All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Russell King <linux@armlinux.org.uk>,
	Ben Skeggs <bskeggs@redhat.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: [PATCH 02/19] drm: Add acquire ctx parameter to ->update_plane
Date: Wed, 22 Mar 2017 22:50:41 +0100	[thread overview]
Message-ID: <20170322215058.8671-3-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <20170322215058.8671-1-daniel.vetter@ffwll.ch>

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>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/armada/armada_overlay.c    | 3 ++-
 drivers/gpu/drm/drm_atomic_helper.c        | 4 +++-
 drivers/gpu/drm/drm_plane.c                | 2 +-
 drivers/gpu/drm/drm_plane_helper.c         | 4 +++-
 drivers/gpu/drm/i915/intel_display.c       | 5 +++--
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c  | 8 +++++---
 drivers/gpu/drm/nouveau/dispnv04/overlay.c | 6 ++++--
 drivers/gpu/drm/shmobile/shmob_drm_plane.c | 3 ++-
 drivers/gpu/drm/vc4/vc4_plane.c            | 6 ++++--
 include/drm/drm_atomic_helper.h            | 3 ++-
 include/drm/drm_plane.h                    | 4 +++-
 include/drm/drm_plane_helper.h             | 3 ++-
 12 files changed, 34 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c
index 34cb73d0db77..b54fd8cbd3a6 100644
--- a/drivers/gpu/drm/armada/armada_overlay.c
+++ b/drivers/gpu/drm/armada/armada_overlay.c
@@ -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);
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 278d72aa012f..8ef7c808670b 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -2078,6 +2078,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.
  *
