Skip to contentSkip to conversation

drm/amdgpu: use adev_to_drm for consistency

PATCH In review Guchun Chen 2 participants 2 messages Jul 25, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: use adev_to_drm for consistency

Keep code consistency when accessing drm_device from amdgpu driver.

---
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +1 -1
index 84ac2401895a..698a59ec3dba 100644
@@ -150,7 +150,7 @@ static int vcn_v4_0_sw_fini(void *handle)
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 	int i, r, idx;
 
-	if (drm_dev_enter(&adev->ddev, &idx)) {
+	if (drm_dev_enter(adev_to_drm(adev), &idx)) {
 		for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
 			volatile struct amdgpu_vcn4_fw_shared *fw_shared;
 
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

[Public]

________________________________
From: amd-gfx <[email protected]> on behalf of Guchun Chen <[email protected]>
Sent: Monday, July 25, 2022 2:18 AM
To: [email protected] <[email protected]>; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH] drm/amdgpu: use adev_to_drm for consistency

Keep code consistency when accessing drm_device from amdgpu driver.

---
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +1 -1
index 84ac2401895a..698a59ec3dba 100644
@@ -150,7 +150,7 @@ static int vcn_v4_0_sw_fini(void *handle)
         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
         int i, r, idx;
 
-       if (drm_dev_enter(&adev->ddev, &idx)) {
+       if (drm_dev_enter(adev_to_drm(adev), &idx)) {
                 for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
                         volatile struct amdgpu_vcn4_fw_shared *fw_shared;
 

--
2.17.1