drm: Add acquire ctx parameter to ->update_plane
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 22 Mar 2017 21:50:41 +0000 (22:50 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 29 Mar 2017 07:14:01 +0000 (09:14 +0200)
Just rolling it out, no code change here.

Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Eric Anholt <eric@anholt.net>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-3-daniel.vetter@ffwll.ch
12 files changed:
drivers/gpu/drm/armada/armada_overlay.c
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_plane.c
drivers/gpu/drm/drm_plane_helper.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
drivers/gpu/drm/nouveau/dispnv04/overlay.c
drivers/gpu/drm/shmobile/shmob_drm_plane.c
drivers/gpu/drm/vc4/vc4_plane.c
include/drm/drm_atomic_helper.h
include/drm/drm_plane.h
include/drm/drm_plane_helper.h

index 34cb73d0db77b2ab7cb06e26942b40091338da6b..b54fd8cbd3a6b59ab4dbced5307eae0022ce2d4a 100644 (file)
@@ -94,7 +94,8 @@ static int
 armada_ovl_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
        struct drm_framebuffer *fb,
        int crtc_x, int crtc_y, unsigned crtc_w, unsigned crtc_h,
-       uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h)
+       uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h,
+       struct drm_modeset_acquire_ctx *ctx)
 {
        struct armada_ovl_plane *dplane = drm_to_armada_ovl_plane(plane);
        struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
index c3ace44e1c8edaa59c33a709898eea7675c85e6a..e552687dcac659317d6521c72f33e2933a8472b5 100644 (file)
@@ -2077,6 +2077,7 @@ EXPORT_SYMBOL(drm_atomic_helper_swap_state);
  * @src_y: y offset of @fb for panning
  * @src_w: width of source rectangle in @fb
  * @src_h: height of source rectangle in @fb
+ * @ctx: lock acquire context
  *
  * Provides a default plane update handler using the atomic driver interface.
  *
@@ -2089,7 +2090,8 @@ int drm_atomic_helper_update_plane(struct drm_plane *plane,
                                   int crtc_x, int crtc_y,
                                   unsigned int crtc_w, unsigned int crtc_h,
                                   uint32_t src_x, uint32_t src_y,
-                                  uint32_t src_w, uint32_t src_h)
+                                  uint32_t src_w, uint32_t src_h,
+                                  struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_atomic_state *state;
        struct drm_plane_state *plane_state;
index 0d04888172a78ce891660f6877d8c342914e720d..8a4e75929810f3c8874eb00e0f896495fdb7c365 100644 (file)
@@ -510,7 +510,7 @@ static int __setplane_internal(struct drm_plane *plane,
        plane->old_fb = plane->fb;
        ret = plane->funcs->update_plane(plane, crtc, fb,
                                         crtc_x, crtc_y, crtc_w, crtc_h,
-                                        src_x, src_y, src_w, src_h);
+                                        src_x, src_y, src_w, src_h, ctx);
        if (!ret) {
                plane->crtc = crtc;
                plane->fb = fb;
index de1ac5e08f4d160b4e49739ee7a16eef3c9b1936..2339879f775d7f3b6436903c25563ab4e88f51b9 100644 (file)
@@ -275,6 +275,7 @@ EXPORT_SYMBOL(drm_plane_helper_check_update);
  * @src_y: y offset of @fb for panning
  * @src_w: width of source rectangle in @fb
  * @src_h: height of source rectangle in @fb
+ * @ctx: lock acquire context, not used here
  *
  * Provides a default plane update handler for primary planes.  This is handler
  * is called in response to a userspace SetPlane operation on the plane with a
@@ -303,7 +304,8 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
                              int crtc_x, int crtc_y,
                              unsigned int crtc_w, unsigned int crtc_h,
                              uint32_t src_x, uint32_t src_y,
-                             uint32_t src_w, uint32_t src_h)
+                             uint32_t src_w, uint32_t src_h,
+                             struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_mode_set set = {
                .crtc = crtc,
index 010e5ddb198adad2db7527385b4d5cd4c0773e0b..e27ea89efd6788b47087467c29b0f991ae8d2ffd 100644 (file)
@@ -13426,7 +13426,8 @@ intel_legacy_cursor_update(struct drm_plane *plane,
                           int crtc_x, int crtc_y,
                           unsigned int crtc_w, unsigned int crtc_h,
                           uint32_t src_x, uint32_t src_y,
-                          uint32_t src_w, uint32_t src_h)
+                          uint32_t src_w, uint32_t src_h,
+                          struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_i915_private *dev_priv = to_i915(crtc->dev);
        int ret;
@@ -13539,7 +13540,7 @@ out_free:
 slow:
        return drm_atomic_helper_update_plane(plane, crtc, fb,
                                              crtc_x, crtc_y, crtc_w, crtc_h,
-                                             src_x, src_y, src_w, src_h);
+                                             src_x, src_y, src_w, src_h, ctx);
 }
 
 static const struct drm_plane_funcs intel_cursor_plane_funcs = {
index 0ffb8affef35848b458b77ce145478e7a9638a2b..60a5451ae0b9caeaaccae0c9066585e232752f0a 100644 (file)
@@ -37,7 +37,8 @@ static int mdp5_update_cursor_plane_legacy(struct drm_plane *plane,
                int crtc_x, int crtc_y,
                unsigned int crtc_w, unsigned int crtc_h,
                uint32_t src_x, uint32_t src_y,
-               uint32_t src_w, uint32_t src_h);
+               uint32_t src_w, uint32_t src_h,
+               struct drm_modeset_acquire_ctx *ctx);
 
 static void set_scanout_locked(struct drm_plane *plane,
                struct drm_framebuffer *fb);
