Skip to content

Commit 017d213

Browse files
alexdeucherairlied
authored andcommitted
drm/radeon/kms/atom: force bpc to 8 for now
Using the bpc (bits per color) specified by the monitor can cause problems in some cases. Until we get a better handle on how to deal with those cases, just use a bpc of 8. Reported-by: Lennert Buytenhek <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
1 parent 5936567 commit 017d213

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

drivers/gpu/drm/radeon/atombios_crtc.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
588588
if (encoder->crtc == crtc) {
589589
radeon_encoder = to_radeon_encoder(encoder);
590590
connector = radeon_get_connector_for_encoder(encoder);
591-
if (connector && connector->display_info.bpc)
592-
bpc = connector->display_info.bpc;
591+
/* if (connector && connector->display_info.bpc)
592+
bpc = connector->display_info.bpc; */
593593
encoder_mode = atombios_get_encoder_mode(encoder);
594594
is_duallink = radeon_dig_monitor_is_duallink(encoder, mode->clock);
595595
if ((radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) ||
@@ -965,7 +965,9 @@ static void atombios_crtc_set_pll(struct drm_crtc *crtc, struct drm_display_mode
965965
struct radeon_connector_atom_dig *dig_connector =
966966
radeon_connector->con_priv;
967967
int dp_clock;
968-
bpc = connector->display_info.bpc;
968+
969+
/* if (connector->display_info.bpc)
970+
bpc = connector->display_info.bpc; */
969971

970972
switch (encoder_mode) {
971973
case ATOM_ENCODER_MODE_DP_MST:

drivers/gpu/drm/radeon/atombios_dp.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,13 @@ static void dp_get_adjust_train(u8 link_status[DP_LINK_STATUS_SIZE],
405405
/* get bpc from the EDID */
406406
static int convert_bpc_to_bpp(int bpc)
407407
{
408+
#if 0
408409
if (bpc == 0)
409410
return 24;
410411
else
411412
return bpc * 3;
413+
#endif
414+
return 24;
412415
}
413416

414417
/* get the max pix clock supported by the link rate and lane num */

drivers/gpu/drm/radeon/atombios_encoders.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ atombios_dig_encoder_setup(struct drm_encoder *encoder, int action, int panel_mo
541541
dp_clock = dig_connector->dp_clock;
542542
dp_lane_count = dig_connector->dp_lane_count;
543543
hpd_id = radeon_connector->hpd.hpd;
544-
bpc = connector->display_info.bpc;
544+
/* bpc = connector->display_info.bpc; */
545545
}
546546

547547
/* no dig encoder assigned */
@@ -1159,7 +1159,7 @@ atombios_external_encoder_setup(struct drm_encoder *encoder,
11591159
dp_lane_count = dig_connector->dp_lane_count;
11601160
connector_object_id =
11611161
(radeon_connector->connector_object_id & OBJECT_ID_MASK) >> OBJECT_ID_SHIFT;
1162-
bpc = connector->display_info.bpc;
1162+
/* bpc = connector->display_info.bpc; */
11631163
}
11641164

11651165
memset(&args, 0, sizeof(args));

0 commit comments

Comments
 (0)