aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_ddi.c17
-rw-r--r--drivers/gpu/drm/i915/intel_display.c36
2 files changed, 53 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 67880f264c65..d5215e2db42c 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1268,6 +1268,23 @@ static void intel_ddi_get_config(struct intel_encoder *encoder,
1268 flags |= DRM_MODE_FLAG_NVSYNC; 1268 flags |= DRM_MODE_FLAG_NVSYNC;
1269 1269
1270 pipe_config->adjusted_mode.flags |= flags; 1270 pipe_config->adjusted_mode.flags |= flags;
1271
1272 switch (temp & TRANS_DDI_BPC_MASK) {
1273 case TRANS_DDI_BPC_6:
1274 pipe_config->pipe_bpp = 18;
1275 break;
1276 case TRANS_DDI_BPC_8:
1277 pipe_config->pipe_bpp = 24;
1278 break;
1279 case TRANS_DDI_BPC_10:
1280 pipe_config->pipe_bpp = 30;
1281 break;
1282 case TRANS_DDI_BPC_12:
1283 pipe_config->pipe_bpp = 36;
1284 break;
1285 default:
1286 break;
1287 }
1271} 1288}
1272 1289
1273static void intel_ddi_destroy(struct drm_encoder *encoder) 1290static void intel_ddi_destroy(struct drm_encoder *encoder)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f1b3d33320d1..1f280cc7b1e3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4997,6 +4997,22 @@ static bool i9xx_get_pipe_config(struct intel_crtc *crtc,
4997 if (!(tmp & PIPECONF_ENABLE)) 4997 if (!(tmp & PIPECONF_ENABLE))
4998 return false; 4998 return false;
4999 4999
5000 if (IS_G4X(dev) || IS_VALLEYVIEW(dev)) {
5001 switch (tmp & PIPECONF_BPC_MASK) {
5002 case PIPECONF_6BPC:
5003 pipe_config->pipe_bpp = 18;
5004 break;
5005 case PIPECONF_8BPC:
5006 pipe_config->pipe_bpp = 24;
5007 break;
5008 case PIPECONF_10BPC:
5009 pipe_config->pipe_bpp = 30;
5010 break;
5011 default:
5012 break;
5013 }
5014 }
5015
5000 intel_get_pipe_timings(crtc, pipe_config); 5016 intel_get_pipe_timings(crtc, pipe_config);
5001 5017
5002 i9xx_get_pfit_config(crtc, pipe_config); 5018 i9xx_get_pfit_config(crtc, pipe_config);
@@ -5895,6 +5911,23 @@ static bool ironlake_get_pipe_config(struct intel_crtc *crtc,
5895 if (!(tmp & PIPECONF_ENABLE)) 5911 if (!(tmp & PIPECONF_ENABLE))
5896 return false; 5912 return false;
5897 5913
5914 switch (tmp & PIPECONF_BPC_MASK) {
5915 case PIPECONF_6BPC:
5916 pipe_config->pipe_bpp = 18;
5917 break;
5918 case PIPECONF_8BPC:
5919 pipe_config->pipe_bpp = 24;
5920 break;
5921 case PIPECONF_10BPC:
5922 pipe_config->pipe_bpp = 30;
5923 break;
5924 case PIPECONF_12BPC:
5925 pipe_config->pipe_bpp = 36;
5926 break;
5927 default:
5928 break;
5929 }
5930
5898 if (I915_READ(PCH_TRANSCONF(crtc->pipe)) & TRANS_ENABLE) { 5931 if (I915_READ(PCH_TRANSCONF(crtc->pipe)) & TRANS_ENABLE) {
5899 struct intel_shared_dpll *pll; 5932 struct intel_shared_dpll *pll;
5900 5933
@@ -8624,6 +8657,9 @@ intel_pipe_config_compare(struct drm_device *dev,
8624 PIPE_CONF_CHECK_X(dpll_hw_state.fp0); 8657 PIPE_CONF_CHECK_X(dpll_hw_state.fp0);
8625 PIPE_CONF_CHECK_X(dpll_hw_state.fp1); 8658 PIPE_CONF_CHECK_X(dpll_hw_state.fp1);
8626 8659
8660 if (IS_G4X(dev) || INTEL_INFO(dev)->gen >= 5)
8661 PIPE_CONF_CHECK_I(pipe_bpp);
8662
8627#undef PIPE_CONF_CHECK_X 8663#undef PIPE_CONF_CHECK_X
8628#undef PIPE_CONF_CHECK_I 8664#undef PIPE_CONF_CHECK_I
8629#undef PIPE_CONF_CHECK_FLAGS 8665#undef PIPE_CONF_CHECK_FLAGS