All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 07/12] drm/i915: Limit fb x offset due to fences
Date: Thu, 5 May 2016 15:49:01 +0530	[thread overview]
Message-ID: <572B1E15.2030703@intel.com> (raw)
In-Reply-To: <1462290001-9246-8-git-send-email-ville.syrjala@linux.intel.com>

Reviewed-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>

On Tuesday 03 May 2016 09:09 PM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> If there's a fence on the object it will be aligned to the start
> of the object, and hence CPU rendering to any fb that straddles
> the fence edge will come out wrong due to lines wrapping at the
> wrong place.
>
> We have no API to manage fences on a sub-object level, so we can't
> really fix this in any way. Additonally gen2/3 fences are rather
> coarse grained so adjusting the offset migth not even be possible.
>
> Avoid these problems by requiring the fb layout to agree with the
> fence layout (if present).
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/intel_display.c | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 68612a5fac3d..438f3bd86e48 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2504,6 +2504,22 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv,
>   		intel_fb_offset_to_xy(&x, &y, fb, i);
>   
>   		/*
> +		 * The fence (if used) is aligned to the start of the object
> +		 * so having the framebuffer wrap around across the edge of the
> +		 * fenced region doesn't really work. We have no API to configure
> +		 * the fence start offset within the object (nor could we probably
> +		 * on gen2/3). So it's just easier if we just require that the
> +		 * fb layout agrees with the fence layout. We already check that the
> +		 * fb stride matches the fence stride elsewhere.
> +		 */
> +		if (intel_fb->obj->tiling_mode != I915_TILING_NONE &&
> +		    (x + width) * cpp > fb->pitches[i]) {
> +			DRM_DEBUG("bad fb plane %d offset: 0x%x\n",
> +				  i, fb->offsets[i]);
> +			return -EINVAL;
> +		}
> +
> +		/*
>   		 * First pixel of the framebuffer from
>   		 * the start of the normal gtt mapping.
>   		 */

-- 
regards,
Sivakumar Thulasimani

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

  reply	other threads:[~2016-05-05 10:14 UTC|newest]

Thread overview: 27+ 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 [this message]
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ä
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

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=572B1E15.2030703@intel.com \
    --to=sivakumar.thulasimani@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.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.