Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i965: On I965, use correct 3DSTATE_DRAWING_RECTANGLE command in vblank

The batchbuffer submission paths were fixed to use the 965-specific command,
but the vblank tasklet was not. When the older version is sent, the 965 will
lock up.

Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Keith Packard and committed by
Dave Airlie
a36b7dcc f1c3e67e

+18 -8
+18 -8
drivers/char/drm/i915_irq.c
··· 125 125 126 126 i915_kernel_lost_context(dev); 127 127 128 - BEGIN_LP_RING(6); 128 + if (IS_I965G(dev)) { 129 + BEGIN_LP_RING(4); 129 130 130 - OUT_RING(GFX_OP_DRAWRECT_INFO); 131 - OUT_RING(0); 132 - OUT_RING(0); 133 - OUT_RING(sarea_priv->width | sarea_priv->height << 16); 134 - OUT_RING(sarea_priv->width | sarea_priv->height << 16); 135 - OUT_RING(0); 131 + OUT_RING(GFX_OP_DRAWRECT_INFO_I965); 132 + OUT_RING(0); 133 + OUT_RING(((sarea_priv->width - 1) & 0xffff) | ((sarea_priv->height - 1) << 16)); 134 + OUT_RING(0); 135 + ADVANCE_LP_RING(); 136 + } else { 137 + BEGIN_LP_RING(6); 136 138 137 - ADVANCE_LP_RING(); 139 + OUT_RING(GFX_OP_DRAWRECT_INFO); 140 + OUT_RING(0); 141 + OUT_RING(0); 142 + OUT_RING(sarea_priv->width | sarea_priv->height << 16); 143 + OUT_RING(sarea_priv->width | sarea_priv->height << 16); 144 + OUT_RING(0); 145 + 146 + ADVANCE_LP_RING(); 147 + } 138 148 139 149 sarea_priv->ctxOwner = DRM_KERNEL_CONTEXT; 140 150