All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yannick FERTRE <yannick.fertre@st.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"alexander.deucher@amd.com" <alexander.deucher@amd.com>,
	"christian.koenig@amd.com" <christian.koenig@amd.com>,
	"David1.Zhou@amd.com" <David1.Zhou@amd.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"patrik.r.jakobsson@gmail.com" <patrik.r.jakobsson@gmail.com>,
	"robdclark@gmail.com" <robdclark@gmail.com>,
	"sean@poorly.run" <sean@poorly.run>,
	"benjamin.gaignard@linaro.org" <benjamin.gaignard@linaro.org>,
	Vincent ABRIOU <vincent.abriou@st.com>,
	Philippe CORNU <philippe.cornu@st.com>,
	"mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>,
	Alexandre TORGUE <alexandre.torgue@st.com>,
	"eric@anholt.net" <eric@anholt.net>,
	"rodrigosiqueiramelo@gmail.com" <rodrigosiqueiramelo@gmail.com>,
	"hamohammed.sa@gmail.com" <hamohammed.sa@gma>
Cc: "linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
	"freedreno@lists.freedesktop.org"
	<freedreno@lists.freedesktop.org>
Subject: Re: [PATCH 09/23] drm: Remove struct drm_driver.get_scanout_position()
Date: Tue, 14 Jan 2020 15:32:24 +0000	[thread overview]
Message-ID: <b851a33e-651b-03f3-9942-9008e70ba74b@st.com> (raw)
In-Reply-To: <20200110092127.27847-10-tzimmermann@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 5028 bytes --]

Thanks for the patch.

Tested-by: Yannick Fertré <yannick.fertre@st.com><mailto:yannick.fertre@st.com>

BR
Yannick Fertré


On 1/10/20 10:21 AM, Thomas Zimmermann wrote:

All users of struct drm_driver.get_scanout_position() have been
covnerted to the respective CRTC helper function. Remove the callback
from struct drm_driver.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de><mailto:tzimmermann@suse.de>
---
 drivers/gpu/drm/drm_vblank.c | 13 ++-------
 include/drm/drm_drv.h        | 52 ------------------------------------
 2 files changed, 2 insertions(+), 63 deletions(-)

diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index c12f0b333e14..b84065911d69 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -633,8 +633,7 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
        }

        /* Scanout position query not supported? Should not happen. */
