Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a36b7dcc authored by Keith Packard's avatar Keith Packard Committed by Dave Airlie
Browse files

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: default avatarDave Airlie <airlied@redhat.com>
parent f1c3e67e
Loading
Loading
Loading
Loading
+20 −10
Original line number Original line Diff line number Diff line
@@ -125,6 +125,15 @@ static void i915_vblank_tasklet(struct drm_device *dev)


	i915_kernel_lost_context(dev);
	i915_kernel_lost_context(dev);


	if (IS_I965G(dev)) {
		BEGIN_LP_RING(4);

		OUT_RING(GFX_OP_DRAWRECT_INFO_I965);
		OUT_RING(0);
		OUT_RING(((sarea_priv->width - 1) & 0xffff) | ((sarea_priv->height - 1) << 16));
		OUT_RING(0);
		ADVANCE_LP_RING();
	} else {
		BEGIN_LP_RING(6);
		BEGIN_LP_RING(6);


		OUT_RING(GFX_OP_DRAWRECT_INFO);
		OUT_RING(GFX_OP_DRAWRECT_INFO);
@@ -135,6 +144,7 @@ static void i915_vblank_tasklet(struct drm_device *dev)
		OUT_RING(0);
		OUT_RING(0);


		ADVANCE_LP_RING();
		ADVANCE_LP_RING();
	}


	sarea_priv->ctxOwner = DRM_KERNEL_CONTEXT;
	sarea_priv->ctxOwner = DRM_KERNEL_CONTEXT;