All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@linux.ie, daniel@ffwll.ch, alexander.deucher@amd.com,
	christian.koenig@amd.com, David1.Zhou@amd.com,
	maarten.lankhorst@linux.intel.com, patrik.r.jakobsson@gmail.com,
	robdclark@gmail.com, sean@poorly.run,
	benjamin.gaignard@linaro.org, vincent.abriou@st.com,
	yannick.fertre@st.com, philippe.cornu@st.com,
	mcoquelin.stm32@gmail.com, alexandre.torgue@st.com,
	eric@anholt.net, rodrigosiqueiramelo@gmail.com,
	hamohammed.sa@gmail.com, linux-graphics-maintainer@vmware.com,
	thellstrom@vmware.com, bskeggs@redhat.com,
	harry.wentland@amd.com, sunpeng.li@amd.com,
	jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
	rodrigo.vivi@intel.com
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
	freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 04/23] drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
Date: Fri, 10 Jan 2020 10:21:08 +0100	[thread overview]
Message-ID: <20200110092127.27847-5-tzimmermann@suse.de> (raw)
In-Reply-To: <20200110092127.27847-1-tzimmermann@suse.de>

The callback struct drm_driver.get_scanout_position() is deprecated in
favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert
nouveau over.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/nouveau/dispnv04/crtc.c   |  1 +
 drivers/gpu/drm/nouveau/dispnv50/head.c   |  1 +
 drivers/gpu/drm/nouveau/nouveau_display.c | 14 +++-----------
 drivers/gpu/drm/nouveau/nouveau_display.h |  2 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c     |  1 -
 5 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 37c50ea8f847..17e9d1c078a0 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -1258,6 +1258,7 @@ static const struct drm_crtc_helper_funcs nv04_crtc_helper_funcs = {
 	.mode_set_base = nv04_crtc_mode_set_base,
 	.mode_set_base_atomic = nv04_crtc_mode_set_base_atomic,
 	.disable = nv_crtc_disable,
+	.get_scanout_position = nouveau_display_scanoutpos,
 };
 
 static const uint32_t modeset_formats[] = {
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c
index c9692df2b76c..1354d19d9a18 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head.c
@@ -403,6 +403,7 @@ nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state)
 static const struct drm_crtc_helper_funcs
 nv50_head_help = {
 	.atomic_check = nv50_head_atomic_check,
+	.get_scanout_position = nouveau_display_scanoutpos,
 };
 
 static void
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 53f9bceaf17a..86f99dc8fcef 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -136,21 +136,13 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
 }
 
 bool
-nouveau_display_scanoutpos(struct drm_device *dev, unsigned int pipe,
+nouveau_display_scanoutpos(struct drm_crtc *crtc,
 			   bool in_vblank_irq, int *vpos, int *hpos,
 			   ktime_t *stime, ktime_t *etime,
 			   const struct drm_display_mode *mode)
 {
-	struct drm_crtc *crtc;
-
-	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
-		if (nouveau_crtc(crtc)->index == pipe) {
-			return nouveau_display_scanoutpos_head(crtc, vpos, hpos,
-							       stime, etime);
-		}
-	}
-
-	return false;
+	return nouveau_display_scanoutpos_head(crtc, vpos, hpos,
+					       stime, etime);
 }
 
 static void
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
index 6e8e66882e45..71e2af693f7f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.h
+++ b/drivers/gpu/drm/nouveau/nouveau_display.h
@@ -63,7 +63,7 @@ int  nouveau_display_suspend(struct drm_device *dev, bool runtime);
 void nouveau_display_resume(struct drm_device *dev, bool runtime);
 int  nouveau_display_vblank_enable(struct drm_device *, unsigned int);
 void nouveau_display_vblank_disable(struct drm_device *, unsigned int);