-       if (!dev->driver->get_scanout_position ||
-           !crtc->helper_private->get_scanout_position) {
+       if (!crtc->helper_private->get_scanout_position) {
                DRM_ERROR("Called from CRTC w/o get_scanout_position()!?\n");
                return false;
        }
@@ -666,17 +665,9 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
                 * Get vertical and horizontal scanout position vpos, hpos,
                 * and bounding timestamps stime, etime, pre/post query.
                 */
-               if (crtc->helper_private->get_scanout_position) {
-                       vbl_status =
-                               crtc->helper_private->get_scanout_position(
+               vbl_status = crtc->helper_private->get_scanout_position(
                                        crtc, in_vblank_irq, &vpos, &hpos,
                                        &stime, &etime, mode);
-               } else {
-                       vbl_status =
-                               dev->driver->get_scanout_position(
-                                       dev, pipe, in_vblank_irq, &vpos,
-                                       &hpos, &stime, &etime, mode);
-               }

                /* Return as no-op if scanout query unsupported or failed. */
                if (!vbl_status) {
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index d0049e5786fc..b704e252f3b2 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -318,58 +318,6 @@ struct drm_driver {
         */
        void (*disable_vblank) (struct drm_device *dev, unsigned int pipe);

-       /**
-        * @get_scanout_position:
-        *
-        * Called by vblank timestamping code.
-        *
-        * Returns the current display scanout position from a crtc, and an
-        * optional accurate ktime_get() timestamp of when position was
-        * measured. Note that this is a helper callback which is only used if a
-        * driver uses drm_calc_vbltimestamp_from_scanoutpos() for the
-        * @get_vblank_timestamp callback.
-        *
-        * Parameters:
-        *
-        * dev:
-        *     DRM device.
-        * pipe:
-        *     Id of the crtc to query.
-        * in_vblank_irq:
-        *     True when called from drm_crtc_handle_vblank().  Some drivers
-        *     need to apply some workarounds for gpu-specific vblank irq quirks
-        *     if flag is set.
-        * vpos:
-        *     Target location for current vertical scanout position.
-        * hpos:
-        *     Target location for current horizontal scanout position.
-        * stime:
-        *     Target location for timestamp taken immediately before
-        *     scanout position query. Can be NULL to skip timestamp.
-        * etime:
-        *     Target location for timestamp taken immediately after
-        *     scanout position query. Can be NULL to skip timestamp.
-        * mode:
-        *     Current display timings.
-        *
-        * Returns vpos as a positive number while in active scanout area.
-        * Returns vpos as a negative number inside vblank, counting the number
-        * of scanlines to go until end of vblank, e.g., -1 means "one scanline
-        * until start of active scanout / end of vblank."
-        *
-        * Returns:
-        *
-        * True on success, false if a reliable scanout position counter could
-        * not be read out.
-        *
-        * This is deprecated and should not be used by new drivers.
-        * Use &drm_crtc_helper_funcs.get_scanout_position instead.
-        */
-       bool (*get_scanout_position) (struct drm_device *dev, unsigned int pipe,
-                                     bool in_vblank_irq, int *vpos, int *hpos,
-                                     ktime_t *stime, ktime_t *etime,
-                                     const struct drm_display_mode *mode);
-
        /**
         * @get_vblank_timestamp:
         *



[-- Attachment #1.2: Type: text/html, Size: 4828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
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: Yannick FERTRE <yannick.fertre@st.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"alexander.deucher@amd.com" <alexander.deucher@amd.com>,
	"christian.koenig@amd.com" <christian.koenig@amd.com>,
	"David1.Zhou@amd.com" <David1.Zhou@amd.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"patrik.r.jakobsson@gmail.com" <patrik.r.jakobsson@gmail.com>,
	"robdclark@gmail.com" <robdclark@gmail.com>,
	"sean@poorly.run" <sean@poorly.run>,
	"benjamin.gaignard@linaro.org" <benjamin.gaignard@linaro.org>,
	Vincent ABRIOU <vincent.abriou@st.com>,
	Philippe CORNU <philippe.cornu@st.com>,
	"mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>,
	Alexandre TORGUE <alexandre.torgue@st.com>,
	"eric@anholt.net" <eric@anholt.net>,
	"rodrigosiqueiramelo@gmail.com" <rodrigosiqueiramelo@gmail.com>,
	"hamohammed.sa@gmail.com" <hamohammed.sa@gmail.com>,
	"linux-graphics-maintainer@vmware.com"
	<linux-graphics-maintainer@vmware.com>,
	"thellstrom@vmware.com" <thellstrom@vmware.com>,
	"bskeggs@redhat.com" <bskeggs@redhat.com>,
	"harry.wentland@amd.com" <harry.wentland@amd.com>,
	"sunpeng.li@amd.com" <sunpeng.li@amd.com>,
	"jani.nikula@linux.intel.com" <jani.nikula@linux.intel.com>,
	"joonas.lahtinen@linux.intel.com"
	<joonas.lahtinen@linux.intel.com>,
	"rodrigo.vivi@intel.com" <rodrigo.vivi@intel.com>
Cc: "linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
	"freedreno@lists.freedesktop.org"
	<freedreno@lists.freedesktop.org>
Subject: Re: [PATCH 09/23] drm: Remove struct drm_driver.get_scanout_position()
Date: Tue, 14 Jan 2020 15:32:24 +0000	[thread overview]
Message-ID: <b851a33e-651b-03f3-9942-9008e70ba74b@st.com> (raw)
In-Reply-To: <20200110092127.27847-10-tzimmermann@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 5028 bytes --]

Thanks for the patch.

Tested-by: Yannick Fertré <yannick.fertre@st.com><mailto:yannick.fertre@st.com>

BR
Yannick Fertré


On 1/10/20 10:21 AM, Thomas Zimmermann wrote:

All users of struct drm_driver.get_scanout_position() have been
covnerted to the respective CRTC helper function. Remove the callback
from struct drm_driver.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de><mailto:tzimmermann@suse.de>
---
 drivers/gpu/drm/drm_vblank.c | 13 ++-------
 include/drm/drm_drv.h        | 52 ------------------------------------
 2 files changed, 2 insertions(+), 63 deletions(-)

diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index c12f0b333e14..b84065911d69 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -633,8 +633,7 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
        }

        /* Scanout position query not supported? Should not happen. */
-       if (!dev->driver->get_scanout_position ||
-           !crtc->helper_private->get_scanout_position) {
+       if (!crtc->helper_private->get_scanout_position) {
                DRM_ERROR("Called from CRTC w/o get_scanout_position()!?\n");
                return false;
        }
@@ -666,17 +665,9 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
                 * Get vertical and horizontal scanout position vpos, hpos,
                 * and bounding timestamps stime, etime, pre/post query.
                 */
-               if (crtc->helper_private->get_scanout_position) {
-                       vbl_status =
-                               crtc->helper_private->get_scanout_position(
+               vbl_status = crtc->helper_private->get_scanout_position(
                                        crtc, in_vblank_irq, &vpos, &hpos,
                                        &stime, &etime, mode);
-               } else {
-                       vbl_status =
-                               dev->driver->get_scanout_position(
-                                       dev, pipe, in_vblank_irq, &vpos,
-                                       &hpos, &stime, &etime, mode);
-               }

                /* Return as no-op if scanout query unsupported or failed. */
                if (!vbl_status) {
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index d0049e5786fc..b704e252f3b2 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -318,58 +318,6 @@ struct drm_driver {
         */
        void (*disable_vblank) (struct drm_device *dev, unsigned int pipe);

-       /**
-        * @get_scanout_position:
-        *
-        * Called by vblank timestamping code.
-        *
-        * Returns the current display scanout position from a crtc, and an
-        * optional accurate ktime_get() timestamp of when position was
-        * measured. Note that this is a helper callback which is only used if a
-        * driver uses drm_calc_vbltimestamp_from_scanoutpos() for the
-        * @get_vblank_timestamp callback.
-        *
-        * Parameters:
-        *
-        * dev:
-        *     DRM device.
-        * pipe:
-        *     Id of the crtc to query.
-        * in_vblank_irq:
-        *     True when called from drm_crtc_handle_vblank().  Some drivers
-        *     need to apply some workarounds for gpu-specific vblank irq quirks
-        *     if flag is set.
-        * vpos:
-        *     Target location for current vertical scanout position.
-        * hpos:
-        *     Target location for current horizontal scanout position.
-        * stime:
-        *     Target location for timestamp taken immediately before
-        *     scanout position query. Can be NULL to skip timestamp.
-        * etime:
-        *     Target location for timestamp taken immediately after
-        *     scanout position query. Can be NULL to skip timestamp.
-        * mode:
-        *     Current display timings.
-        *
-        * Returns vpos as a positive number while in active scanout area.
-        * Returns vpos as a negative number inside vblank, counting the number
-        * of scanlines to go until end of vblank, e.g., -1 means "one scanline
-        * until start of active scanout / end of vblank."
-        *
-        * Returns:
-        *
-        * True on success, false if a reliable scanout position counter could
-        * not be read out.
-        *
-        * This is deprecated and should not be used by new drivers.
-        * Use &drm_crtc_helper_funcs.get_scanout_position instead.
-        */
-       bool (*get_scanout_position) (struct drm_device *dev, unsigned int pipe,
-                                     bool in_vblank_irq, int *vpos, int *hpos,
-                                     ktime_t *stime, ktime_t *etime,
-                                     const struct drm_display_mode *mode);
-
        /**
         * @get_vblank_timestamp:
         *



[-- Attachment #1.2: Type: text/html, Size: 4828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
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: Yannick FERTRE <yannick.fertre@st.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"alexander.deucher@amd.com" <alexander.deucher@amd.com>,
	"christian.koenig@amd.com" <christian.koenig@amd.com>,
	"David1.Zhou@amd.com" <David1.Zhou@amd.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"patrik.r.jakobsson@gmail.com" <patrik.r.jakobsson@gmail.com>,
	"robdclark@gmail.com" <robdclark@gmail.com>,
	"sean@poorly.run" <sean@poorly.run>,
	"benjamin.gaignard@linaro.org" <benjamin.gaignard@linaro.org>,
	Vincent ABRIOU <vincent.abriou@st.com>,
	Philippe CORNU <philippe.cornu@st.com>,
	"mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>,
	Alexandre TORGUE <alexandre.torgue@st.com>,
	"eric@anholt.net" <eric@anholt.net>,
	"rodrigosiqueiramelo@gmail.com" <rodrigosiqueiramelo@gmail.com>,
	"hamohammed.sa@gmail.com" <hamohammed.sa@gmail.com>,
	"linux-graphics-maintainer@vmware.com"
	<linux-graphics-maintainer@vmware.com>,
	"thellstrom@vmware.com" <thellstrom@vmware.com>,
	"bskeggs@redhat.com" <bskeggs@redhat.com>,
	"harry.wentland@amd.com" <harry.wentland@amd.com>,
	"sunpeng.li@amd.com" <sunpeng.li@amd.com>,
	"jani.nikula@linux.intel.com" <jani.nikula@linux.intel.com>,
	"joonas.lahtinen@linux.intel.com"
	<joonas.lahtinen@linux.intel.com>,
	"rodrigo.vivi@intel.com" <rodrigo.vivi@intel.com>
Cc: "linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
	"freedreno@lists.freedesktop.org"
	<freedreno@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 09/23] drm: Remove struct drm_driver.get_scanout_position()
Date: Tue, 14 Jan 2020 15:32:24 +0000	[thread overview]
Message-ID: <b851a33e-651b-03f3-9942-9008e70ba74b@st.com> (raw)
In-Reply-To: <20200110092127.27847-10-tzimmermann@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 5028 bytes --]

Thanks for the patch.

Tested-by: Yannick Fertré <yannick.fertre@st.com><mailto:yannick.fertre@st.com>

BR
Yannick Fertré


On 1/10/20 10:21 AM, Thomas Zimmermann wrote:

All users of struct drm_driver.get_scanout_position() have been
covnerted to the respective CRTC helper function. Remove the callback
from struct drm_driver.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de><mailto:tzimmermann@suse.de>
---
 drivers/gpu/drm/drm_vblank.c | 13 ++-------
 include/drm/drm_drv.h        | 52 ------------------------------------
 2 files changed, 2 insertions(+), 63 deletions(-)

diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index c12f0b333e14..b84065911d69 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -633,8 +633,7 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
        }

        /* Scanout position query not supported? Should not happen. */
-       if (!dev->driver->get_scanout_position ||
-           !crtc->helper_private->get_scanout_position) {
+       if (!crtc->helper_private->get_scanout_position) {
                DRM_ERROR("Called from CRTC w/o get_scanout_position()!?\n");
                return false;
        }
@@ -666,17 +665,9 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
                 * Get vertical and horizontal scanout position vpos, hpos,
                 * and bounding timestamps stime, etime, pre/post query.
                 */
-               if (crtc->helper_private->get_scanout_position) {
-                       vbl_status =
-                               crtc->helper_private->get_scanout_position(
+               vbl_status = crtc->helper_private->get_scanout_position(
                                        crtc, in_vblank_irq, &vpos, &hpos,
                                        &stime, &etime, mode);
-               } else {
-                       vbl_status =
-                               dev->driver->get_scanout_position(
-                                       dev, pipe, in_vblank_irq, &vpos,
-                                       &hpos, &stime, &etime, mode);
-               }

                /* Return as no-op if scanout query unsupported or failed. */
                if (!vbl_status) {
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index d0049e5786fc..b704e252f3b2 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -318,58 +318,6 @@ struct drm_driver {
         */
        void (*disable_vblank) (struct drm_device *dev, unsigned int pipe);

-       /**
-        * @get_scanout_position:
-        *
-        * Called by vblank timestamping code.
-        *
-        * Returns the current display scanout position from a crtc, and an
-        * optional accurate ktime_get() timestamp of when position was
-        * measured. Note that this is a helper callback which is only used if a
-        * driver uses drm_calc_vbltimestamp_from_scanoutpos() for the
-        * @get_vblank_timestamp callback.
-        *
-        * Parameters:
-        *
-        * dev:
-        *     DRM device.
-        * pipe:
-        *     Id of the crtc to query.
-        * in_vblank_irq:
-        *     True when called from drm_crtc_handle_vblank().  Some drivers
-        *     need to apply some workarounds for gpu-specific vblank irq quirks
-        *     if flag is set.
-        * vpos:
-        *     Target location for current vertical scanout position.
-        * hpos:
-        *     Target location for current horizontal scanout position.
-        * stime:
-        *     Target location for timestamp taken immediately before
-        *     scanout position query. Can be NULL to skip timestamp.
-        * etime:
-        *     Target location for timestamp taken immediately after
-        *     scanout position query. Can be NULL to skip timestamp.
-        * mode:
-        *     Current display timings.
-        *
-        * Returns vpos as a positive number while in active scanout area.
-        * Returns vpos as a negative number inside vblank, counting the number
-        * of scanlines to go until end of vblank, e.g., -1 means "one scanline
-        * until start of active scanout / end of vblank."
-        *
-        * Returns:
-        *
-        * True on success, false if a reliable scanout position counter could
-        * not be read out.
-        *
-        * This is deprecated and should not be used by new drivers.
-        * Use &drm_crtc_helper_funcs.get_scanout_position instead.
-        */
-       bool (*get_scanout_position) (struct drm_device *dev, unsigned int pipe,
-                                     bool in_vblank_irq, int *vpos, int *hpos,
-                                     ktime_t *stime, ktime_t *etime,
-                                     const struct drm_display_mode *mode);
-
        /**
         * @get_vblank_timestamp:
         *



[-- Attachment #1.2: Type: text/html, Size: 4828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
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: Yannick FERTRE <yannick.fertre@st.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"alexander.deucher@amd.com" <alexander.deucher@amd.com>,
	"christian.koenig@amd.com" <christian.koenig@amd.com>,
	"David1.Zhou@amd.com" <David1.Zhou@amd.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"patrik.r.jakobsson@gmail.com" <patrik.r.jakobsson@gmail.com>,
	"robdclark@gmail.com" <robdclark@gmail.com>,
	"sean@poorly.run" <sean@poorly.run>,
	"benjamin.gaignard@linaro.org" <benjamin.gaignard@linaro.org>,
	Vincent ABRIOU <vincent.abriou@st.com>,
	Philippe CORNU <philippe.cornu@st.com>,
	"mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>,
	Alexandre TORGUE <alexandre.torgue@st.com>,
	"eric@anholt.net" <eric@anholt.net>,
	"rodrigosiqueiramelo@gmail.com" <rodrigosiqueiramelo@gmail.com>,
	"hamohammed.sa@gmail.com" <hamohammed.sa@gmail.com>,
	"linux-graphics-maintainer@vmware.com"
	<linux-graphics-maintainer@vmware.com>,
	"thellstrom@vmware.com" <thellstrom@vmware.com>,
	"bskeggs@redhat.com" <bskeggs@redhat.com>,
	"harry.wentland@amd.com" <harry.wentland@amd.com>,
	"sunpeng.li@amd.com" <sunpeng.li@amd.com>,
	"jani.nikula@linux.intel.com" <jani.nikula@linux.intel.com>,
	"joonas.lahtinen@linux.intel.com"
	<joonas.lahtinen@linux.intel.com>,
	"rodrigo.vivi@intel.com" <rodrigo.vivi@intel.com>
Cc: "linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
	"freedreno@lists.freedesktop.org"
	<freedreno@lists.freedesktop.org>
Subject: Re: [PATCH 09/23] drm: Remove struct drm_driver.get_scanout_position()
Date: Tue, 14 Jan 2020 15:32:24 +0000	[thread overview]
Message-ID: <b851a33e-651b-03f3-9942-9008e70ba74b@st.com> (raw)
In-Reply-To: <20200110092127.27847-10-tzimmermann@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 5028 bytes --]

Thanks for the patch.

Tested-by: Yannick Fertré <yannick.fertre@st.com><mailto:yannick.fertre@st.com>

BR
Yannick Fertré


On 1/10/20 10:21 AM, Thomas Zimmermann wrote:

All users of struct drm_driver.get_scanout_position() have been
covnerted to the respective CRTC helper function. Remove the callback
from struct drm_driver.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de><mailto:tzimmermann@suse.de>
---
 drivers/gpu/drm/drm_vblank.c | 13 ++-------
 include/drm/drm_drv.h        | 52 ------------------------------------
 2 files changed, 2 insertions(+), 63 deletions(-)

diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
index c12f0b333e14..b84065911d69 100644
--- a/drivers/gpu/drm/drm_vblank.c
+++ b/drivers/gpu/drm/drm_vblank.c
@@ -633,8 +633,7 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
        }

        /* Scanout position query not supported? Should not happen. */
-       if (!dev->driver->get_scanout_position ||
-           !crtc->helper_private->get_scanout_position) {
+       if (!crtc->helper_private->get_scanout_position) {
                DRM_ERROR("Called from CRTC w/o get_scanout_position()!?\n");
                return false;
        }
@@ -666,17 +665,9 @@ bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
                 * Get vertical and horizontal scanout position vpos, hpos,
                 * and bounding timestamps stime, etime, pre/post query.
                 */
-               if (crtc->helper_private->get_scanout_position) {
-                       vbl_status =
-                               crtc->helper_private->get_scanout_position(
+               vbl_status = crtc->helper_private->get_scanout_position(
                                        crtc, in_vblank_irq, &vpos, &hpos,
                                        &stime, &etime, mode);
-               } else {
-                       vbl_status =
-                               dev->driver->get_scanout_position(
-                                       dev, pipe, in_vblank_irq, &vpos,
-                                       &hpos, &stime, &etime, mode);
-               }

                /* Return as no-op if scanout query unsupported or failed. */
                if (!vbl_status) {
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index d0049e5786fc..b704e252f3b2 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -318,58 +318,6 @@ struct drm_driver {
         */
        void (*disable_vblank) (struct drm_device *dev, unsigned int pipe);

-       /**
-        * @get_scanout_position:
-        *
-        * Called by vblank timestamping code.
-        *
-        * Returns the current display scanout position from a crtc, and an
-        * optional accurate ktime_get() timestamp of when position was
-        * measured. Note that this is a helper callback which is only used if a
-        * driver uses drm_calc_vbltimestamp_from_scanoutpos() for the
-        * @get_vblank_timestamp callback.
-        *
-        * Parameters:
-        *
-        * dev:
-        *     DRM device.
-        * pipe:
-        *     Id of the crtc to query.
-        * in_vblank_irq:
-        *     True when called from drm_crtc_handle_vblank().  Some drivers
-        *     need to apply some workarounds for gpu-specific vblank irq quirks
-        *     if flag is set.
-        * vpos:
-        *     Target location for current vertical scanout position.
-        * hpos:
-        *     Target location for current horizontal scanout position.
-        * stime:
-        *     Target location for timestamp taken immediately before
-        *     scanout position query. Can be NULL to skip timestamp.
-        * etime:
-        *     Target location for timestamp taken immediately after
-        *     scanout position query. Can be NULL to skip timestamp.
-        * mode:
-        *     Current display timings.
-        *
-        * Returns vpos as a positive number while in active scanout area.
-        * Returns vpos as a negative number inside vblank, counting the number
-        * of scanlines to go until end of vblank, e.g., -1 means "one scanline
-        * until start of active scanout / end of vblank."
-        *
-        * Returns:
-        *
-        * True on success, false if a reliable scanout position counter could
-        * not be read out.
-        *
-        * This is deprecated and should not be used by new drivers.
-        * Use &drm_crtc_helper_funcs.get_scanout_position instead.
-        */
-       bool (*get_scanout_position) (struct drm_device *dev, unsigned int pipe,
-                                     bool in_vblank_irq, int *vpos, int *hpos,
-                                     ktime_t *stime, ktime_t *etime,
-                                     const struct drm_display_mode *mode);
-
        /**
         * @get_vblank_timestamp:
         *



[-- Attachment #1.2: Type: text/html, Size: 4828 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

  reply	other threads:[~2020-01-14 15:32 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 ` [PATCH 04/23] drm/nouveau: 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 ` [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 [this message]
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=b851a33e-651b-03f3-9942-9008e70ba74b@st.com \
    --to=yannick.fertre@st.com \
    --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=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@gma \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --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=rodrigosiqueiramelo@gmail.com \
    --cc=sean@poorly.run \
    --cc=tzimmermann@suse.de \
    --cc=vincent.abriou@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.