[Intel-gfx] [PATCH 14/21] drm/i915: use current scaler state during readout_hw_state.

Chandra Konduru chandra.konduru at intel.com
Sat Mar 14 22:55:39 PDT 2015


During readout_hw_state, whole pipe_config is built reading hw.
But rebuilding scaler state from hw requires,
 - reading all planes and find its corresponding index in order to set
   its bits in scaler_users
 - reading cdclk and adjusted mode crtc clk in order to regenerate
   min scaling ratios.
 - some values directly from bspec

To simplify things, for now using sw scaler state as readout state.

Signed-off-by: Chandra Konduru <chandra.konduru at intel.com>
---
 drivers/gpu/drm/i915/intel_display.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 9c3c6b1..b1d7036 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14292,7 +14292,10 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
 	int i;
 
 	for_each_intel_crtc(dev, crtc) {
+		struct intel_crtc_scaler_state scaler_state;
+		scaler_state = crtc->config->scaler_state;
 		memset(crtc->config, 0, sizeof(*crtc->config));
+		crtc->config->scaler_state = scaler_state;
 
 		crtc->config->quirks |= PIPE_CONFIG_QUIRK_INHERITED_MODE;
 
-- 
1.7.9.5



More information about the Intel-gfx mailing list