@@ -886,7 +887,8 @@ static int mdp5_update_cursor_plane_legacy(struct drm_plane *plane,
                        int crtc_x, int crtc_y,
                        unsigned int crtc_w, unsigned int crtc_h,
                        uint32_t src_x, uint32_t src_y,
-                       uint32_t src_w, uint32_t src_h)
+                       uint32_t src_w, uint32_t src_h,
+                       struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_plane_state *plane_state, *new_plane_state;
        struct mdp5_plane_state *mdp5_pstate;
@@ -954,7 +956,7 @@ slow_free:
 slow:
        return drm_atomic_helper_update_plane(plane, crtc, fb,
                                              crtc_x, crtc_y, crtc_w, crtc_h,
-                                             src_x, src_y, src_w, src_h);
+                                             src_x, src_y, src_w, src_h, ctx);
 }
 
 enum mdp5_pipe mdp5_plane_pipe(struct drm_plane *plane)
index 5319f2a7f24d28aeed7c2100321518ad660fd6d1..2d90e7898ec841dc882051160b5b386313c557b8 100644 (file)
@@ -94,7 +94,8 @@ nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
                  struct drm_framebuffer *fb, int crtc_x, int crtc_y,
                  unsigned int crtc_w, unsigned int crtc_h,
                  uint32_t src_x, uint32_t src_y,
