Skip to content

Commit

Permalink
Merge tag 'drm-fixes-2025-02-28' of https://gitlab.freedesktop.org/dr…
Browse files Browse the repository at this point in the history
…m/kernel

Pull drm fixes from Dave Airlie:
 "This week's fixes pull, amdgpu mostly, with some xe and a few misc
  others, the fb defio fix is bit of a change, but it avoids some nasty
  NULL pointer crashes due to defio assuming page backing in places it
  didn't have pages.

  amdgpu:
   - Legacy dpm suspend/resume fix
   - Runtime PM fix for DELL G5 SE
   - MAINTAINERS updates
   - Enforce Isolation fixes
   - mailmap update
   - EDID reading i2c fix
   - PSR fix
   - eDP fix
   - HPD interrupt handling fix
   - Clear memory fix

  amdkfd:
   - MQD handling fix

  vkms:
   - fix rounding error

  imagination:
   - header fix

  nouveau:
   - connector status fix

  fb/defio:
   - NULL ptr fix for defio drivers

  i915:
   - Fix encoder HW state readout for DP UHBR MST

  xe:
   - OA uapi fix (Umesh)
   - Userptr related fixes
   - Remove a duplicated register entry
   - Scheduler related fix to prevent exec races when freeing it"

* tag 'drm-fixes-2025-02-28' of https://gitlab.freedesktop.org/drm/kernel: (25 commits)
  drm/fbdev-dma: Add shadow buffering for deferred I/O
  drm/nouveau: Do not override forced connector status
  drm/i915/dp_mst: Fix encoder HW state readout for UHBR MST
  drm/xe: cancel pending job timer before freeing scheduler
  drm/xe/regs: remove a duplicate definition for RING_CTL_SIZE(size)
  drm/imagination: remove unnecessary header include path
  drm/amdgpu: init return value in amdgpu_ttm_clear_buffer
  drm/amd/display: Fix HPD after gpu reset
  drm/amd/display: add a quirk to enable eDP0 on DP1
  drm/amd/display: Disable PSR-SU on eDP panels
  MAINTAINERS: Update AMDGPU DML maintainers info
  drm/amd/display: restore edid reading from a given i2c adapter
  mailmap: Add entry for Rodrigo Siqueira
  MAINTAINERS: Change my role from Maintainer to Reviewer
  drm/amdgpu/mes: keep enforce isolation up to date
  drm/amdgpu/gfx: only call mes for enforce isolation if supported
  MAINTAINERS: update amdgpu maintainers list
  drm/amdgpu: disable BAR resize on Dell G5 SE
  drm/amdkfd: Preserve cp_hqd_pq_control on update_mqd
  amdgpu/pm/legacy: fix suspend/resume issues
  ...
  • Loading branch information
torvalds committed Feb 28, 2025
2 parents 1e15510 + 6a5884f commit 7654481
Show file tree
Hide file tree
Showing 28 changed files with 407 additions and 124 deletions.
3 changes: 3 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ Nadav Amit <[email protected]> <[email protected]>
Nadia Yvette Chambers <[email protected]> William Lee Irwin III <[email protected]>
Naoya Horiguchi <[email protected]> <[email protected]>
Naoya Horiguchi <[email protected]> <[email protected]>
Natalie Vock <[email protected]> <[email protected]>
Nathan Chancellor <[email protected]> <[email protected]>
Naveen N Rao <[email protected]> <[email protected]>
Naveen N Rao <[email protected]> <[email protected]>
Expand Down Expand Up @@ -613,6 +614,8 @@ Richard Leitner <[email protected]> <[email protected]>
Richard Leitner <[email protected]> <[email protected]>
Robert Foss <[email protected]> <[email protected]>
Rocky Liao <[email protected]> <[email protected]>
Rodrigo Siqueira <[email protected]> <[email protected]>
Rodrigo Siqueira <[email protected]> <[email protected]>
Roman Gushchin <[email protected]> <[email protected]>
Roman Gushchin <[email protected]> <[email protected]>
Roman Gushchin <[email protected]> <[email protected]>
Expand Down
16 changes: 13 additions & 3 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1046,14 +1046,14 @@ F: drivers/crypto/ccp/hsti.*
AMD DISPLAY CORE
M: Harry Wentland <[email protected]>
M: Leo Li <[email protected]>
M: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
R: Rodrigo Siqueira <siqueira@igalia.com>
L: [email protected]
S: Supported
T: git https://gitlab.freedesktop.org/agd5f/linux.git
F: drivers/gpu/drm/amd/display/

AMD DISPLAY CORE - DML
M: Chaitanya Dhere <chaitanya.dhere@amd.com>
M: Austin Zheng <austin.zheng@amd.com>
M: Jun Lei <[email protected]>
S: Supported
F: drivers/gpu/drm/amd/display/dc/dml/
Expand Down Expand Up @@ -5926,6 +5926,17 @@ F: tools/testing/selftests/cgroup/test_cpuset.c
F: tools/testing/selftests/cgroup/test_cpuset_prs.sh
F: tools/testing/selftests/cgroup/test_cpuset_v1_base.sh

