[Mesa-dev] [PATCH] i965: Disable guardband clipping on SNB unless workaround is present.

Kenneth Graunke kenneth at whitecape.org
Sun Oct 7 15:38:58 PDT 2012

On 10/07/2012 02:40 PM, Daniel Vetter wrote:
> On Fri, Oct 05, 2012 at 05:08:04PM -0700, Kenneth Graunke wrote:
>> According to internal bug reports, guardband clipping sometimes
>> incorrectly discards triangles unless bit 5 of 3D_CHICKEN3 ("SF Disable
>> fastclip optimization when culled") is set.
>> Experimentally, this appears to be true.  With guardband clipping
>> enabled, Dante randomly loses triangles unless bit 5 is set.
>> The BSpec indicates that the default value of the register is supposed
>> to be 0x20 (just bit 5), but on my Lenovo X220 it appears to be 0.
>> Daniel attempted to implement the workaround via a kernel patch named
>>     drm/i915: implement w/a for incorrect guarband clipping
>> but unfortunately, the write isn't taking effect for some reason.
>> Fixes clipping issues in Dante.
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=53946
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55523
>> Cc: Oliver McFadden <oliver.mcfadden at linux.intel.com>
>> Cc: nkalkhof at web.de
>> Cc: Eric Anholt <eric at anholt.net>
>> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> Does this really work as advertised?
> The reg_read_ioctl is brand-new, only merged into 3.7. And it has a
> whitelist of registers that userspace is allowed to read, and CHICKEN_3 is
> not on it.
> -Daniel

Oh.  Damn.  I neglected to check that it ever returned success.

The fact that it's new is fine, as the fix is newer.  If the ioctl 
didn't exist, it would simply turn off guardband clipping.

But you're right, since we can't read 3D_CHICKEN3, we'd just turn it off 
unilaterally.  That sucks.

I'm not sure what to do then.

More information about the mesa-dev mailing list