Skip to contentSkip to conversation

drm/amdgpu: use adev_to_drm to get drm_device pointer

PATCH In review Guchun Chen 2 participants 2 messages Dec 13, 2021

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

PATCH 1/1 drm/amdgpu: use adev_to_drm to get drm_device pointer

Updated for consistency when accessing drm_device from amdgpu driver.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 48aeca3b8f16..b2c3892e8e7f 100644
@@ -5705,7 +5705,7 @@ void amdgpu_device_invalidate_hdp(struct amdgpu_device *adev,
 void amdgpu_device_halt(struct amdgpu_device *adev)
 {
 	struct pci_dev *pdev = adev->pdev;
-	struct drm_device *ddev = &adev->ddev;
+	struct drm_device *ddev = adev_to_drm(adev);
 
 	drm_dev_unplug(ddev);
 
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only]

________________________________
From: Chen, Guchun <[email protected]>
Sent: Sunday, December 12, 2021 11:08 PM
To: [email protected] <[email protected]>; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pan, Xinhui <[email protected]>; Yu, Lang <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH] drm/amdgpu: use adev_to_drm to get drm_device pointer

Updated for consistency when accessing drm_device from amdgpu driver.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 48aeca3b8f16..b2c3892e8e7f 100644
@@ -5705,7 +5705,7 @@ void amdgpu_device_invalidate_hdp(struct amdgpu_device *adev,
 void amdgpu_device_halt(struct amdgpu_device *adev)
 {
         struct pci_dev *pdev = adev->pdev;
-       struct drm_device *ddev = &adev->ddev;
+       struct drm_device *ddev = adev_to_drm(adev);
 
         drm_dev_unplug(ddev);
 

--
2.17.1