public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/5] drm/i915: adjust get_crtc_fence_y_offset() to use base.y instead of crtc.y
Date: Mon, 9 Oct 2017 20:14:50 +0300	[thread overview]
Message-ID: <20171009171450.GJ10981@intel.com> (raw)
In-Reply-To: <1505850249-23527-6-git-send-email-juhapekka.heikkila@gmail.com>

On Tue, Sep 19, 2017 at 10:44:09PM +0300, Juha-Pekka Heikkila wrote:
> This is to use clipped y coordinate here. I left get_crtc_fence_y_offset()
> function itself in place as oneliner to maintain comment above it why this
> is done.
> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h  |  2 ++
>  drivers/gpu/drm/i915/intel_fbc.c | 11 +++++------
>  2 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 17960ba..f7c1162 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1103,6 +1103,8 @@ struct intel_fbc {
>  			 */
>  			int adjusted_x;
>  			int adjusted_y;
> +
> +			int base_y;

Calling it 'base_y' doesn't really make sense to me.
I think you could just call it 'y'.

>  		} plane;
>  
>  		struct {
> diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
> index dc059808..a65af80 100644
> --- a/drivers/gpu/drm/i915/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/intel_fbc.c
> @@ -69,12 +69,10 @@ static inline bool no_fbc_on_multiple_pipes(struct drm_i915_private *dev_priv)
>   * address we program because it starts at the real start of the buffer, so we
>   * have to take this into consideration here.
>   */
> -static unsigned int get_crtc_fence_y_offset(struct intel_crtc *crtc)
> +static unsigned int get_crtc_fence_y_offset(struct intel_fbc *fbc)
>  {
> -	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> -	struct intel_fbc *fbc = &dev_priv->fbc;
> -
> -	return crtc->base.y - fbc->state_cache.plane.adjusted_y;
> +	return fbc->state_cache.plane.base_y
> +			- fbc->state_cache.plane.adjusted_y;
>  }
>  
>  /*
> @@ -762,6 +760,7 @@ static void intel_fbc_update_state_cache(struct intel_crtc *crtc,
>  	cache->plane.visible = plane_state->base.visible;
>  	cache->plane.adjusted_x = plane_state->main.x;
>  	cache->plane.adjusted_y = plane_state->main.y;
> +	cache->plane.base_y = plane_state->base.src.y1 >> 16;
>  
>  	if (!cache->plane.visible)
>  		return;
> @@ -893,7 +892,7 @@ static void intel_fbc_get_reg_params(struct intel_crtc *crtc,
>  
>  	params->crtc.pipe = crtc->pipe;
>  	params->crtc.plane = crtc->plane;
> -	params->crtc.fence_y_offset = get_crtc_fence_y_offset(crtc);
> +	params->crtc.fence_y_offset = get_crtc_fence_y_offset(fbc);
>  
>  	params->fb.format = cache->fb.format;
>  	params->fb.stride = cache->fb.stride;
> -- 
> 2.7.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

  reply	other threads:[~2017-10-09 17:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 19:44 [PATCH 0/5] drm/i915: Skylake plane update/disable unifications [v5] Juha-Pekka Heikkila
2017-09-19 19:44 ` [PATCH 1/5] drm/i915: move adjusted_x/y from crtc to cache Juha-Pekka Heikkila
2017-10-09 17:12   ` Ville Syrjälä
2017-09-19 19:44 ` [PATCH 2/5] drm/i915: Unify skylake plane update Juha-Pekka Heikkila
2017-09-19 19:44 ` [PATCH 3/5] drm/i915: Unify skylake plane disable Juha-Pekka Heikkila
2017-09-19 19:44 ` [PATCH 4/5] drm/i915: dspaddr_offset doesn't need to be more than local variable Juha-Pekka Heikkila
2017-10-09 17:13   ` Ville Syrjälä
2017-09-19 19:44 ` [PATCH 5/5] drm/i915: adjust get_crtc_fence_y_offset() to use base.y instead of crtc.y Juha-Pekka Heikkila
2017-10-09 17:14   ` Ville Syrjälä [this message]
2017-09-19 21:13 ` ✓ Fi.CI.BAT: success for drm/i915: Skylake plane update/disable unifications [v5] Patchwork
2017-09-20  1:00 ` ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2017-10-17 20:08 [PATCH 0/5] drm/i915: Skylake plane update/disable unifications [v6] Juha-Pekka Heikkila
2017-10-17 20:08 ` [PATCH 5/5] drm/i915: adjust get_crtc_fence_y_offset() to use base.y instead of crtc.y Juha-Pekka Heikkila

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=20171009171450.GJ10981@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.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