CONTROL GROUP - DEVICE MEMORY CONTROLLER (DMEM)
M: Maarten Lankhorst <[email protected]>
M: Maxime Ripard <[email protected]>
M: Natalie Vock <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
F: include/linux/cgroup_dmem.h
F: kernel/cgroup/dmem.c

CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)
M: Johannes Weiner <[email protected]>
M: Michal Hocko <[email protected]>
Expand Down Expand Up @@ -19655,7 +19666,6 @@ F: drivers/net/wireless/quantenna
RADEON and AMDGPU DRM DRIVERS
M: Alex Deucher <[email protected]>
M: Christian König <[email protected]>
M: Xinhui Pan <[email protected]>
L: [email protected]
S: Supported
B: https://gitlab.freedesktop.org/drm/amd/-/issues
Expand Down
7 changes: 7 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,6 +1638,13 @@ int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev)
if (amdgpu_sriov_vf(adev))
return 0;

/* resizing on Dell G5 SE platforms causes problems with runtime pm */
if ((amdgpu_runtime_pm != 0) &&
adev->pdev->vendor == PCI_VENDOR_ID_ATI &&
adev->pdev->device == 0x731f &&
adev->pdev->subsystem_vendor == PCI_VENDOR_ID_DELL)
return 0;

/* PCI_EXT_CAP_ID_VNDR extended capability is located at 0x100 */
if (!pci_find_ext_capability(adev->pdev, PCI_EXT_CAP_ID_VNDR))
DRM_WARN("System can't access extended configuration space, please check!!\n");
Expand Down
11 changes: 4 additions & 7 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1638,22 +1638,19 @@ static ssize_t amdgpu_gfx_set_enforce_isolation(struct device *dev,
}

mutex_lock(&adev->enforce_isolation_mutex);

for (i = 0; i < num_partitions; i++) {
if (adev->enforce_isolation[i] && !partition_values[i]) {
if (adev->enforce_isolation[i] && !partition_values[i])
/* Going from enabled to disabled */
amdgpu_vmid_free_reserved(adev, AMDGPU_GFXHUB(i));
amdgpu_mes_set_enforce_isolation(adev, i, false);
} else if (!adev->enforce_isolation[i] && partition_values[i]) {
else if (!adev->enforce_isolation[i] && partition_values[i])
/* Going from disabled to enabled */
amdgpu_vmid_alloc_reserved(adev, AMDGPU_GFXHUB(i));
amdgpu_mes_set_enforce_isolation(adev, i, true);
}
adev->enforce_isolation[i] = partition_values[i];
}

mutex_unlock(&adev->enforce_isolation_mutex);

amdgpu_mes_update_enforce_isolation(adev);

return count;
}

Expand Down
20 changes: 19 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,8 @@ bool amdgpu_mes_suspend_resume_all_supported(struct amdgpu_device *adev)
}

/* Fix me -- node_id is used to identify the correct MES instances in the future */
int amdgpu_mes_set_enforce_isolation(struct amdgpu_device *adev, uint32_t node_id, bool enable)
static int amdgpu_mes_set_enforce_isolation(struct amdgpu_device *adev,
uint32_t node_id, bool enable)
{
struct mes_misc_op_input op_input = {0};
int r;
Expand All @@ -1703,6 +1704,23 @@ int amdgpu_mes_set_enforce_isolation(struct amdgpu_device *adev, uint32_t node_i
return r;
}

int amdgpu_mes_update_enforce_isolation(struct amdgpu_device *adev)
{
int i, r = 0;

if (adev->enable_mes && adev->gfx.enable_cleaner_shader) {
mutex_lock(&adev->enforce_isolation_mutex);
for (i = 0; i < (adev->xcp_mgr ? adev->xcp_mgr->num_xcps : 1); i++) {
if (adev->enforce_isolation[i])
r |= amdgpu_mes_set_enforce_isolation(adev, i, true);
else
r |= amdgpu_mes_set_enforce_isolation(adev, i, false);
}
mutex_unlock(&adev->enforce_isolation_mutex);
}
return r;
}

#if defined(CONFIG_DEBUG_FS)

static int amdgpu_debugfs_mes_event_log_show(struct seq_file *m, void *unused)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,6 @@ static inline void amdgpu_mes_unlock(struct amdgpu_mes *mes)

bool amdgpu_mes_suspend_resume_all_supported(struct amdgpu_device *adev);

int amdgpu_mes_set_enforce_isolation(struct amdgpu_device *adev, uint32_t node_id, bool enable);
int amdgpu_mes_update_enforce_isolation(struct amdgpu_device *adev);

#endif /* __AMDGPU_MES_H__ */
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2281,7 +2281,7 @@ int amdgpu_ttm_clear_buffer(struct amdgpu_bo *bo,
struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;
struct amdgpu_res_cursor cursor;
u64 addr;
int r;
int r = 0;

if (!adev->mman.buffer_funcs_enabled)
return -EINVAL;
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,10 @@ static int mes_v11_0_hw_init(struct amdgpu_ip_block *ip_block)
goto failure;
}

r = amdgpu_mes_update_enforce_isolation(adev);
if (r)
goto failure;

out:
/*
* Disable KIQ ring usage from the driver once MES is enabled.
Expand Down
4 changes: 4 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,10 @@ static int mes_v12_0_hw_init(struct amdgpu_ip_block *ip_block)
goto failure;
}

r = amdgpu_mes_update_enforce_isolation(adev);
if (r)
goto failure;

out:
/*
* Disable KIQ ring usage from the driver once MES is enabled.
Expand Down
6 changes: 4 additions & 2 deletions drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v10.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ static void init_mqd(struct mqd_manager *mm, void **mqd,
m->cp_hqd_persistent_state = CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK |
0x53 << CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT;

m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT;
m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__UNORD_DISPATCH_MASK;
m->cp_mqd_control = 1 << CP_MQD_CONTROL__PRIV_STATE__SHIFT;

m->cp_mqd_base_addr_lo = lower_32_bits(addr);
Expand Down Expand Up @@ -167,10 +169,10 @@ static void update_mqd(struct mqd_manager *mm, void *mqd,

m = get_mqd(mqd);

m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT;
m->cp_hqd_pq_control &= ~CP_HQD_PQ_CONTROL__QUEUE_SIZE_MASK;
m->cp_hqd_pq_control |=
ffs(q->queue_size / sizeof(unsigned int)) - 1 - 1;
m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__UNORD_DISPATCH_MASK;

pr_debug("cp_hqd_pq_control 0x%x\n", m->cp_hqd_pq_control);

m->cp_hqd_pq_base_lo = lower_32_bits((uint64_t)q->queue_address >> 8);
Expand Down
5 changes: 3 additions & 2 deletions drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v11.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ static void init_mqd(struct mqd_manager *mm, void **mqd,
m->cp_hqd_persistent_state = CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK |
0x55 << CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT;

m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT;
m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__UNORD_DISPATCH_MASK;
m->cp_mqd_control = 1 << CP_MQD_CONTROL__PRIV_STATE__SHIFT;

m->cp_mqd_base_addr_lo = lower_32_bits(addr);
Expand Down Expand Up @@ -221,10 +223,9 @@ static void update_mqd(struct mqd_manager *mm, void *mqd,

m = get_mqd(mqd);

m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT;
m->cp_hqd_pq_control &= ~CP_HQD_PQ_CONTROL__QUEUE_SIZE_MASK;
m->cp_hqd_pq_control |=
ffs(q->queue_size / sizeof(unsigned int)) - 1 - 1;
m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__UNORD_DISPATCH_MASK;
pr_debug("cp_hqd_pq_control 0x%x\n", m->cp_hqd_pq_control);

m->cp_hqd_pq_base_lo = lower_32_bits((uint64_t)q->queue_address >> 8);
Expand Down
5 changes: 3 additions & 2 deletions drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ static void init_mqd(struct mqd_manager *mm, void **mqd,
m->cp_hqd_persistent_state = CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK |
0x55 << CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT;

m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT;
m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__UNORD_DISPATCH_MASK;
m->cp_mqd_control = 1 << CP_MQD_CONTROL__PRIV_STATE__SHIFT;

m->cp_mqd_base_addr_lo = lower_32_bits(addr);
Expand Down Expand Up @@ -184,10 +186,9 @@ static void update_mqd(struct mqd_manager *mm, void *mqd,

m = get_mqd(mqd);

m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT;
m->cp_hqd_pq_control &= ~CP_HQD_PQ_CONTROL__QUEUE_SIZE_MASK;
m->cp_hqd_pq_control |=
ffs(q->queue_size / sizeof(unsigned int)) - 1 - 1;
m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__UNORD_DISPATCH_MASK;
pr_debug("cp_hqd_pq_control 0x%x\n", m->cp_hqd_pq_control);

m->cp_hqd_pq_base_lo = lower_32_bits((uint64_t)q->queue_address >> 8);
Expand Down
5 changes: 4 additions & 1 deletion drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ static void init_mqd(struct mqd_manager *mm, void **mqd,
m->cp_hqd_persistent_state = CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK |
0x53 << CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT;

m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT;
m->cp_hqd_pq_control |= CP_HQD_PQ_CONTROL__UNORD_DISPATCH_MASK;

m->cp_mqd_control = 1 << CP_MQD_CONTROL__PRIV_STATE__SHIFT;

m->cp_mqd_base_addr_lo = lower_32_bits(addr);
Expand Down Expand Up @@ -245,7 +248,7 @@ static void update_mqd(struct mqd_manager *mm, void *mqd,

m = get_mqd(mqd);

m->cp_hqd_pq_control = 5 << CP_HQD_PQ_CONTROL__RPTR_BLOCK_SIZE__SHIFT;
m->cp_hqd_pq_control &= ~CP_HQD_PQ_CONTROL__QUEUE_SIZE_MASK;
m->cp_hqd_pq_control |= order_base_2(q->queue_size / 4) - 1;
pr_debug("cp_hqd_pq_control 0x%x\n", m->cp_hqd_pq_control);

Expand Down
Loading

0 comments on commit 7654481

Please sign in to comment.