[Intel-gfx] [PATCH RFC] drm/i915: reduce cursor size for GEN5 hardware

Uwe Kleine-König uwe at kleine-koenig.org
Tue Jan 31 08:09:49 UTC 2017


From: Chris Wilson <chris at chris-wilson.co.uk>

As the introduced comment admits this is clearly a workaround, but for
me this is the only known way to make my Lenovo X201 work without
flickering and crashing.

Signed-off-by: Uwe Kleine-König <uwe at kleine-koenig.org>
[uwe: added changelog, comment and restrict to GEN5]
---
Hello,

as I don't like having to compile my own kernel (which has this workaround) I
suggest to apply this patch until someone with more knowledge than me about
i915 finds the muse and time to work on this.

If applying this patch means that I will become i915 maintainer, then please
don't apply; I'm not ready for this :-)

Best regards
Uwe

 drivers/gpu/drm/i915/intel_display.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f0b9aa7a0483..126825c207b3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -16488,6 +16488,17 @@ int intel_modeset_init(struct drm_device *dev)
 	} else if (IS_GEN2(dev_priv)) {
 		dev->mode_config.cursor_width = GEN2_CURSOR_WIDTH;
 		dev->mode_config.cursor_height = GEN2_CURSOR_HEIGHT;
+	} else if (IS_GEN5(dev_priv)) {
+		/*
+		 * actually the hardware should be capable to handle
+		 * MAX_CURSOR_{WIDTH,HEIGHT} (i.e. 256), but on some GEN 5
+		 * hardware this results in fifo underruns, occasional
+		 * hardware lockups and display artifacts.
+		 * See https://bugs.freedesktop.org/show_bug.cgi?id=98742 for
+		 * more details.
+		 */
+		dev->mode_config.cursor_width = 64;
+		dev->mode_config.cursor_height = 64;
 	} else {
 		dev->mode_config.cursor_width = MAX_CURSOR_WIDTH;
 		dev->mode_config.cursor_height = MAX_CURSOR_HEIGHT;
-- 
2.11.0



More information about the Intel-gfx mailing list