[Intel-gfx] [PATCH 55/81] drm/i915: Don't mark cursor as pinned, when we don't have a cursor bo

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Wed Dec 12 17:16:22 CET 2012


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

Avoids a NULL pointer dereference if the atomic modeset fails.

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

diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index ac7fe88..98af0ae 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -726,7 +726,8 @@ static int pin_cursors(struct drm_device *dev,
 		if (ret)
 			goto unpin;
 
-		st->cursor_pinned = true;
+		if (intel_crtc->cursor_bo)
+			st->cursor_pinned = true;
 	}
 
 	return 0;
-- 
1.7.8.6




More information about the Intel-gfx mailing list