Skip to content

Commit fe6fcec

Browse files
committed
Merge tag 'drm-fixes-2024-10-04' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Weekly fixes, xe and amdgpu lead the way, with panthor, and few core components getting various fixes. Nothing seems too out of the ordinary. atomic: - Use correct type when reading damage rectangles display: - Fix kernel docs dp-mst: - Fix DSC decompression detection hdmi: - Fix infoframe size sched: - Update maintainers - Fix race condition whne queueing up jobs - Fix locking in drm_sched_entity_modify_sched() - Fix pointer deref if entity queue changes sysfb: - Disable sysfb if framebuffer parent device is unknown amdgpu: - DML2 fix - DSC fix - Dispclk fix - eDP HDR fix - IPS fix - TBT fix i915: - One fix for bitwise and logical "and" mixup in PM code xe: - Restore pci state on resume - Fix locking on submission, queue and vm - Fix UAF on queue destruction - Fix resource release on freq init error path - Use rw_semaphore to reduce contention on ASID->VM lookup - Fix steering for media on Xe2_HPM - Tuning updates to Xe2 - Resume TDR after GT reset to prevent jobs running forever - Move id allocation to avoid userspace using a guessed number to trigger UAF - Fix OA stream close preventing pbatch buffers to complete - Fix NPD when migrating memory on LNL - Fix memory leak when aborting binds panthor: - Fix locking - Set FOP_UNSIGNED_OFFSET in fops instance - Acquire lock in panthor_vm_prepare_map_op_ctx() - Avoid uninitialized variable in tick_ctx_cleanup() - Do not block scheduler queue if work is pending - Do not add write fences to the shared BOs vbox: - Fix VLA handling" * tag 'drm-fixes-2024-10-04' of https://gitlab.freedesktop.org/drm/kernel: (41 commits) drm/xe: Fix memory leak when aborting binds drm/xe: Prevent null pointer access in xe_migrate_copy drm/xe/oa: Don't reset OAC_CONTEXT_ENABLE on OA stream close drm/xe/queue: move xa_alloc to prevent UAF drm/xe/vm: move xa_alloc to prevent UAF drm/xe: Clean up VM / exec queue file lock usage. drm/xe: Resume TDR after GT reset drm/xe/xe2: Add performance tuning for L3 cache flushing drm/xe/xe2: Extend performance tuning to media GT drm/xe/mcr: Use Xe2_LPM steering tables for Xe2_HPM drm/xe: Use helper for ASID -> VM in GPU faults and access counters drm/xe: Convert to USM lock to rwsem drm/xe: use devm_add_action_or_reset() helper drm/xe: fix UAF around queue destruction drm/xe/guc_submit: add missing locking in wedged_fini drm/xe: Restore pci state upon resume drm/amd/display: Fix system hang while resume with TBT monitor drm/amd/display: Enable idle workqueue for more IPS modes drm/amd/display: Add HDR workaround for specific eDP drm/amd/display: avoid set dispclk to 0 ...
2 parents 360c1f1 + 5b272bf commit fe6fcec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+282
-108
lines changed

Documentation/gpu/drm-kms-helpers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Bridge Operations
181181
Bridge Connector Helper
182182
-----------------------
183183

184-
.. kernel-doc:: drivers/gpu/drm/drm_bridge_connector.c
184+
.. kernel-doc:: drivers/gpu/drm/display/drm_bridge_connector.c
185185
:doc: overview
186186

187187

@@ -204,7 +204,7 @@ MIPI-DSI bridge operation
204204
Bridge Connector Helper Reference
205205
---------------------------------
206206

207-
.. kernel-doc:: drivers/gpu/drm/drm_bridge_connector.c
207+
.. kernel-doc:: drivers/gpu/drm/display/drm_bridge_connector.c
208208
:export:
209209

210210
Panel-Bridge Helper Reference

MAINTAINERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7832,6 +7832,8 @@ F: drivers/gpu/drm/xlnx/
78327832
DRM GPU SCHEDULER
78337833
M: Luben Tuikov <[email protected]>
78347834
M: Matthew Brost <[email protected]>
7835+
M: Danilo Krummrich <[email protected]>
7836+
M: Philipp Stanner <[email protected]>
78357837
78367838
S: Maintained
78377839
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git

drivers/firmware/sysfb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ static bool sysfb_unregister(void)
6767
void sysfb_disable(struct device *dev)
6868
{
6969
struct screen_info *si = &screen_info;
70+
struct device *parent;
7071

7172
mutex_lock(&disable_lock);
72-
if (!dev || dev == sysfb_parent_dev(si)) {
73+
parent = sysfb_parent_dev(si);
74+
if (!dev || !parent || dev == parent) {
7375
sysfb_unregister();
7476
disabled = true;
7577
}

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,12 @@ static void dmub_hpd_callback(struct amdgpu_device *adev,
770770
return;
771771
}
772772

773+
/* Skip DMUB HPD IRQ in suspend/resume. We will probe them later. */
774+
if (notify->type == DMUB_NOTIFICATION_HPD && adev->in_suspend) {
775+
DRM_INFO("Skip DMUB HPD IRQ callback in suspend/resume\n");
776+
return;
777+
}
778+
773779
link_index = notify->link_index;
774780
link = adev->dm.dc->links[link_index];
775781
dev = adev->dm.ddev;
@@ -2026,7 +2032,8 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
20262032
DRM_ERROR("amdgpu: failed to initialize vblank_workqueue.\n");
20272033
}
20282034

2029-
if (adev->dm.dc->caps.ips_support && adev->dm.dc->config.disable_ips == DMUB_IPS_ENABLE)
2035+
if (adev->dm.dc->caps.ips_support &&
2036+
adev->dm.dc->config.disable_ips != DMUB_IPS_DISABLE_ALL)
20302037
adev->dm.idle_workqueue = idle_create_workqueue(adev);
20312038

20322039
if (adev->dm.dc->caps.max_links > 0 && adev->family >= AMDGPU_FAMILY_RV) {
@@ -6735,12 +6742,21 @@ create_stream_for_sink(struct drm_connector *connector,
67356742
if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT ||
67366743
stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST ||
67376744
stream->signal == SIGNAL_TYPE_EDP) {
6745+
const struct dc_edid_caps *edid_caps;
6746+
unsigned int disable_colorimetry = 0;
6747+
6748+
if (aconnector->dc_sink) {
6749+
edid_caps = &aconnector->dc_sink->edid_caps;
6750+
disable_colorimetry = edid_caps->panel_patch.disable_colorimetry;
6751+
}
6752+
67386753
//
67396754
// should decide stream support vsc sdp colorimetry capability
67406755
// before building vsc info packet
67416756
//
67426757
stream->use_vsc_sdp_for_colorimetry = stream->link->dpcd_caps.dpcd_rev.raw >= 0x14 &&
6743-
stream->link->dpcd_caps.dprx_feature.bits.VSC_SDP_COLORIMETRY_SUPPORTED;
6758+
stream->link->dpcd_caps.dprx_feature.bits.VSC_SDP_COLORIMETRY_SUPPORTED &&
6759+
!disable_colorimetry;
67446760

67456761
if (stream->out_transfer_func.tf == TRANSFER_FUNCTION_GAMMA22)
67466762
tf = TRANSFER_FUNC_GAMMA_22;

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ static void apply_edid_quirks(struct edid *edid, struct dc_edid_caps *edid_caps)
7373
DRM_DEBUG_DRIVER("Clearing DPCD 0x317 on monitor with panel id %X\n", panel_id);
7474
edid_caps->panel_patch.remove_sink_ext_caps = true;
7575
break;
76+
case drm_edid_encode_panel_id('S', 'D', 'C', 0x4154):
77+
DRM_DEBUG_DRIVER("Disabling VSC on monitor with panel id %X\n", panel_id);
78+
edid_caps->panel_patch.disable_colorimetry = true;
79+
break;
7680
default:
7781
return;
7882
}

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,7 @@ static int try_disable_dsc(struct drm_atomic_state *state,
10271027
int remaining_to_try = 0;
10281028
int ret;
10291029
uint16_t fec_overhead_multiplier_x1000 = get_fec_overhead_multiplier(dc_link);
1030+
int var_pbn;
10301031

10311032
for (i = 0; i < count; i++) {
10321033
if (vars[i + k].dsc_enabled
@@ -1057,28 +1058,36 @@ static int try_disable_dsc(struct drm_atomic_state *state,
10571058
break;
10581059

10591060
DRM_DEBUG_DRIVER("MST_DSC index #%d, try no compression\n", next_index);
1061+
var_pbn = vars[next_index].pbn;
10601062
vars[next_index].pbn = kbps_to_peak_pbn(params[next_index].bw_range.stream_kbps, fec_overhead_multiplier_x1000);
10611063
ret = drm_dp_atomic_find_time_slots(state,
10621064
params[next_index].port->mgr,
10631065
params[next_index].port,
10641066
vars[next_index].pbn);
1065-
if (ret < 0)
1067+
if (ret < 0) {
1068+
DRM_DEBUG_DRIVER("%s:%d MST_DSC index #%d, failed to set pbn to the state, %d\n",
1069+
__func__, __LINE__, next_index, ret);
1070+
vars[next_index].pbn = var_pbn;
10661071
return ret;
1072+
}
10671073

10681074
ret = drm_dp_mst_atomic_check(state);
10691075
if (ret == 0) {
10701076
DRM_DEBUG_DRIVER("MST_DSC index #%d, greedily disable dsc\n", next_index);
10711077
vars[next_index].dsc_enabled = false;
10721078
vars[next_index].bpp_x16 = 0;
10731079
} else {
1074-
DRM_DEBUG_DRIVER("MST_DSC index #%d, restore minimum compression\n", next_index);
1075-
vars[next_index].pbn = kbps_to_peak_pbn(params[next_index].bw_range.max_kbps, fec_overhead_multiplier_x1000);
1080+
DRM_DEBUG_DRIVER("MST_DSC index #%d, restore optimized pbn value\n", next_index);
1081+
vars[next_index].pbn = var_pbn;
10761082
ret = drm_dp_atomic_find_time_slots(state,
10771083
params[next_index].port->mgr,
10781084
params[next_index].port,
10791085
vars[next_index].pbn);
1080-
if (ret < 0)
1086+
if (ret < 0) {
1087+
DRM_DEBUG_DRIVER("%s:%d MST_DSC index #%d, failed to set pbn to the state, %d\n",
1088+
__func__, __LINE__, next_index, ret);
10811089
return ret;
1090+
}
10821091
}
10831092

10841093
tried[next_index] = true;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ struct dc_panel_patch {
178178
unsigned int skip_avmute;
179179
unsigned int mst_start_top_delay;
180180
unsigned int remove_sink_ext_caps;
181+
unsigned int disable_colorimetry;
181182
};
182183

183184
struct dc_edid_caps {

drivers/gpu/drm/amd/display/dc/dml2/dml2_policy.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ void build_unoptimized_policy_settings(enum dml_project_id project, struct dml_m
303303
if (project == dml_project_dcn35 ||
304304
project == dml_project_dcn351) {
305305
policy->DCCProgrammingAssumesScanDirectionUnknownFinal = false;
306-
policy->EnhancedPrefetchScheduleAccelerationFinal = 0;
307306
policy->AllowForPStateChangeOrStutterInVBlankFinal = dml_prefetch_support_uclk_fclk_and_stutter_if_possible; /*new*/
308307
policy->UseOnlyMaxPrefetchModes = 1;
309308
}

drivers/gpu/drm/amd/display/dc/resource/dcn351/dcn351_resource.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,7 @@ static const struct dc_debug_options debug_defaults_drv = {
766766
.disable_dmub_reallow_idle = false,
767767
.static_screen_wait_frames = 2,
768768
.notify_dpia_hr_bw = true,
769+
.min_disp_clk_khz = 50000,
769770
};
770771

771772
static const struct dc_panel_config panel_config_defaults = {

drivers/gpu/drm/display/drm_dp_mst_topology.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6083,6 +6083,7 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
60836083
struct drm_dp_aux *immediate_upstream_aux;
60846084
struct drm_dp_mst_port *fec_port;
60856085
struct drm_dp_desc desc = {};
6086+
u8 upstream_dsc;
60866087
u8 endpoint_fec;
60876088
u8 endpoint_dsc;
60886089

@@ -6109,8 +6110,6 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
61096110

61106111
/* DP-to-DP peer device */
61116112
if (drm_dp_mst_is_virtual_dpcd(immediate_upstream_port)) {
6112-
u8 upstream_dsc;
6113-
61146113
if (drm_dp_dpcd_read(&port->aux,
61156114
DP_DSC_SUPPORT, &endpoint_dsc, 1) != 1)
61166115
return NULL;
@@ -6156,6 +6155,13 @@ struct drm_dp_aux *drm_dp_mst_dsc_aux_for_port(struct drm_dp_mst_port *port)
61566155
if (drm_dp_has_quirk(&desc, DP_DPCD_QUIRK_DSC_WITHOUT_VIRTUAL_DPCD)) {
61576156
u8 dpcd_ext[DP_RECEIVER_CAP_SIZE];
61586157

6158+
if (drm_dp_dpcd_read(immediate_upstream_aux,
6159+
DP_DSC_SUPPORT, &upstream_dsc, 1) != 1)
6160+
return NULL;
6161+
6162+
if (!(upstream_dsc & DP_DSC_DECOMPRESSION_IS_SUPPORTED))
6163+
return NULL;
6164+
61596165
if (drm_dp_read_dpcd_caps(immediate_upstream_aux, dpcd_ext) < 0)
61606166
return NULL;
61616167

0 commit comments

Comments
 (0)