intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: hamohammed.sa@gmail.com, airlied@linux.ie,
	nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	eric@anholt.net, amd-gfx@lists.freedesktop.org,
	benjamin.gaignard@linaro.org, alexandre.torgue@st.com,
	David1.Zhou@amd.com, thellstrom@vmware.com,
	linux-graphics-maintainer@vmware.com, bskeggs@redhat.com,
	harry.wentland@amd.com, mcoquelin.stm32@gmail.com,
	sunpeng.li@amd.com, linux-arm-msm@vger.kernel.org,
	intel-gfx@lists.freedesktop.org, vincent.abriou@st.com,
	rodrigosiqueiramelo@gmail.com, philippe.cornu@st.com,
	yannick.fertre@st.com, alexander.deucher@amd.com,
	freedreno@lists.freedesktop.org, christian.koenig@amd.com
Subject: Re: [Intel-gfx] [PATCH v3 22/22] drm: Remove legacy version of get_scanout_position()
Date: Mon, 20 Jan 2020 17:40:31 +0200	[thread overview]
Message-ID: <20200120154031.GY13686@intel.com> (raw)
In-Reply-To: <20200120082314.14756-23-tzimmermann@suse.de>

On Mon, Jan 20, 2020 at 09:23:14AM +0100, Thomas Zimmermann wrote:
> The legacy version of get_scanout_position() was only useful while
> drivers still used drm_driver.get_scanout_position(). With no such
> drivers left, the related typedef and code can be removed
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/drm_vblank.c    | 27 +++++++--------------------
>  drivers/gpu/drm/i915/i915_irq.c |  2 +-
>  include/drm/drm_vblank.h        | 10 +---------
>  3 files changed, 9 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> index 34428ce3c676..0bda7d7a0af2 100644
> --- a/drivers/gpu/drm/drm_vblank.c
> +++ b/drivers/gpu/drm/drm_vblank.c
> @@ -576,9 +576,6 @@ EXPORT_SYMBOL(drm_calc_timestamping_constants);
>   * @get_scanout_position:
>   *     Callback function to retrieve the scanout position. See
>   *     @struct drm_crtc_helper_funcs.get_scanout_position.
> - * @get_scanout_position_legacy:
> - *     Callback function to retrieve the scanout position. See
> - *     @struct drm_driver.get_scanout_position.
>   *
>   * Implements calculation of exact vblank timestamps from given drm_display_mode
>   * timings and current video scanout position of a CRTC.
> @@ -601,8 +598,7 @@ bool
>  drm_crtc_vblank_helper_get_vblank_timestamp_internal(
>  	struct drm_crtc *crtc, int *max_error, ktime_t *vblank_time,
>  	bool in_vblank_irq,
> -	drm_vblank_get_scanout_position_func get_scanout_position,
> -	drm_vblank_get_scanout_position_legacy_func get_scanout_position_legacy)
> +	drm_vblank_get_scanout_position_func get_scanout_position)
>  {
>  	struct drm_device *dev = crtc->dev;
>  	unsigned int pipe = crtc->index;
> @@ -620,7 +616,7 @@ drm_crtc_vblank_helper_get_vblank_timestamp_internal(
>  	}
>  
>  	/* Scanout position query not supported? Should not happen. */
> -	if (!get_scanout_position && !get_scanout_position_legacy) {
> +	if (!get_scanout_position) {
>  		DRM_ERROR("Called from CRTC w/o get_scanout_position()!?\n");
>  		return false;
>  	}
> @@ -651,19 +647,10 @@ drm_crtc_vblank_helper_get_vblank_timestamp_internal(
>  		 * Get vertical and horizontal scanout position vpos, hpos,
>  		 * and bounding timestamps stime, etime, pre/post query.
>  		 */
> -		if (get_scanout_position) {
> -			vbl_status = get_scanout_position(crtc,
> -							  in_vblank_irq,
> -							  &vpos, &hpos,
> -							  &stime, &etime,
> -							  mode);
> -		} else {
> -			vbl_status = get_scanout_position_legacy(dev, pipe,
> -								 in_vblank_irq,
> -								 &vpos, &hpos,
> -								 &stime, &etime,
> -								 mode);
> -		}
> +		vbl_status = get_scanout_position(crtc, in_vblank_irq,
> +						  &vpos, &hpos,
> +						  &stime, &etime,
> +						  mode);
>  
>  		/* Return as no-op if scanout query unsupported or failed. */
>  		if (!vbl_status) {
> @@ -755,7 +742,7 @@ bool drm_crtc_vblank_helper_get_vblank_timestamp(struct drm_crtc *crtc,
>  {
>  	return drm_crtc_vblank_helper_get_vblank_timestamp_internal(
>  		crtc, max_error, vblank_time, in_vblank_irq,
> -		crtc->helper_private->get_scanout_position, NULL);
> +		crtc->helper_private->get_scanout_position);
>  }
>  EXPORT_SYMBOL(drm_crtc_vblank_helper_get_vblank_timestamp);
>  
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 29bf847999f5..3245f7c5c84f 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -886,7 +886,7 @@ bool intel_crtc_get_vblank_timestamp(struct drm_crtc *crtc, int *max_error,
>  {
>  	return drm_crtc_vblank_helper_get_vblank_timestamp_internal(
>  		crtc, max_error, vblank_time, in_vblank_irq,
> -		i915_get_crtc_scanoutpos, NULL);
> +		i915_get_crtc_scanoutpos);
>  }
>  
>  int intel_get_crtc_scanline(struct intel_crtc *crtc)
> diff --git a/include/drm/drm_vblank.h b/include/drm/drm_vblank.h
> index a6ca8be93dd8..0f474e855e7f 100644
> --- a/include/drm/drm_vblank.h
> +++ b/include/drm/drm_vblank.h
> @@ -245,20 +245,12 @@ typedef bool (*drm_vblank_get_scanout_position_func)(struct drm_crtc *crtc,
>  						     ktime_t *stime, ktime_t *etime,
>  						     const struct drm_display_mode *mode);
>  
> -typedef bool (*drm_vblank_get_scanout_position_legacy_func)(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);
> -
>  bool
>  drm_crtc_vblank_helper_get_vblank_timestamp_internal(struct drm_crtc *crtc,
>  						     int *max_error,
>  						     ktime_t *vblank_time,
>  						     bool in_vblank_irq,
> -						     drm_vblank_get_scanout_position_func get_scanout_position,
> -						     drm_vblank_get_scanout_position_legacy_func get_scanout_position_legacy);
> +						     drm_vblank_get_scanout_position_func get_scanout_position);
>  bool drm_crtc_vblank_helper_get_vblank_timestamp(struct drm_crtc *crtc,
>  						 int *max_error,
>  						 ktime_t *vblank_time,
> -- 
> 2.24.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

  reply	other threads:[~2020-01-20 15:40 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20  8:22 [Intel-gfx] [PATCH v3 00/22] drm: Clean up VBLANK callbacks in struct drm_driver Thomas Zimmermann
2020-01-20  8:22 ` [Intel-gfx] [PATCH v3 01/22] drm: Remove internal setup of struct drm_device.vblank_disable_immediate Thomas Zimmermann
2020-01-20  8:22 ` [Intel-gfx] [PATCH v3 02/22] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs Thomas Zimmermann
2020-01-20  8:22 ` [Intel-gfx] [PATCH v3 03/22] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs Thomas Zimmermann
2020-01-20 15:38   ` Ville Syrjälä
2020-01-20  8:22 ` [Intel-gfx] [PATCH v3 04/22] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-20  8:22 ` [Intel-gfx] [PATCH v3 05/22] drm/amdgpu: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-20  8:22 ` [Intel-gfx] [PATCH v3 06/22] drm/gma500: " Thomas Zimmermann
2020-01-20 12:32   ` Patrik Jakobsson
2020-01-20  8:22 ` [Intel-gfx] [PATCH v3 07/22] drm/i915: " Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 08/22] drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 09/22] drm/nouveau: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 10/22] drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 11/22] drm/radeon: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 12/22] drm/msm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 13/22] drm/msm: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 14/22] drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 15/22] drm/stm: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 16/22] drm/sti: " Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 17/22] drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position() Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 18/22] drm/vc4: Convert to CRTC VBLANK callbacks Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 19/22] drm/vkms: " Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 20/22] drm/vmwgfx: " Thomas Zimmermann
2020-01-20 12:15   ` Thomas Hellstrom
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 21/22] drm: Clean-up VBLANK-related callbacks in struct drm_driver Thomas Zimmermann
2020-01-20  8:23 ` [Intel-gfx] [PATCH v3 22/22] drm: Remove legacy version of get_scanout_position() Thomas Zimmermann
2020-01-20 15:40   ` Ville Syrjälä [this message]
2020-01-20 10:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Clean up VBLANK callbacks in struct drm_driver (rev8) Patchwork
2020-01-20 10:41 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-01-21  9:25   ` Jani Nikula
2020-01-21  9:54     ` Thomas Zimmermann
2020-01-21 15:51       ` Jani Nikula
2020-01-20 12:54 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " 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=20200120154031.GY13686@intel.com \
    --to=ville.syrjala@linux.intel.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=bskeggs@redhat.com \
    --cc=christian.koenig@amd.com \
    --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=linux-arm-msm@vger.kernel.org \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=philippe.cornu@st.com \
    --cc=rodrigosiqueiramelo@gmail.com \
    --cc=sunpeng.li@amd.com \
    --cc=thellstrom@vmware.com \
    --cc=tzimmermann@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).