Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 017d213f authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie
Browse files

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: default avatarLennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 59365671
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -588,8 +588,8 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
		if (encoder->crtc == crtc) {
		if (encoder->crtc == crtc) {
			radeon_encoder = to_radeon_encoder(encoder);
			radeon_encoder = to_radeon_encoder(encoder);
			connector = radeon_get_connector_for_encoder(encoder);
			connector = radeon_get_connector_for_encoder(encoder);
			if (connector && connector->display_info.bpc)
			/* if (connector && connector->display_info.bpc)
				bpc = connector->display_info.bpc;
				bpc = connector->display_info.bpc; */
			encoder_mode = atombios_get_encoder_mode(encoder);
			encoder_mode = atombios_get_encoder_mode(encoder);
			is_duallink = radeon_dig_monitor_is_duallink(encoder, mode->clock);
			is_duallink = radeon_dig_monitor_is_duallink(encoder, mode->clock);
			if ((radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) ||
			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
		struct radeon_connector_atom_dig *dig_connector =
		struct radeon_connector_atom_dig *dig_connector =
			radeon_connector->con_priv;
			radeon_connector->con_priv;
		int dp_clock;
		int dp_clock;
		bpc = connector->display_info.bpc;

		/* if (connector->display_info.bpc)
			bpc = connector->display_info.bpc; */


		switch (encoder_mode) {
		switch (encoder_mode) {
		case ATOM_ENCODER_MODE_DP_MST:
		case ATOM_ENCODER_MODE_DP_MST:
+3 −0
Original line number Original line Diff line number Diff line
@@ -405,10 +405,13 @@ static void dp_get_adjust_train(u8 link_status[DP_LINK_STATUS_SIZE],
/* get bpc from the EDID */
/* get bpc from the EDID */
static int convert_bpc_to_bpp(int bpc)
static int convert_bpc_to_bpp(int bpc)
{
{
#if 0
	if (bpc == 0)
	if (bpc == 0)
		return 24;
		return 24;
	else
	else
		return bpc * 3;
		return bpc * 3;
#endif
	return 24;
}
}


/* get the max pix clock supported by the link rate and lane num */
/* get the max pix clock supported by the link rate and lane num */
+2 −2
Original line number Original line Diff line number Diff line
@@ -541,7 +541,7 @@ atombios_dig_encoder_setup(struct drm_encoder *encoder, int action, int panel_mo
		dp_clock = dig_connector->dp_clock;
		dp_clock = dig_connector->dp_clock;
		dp_lane_count = dig_connector->dp_lane_count;
		dp_lane_count = dig_connector->dp_lane_count;
		hpd_id = radeon_connector->hpd.hpd;
		hpd_id = radeon_connector->hpd.hpd;
		bpc = connector->display_info.bpc;
		/* bpc = connector->display_info.bpc; */
	}
	}


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


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