Skip to content

Commit 9bea7e0

Browse files
committed
Merge branch '7.0/hdmi' into 7.0/base
Signed-off-by: Eric Naim <dnaim@cachyos.org>
2 parents d0d5b40 + e2462c3 commit 9bea7e0

22 files changed

Lines changed: 872 additions & 196 deletions

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 244 additions & 63 deletions
Large diffs are not rendered by default.

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,9 @@ struct amdgpu_dm_connector {
847847
unsigned int hdmi_hpd_debounce_delay_ms;
848848
struct delayed_work hdmi_hpd_debounce_work;
849849
struct dc_sink *hdmi_prev_sink;
850+
851+
/* HDMI ALLM */
852+
bool hdmi_allm_capable;
850853
};
851854

852855
static inline void amdgpu_dm_set_mst_status(uint8_t *status,
@@ -1021,6 +1024,7 @@ struct dm_connector_state {
10211024
uint8_t underscan_hborder;
10221025
bool underscan_enable;
10231026
bool freesync_capable;
1027+
bool freesync_on_desktop_capable;
10241028
bool update_hdcp;
10251029
bool abm_sysfs_forbidden;
10261030
uint8_t abm_level;

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,12 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
137137
edid_caps->display_name,
138138
AUDIO_INFO_DISPLAY_NAME_SIZE_IN_CHARS);
139139

140-
edid_caps->edid_hdmi = connector->display_info.is_hdmi;
140+
if (connector->display_info.is_hdmi) {
141+
edid_caps->edid_hdmi = true;
142+
edid_caps->allm = connector->display_info.hdmi.allm;
143+
edid_caps->fva = connector->display_info.hdmi.vrr_cap.fva;
144+
edid_caps->hdmi_vrr = connector->display_info.hdmi.vrr_cap.supported;
145+
}
141146

142147
if (edid_caps->edid_hdmi)
143148
populate_hdmi_info_from_connector(&connector->display_info.hdmi, edid_caps);
@@ -1389,40 +1394,32 @@ void dm_helpers_dp_mst_update_branch_bandwidth(
13891394
// TODO
13901395
}
13911396

1392-
static bool dm_is_freesync_pcon_whitelist(const uint32_t branch_dev_id)
1397+
bool dm_helpers_is_vrr_pcon_allowed(const struct dc_link *link, const struct drm_device *dev)
13931398
{
1394-
bool ret_val = false;
1399+
if (link->dpcd_caps.dongle_type != DISPLAY_DONGLE_DP_HDMI_CONVERTER)
1400+
return false;
13951401

1396-
switch (branch_dev_id) {
1402+
if (!link->dpcd_caps.allow_invalid_MSA_timing_param)
1403+
return false;
1404+
1405+
if (!link->dpcd_caps.adaptive_sync_caps.dp_adap_sync_caps.bits.ADAPTIVE_SYNC_SDP_SUPPORT)
1406+
return false;
1407+
1408+
switch (link->dpcd_caps.branch_dev_id) {
13971409
case DP_BRANCH_DEVICE_ID_0060AD:
13981410
case DP_BRANCH_DEVICE_ID_00E04C:
13991411
case DP_BRANCH_DEVICE_ID_90CC24:
1400-
ret_val = true;
1401-
break;
1402-
default:
1403-
break;
1412+
case DP_BRANCH_DEVICE_ID_2B02F0:
1413+
return true;
14041414
}
14051415

1406-
return ret_val;
1407-
}
1408-
1409-
enum adaptive_sync_type dm_get_adaptive_sync_support_type(struct dc_link *link)
1410-
{
1411-
struct dpcd_caps *dpcd_caps = &link->dpcd_caps;
1412-
enum adaptive_sync_type as_type = ADAPTIVE_SYNC_TYPE_NONE;
1413-
1414-
switch (dpcd_caps->dongle_type) {
1415-
case DISPLAY_DONGLE_DP_HDMI_CONVERTER:
1416-
if (dpcd_caps->adaptive_sync_caps.dp_adap_sync_caps.bits.ADAPTIVE_SYNC_SDP_SUPPORT == true &&
1417-
dpcd_caps->allow_invalid_MSA_timing_param == true &&
1418-
dm_is_freesync_pcon_whitelist(dpcd_caps->branch_dev_id))
1419-
as_type = FREESYNC_TYPE_PCON_IN_WHITELIST;
1420-
break;
1421-
default:
1422-
break;
1416+
if (link->dc->debug.override_pcon_vrr_id_check) {
1417+
drm_info(dev, "Overriding VRR PCON check for ID: 0x%06x\n",
1418+
link->dpcd_caps.branch_dev_id);
1419+
return true;
14231420
}
14241421

1425-
return as_type;
1422+
return false;
14261423
}
14271424

14281425
bool dm_helpers_is_fullscreen(struct dc_context *ctx, struct dc_stream_state *stream)

drivers/gpu/drm/amd/display/dc/core/dc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3293,6 +3293,9 @@ static void copy_stream_update_to_stream(struct dc *dc,
32933293
if (update->vrr_active_fixed)
32943294
stream->vrr_active_fixed = *update->vrr_active_fixed;
32953295

3296+
if (update->hdmi_allm_active)
3297+
stream->hdmi_allm_active = *update->hdmi_allm_active;
3298+
32963299
if (update->crtc_timing_adjust) {
32973300
if (stream->adjust.v_total_min != update->crtc_timing_adjust->v_total_min ||
32983301
stream->adjust.v_total_max != update->crtc_timing_adjust->v_total_max ||

drivers/gpu/drm/amd/display/dc/core/dc_resource.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4659,7 +4659,7 @@ static void set_avi_info_frame(
46594659
vic = 0;
46604660
format = stream->timing.timing_3d_format;
46614661
/*todo, add 3DStereo support*/
4662-
if (format != TIMING_3D_FORMAT_NONE) {
4662+
if (format != TIMING_3D_FORMAT_NONE || stream->hdmi_allm_active) {
46634663
// Based on HDMI specs hdmi vic needs to be converted to cea vic when 3D is enabled
46644664
switch (pipe_ctx->stream->timing.hdmi_vic) {
46654665
case 1:

drivers/gpu/drm/amd/display/dc/dc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,7 @@ struct dc_debug_options {
10571057
bool scl_reset_length10;
10581058
bool hdmi20_disable;
10591059
bool skip_detection_link_training;
1060+
bool override_pcon_vrr_id_check;
10601061
uint32_t edid_read_retry_times;
10611062
unsigned int force_odm_combine; //bit vector based on otg inst
10621063
unsigned int seamless_boot_odm_combine;

drivers/gpu/drm/amd/display/dc/dc_stream.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ struct dc_stream_state {
247247
bool vrr_active_variable;
248248
bool freesync_on_desktop;
249249
bool vrr_active_fixed;
250+
bool hdmi_allm_active;
250251

251252
bool converter_disable_audio;
252253
uint8_t qs_bit;
@@ -352,6 +353,7 @@ struct dc_stream_update {
352353
bool *allow_freesync;
353354
bool *vrr_active_variable;
354355
bool *vrr_active_fixed;
356+
bool *hdmi_allm_active;
355357

356358
struct colorspace_transform *gamut_remap;
357359
enum dc_color_space *output_color_space;

drivers/gpu/drm/amd/display/dc/dc_types.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,14 @@ struct dc_edid_caps {
210210

211211
uint32_t max_tmds_clk_mhz;
212212

213-
/*HDMI 2.0 caps*/
213+
/* HDMI 2.0 caps */
214214
bool lte_340mcsc_scramble;
215215

216+
/* HDMI 2.1 caps */
217+
bool allm;
218+
bool fva;
219+
bool hdmi_vrr;
220+
216221
bool edid_hdmi;
217222
bool hdr_supported;
218223
bool rr_capable;

drivers/gpu/drm/amd/display/dc/dm_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ int dm_helpers_dmub_set_config_sync(struct dc_context *ctx,
220220
const struct dc_link *link,
221221
struct set_config_cmd_payload *payload,
222222
enum set_config_status *operation_result);
223-
enum adaptive_sync_type dm_get_adaptive_sync_support_type(struct dc_link *link);
224223

225224
enum dc_edid_status dm_helpers_get_sbios_edid(struct dc_link *link, struct dc_edid *edid);
226225

226+
bool dm_helpers_is_vrr_pcon_allowed(const struct dc_link *link, const struct drm_device *dev);
227227
bool dm_helpers_is_fullscreen(struct dc_context *ctx, struct dc_stream_state *stream);
228228
bool dm_helpers_is_hdr_on(struct dc_context *ctx, struct dc_stream_state *stream);
229229

drivers/gpu/drm/amd/display/include/ddc_service_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#define DP_BRANCH_DEVICE_ID_006037 0x006037
3737
#define DP_BRANCH_DEVICE_ID_001CF8 0x001CF8
3838
#define DP_BRANCH_DEVICE_ID_0060AD 0x0060AD
39+
#define DP_BRANCH_DEVICE_ID_2B02F0 0x2B02F0 /* Chrontel CH7218 */
3940
#define DP_BRANCH_HW_REV_10 0x10
4041
#define DP_BRANCH_HW_REV_20 0x20
4142

0 commit comments

Comments
 (0)