Skip to content

Commit 0d45994

Browse files
amd-sukhatrigregkh
authored andcommitted
drm/amdgpu: add amdgpu_device reference in ip block
[ Upstream commit 37b9932 ] To handle amdgpu_device reference for different GPUs we add it's reference in each ip block which can be used to differentiate between difference gpu devices. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Suggested-by: Christian König <christian.koenig@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Stable-dep-of: 8b3e8fa ("drm/amdgpu/uvd4.2: Don't initialize UVD 4.2 when DPM is disabled") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 86b16f3 commit 0d45994

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ struct amdgpu_ip_block_version {
388388
struct amdgpu_ip_block {
389389
struct amdgpu_ip_block_status status;
390390
const struct amdgpu_ip_block_version *version;
391+
struct amdgpu_device *adev;
391392
};
392393

393394
int amdgpu_device_ip_block_version_cmp(struct amdgpu_device *adev,

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,6 +2336,8 @@ int amdgpu_device_ip_block_add(struct amdgpu_device *adev,
23362336
DRM_INFO("add ip block number %d <%s>\n", adev->num_ip_blocks,
23372337
ip_block_version->funcs->name);
23382338

2339+
adev->ip_blocks[adev->num_ip_blocks].adev = adev;
2340+
23392341
adev->ip_blocks[adev->num_ip_blocks++].version = ip_block_version;
23402342

23412343
return 0;

0 commit comments

Comments
 (0)