mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 11:02:31 -04:00
Merge tag 'amd-drm-next-6.9-2024-02-19' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-6.9-2024-02-19: amdgpu: - ATHUB 4.1 support - EEPROM support updates - RAS updates - LSDMA 7.0 support - JPEG DPG support - IH 7.0 support - HDP 7.0 support - VCN 5.0 support - Misc display fixes - Retimer fixes - DCN 3.5 fixes - VCN 4.x fixes - PSR fixes - PSP 14.0 support - VA_RESERVED cleanup - SMU 13.0.6 updates - NBIO 7.11 updates - SDMA 6.1 updates - MMHUB 3.3 updates - Suspend/resume fixes - DMUB updates amdkfd: - Trap handler enhancements - Fix cache size reporting - Relocate the trap handler radeon: - fix typo in print statement Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240219214810.4911-1-alexander.deucher@amd.com
This commit is contained in:
@@ -1939,17 +1939,15 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
|
||||
adev->dm.hdcp_workqueue = NULL;
|
||||
}
|
||||
|
||||
if (adev->dm.dc)
|
||||
if (adev->dm.dc) {
|
||||
dc_deinit_callbacks(adev->dm.dc);
|
||||
|
||||
if (adev->dm.dc)
|
||||
dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv);
|
||||
|
||||
if (dc_enable_dmub_notifications(adev->dm.dc)) {
|
||||
kfree(adev->dm.dmub_notify);
|
||||
adev->dm.dmub_notify = NULL;
|
||||
destroy_workqueue(adev->dm.delayed_hpd_wq);
|
||||
adev->dm.delayed_hpd_wq = NULL;
|
||||
if (dc_enable_dmub_notifications(adev->dm.dc)) {
|
||||
kfree(adev->dm.dmub_notify);
|
||||
adev->dm.dmub_notify = NULL;
|
||||
destroy_workqueue(adev->dm.delayed_hpd_wq);
|
||||
adev->dm.delayed_hpd_wq = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (adev->dm.dmub_bo)
|
||||
@@ -1957,7 +1955,7 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
|
||||
&adev->dm.dmub_bo_gpu_addr,
|
||||
&adev->dm.dmub_bo_cpu_addr);
|
||||
|
||||
if (adev->dm.hpd_rx_offload_wq) {
|
||||
if (adev->dm.hpd_rx_offload_wq && adev->dm.dc) {
|
||||
for (i = 0; i < adev->dm.dc->caps.max_links; i++) {
|
||||
if (adev->dm.hpd_rx_offload_wq[i].wq) {
|
||||
destroy_workqueue(adev->dm.hpd_rx_offload_wq[i].wq);
|
||||
@@ -2130,7 +2128,8 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
|
||||
DMUB_WINDOW_MEMORY_TYPE_FB, //DMUB_WINDOW_4_MAILBOX
|
||||
DMUB_WINDOW_MEMORY_TYPE_FB, //DMUB_WINDOW_5_TRACEBUFF
|
||||
DMUB_WINDOW_MEMORY_TYPE_FB, //DMUB_WINDOW_6_FW_STATE
|
||||
DMUB_WINDOW_MEMORY_TYPE_FB //DMUB_WINDOW_7_SCRATCH_MEM
|
||||
DMUB_WINDOW_MEMORY_TYPE_FB, //DMUB_WINDOW_7_SCRATCH_MEM
|
||||
DMUB_WINDOW_MEMORY_TYPE_FB, //DMUB_WINDOW_SHARED_STATE
|
||||
};
|
||||
int r;
|
||||
|
||||
@@ -5254,6 +5253,7 @@ static void fill_dc_dirty_rects(struct drm_plane *plane,
|
||||
struct drm_plane_state *new_plane_state,
|
||||
struct drm_crtc_state *crtc_state,
|
||||
struct dc_flip_addrs *flip_addrs,
|
||||
bool is_psr_su,
|
||||
bool *dirty_regions_changed)
|
||||
{
|
||||
struct dm_crtc_state *dm_crtc_state = to_dm_crtc_state(crtc_state);
|
||||
@@ -5278,6 +5278,10 @@ static void fill_dc_dirty_rects(struct drm_plane *plane,
|
||||
num_clips = drm_plane_get_damage_clips_count(new_plane_state);
|
||||
clips = drm_plane_get_damage_clips(new_plane_state);
|
||||
|
||||
if (num_clips && (!amdgpu_damage_clips || (amdgpu_damage_clips < 0 &&
|
||||
is_psr_su)))
|
||||
goto ffu;
|
||||
|
||||
if (!dm_crtc_state->mpo_requested) {
|
||||
if (!num_clips || num_clips > DC_MAX_DIRTY_RECTS)
|
||||
goto ffu;
|
||||
@@ -6229,7 +6233,9 @@ create_stream_for_sink(struct drm_connector *connector,
|
||||
if (recalculate_timing) {
|
||||
freesync_mode = get_highest_refresh_rate_mode(aconnector, false);
|
||||
drm_mode_copy(&saved_mode, &mode);
|
||||
saved_mode.picture_aspect_ratio = mode.picture_aspect_ratio;
|
||||
drm_mode_copy(&mode, freesync_mode);
|
||||
mode.picture_aspect_ratio = saved_mode.picture_aspect_ratio;
|
||||
} else {
|
||||
decide_crtc_timing_for_drm_display_mode(
|
||||
&mode, preferred_mode, scale);
|
||||
@@ -6509,7 +6515,8 @@ static void amdgpu_dm_connector_unregister(struct drm_connector *connector)
|
||||
{
|
||||
struct amdgpu_dm_connector *amdgpu_dm_connector = to_amdgpu_dm_connector(connector);
|
||||
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP &&
|
||||
amdgpu_dm_abm_level < 0)
|
||||
sysfs_remove_group(&connector->kdev->kobj, &amdgpu_group);
|
||||
|
||||
drm_dp_aux_unregister(&amdgpu_dm_connector->dm_dp_aux.aux);
|
||||
@@ -6573,9 +6580,12 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector)
|
||||
state->vcpi_slots = 0;
|
||||
state->pbn = 0;
|
||||
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP)
|
||||
state->abm_level = amdgpu_dm_abm_level ?:
|
||||
ABM_LEVEL_IMMEDIATE_DISABLE;
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
|
||||
if (amdgpu_dm_abm_level <= 0)
|
||||
state->abm_level = ABM_LEVEL_IMMEDIATE_DISABLE;
|
||||
else
|
||||
state->abm_level = amdgpu_dm_abm_level;
|
||||
}
|
||||
|
||||
__drm_atomic_helper_connector_reset(connector, &state->base);
|
||||
}
|
||||
@@ -6613,7 +6623,8 @@ amdgpu_dm_connector_late_register(struct drm_connector *connector)
|
||||
to_amdgpu_dm_connector(connector);
|
||||
int r;
|
||||
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
|
||||
if (connector->connector_type == DRM_MODE_CONNECTOR_eDP &&
|
||||
amdgpu_dm_abm_level < 0) {
|
||||
r = sysfs_create_group(&connector->kdev->kobj,
|
||||
&amdgpu_group);
|
||||
if (r)
|
||||
@@ -7643,7 +7654,8 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
|
||||
aconnector->base.state->max_requested_bpc = aconnector->base.state->max_bpc;
|
||||
|
||||
if (connector_type == DRM_MODE_CONNECTOR_eDP &&
|
||||
(dc_is_dmcu_initialized(adev->dm.dc) || adev->dm.dc->ctx->dmub_srv)) {
|
||||
(dc_is_dmcu_initialized(adev->dm.dc) ||
|
||||
adev->dm.dc->ctx->dmub_srv) && amdgpu_dm_abm_level < 0) {
|
||||
drm_object_attach_property(&aconnector->base.base,
|
||||
adev->mode_info.abm_level_property, 0);
|
||||
}
|
||||
@@ -8411,6 +8423,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
|
||||
fill_dc_dirty_rects(plane, old_plane_state,
|
||||
new_plane_state, new_crtc_state,
|
||||
&bundle->flip_addrs[planes_count],
|
||||
acrtc_state->stream->link->psr_settings.psr_version ==
|
||||
DC_PSR_VERSION_SU_1,
|
||||
&dirty_rects_changed);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user