-bool  nouveau_display_scanoutpos(struct drm_device *, unsigned int,
+bool  nouveau_display_scanoutpos(struct drm_crtc *,
 				 bool, int *, int *, ktime_t *,
 				 ktime_t *, const struct drm_display_mode *);
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 2cd83849600f..9fb38a018240 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1123,7 +1123,6 @@ driver_stub = {
 
 	.enable_vblank = nouveau_display_vblank_enable,
 	.disable_vblank = nouveau_display_vblank_disable,
-	.get_scanout_position = nouveau_display_scanoutpos,
 	.get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos,
 
 	.ioctls = nouveau_ioctls,
-- 
2.24.1


WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@linux.ie, daniel@ffwll.ch, alexander.deucher@amd.com,
	christian.koenig@amd.com, David1.Zhou@amd.com,
	maarten.lankhorst@linux.intel.com, patrik.r.jakobsson@gmail.com,
	robdclark@gmail.com, sean@poorly.run,
	benjamin.gaignard@linaro.org, vincent.abriou@st.com,
	yannick.fertre@st.com, philippe.cornu@st.com,
	mcoquelin.stm32@gmail.com, alexandre.torgue@st.com,
	eric@anholt.net, rodrigosiqueiramelo@gmail.com,
	hamohammed.sa@gmail.com, linux-graphics-maintainer@vmware.com,
	thellstrom@vmware.com, bskeggs@redhat.com,
	harry.wentland@amd.com, sunpeng.li@amd.com,
	jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
	rodrigo.vivi@intel.com
Cc: linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	nouveau@lists.freedesktop.org, freedreno@lists.freedesktop.org
Subject: [PATCH 04/23] drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
Date: Fri, 10 Jan 2020 10:21:08 +0100	[thread overview]
Message-ID: <20200110092127.27847-5-tzimmermann@suse.de> (raw)
In-Reply-To: <20200110092127.27847-1-tzimmermann@suse.de>

The callback struct drm_driver.get_scanout_position() is deprecated in
favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert
nouveau over.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/nouveau/dispnv04/crtc.c   |  1 +
 drivers/gpu/drm/nouveau/dispnv50/head.c   |  1 +
 drivers/gpu/drm/nouveau/nouveau_display.c | 14 +++-----------
 drivers/gpu/drm/nouveau/nouveau_display.h |  2 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c     |  1 -
 5 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 37c50ea8f847..17e9d1c078a0 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -1258,6 +1258,7 @@ static const struct drm_crtc_helper_funcs nv04_crtc_helper_funcs = {
 	.mode_set_base = nv04_crtc_mode_set_base,
 	.mode_set_base_atomic = nv04_crtc_mode_set_base_atomic,
 	.disable = nv_crtc_disable,
+	.get_scanout_position = nouveau_display_scanoutpos,
 };
 
 static const uint32_t modeset_formats[] = {
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c
index c9692df2b76c..1354d19d9a18 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head.c
@@ -403,6 +403,7 @@ nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state)
 static const struct drm_crtc_helper_funcs
 nv50_head_help = {
 	.atomic_check = nv50_head_atomic_check,
+	.get_scanout_position = nouveau_display_scanoutpos,
 };
 
 static void
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 53f9bceaf17a..86f99dc8fcef 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -136,21 +136,13 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
 }
 
 bool
-nouveau_display_scanoutpos(struct drm_device *dev, unsigned int pipe,
+nouveau_display_scanoutpos(struct drm_crtc *crtc,
 			   bool in_vblank_irq, int *vpos, int *hpos,
 			   ktime_t *stime, ktime_t *etime,
 			   const struct drm_display_mode *mode)
 {
-	struct drm_crtc *crtc;
-
-	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
-		if (nouveau_crtc(crtc)->index == pipe) {
-			return nouveau_display_scanoutpos_head(crtc, vpos, hpos,
-							       stime, etime);
-		}
-	}
-
-	return false;
+	return nouveau_display_scanoutpos_head(crtc, vpos, hpos,
+					       stime, etime);
 }
 
 static void
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
index 6e8e66882e45..71e2af693f7f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.h
+++ b/drivers/gpu/drm/nouveau/nouveau_display.h
@@ -63,7 +63,7 @@ int  nouveau_display_suspend(struct drm_device *dev, bool runtime);
 void nouveau_display_resume(struct drm_device *dev, bool runtime);
 int  nouveau_display_vblank_enable(struct drm_device *, unsigned int);
 void nouveau_display_vblank_disable(struct drm_device *, unsigned int);
-bool  nouveau_display_scanoutpos(struct drm_device *, unsigned int,
+bool  nouveau_display_scanoutpos(struct drm_crtc *,
 				 bool, int *, int *, ktime_t *,
 				 ktime_t *, const struct drm_display_mode *);
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 2cd83849600f..9fb38a018240 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1123,7 +1123,6 @@ driver_stub = {
 
 	.enable_vblank = nouveau_display_vblank_enable,
 	.disable_vblank = nouveau_display_vblank_disable,
-	.get_scanout_position = nouveau_display_scanoutpos,
 	.get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos,
 
 	.ioctls = nouveau_ioctls,
-- 
2.24.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@linux.ie, daniel@ffwll.ch, alexander.deucher@amd.com,
	christian.koenig@amd.com, David1.Zhou@amd.com,
	maarten.lankhorst@linux.intel.com, patrik.r.jakobsson@gmail.com,
	robdclark@gmail.com, sean@poorly.run,
	benjamin.gaignard@linaro.org, vincent.abriou@st.com,
	yannick.fertre@st.com, philippe.cornu@st.com,
	mcoquelin.stm32@gmail.com, alexandre.torgue@st.com,
	eric@anholt.net, rodrigosiqueiramelo@gmail.com,
	hamohammed.sa@gmail.com, linux-graphics-maintainer@vmware.com,
	thellstrom@vmware.com, bskeggs@redhat.com,
	harry.wentland@amd.com, sunpeng.li@amd.com,
	jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
	rodrigo.vivi@intel.com
Cc: linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	nouveau@lists.freedesktop.org, freedreno@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 04/23] drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
Date: Fri, 10 Jan 2020 10:21:08 +0100	[thread overview]
Message-ID: <20200110092127.27847-5-tzimmermann@suse.de> (raw)
In-Reply-To: <20200110092127.27847-1-tzimmermann@suse.de>

The callback struct drm_driver.get_scanout_position() is deprecated in
favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert
nouveau over.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/nouveau/dispnv04/crtc.c   |  1 +
 drivers/gpu/drm/nouveau/dispnv50/head.c   |  1 +
 drivers/gpu/drm/nouveau/nouveau_display.c | 14 +++-----------
 drivers/gpu/drm/nouveau/nouveau_display.h |  2 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c     |  1 -
 5 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 37c50ea8f847..17e9d1c078a0 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -1258,6 +1258,7 @@ static const struct drm_crtc_helper_funcs nv04_crtc_helper_funcs = {
 	.mode_set_base = nv04_crtc_mode_set_base,
 	.mode_set_base_atomic = nv04_crtc_mode_set_base_atomic,
 	.disable = nv_crtc_disable,
+	.get_scanout_position = nouveau_display_scanoutpos,
 };
 
 static const uint32_t modeset_formats[] = {
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c
index c9692df2b76c..1354d19d9a18 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head.c
@@ -403,6 +403,7 @@ nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state)
 static const struct drm_crtc_helper_funcs
 nv50_head_help = {
 	.atomic_check = nv50_head_atomic_check,
+	.get_scanout_position = nouveau_display_scanoutpos,
 };
 
 static void
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 53f9bceaf17a..86f99dc8fcef 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -136,21 +136,13 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
 }
 
 bool
-nouveau_display_scanoutpos(struct drm_device *dev, unsigned int pipe,
+nouveau_display_scanoutpos(struct drm_crtc *crtc,
 			   bool in_vblank_irq, int *vpos, int *hpos,
 			   ktime_t *stime, ktime_t *etime,
 			   const struct drm_display_mode *mode)
 {
-	struct drm_crtc *crtc;
-
-	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
-		if (nouveau_crtc(crtc)->index == pipe) {
-			return nouveau_display_scanoutpos_head(crtc, vpos, hpos,
-							       stime, etime);
-		}
-	}
-
-	return false;
+	return nouveau_display_scanoutpos_head(crtc, vpos, hpos,
+					       stime, etime);
 }
 
 static void
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
index 6e8e66882e45..71e2af693f7f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.h
+++ b/drivers/gpu/drm/nouveau/nouveau_display.h
@@ -63,7 +63,7 @@ int  nouveau_display_suspend(struct drm_device *dev, bool runtime);
 void nouveau_display_resume(struct drm_device *dev, bool runtime);
 int  nouveau_display_vblank_enable(struct drm_device *, unsigned int);
 void nouveau_display_vblank_disable(struct drm_device *, unsigned int);
-bool  nouveau_display_scanoutpos(struct drm_device *, unsigned int,
+bool  nouveau_display_scanoutpos(struct drm_crtc *,
 				 bool, int *, int *, ktime_t *,
 				 ktime_t *, const struct drm_display_mode *);
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 2cd83849600f..9fb38a018240 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1123,7 +1123,6 @@ driver_stub = {
 
 	.enable_vblank = nouveau_display_vblank_enable,
 	.disable_vblank = nouveau_display_vblank_disable,
-	.get_scanout_position = nouveau_display_scanoutpos,
 	.get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos,
 
 	.ioctls = nouveau_ioctls,
-- 
2.24.1

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

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@linux.ie, daniel@ffwll.ch, alexander.deucher@amd.com,
	christian.koenig@amd.com, David1.Zhou@amd.com,
	maarten.lankhorst@linux.intel.com, patrik.r.jakobsson@gmail.com,
	robdclark@gmail.com, sean@poorly.run,
	benjamin.gaignard@linaro.org, vincent.abriou@st.com,
	yannick.fertre@st.com, philippe.cornu@st.com,
	mcoquelin.stm32@gmail.com, alexandre.torgue@st.com,
	eric@anholt.net, rodrigosiqueiramelo@gmail.com,
	hamohammed.sa@gmail.com, linux-graphics-maintainer@vmware.com,
	thellstrom@vmware.com, bskeggs@redhat.com,
	harry.wentland@amd.com, sunpeng.li@amd.com,
	jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
	rodrigo.vivi@intel.com
Cc: linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	nouveau@lists.freedesktop.org, freedreno@lists.freedesktop.org
Subject: [PATCH 04/23] drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position()
Date: Fri, 10 Jan 2020 10:21:08 +0100	[thread overview]
Message-ID: <20200110092127.27847-5-tzimmermann@suse.de> (raw)
In-Reply-To: <20200110092127.27847-1-tzimmermann@suse.de>

The callback struct drm_driver.get_scanout_position() is deprecated in
favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert
nouveau over.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/nouveau/dispnv04/crtc.c   |  1 +
 drivers/gpu/drm/nouveau/dispnv50/head.c   |  1 +
 drivers/gpu/drm/nouveau/nouveau_display.c | 14 +++-----------
 drivers/gpu/drm/nouveau/nouveau_display.h |  2 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c     |  1 -
 5 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 37c50ea8f847..17e9d1c078a0 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -1258,6 +1258,7 @@ static const struct drm_crtc_helper_funcs nv04_crtc_helper_funcs = {
 	.mode_set_base = nv04_crtc_mode_set_base,
 	.mode_set_base_atomic = nv04_crtc_mode_set_base_atomic,
 	.disable = nv_crtc_disable,
+	.get_scanout_position = nouveau_display_scanoutpos,
 };
 
 static const uint32_t modeset_formats[] = {
diff --git a/drivers/gpu/drm/nouveau/dispnv50/head.c b/drivers/gpu/drm/nouveau/dispnv50/head.c
index c9692df2b76c..1354d19d9a18 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/head.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/head.c
@@ -403,6 +403,7 @@ nv50_head_atomic_check(struct drm_crtc *crtc, struct drm_crtc_state *state)
 static const struct drm_crtc_helper_funcs
 nv50_head_help = {
 	.atomic_check = nv50_head_atomic_check,
+	.get_scanout_position = nouveau_display_scanoutpos,
 };
 
 static void
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 53f9bceaf17a..86f99dc8fcef 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -136,21 +136,13 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
 }
 
 bool
-nouveau_display_scanoutpos(struct drm_device *dev, unsigned int pipe,
+nouveau_display_scanoutpos(struct drm_crtc *crtc,
 			   bool in_vblank_irq, int *vpos, int *hpos,
 			   ktime_t *stime, ktime_t *etime,
 			   const struct drm_display_mode *mode)
 {
-	struct drm_crtc *crtc;
-
-	list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
-		if (nouveau_crtc(crtc)->index == pipe) {
-			return nouveau_display_scanoutpos_head(crtc, vpos, hpos,
-							       stime, etime);
-		}
-	}
-
-	return false;
+	return nouveau_display_scanoutpos_head(crtc, vpos, hpos,
+					       stime, etime);
 }
 
 static void
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.h b/drivers/gpu/drm/nouveau/nouveau_display.h
index 6e8e66882e45..71e2af693f7f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.h
+++ b/drivers/gpu/drm/nouveau/nouveau_display.h
@@ -63,7 +63,7 @@ int  nouveau_display_suspend(struct drm_device *dev, bool runtime);
 void nouveau_display_resume(struct drm_device *dev, bool runtime);
 int  nouveau_display_vblank_enable(struct drm_device *, unsigned int);
 void nouveau_display_vblank_disable(struct drm_device *, unsigned int);
-bool  nouveau_display_scanoutpos(struct drm_device *, unsigned int,
+bool  nouveau_display_scanoutpos(struct drm_crtc *,
 				 bool, int *, int *, ktime_t *,
 				 ktime_t *, const struct drm_display_mode *);
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 2cd83849600f..9fb38a018240 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -1123,7 +1123,6 @@ driver_stub = {
 
 	.enable_vblank = nouveau_display_vblank_enable,
 	.disable_vblank = nouveau_display_vblank_disable,
-	.get_scanout_position = nouveau_display_scanoutpos,
 	.get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos,
 
 	.ioctls = nouveau_ioctls,
-- 
2.24.1

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

  parent reply	other threads:[~2020-01-10  9:21 UTC|newest]

Thread overview: 217+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10  9:21 [PATCH 00/23] drm: Clean up VBLANK callbacks in struct drm_driver Thomas Zimmermann
2020-01-10  9:21 ` Thomas Zimmermann
2020-01-10  9:21 ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21 ` Thomas Zimmermann
2020-01-10  9:21 ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 01/23] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10 10:24   ` Jani Nikula
2020-01-10 10:24     ` Jani Nikula
2020-01-10 10:24     ` [Intel-gfx] " Jani Nikula
2020-01-10 10:24     ` Jani Nikula
2020-01-10 10:24     ` Jani Nikula
2020-01-14 15:31   ` Yannick FERTRE
2020-01-14 15:31     ` Yannick FERTRE
2020-01-14 15:31     ` [Intel-gfx] " Yannick FERTRE
2020-01-14 15:31     ` Yannick FERTRE
2020-01-15  7:31     ` Thomas Zimmermann
2020-01-15  7:31       ` Thomas Zimmermann
2020-01-15  7:31       ` [Intel-gfx] " Thomas Zimmermann
2020-01-15  7:31       ` Thomas Zimmermann
2020-01-15  7:31       ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-13 18:52   ` Alex Deucher
2020-01-13 18:52     ` Alex Deucher
2020-01-13 18:52     ` [Intel-gfx] " Alex Deucher
2020-01-13 18:52     ` Alex Deucher
2020-01-13 18:52     ` Alex Deucher
2020-01-14  7:46     ` Thomas Zimmermann
2020-01-14  7:46       ` Thomas Zimmermann
2020-01-14  7:46       ` [Intel-gfx] " Thomas Zimmermann
2020-01-14  7:46       ` Thomas Zimmermann
2020-01-14  7:46       ` Thomas Zimmermann
2020-01-15  9:41     ` Thomas Zimmermann
2020-01-15  9:41       ` Thomas Zimmermann
2020-01-15  9:41       ` [Intel-gfx] " Thomas Zimmermann
2020-01-15  9:41       ` Thomas Zimmermann
2020-01-15  9:41       ` Thomas Zimmermann
2020-01-15 16:35       ` Alex Deucher
2020-01-15 16:35         ` Alex Deucher
2020-01-15 16:35         ` [Intel-gfx] " Alex Deucher
2020-01-15 16:35         ` Alex Deucher
2020-01-15 16:35         ` Alex Deucher
2020-01-10  9:21 ` [PATCH 03/23] drm/i915: Don't use struct drm_driver.get_scanout_position() Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10 11:59   ` Jani Nikula
2020-01-10 11:59     ` Jani Nikula
2020-01-10 11:59     ` [Intel-gfx] " Jani Nikula
2020-01-10 11:59     ` Jani Nikula
2020-01-10 11:59     ` Jani Nikula
2020-01-10 12:04     ` Thomas Zimmermann
2020-01-10 12:04       ` Thomas Zimmermann
2020-01-10 12:04       ` [Intel-gfx] " Thomas Zimmermann
2020-01-10 12:04       ` Thomas Zimmermann
2020-01-10 12:04       ` Thomas Zimmermann
2020-01-10 13:56       ` Jani Nikula
2020-01-10 13:56         ` Jani Nikula
2020-01-10 13:56         ` [Intel-gfx] " Jani Nikula
2020-01-10 13:56         ` Jani Nikula
2020-01-10 13:56         ` Jani Nikula
2020-01-10 15:25         ` Ville Syrjälä
2020-01-10 15:25           ` Ville Syrjälä
2020-01-10 15:25           ` [Intel-gfx] " Ville Syrjälä
2020-01-10 15:25           ` Ville Syrjälä
2020-01-10 15:25           ` Ville Syrjälä
2020-01-10  9:21 ` Thomas Zimmermann [this message]
2020-01-10  9:21   ` [PATCH 04/23] drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 05/23] drm/radeon: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-13 18:53   ` Alex Deucher
2020-01-13 18:53     ` Alex Deucher
2020-01-13 18:53     ` [Intel-gfx] " Alex Deucher
2020-01-13 18:53     ` Alex Deucher
2020-01-13 18:53     ` Alex Deucher
2020-01-10  9:21 ` [PATCH 06/23] drm/msm: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 07/23] drm/vc4: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 08/23] drm/stm: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-14 15:31   ` Yannick FERTRE
2020-01-14 15:31     ` Yannick FERTRE
2020-01-14 15:31     ` [Intel-gfx] " Yannick FERTRE
2020-01-14 15:31     ` Yannick FERTRE
2020-01-10  9:21 ` [PATCH 09/23] drm: Remove struct drm_driver.get_scanout_position() Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-14 15:32   ` Yannick FERTRE
2020-01-14 15:32     ` Yannick FERTRE
2020-01-14 15:32     ` [Intel-gfx] " Yannick FERTRE
2020-01-14 15:32     ` Yannick FERTRE
2020-01-10  9:21 ` [PATCH 10/23] drm: Evaluate struct drm_device.vblank_disable_immediate on each use Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 11/23] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 12/23] drm/amdgpu: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-13 19:00   ` Alex Deucher
2020-01-13 19:00     ` Alex Deucher
2020-01-13 19:00     ` [Intel-gfx] " Alex Deucher
2020-01-13 19:00     ` Alex Deucher
2020-01-13 19:00     ` Alex Deucher
2020-01-10  9:21 ` [PATCH 13/23] drm/gma500: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 14/23] drm/i915: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 15/23] drm/msm: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 16/23] drm/nouveau: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 17/23] drm/radeon: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-13 19:02   ` Alex Deucher
2020-01-13 19:02     ` Alex Deucher
2020-01-13 19:02     ` [Intel-gfx] " Alex Deucher
2020-01-13 19:02     ` Alex Deucher
2020-01-13 19:02     ` Alex Deucher
2020-01-10  9:21 ` [PATCH 18/23] drm/sti: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10 13:38   ` Benjamin Gaignard
2020-01-10 13:38     ` Benjamin Gaignard
2020-01-10 13:38     ` [Intel-gfx] " Benjamin Gaignard
2020-01-10 13:38     ` Benjamin Gaignard
2020-01-10 13:38     ` Benjamin Gaignard
2020-01-10  9:21 ` [PATCH 19/23] drm/stm: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-14 15:32   ` Yannick FERTRE
2020-01-14 15:32     ` Yannick FERTRE
2020-01-14 15:32     ` [Intel-gfx] " Yannick FERTRE
2020-01-14 15:32     ` Yannick FERTRE
2020-01-10  9:21 ` [PATCH 20/23] drm/vc4: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 21/23] drm/vkms: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 22/23] drm/vmwgfx: " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21 ` [PATCH 23/23] drm: Cleanup VBLANK callbacks in struct drm_driver Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-10  9:21   ` [Intel-gfx] " Thomas Zimmermann
2020-01-10  9:21   ` Thomas Zimmermann
2020-01-12 22:53   ` Daniel Vetter
2020-01-12 22:53     ` Daniel Vetter
2020-01-12 22:53     ` [Intel-gfx] " Daniel Vetter
2020-01-12 22:53     ` Daniel Vetter
2020-01-12 22:53     ` Daniel Vetter
2020-01-12 22:54     ` Daniel Vetter
2020-01-12 22:54       ` Daniel Vetter
2020-01-12 22:54       ` [Intel-gfx] " Daniel Vetter
2020-01-12 22:54       ` Daniel Vetter
2020-01-12 22:54       ` Daniel Vetter
2020-01-14 13:48     ` Thomas Zimmermann
2020-01-14 13:48       ` Thomas Zimmermann
2020-01-14 13:48       ` [Intel-gfx] " Thomas Zimmermann
2020-01-14 13:48       ` Thomas Zimmermann
2020-01-14 15:32   ` Yannick FERTRE
2020-01-14 15:32     ` Yannick FERTRE
2020-01-14 15:32     ` [Intel-gfx] " Yannick FERTRE
2020-01-14 15:32     ` Yannick FERTRE
2020-01-10  9:40 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Clean up " Patchwork
2020-01-10  9:49 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-01-10 10:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-01-13 12:57 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-01-14 18:09 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm: Clean up VBLANK callbacks in struct drm_driver (rev6) 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=20200110092127.27847-5-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=David1.Zhou@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=alexandre.torgue@st.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=benjamin.gaignard@linaro.org \
    --cc=bskeggs@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=freedreno@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=patrik.r.jakobsson@gmail.com \
    --cc=philippe.cornu@st.com \
    --cc=robdclark@gmail.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=sean@poorly.run \
    --cc=sunpeng.li@amd.com \
    --cc=thellstrom@vmware.com \
    --cc=vincent.abriou@st.com \
    --cc=yannick.fertre@st.com \
    /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.