All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 08/12] drm/i915: Allow calling intel_adjust_tile_offset() multiple times
Date: Fri, 27 May 2016 11:23:28 +0300	[thread overview]
Message-ID: <20160527082328.GY4329@intel.com> (raw)
In-Reply-To: <1462290001-9246-9-git-send-email-ville.syrjala@linux.intel.com>

On Tue, May 03, 2016 at 06:39:57PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Minimize the resulting X coordinate after intel_adjust_tile_offset() is
> done with it's offset adjustment. This allows calling
> intel_adjust_tile_offset() multiple times in case we need to adjust
> the offset several times.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

I was hoping to push most of this, but this patch still needs to be
reviewed before I do that. I don't want to push without the SKL
X-tile hack (which needs this).

Sivakumar, are you still looking at this or should I turn elsewhere?

> ---
>  drivers/gpu/drm/i915/intel_display.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 438f3bd86e48..17f9f014e808 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2361,6 +2361,7 @@ static u32 intel_adjust_tile_offset(int *x, int *y,
>  				    u32 old_offset,
>  				    u32 new_offset)
>  {
> +	unsigned int pitch_pixels = pitch_tiles * tile_width;
>  	unsigned int tiles;
>  
>  	WARN_ON(old_offset & (tile_size - 1));
> @@ -2372,6 +2373,10 @@ static u32 intel_adjust_tile_offset(int *x, int *y,
>  	*y += tiles / pitch_tiles * tile_height;
>  	*x += tiles % pitch_tiles * tile_width;
>  
> +	/* minimize x in case it got needlessly big */
> +	*y += *x / pitch_pixels * tile_height;
> +	*x %= pitch_pixels;
> +
>  	return new_offset;
>  }
>  
> -- 
> 2.7.4

-- 
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:[~2016-05-27  8:23 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 15:39 [PATCH v4 00/12] drm/i915: Handle fb->offsets[] and rewrite fb rotation handling to be more generic (v4) ville.syrjala
2016-05-03 15:39 ` [PATCH v5 01/12] drm/i915: Rewrite fb rotation GTT handling ville.syrjala
2016-05-05  8:12   ` Thulasimani, Sivakumar
2016-05-05  8:14   ` Thulasimani, Sivakumar
2016-05-03 15:39 ` [PATCH v3 02/12] drm/i915: Don't pass pitch to intel_compute_page_offset() ville.syrjala
2016-05-05  8:17   ` Thulasimani, Sivakumar
2016-05-03 15:39 ` [PATCH 03/12] drm/i915: Move SKL hw stride calculation into a helper ville.syrjala
2016-05-04 11:53   ` Matthew Auld
2016-05-05  8:20   ` Thulasimani, Sivakumar
2016-05-03 15:39 ` [PATCH 04/12] drm/i915: Pass around plane_state instead of fb+rotation ville.syrjala
2016-05-05  8:21   ` Thulasimani, Sivakumar
2016-05-03 15:39 ` [PATCH v2 05/12] drm/i915: Use fb modifiers for display tiling decisions ville.syrjala
2016-05-03 15:39 ` [PATCH v2 06/12] drm/i915: Adjust obj tiling vs. fb modifier rules ville.syrjala
2016-05-03 15:39 ` [PATCH 07/12] drm/i915: Limit fb x offset due to fences ville.syrjala
2016-05-05 10:19   ` Sivakumar Thulasimani
2016-05-03 15:39 ` [PATCH 08/12] drm/i915: Allow calling intel_adjust_tile_offset() multiple times ville.syrjala
2016-05-27  8:23   ` Ville Syrjälä [this message]
2016-05-30 10:14     ` Thulasimani, Sivakumar
2016-05-03 15:39 ` [PATCH 09/12] drm/i915: Make intel_adjust_tile_offset() work for linear buffers ville.syrjala
2016-05-09  9:24   ` Sivakumar Thulasimani
2016-05-03 15:39 ` [PATCH 10/12] drm/i915: Compute display surface offset in the plane check hook for SKL+ ville.syrjala
2016-05-09 10:30   ` Sivakumar Thulasimani
2016-05-03 15:40 ` [PATCH 11/12] drm/i915: Deal with NV12 CbCr plane AUX surface on SKL+ ville.syrjala
2016-05-03 15:40 ` [PATCH v2 12/12] drm/i915: Make sure fb offset is (macro)pixel aligned ville.syrjala
2016-05-03 16:25 ` ✗ Fi.CI.BAT: failure for drm/i915: Handle fb->offsets[] and rewrite fb rotation handling to be more generic (v4) Patchwork
2016-05-27 11:43   ` Ville Syrjälä
2016-05-27 11:49     ` Chris Wilson
  -- strict thread matches above, loose matches on Subject: below --
2016-08-10  9:23 [PATCH v5 00/12] drm/i915: Handle fb->offsets[] and rewrite fb rotation handling to be more generic (v5) ville.syrjala
2016-08-10  9:23 ` [PATCH 08/12] drm/i915: Allow calling intel_adjust_tile_offset() multiple times ville.syrjala
2016-08-10  9:46   ` Chris Wilson
2016-08-10  9:48   ` Daniel Vetter
2016-08-10 11:17     ` Ville Syrjälä

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=20160527082328.GY4329@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.