Re: [Intel-gfx] [PATCH v3] drm/i915/skl: Add support for the SAGV, fix underrun hangs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 13, 2016 at 11:17:52AM -0700, Matt Roper wrote:
> On Wed, Jul 13, 2016 at 09:12:09PM +0300, Ville Syrjälä wrote:
> > We have wait_for()/_wait_for() for polling stuff.
> 
> Those just block until a condition becomes true, right?  In this case my
> understanding from the bspec is that we need to keep re-writing the SAGV
> disable until it sticks.

the condition is an arbitrary expression such as

static inline bool sagv_disabled(struct drm_i915_private (dev_priv)
{
	u32 tmp;

	if (sandybridge_pcode_write(dev_priv,
				    GEN9_PCODE_SAGV_CONTROL,
				    GEN9_SAGV_DISABLE))
		goto error;

	if (sandybridge_pcode_read(dev_priv,
				   GEN9_PCODE_SAGV_CONTROL,
				   &tmp))
		goto error;
	
	return tmp & 1;

error:
	DRM_ERROR("Failed to disable the SAGV\n");
	return true;
}


ret = wait_for(sagv_disabled(dev_priv), 1);
if (ret)
	DRM_ERROR("Timed out waiting for SAGV to be disabled\n");

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux