Commit 3680c2e9 authored by Chris Wilson's avatar Chris Wilson Committed by Joonas Lahtinen

drm/i915/display: Only query DP state of a DDI encoder

Avoid a NULL dereference for a mismatched encoder type, hit when
probing state for all encoders.

This is a band aid to prevent the OOPS as the right fix is "probably to
swap the psr vs infoframes.enable checks, or outright disappear from
this function" (Ville).

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1892Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200525124912.16019-1-chris@chris-wilson.co.uk
(cherry picked from commit 22da5d84)
Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent 4da1ced1
...@@ -5206,6 +5206,9 @@ void intel_read_dp_sdp(struct intel_encoder *encoder, ...@@ -5206,6 +5206,9 @@ void intel_read_dp_sdp(struct intel_encoder *encoder,
struct intel_crtc_state *crtc_state, struct intel_crtc_state *crtc_state,
unsigned int type) unsigned int type)
{ {
if (encoder->type != INTEL_OUTPUT_DDI)
return;
switch (type) { switch (type) {
case DP_SDP_VSC: case DP_SDP_VSC:
intel_read_dp_vsc_sdp(encoder, crtc_state, intel_read_dp_vsc_sdp(encoder, 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