[Intel-gfx] [PATCH 2/7] drm/i915: Don't enable cursors or sprites for fbdev

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Wed May 8 11:55:17 CEST 2013


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Check if the CRTC framebuffer matches the fbdev helper's framebuffer,
and if it does, doen't enable cursors/sprites.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 94d6604..cfe2803 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3264,12 +3264,23 @@ static void ironlake_pfit_enable(struct intel_crtc *crtc)
 	}
 }
 
+static bool fbdev_active_on_crtc(const struct drm_crtc *crtc)
+{
+	const struct drm_i915_private *dev_priv = crtc->dev->dev_private;
+
+	return dev_priv->fbdev && dev_priv->fbdev->helper.fb == crtc->fb;
+}
+
 static void intel_enable_planes(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
 	enum pipe pipe = to_intel_crtc(crtc)->pipe;
 	struct intel_plane *intel_plane;
 
+	/* don't enable sprite planes for fbdev */
+	if (fbdev_active_on_crtc(crtc))
+		return;
+
 	list_for_each_entry(intel_plane, &dev->mode_config.plane_list, base.head)
 		if (intel_plane->pipe == pipe)
 			intel_plane_restore(&intel_plane->base);
@@ -6522,6 +6533,10 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
 	u32 base, pos;
 	bool visible;
 
+	/* don't enable cursors for fbdev */
+	if (on && fbdev_active_on_crtc(crtc))
+		return;
+
 	pos = 0;
 
 	if (on && crtc->enabled && crtc->fb) {
-- 
1.8.1.5




More information about the Intel-gfx mailing list