Commit 3c010c0b authored by Alex Deucher's avatar Alex Deucher Committed by Ben Hutchings

drm/radeon: only apply hdmi bpc pll flags when encoder mode is hdmi

commit 7d5ab300 upstream.

May fix display issues with non-HDMI displays.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 94264f44
...@@ -830,14 +830,16 @@ static void atombios_crtc_program_pll(struct drm_crtc *crtc, ...@@ -830,14 +830,16 @@ static void atombios_crtc_program_pll(struct drm_crtc *crtc,
args.v5.ucMiscInfo = 0; /* HDMI depth, etc. */ args.v5.ucMiscInfo = 0; /* HDMI depth, etc. */
if (ss_enabled && (ss->type & ATOM_EXTERNAL_SS_MASK)) if (ss_enabled && (ss->type & ATOM_EXTERNAL_SS_MASK))
args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_REF_DIV_SRC; args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_REF_DIV_SRC;
switch (bpc) { if (encoder_mode == ATOM_ENCODER_MODE_HDMI) {
case 8: switch (bpc) {
default: case 8:
args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_HDMI_24BPP; default:
break; args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_HDMI_24BPP;
case 10: break;
args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_HDMI_30BPP; case 10:
break; args.v5.ucMiscInfo |= PIXEL_CLOCK_V5_MISC_HDMI_30BPP;
break;
}
} }
args.v5.ucTransmitterID = encoder_id; args.v5.ucTransmitterID = encoder_id;
args.v5.ucEncoderMode = encoder_mode; args.v5.ucEncoderMode = encoder_mode;
...@@ -852,20 +854,22 @@ static void atombios_crtc_program_pll(struct drm_crtc *crtc, ...@@ -852,20 +854,22 @@ static void atombios_crtc_program_pll(struct drm_crtc *crtc,
args.v6.ucMiscInfo = 0; /* HDMI depth, etc. */ args.v6.ucMiscInfo = 0; /* HDMI depth, etc. */
if (ss_enabled && (ss->type & ATOM_EXTERNAL_SS_MASK)) if (ss_enabled && (ss->type & ATOM_EXTERNAL_SS_MASK))
args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_REF_DIV_SRC; args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_REF_DIV_SRC;
switch (bpc) { if (encoder_mode == ATOM_ENCODER_MODE_HDMI) {
case 8: switch (bpc) {
default: case 8:
args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_24BPP; default:
break; args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_24BPP;
case 10: break;
args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_30BPP; case 10:
break; args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_30BPP;
case 12: break;
args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_36BPP; case 12:
break; args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_36BPP;
case 16: break;
args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_48BPP; case 16:
break; args.v6.ucMiscInfo |= PIXEL_CLOCK_V6_MISC_HDMI_48BPP;
break;
}
} }
args.v6.ucTransmitterID = encoder_id; args.v6.ucTransmitterID = encoder_id;
args.v6.ucEncoderMode = encoder_mode; args.v6.ucEncoderMode = encoder_mode;
......
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