Skip to contentSkip to conversation

drm/i915: Propagate errors back from fb set-base

PATCH Applied Chris Wilson 2 participants 4 messages May 3, 2013 – May 21, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Propagate errors back from fb set-base

Along the modesetting short cut where we skip trying to do a full modeset and instead simply update the framebuffer base registers, we failed to handle any errors reported.

---
 drivers/gpu/drm/i915/intel_display.c |   25 ++++++++++---------------
 1 file changed, 10 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/intel_display.c +10 -15
index 2939524..62eafc7 100644
@@ -8572,11 +8572,6 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
 
 		ret = intel_set_mode(set->crtc, set->mode,
 				     set->x, set->y, set->fb);
-		if (ret) {
-			DRM_ERROR("failed to set mode on [CRTC:%d], err = %d\n",
-				  set->crtc->base.id, ret);
-			goto fail;
-		}
 	} else if (config->fb_changed) {
 		intel_crtc_wait_for_pending_flips(set->crtc);
 
@@ -8584,18 +8579,18 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
 					  set->x, set->y, set->fb);
 	}
 
-	intel_set_config_free(config);
-
-	return 0;
-
+	if (ret) {
+		DRM_ERROR("failed to set mode on [CRTC:%d], err = %d\n",
+			  set->crtc->base.id, ret);
 fail:
-	intel_set_config_restore_state(dev, config);
+		intel_set_config_restore_state(dev, config);
 
-	/* Try to restore the config */
-	if (config->mode_changed &&
-	    intel_set_mode(save_set.crtc, save_set.mode,
-			   save_set.x, save_set.y, save_set.fb))
-		DRM_ERROR("failed to restore config after modeset failure\n");
+		/* Try to restore the config */
+		if (config->mode_changed &&
+		    intel_set_mode(save_set.crtc, save_set.mode,
+				   save_set.x, save_set.y, save_set.fb))
+			DRM_ERROR("failed to restore config after modeset failure\n");
+	}
 
 out_config:
 	intel_set_config_free(config);
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 5 lines · Chris Wilson

Along the modesetting short cut where we skip trying to do a full modeset and instead simply update the framebuffer base registers, we failed to handle any errors reported.

This regression has been introduced in

commit 94352cf9a5328bb1a44288e6c2c1276695f8a356

Author: Daniel Vetter <[email protected]>
Date:   Thu Jul 5 22:51:56 2012 +0200
    drm/i915: push crtc->fb update into pipe_set_base

/me hangs head in shame
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

#2 lore raw
Quoted 10 lines · Daniel Vetter
Quoted 5 lines · Chris Wilson

Along the modesetting short cut where we skip trying to do a full modeset and instead simply update the framebuffer base registers, we failed to handle any errors reported.

This regression has been introduced in

Quoted 7 lines

commit 94352cf9a5328bb1a44288e6c2c1276695f8a356

Author: Daniel Vetter <[email protected]>
Date:   Thu Jul 5 22:51:56 2012 +0200
    drm/i915: push crtc->fb update into pipe_set_base

/me hangs head in shame

Ping?
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#3 lore raw
Quoted 15 lines · Chris Wilson
Quoted 14 lines · Daniel Vetter
Quoted 5 lines · Chris Wilson

Along the modesetting short cut where we skip trying to do a full modeset and instead simply update the framebuffer base registers, we failed to handle any errors reported.

This regression has been introduced in

commit 94352cf9a5328bb1a44288e6c2c1276695f8a356

Author: Daniel Vetter <[email protected]>
Date:   Thu Jul 5 22:51:56 2012 +0200
Quoted 5 lines
Quoted 3 lines
    drm/i915: push crtc->fb update into pipe_set_base

/me hangs head in shame

Ping?

Picked up for -fixes, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch