]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdgpu: fix return random value when multiple threads read registers via mes.
authorchongli2 <chongli2@amd.com>
Wed, 6 Nov 2024 03:43:09 +0000 (11:43 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 8 Nov 2024 16:07:50 +0000 (11:07 -0500)
commitf4a3246a2c7a595161f1ba11db53639b7f580104
tree77bb69ed4f7c92a4de91c5633e26bfd0eb76d18e
parentcd82f29ec51b2e616289db7b258a936127c16efa
drm/amdgpu: fix return random value when multiple threads read registers via mes.

The currect code use the address "adev->mes.read_val_ptr" to
store the value read from register via mes.
So when multiple threads read register,
multiple threads have to share the one address,
and overwrite the value each other.

Assign an address by "amdgpu_device_wb_get" to store register value.
each thread will has an address to store register value.

Signed-off-by: chongli2 <chongli2@amd.com>
Reviewed-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h