public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 07/10] drm/i915: HWS must be in the mappable region for g33
Date: Tue, 8 Jul 2014 21:07:31 +0200	[thread overview]
Message-ID: <20140708190731.GL17271@phenom.ffwll.local> (raw)
In-Reply-To: <1404423186-2019-8-git-send-email-rodrigo.vivi@intel.com>

On Thu, Jul 03, 2014 at 05:33:03PM -0400, Rodrigo Vivi wrote:
> From: Chris Wilson <chris@chris-wilson.co.uk>
> 
> On g33, the documentation states
> 
> "HWS_PGA:
>  Format = Bits 28:12 of graphics memory address (bits 31:29 MBZ)."
> 
> which translates to that the address of the HWS must be below 256MiB,
> which is conveniently the mappable aperture.
> 
> This also appears to be true (but not documented as so) for gen4 and
> gen5. To generalise we force it into the low mappable region for all
> non-LLC platforms. If we locate the HWS at the top of the GTT the
> machine will hard hang during boot (fails on pnv, gm45, ilk and byt,
> but works on snb, ivb, hsw).
> 
> v2: Add comments to explain why use PIN_MAPPABLE even though we have
>     no intention of mapping the object. (Ville)
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 2faef26..f49a3dd 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1331,6 +1331,7 @@ static int init_status_page(struct intel_engine_cs *ring)
>  	struct drm_i915_gem_object *obj;
>  
>  	if ((obj = ring->status_page.obj) == NULL) {
> +		unsigned flags;
>  		int ret;
>  
>  		obj = i915_gem_alloc_object(ring->dev, 4096);
> @@ -1343,7 +1344,20 @@ static int init_status_page(struct intel_engine_cs *ring)
>  		if (ret)
>  			goto err_unref;
>  
> -		ret = i915_gem_obj_ggtt_pin(obj, 4096, 0);
> +		flags = 0;
> +		if (!HAS_LLC(ring->dev))
> +			/* On g33, we cannot place HWS above 256MiB, so
> +			 * restrict its pinning to the low mappable arena.
> +			 * Though this restriction is not documented for
> +			 * gen4, gen5, or byt, they also behave similarly
> +			 * and hang if the HWS is placed at the top of the
> +			 * GTT. To generalise, it appears that all !llc
> +			 * platforms have issues with us placing the HWS
> +			 * above the mappable region (even though we never
> +			 * actualy map it).
> +			 */
> +			flags |= PIN_MAPPABLE;
> +		ret = i915_gem_obj_ggtt_pin(obj, 4096, flags);
>  		if (ret) {
>  err_unref:
>  			drm_gem_object_unreference(&obj->base);
> -- 
> 1.9.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2014-07-08 19:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-03 21:32 [PATCH 00/10] drm-intel-collector - update Rodrigo Vivi
2014-07-03 21:32 ` [PATCH 01/10] drm/i915: Bring UP Power Wells before disabling RC6 Rodrigo Vivi
2014-07-03 21:32 ` [PATCH 02/10] drm/i915: Don't save/restore RS when not used Rodrigo Vivi
2014-07-03 21:32 ` [PATCH 03/10] drm/i915: Upgrade execbuffer fail after resume failure to EIO Rodrigo Vivi
2014-07-03 21:33 ` [PATCH 04/10] drm/i915: Add property to set HDMI aspect ratio Rodrigo Vivi
2014-07-03 21:33 ` [PATCH 05/10] drm/i915/vlv: WA for Turbo and RC6 to work together Rodrigo Vivi
2014-07-08 19:05   ` Daniel Vetter
2014-07-03 21:33 ` [PATCH 06/10] drm/i915: honour forced connector modes Rodrigo Vivi
2014-07-03 21:33 ` [PATCH 07/10] drm/i915: HWS must be in the mappable region for g33 Rodrigo Vivi
2014-07-08 19:07   ` Daniel Vetter [this message]
2014-07-03 21:33 ` [PATCH 08/10] drm/i915: Don't promote UC to WT automagically Rodrigo Vivi
2014-07-03 21:33 ` [PATCH 09/10] drm/i915/bdw: Always issue a force restore Rodrigo Vivi
2014-07-03 21:38   ` Ben Widawsky
2014-07-03 21:39     ` Rodrigo Vivi
2014-07-03 21:33 ` [PATCH 10/10] drm/i915/vlv: T12 eDP panel timing enforcement during reboot Rodrigo Vivi
2014-07-08 19:09 ` [PATCH 00/10] drm-intel-collector - update Daniel Vetter

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=20140708190731.GL17271@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@gmail.com \
    --cc=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox