On 7 October 2012 15:38, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 10/07/2012 02:40 PM, Daniel Vetter wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, Oct 05, 2012 at 05:08:04PM -0700, Kenneth Graunke wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
According to internal bug reports, guardband clipping sometimes<br>
incorrectly discards triangles unless bit 5 of 3D_CHICKEN3 ("SF Disable<br>
fastclip optimization when culled") is set.<br>
<br>
Experimentally, this appears to be true.  With guardband clipping<br>
enabled, Dante randomly loses triangles unless bit 5 is set.<br>
<br>
The BSpec indicates that the default value of the register is supposed<br>
to be 0x20 (just bit 5), but on my Lenovo X220 it appears to be 0.<br>
<br>
Daniel attempted to implement the workaround via a kernel patch named<br>
    drm/i915: implement w/a for incorrect guarband clipping<br>
but unfortunately, the write isn't taking effect for some reason.<br>
<br>
Fixes clipping issues in Dante.<br>
<br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=53946" target="_blank">https://bugs.freedesktop.org/<u></u>show_bug.cgi?id=53946</a><br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=55523" target="_blank">https://bugs.freedesktop.org/<u></u>show_bug.cgi?id=55523</a><br>
Cc: Oliver McFadden <<a href="mailto:oliver.mcfadden@linux.intel.com" target="_blank">oliver.mcfadden@linux.intel.<u></u>com</a>><br>
Cc: <a href="mailto:nkalkhof@web.de" target="_blank">nkalkhof@web.de</a><br>
Cc: Eric Anholt <<a href="mailto:eric@anholt.net" target="_blank">eric@anholt.net</a>><br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>><br>
</blockquote>
<br>
Does this really work as advertised?<br>
<br>
The reg_read_ioctl is brand-new, only merged into 3.7. And it has a<br>
whitelist of registers that userspace is allowed to read, and CHICKEN_3 is<br>
not on it.<br>
-Daniel<br>
</blockquote>
<br></div>
Oh.  Damn.  I neglected to check that it ever returned success.<br>
<br>
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.<br>
<br>
But you're right, since we can't read 3D_CHICKEN3, we'd just turn it off unilaterally.  That sucks.<br>
<br>
I'm not sure what to do then.<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Can we make a kernel patch that adds 3D_CHICKEN3 to the whitelist?  That would at least allow guardband clipping to work with future kernels.</div>
</div>