@@ -2090,7 +2091,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;
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 0d04888172a7..8a4e75929810 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -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;
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index de1ac5e08f4d..2339879f775d 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -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,
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 010e5ddb198a..e27ea89efd67 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -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 @@ intel_legacy_cursor_update(struct drm_plane *plane,
 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 = {
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
index 0ffb8affef35..60a5451ae0b9 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
@@ -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 @@ static int mdp5_update_cursor_plane_legacy(struct drm_plane *plane,
 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)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/overlay.c b/drivers/gpu/drm/nouveau/dispnv04/overlay.c
index 5319f2a7f24d..2d90e7898ec8 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/overlay.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/overlay.c
@@ -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 =
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_plane.c b/drivers/gpu/drm/shmobile/shmob_drm_plane.c
index 2023a93cee2b..9a3c8ddfe198 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_plane.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_plane.c
@@ -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;
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index 0f4564beb017..d34cd5393a9b 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -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 @@ vc4_update_plane(struct drm_plane *plane,
 					      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 = {
diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
index 969f7237f1fc..62ac6053721d 100644
--- a/include/drm/drm_atomic_helper.h
+++ b/include/drm/drm_atomic_helper.h
@@ -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);
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 31da9f0c4ad2..1076fe150cdf 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -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:
diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
index c18959685c06..ea219423d72b 100644
--- a/include/drm/drm_plane_helper.h
+++ b/include/drm/drm_plane_helper.h
@@ -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;
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-03-22 21:50 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-22 21:50 [PATCH 00/19] wire acquire ctx through legacy modeset paths Daniel Vetter
2017-03-22 21:50 ` [PATCH 01/19] drm: Wire up proper acquire ctx for plane functions Daniel Vetter
2017-03-27 20:12   ` Harry Wentland
2017-03-28  6:23     ` Daniel Vetter
2017-03-28  6:46       ` Daniel Vetter
2017-03-28  7:02       ` Daniel Vetter
2017-03-28 14:48         ` Harry Wentland
2017-03-22 21:50 ` Daniel Vetter [this message]
2017-03-22 23:03   ` [PATCH 02/19] drm: Add acquire ctx parameter to ->update_plane Russell King - ARM Linux
2017-03-24  7:07     ` Daniel Vetter
2017-03-22 21:50 ` [PATCH 03/19] drm: drm_plane_force_disable is not for atomic drivers Daniel Vetter
2017-03-22 21:50 ` [PATCH 04/19] drm: Add acquire ctx parameter to ->plane_disable Daniel Vetter
2017-03-22 21:50 ` [PATCH 05/19] drm/atomic-helper: remove backoff hack from disable/update_plane Daniel Vetter
2017-03-22 21:50 ` [PATCH 06/19] drm/vmwgfx: Drop the cursor locking hack Daniel Vetter
2017-03-23  6:22   ` Thomas Hellstrom
2017-03-23  7:28     ` Daniel Vetter
2017-03-23  7:31       ` Daniel Vetter
2017-03-23  8:35         ` Thomas Hellstrom
2017-03-23 10:10           ` Daniel Vetter
2017-03-23 10:32             ` Thomas Hellstrom
2017-03-23 12:56               ` Daniel Vetter
2017-03-27  3:01               ` Michel Dänzer
2017-03-27  6:28                 ` Daniel Vetter
2017-03-27  8:31                   ` Thomas Hellstrom
2017-03-29  8:00                     ` Daniel Vetter
2017-03-29  8:04                       ` Thomas Hellstrom
2017-03-22 21:50 ` [PATCH 07/19] drm/tegra: Don't use modeset_lock_crtc Daniel Vetter
2017-03-27 15:50   ` Daniel Vetter
2017-03-22 21:50 ` [PATCH 08/19] drm/tilcdc: Drop calls to modeset_lock_crtc Daniel Vetter
2017-03-24  9:46   ` Tomi Valkeinen
2017-03-25 21:19     ` Daniel Vetter
2017-03-24 13:34   ` Jyri Sarha
2017-03-22 21:50 ` [PATCH 09/19] drm: Make drm_modeset_lock_crtc internal Daniel Vetter
2017-03-22 21:50 ` [PATCH 10/19] drm: Roll out acquire context for the page_flip ioctl Daniel Vetter
2017-03-22 21:50 ` [PATCH 11/19] drm: Add acquire ctx parameter to ->page_flip(_target) Daniel Vetter
2017-03-22 21:50 ` [PATCH 12/19] drm/atomic-helper: remove backoff hack from page_flip Daniel Vetter
2017-03-22 21:50 ` [PATCH 13/19] drm: simplify the locking in the GETCRTC ioctl Daniel Vetter
2017-03-28  0:13   ` Harry Wentland
2017-03-28  6:27     ` Daniel Vetter
2017-03-28  7:01   ` [PATCH] " Daniel Vetter
2017-03-28 14:41     ` Harry Wentland
2017-03-30  7:36     ` [PATCH] Revert unrelated part of "drm: simplify the locking in the GETCRTC ioctl" Maarten Lankhorst
2017-03-30  7:48       ` Pandiyan, Dhinakaran
2017-03-30  7:56         ` [Intel-gfx] " Daniel Vetter
2017-03-22 21:50 ` [PATCH 14/19] drm: Remove drm_modeset_(un)lock_crtc Daniel Vetter
2017-03-22 21:50 ` [PATCH 15/19] drm: Remove drm_modeset_legacy_acquire_ctx and crtc->acquire_ctx Daniel Vetter
2017-03-22 21:50 ` [PATCH 16/19] drm: Restrict drm_mode_set_config_internal to non-atomic drivers Daniel Vetter
2017-03-22 21:50 ` [PATCH 17/19] drm: Add explicit acquire ctx handling around ->set_config Daniel Vetter
2017-03-22 21:50 ` [PATCH 18/19] drm: Add acquire ctx parameter to ->set_config Daniel Vetter
2017-04-04  0:06   ` Sinclair Yeh
2017-03-22 21:50 ` [PATCH 19/19] drm/atomic-helper: Remove the backoff hack from set_config Daniel Vetter
2017-03-23  9:37 ` ✗ Fi.CI.BAT: warning for wire acquire ctx through legacy modeset paths Patchwork
2017-03-28  0:31 ` [PATCH 00/19] " Harry Wentland
2017-03-28  7:20 ` ✓ Fi.CI.BAT: success for wire acquire ctx through legacy modeset paths (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170322215058.8671-3-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=bskeggs@redhat.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.