Skip to contentSkip to conversation

drm/i915: Only use read-back pipe config

RFC PATCH New Daniel Vetter 1 participant 1 message Nov 27, 2013

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

RFC PATCH 1/1 drm/i915: Only use read-back pipe config

This way we'll catch bugs in our code where we depend upon pipe config state not (yet) read out much quicker, through a simple dpms on/off cycle.

This will blow up all over the place for now, hence just a quick idea to toss out there.

---
 drivers/gpu/drm/i915/intel_display.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_display.c +3 -0
index 7ec8b488bb1d..342915f149b8 100644
@@ -9287,6 +9287,9 @@ check_crtc_state(struct drm_device *dev)
 			intel_dump_pipe_config(crtc, &crtc->config,
 					       "[sw state]");
 		}
+
+		/* Make sure our code only depends upon stuff we read back. */
+		memcpy(&pipe_config, &crtc->config, sizeof(pipe_config));
 	}
 }
 
Signature · 1 line
1.8.4.3