]> git.itanic.dy.fi Git - linux-stable/commitdiff
drm/amdgpu: use adev_to_drm for consistency
authorGuchun Chen <guchun.chen@amd.com>
Mon, 25 Jul 2022 06:15:09 +0000 (14:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Jul 2022 20:05:14 +0000 (16:05 -0400)
Keep code consistency when accessing drm_device from amdgpu driver.

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c

index a91ffbf902d4808c015f3526285e655931dbf8c1..0bde38449fd214ee3a434fad953270c10d6e984c 100644 (file)
@@ -154,7 +154,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;