Commit 5448f53f authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Don't use encoder->type in intel_ddi_set_pipe_settings()

encoder->type isn't reliable for DP/HDMI so instead extract the correct
type from the crtc state in intel_ddi_set_pipe_settings().
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171019133721.11794-2-ville.syrjala@linux.intel.comReviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
parent 547da76b
...@@ -1504,12 +1504,12 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state) ...@@ -1504,12 +1504,12 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state)
{ {
struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
struct intel_encoder *encoder = intel_ddi_get_crtc_encoder(crtc);
enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
int type = encoder->type; u32 temp;
uint32_t temp;
if (!intel_crtc_has_dp_encoder(crtc_state))
return;
if (type == INTEL_OUTPUT_DP || type == INTEL_OUTPUT_EDP || type == INTEL_OUTPUT_DP_MST) {
WARN_ON(transcoder_is_dsi(cpu_transcoder)); WARN_ON(transcoder_is_dsi(cpu_transcoder));
temp = TRANS_MSA_SYNC_CLK; temp = TRANS_MSA_SYNC_CLK;
...@@ -1527,10 +1527,11 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state) ...@@ -1527,10 +1527,11 @@ void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state)
temp |= TRANS_MSA_12_BPC; temp |= TRANS_MSA_12_BPC;
break; break;
default: default:
BUG(); MISSING_CASE(crtc_state->pipe_bpp);
break;
} }
I915_WRITE(TRANS_MSA_MISC(cpu_transcoder), temp); I915_WRITE(TRANS_MSA_MISC(cpu_transcoder), temp);
}
} }
void intel_ddi_set_vc_payload_alloc(const struct intel_crtc_state *crtc_state, void intel_ddi_set_vc_payload_alloc(const struct intel_crtc_state *crtc_state,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment