Commit 8bc14183 authored by Robin Chen's avatar Robin Chen Committed by Alex Deucher
Browse files

drm/amd/display: Revise Sink device string ID



[Why]
The Sink device string ID1/ID2 use 5 bytes instead of 6 bytes,
so the driver should compare the first 5 bytes only.

Reviewed-by: default avatarAnthony Koo <Anthony.Koo@amd.com>
Acked-by: default avatarWayne Lin <wayne.lin@amd.com>
Signed-off-by: default avatarRobin Chen <po-tchen@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9680810f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -393,17 +393,18 @@ static bool dmub_psr_copy_settings(struct dmub_psr *dmub,
	if (copy_settings_data->dsc_enable_status &&
		link->dpcd_caps.sink_dev_id == DP_DEVICE_ID_38EC11 &&
		!memcmp(link->dpcd_caps.sink_dev_id_str, DP_SINK_DEVICE_STR_ID_1,
			sizeof(link->dpcd_caps.sink_dev_id_str)))
			sizeof(DP_SINK_DEVICE_STR_ID_1)))
		link->psr_settings.force_ffu_mode = 1;
	else
		link->psr_settings.force_ffu_mode = 0;
	copy_settings_data->force_ffu_mode = link->psr_settings.force_ffu_mode;

	if (link->fec_state == dc_link_fec_enabled &&
		link->dpcd_caps.sink_dev_id == DP_DEVICE_ID_38EC11 &&
		(!memcmp(link->dpcd_caps.sink_dev_id_str, DP_SINK_DEVICE_STR_ID_1,
			sizeof(link->dpcd_caps.sink_dev_id_str)) ||
			sizeof(DP_SINK_DEVICE_STR_ID_1)) ||
		!memcmp(link->dpcd_caps.sink_dev_id_str, DP_SINK_DEVICE_STR_ID_2,
			sizeof(link->dpcd_caps.sink_dev_id_str))))
			sizeof(DP_SINK_DEVICE_STR_ID_2))))
		copy_settings_data->debug.bitfields.force_wakeup_by_tps3 = 1;
	else
		copy_settings_data->debug.bitfields.force_wakeup_by_tps3 = 0;
+2 −2
Original line number Diff line number Diff line
@@ -128,8 +128,8 @@ struct av_sync_data {
	uint8_t aud_del_ins3;/* DPCD 0002Dh */
};

static const uint8_t DP_SINK_DEVICE_STR_ID_1[] = {7, 1, 8, 7, 3, 0};
static const uint8_t DP_SINK_DEVICE_STR_ID_2[] = {7, 1, 8, 7, 5, 0};
static const uint8_t DP_SINK_DEVICE_STR_ID_1[] = {7, 1, 8, 7, 3};
static const uint8_t DP_SINK_DEVICE_STR_ID_2[] = {7, 1, 8, 7, 5};

static const u8 DP_SINK_BRANCH_DEV_NAME_7580[] = "7580\x80u";