aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-04-20 14:20:15 -0400
committerKeith Packard <keithp@keithp.com>2011-05-10 16:19:14 -0400
commitbe925587570a745944d99042368f72496bc28a70 (patch)
tree88d6a565465b737ed45d8dc8d1ff743a47463401 /drivers/gpu
parent7173188d5d5e50b95c588dbae3b3bc78fde4138e (diff)
drm/i915: Propagate failure to set mode for load-detect pipe
Check the return value from drm_crtc_set_mode(), report the failure via a debug message and propagate the error back to the caller. This prevents us from blissfully continuing to do the load detection on a disabled pipe. Fortunately actual failure for modesetting is very rare, and reported failures even rarer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 228621d07743..943bcbcb4670 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5551,7 +5551,11 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,
5551 if (!crtc->enabled) { 5551 if (!crtc->enabled) {
5552 if (!mode) 5552 if (!mode)
5553 mode = &load_detect_mode; 5553 mode = &load_detect_mode;
5554 drm_crtc_helper_set_mode(crtc, mode, 0, 0, crtc->fb); 5554
5555 if (!drm_crtc_helper_set_mode(crtc, mode, 0, 0, crtc->fb)) {
5556 DRM_DEBUG_KMS("failed to set mode on load-detect pipe\n");
5557 return false;
5558 }
5555 } else { 5559 } else {
5556 if (intel_crtc->dpms_mode != DRM_MODE_DPMS_ON) { 5560 if (intel_crtc->dpms_mode != DRM_MODE_DPMS_ON) {
5557 crtc_funcs = crtc->helper_private; 5561 crtc_funcs = crtc->helper_private;