-                 uint32_t src_w, uint32_t src_h)
+                 uint32_t src_w, uint32_t src_h,
+                 struct drm_modeset_acquire_ctx *ctx)
 {
        struct nouveau_drm *drm = nouveau_drm(plane->dev);
        struct nvif_object *dev = &drm->client.device.object;
@@ -345,7 +346,8 @@ nv04_update_plane(struct drm_plane *plane, struct drm_crtc *crtc,
                  struct drm_framebuffer *fb, int crtc_x, int crtc_y,
                  unsigned int crtc_w, unsigned int crtc_h,
                  uint32_t src_x, uint32_t src_y,
-                 uint32_t src_w, uint32_t src_h)
+                 uint32_t src_w, uint32_t src_h,
+                 struct drm_modeset_acquire_ctx *ctx)
 {
        struct nvif_object *dev = &nouveau_drm(plane->dev)->client.device.object;
        struct nouveau_plane *nv_plane =
index 2023a93cee2b40a925a9463588ce5f4c1268c579..9a3c8ddfe198e56ce242bf7c1ee53bc37e6bceaf 100644 (file)
@@ -177,7 +177,8 @@ shmob_drm_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
                       struct drm_framebuffer *fb, int crtc_x, int crtc_y,
                       unsigned int crtc_w, unsigned int crtc_h,
                       uint32_t src_x, uint32_t src_y,
-                      uint32_t src_w, uint32_t src_h)
+                      uint32_t src_w, uint32_t src_h,
+                      struct drm_modeset_acquire_ctx *ctx)
 {
        struct shmob_drm_plane *splane = to_shmob_plane(plane);
        struct shmob_drm_device *sdev = plane->dev->dev_private;
index 0f4564beb0179a1f9126389435eab09ab2f1a487..d34cd5393a9b021f851fab8b16b042e84e99f6c4 100644 (file)
@@ -756,7 +756,8 @@ vc4_update_plane(struct drm_plane *plane,
                 int crtc_x, int crtc_y,
                 unsigned int crtc_w, unsigned int crtc_h,
                 uint32_t src_x, uint32_t src_y,
-                uint32_t src_w, uint32_t src_h)
+                uint32_t src_w, uint32_t src_h,
+                struct drm_modeset_acquire_ctx *ctx)
 {
        struct drm_plane_state *plane_state;
        struct vc4_plane_state *vc4_state;
@@ -817,7 +818,8 @@ out:
                                              crtc_x, crtc_y,
                                              crtc_w, crtc_h,
                                              src_x, src_y,
-                                             src_w, src_h);
+                                             src_w, src_h,
+                                             ctx);
 }
 
 static const struct drm_plane_funcs vc4_plane_funcs = {
index 969f7237f1fcd22aff19157a098123c525746e31..62ac6053721d264f32cc14bfec332bd01d83c75b 100644 (file)
@@ -94,7 +94,8 @@ int drm_atomic_helper_update_plane(struct drm_plane *plane,
                                   int crtc_x, int crtc_y,
                                   unsigned int crtc_w, unsigned int crtc_h,
                                   uint32_t src_x, uint32_t src_y,
-                                  uint32_t src_w, uint32_t src_h);
+                                  uint32_t src_w, uint32_t src_h,
+                                  struct drm_modeset_acquire_ctx *ctx);
 int drm_atomic_helper_disable_plane(struct drm_plane *plane);
 int __drm_atomic_helper_disable_plane(struct drm_plane *plane,
                struct drm_plane_state *plane_state);
index 7aedbf34f3a6a6b5163249c3ba2afdc8103f0378..ab3bdfb897c43057044352bcf58692b255abf6c5 100644 (file)
@@ -29,6 +29,7 @@
 
 struct drm_crtc;
 struct drm_printer;
+struct drm_modeset_acquire_ctx;
 
 /**
  * struct drm_plane_state - mutable plane state
@@ -184,7 +185,8 @@ struct drm_plane_funcs {
                            int crtc_x, int crtc_y,
                            unsigned int crtc_w, unsigned int crtc_h,
                            uint32_t src_x, uint32_t src_y,
-                           uint32_t src_w, uint32_t src_h);
+                           uint32_t src_w, uint32_t src_h,
+                           struct drm_modeset_acquire_ctx *ctx);
 
        /**
         * @disable_plane:
index c18959685c06c301ffae57084a4a1f0a9805d98d..ea219423d72ba76e311165822ef3bd3904fb5dd2 100644 (file)
@@ -61,7 +61,8 @@ int drm_primary_helper_update(struct drm_plane *plane,
                              int crtc_x, int crtc_y,
                              unsigned int crtc_w, unsigned int crtc_h,
                              uint32_t src_x, uint32_t src_y,
-                             uint32_t src_w, uint32_t src_h);
+                             uint32_t src_w, uint32_t src_h,
+                             struct drm_modeset_acquire_ctx *ctx);
 int drm_primary_helper_disable(struct drm_plane *plane);
 void drm_primary_helper_destroy(struct drm_plane *plane);
 extern const struct drm_plane_funcs drm_primary_helper_funcs;