diff options
author | Yang Xiong <Yang.Xiong@amd.com> | 2020-08-26 15:49:19 +0800 |
---|---|---|
committer | Yang Xiong <Yang.Xiong@amd.com> | 2020-09-03 18:21:05 +0800 |
commit | 73c1d68ba5480d0c31d7d988755cc7f3ce338d45 (patch) | |
tree | d3471869e86a007173abcd0bd9a4935f1bb5cf78 | |
parent | 82fc7acd0b7af38dfc0fd460e6def1be04a60192 (diff) |
drm/amdkcl: Get DRM dev from adev by inline-f
This patch is caused by the following patches:
drm/amdgpu: Get DRM dev from adev by inline-f
drm/amdgpu: Embed drm_device into amdgpu_device (v2)
Change-Id: I0a1bfd7e718cf222133c6c1b68adfb92bc4a95d2
Signed-off-by: Yang Xiong <Yang.Xiong@amd.com>
Reviewed-by: Flora Cui <flora.cui@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index bcd4c957c711..32838fed950d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -1973,7 +1973,7 @@ int amdgpu_amdkfd_gpuvm_export_ipc_obj(struct kgd_dev *kgd, void *vm, #ifdef HAVE_DRM_DRV_GEM_PRIME_EXPORT_PI dmabuf = amdgpu_gem_prime_export(&mem->bo->tbo.base, 0); #else - dmabuf = amdgpu_gem_prime_export(adev->ddev, &mem->bo->tbo.base, 0); + dmabuf = amdgpu_gem_prime_export(adev_to_drm(adev), &mem->bo->tbo.base, 0); #endif if (IS_ERR(dmabuf)) { r = PTR_ERR(dmabuf); diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index 79fb5793e267..6af220a45d22 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -114,7 +114,7 @@ static void amdgpu_flip_work_func(struct work_struct *__work) * start in hpos, and to the "fudged earlier" vblank start in * vpos. */ - stat = amdgpu_display_get_crtc_scanoutpos(adev->ddev, work->crtc_id, + stat = amdgpu_display_get_crtc_scanoutpos(adev_to_drm(adev), work->crtc_id, GET_DISTANCE_TO_VBLANKSTART, &vpos, &hpos, NULL, NULL, &crtc->hwmode); @@ -895,7 +895,7 @@ int amdgpu_display_modeset_create_props(struct amdgpu_device *adev) if (amdgpu_device_has_dc_support(adev)) { #ifndef HAVE_DRM_CONNECTOR_PROPERTY_MAX_BPC adev->mode_info.max_bpc_property = - drm_property_create_range(adev->ddev, 0, "max bpc", 8, 16); + drm_property_create_range(adev_to_drm(adev), 0, "max bpc", 8, 16); if (!adev->mode_info.max_bpc_property) return -ENOMEM; #endif @@ -916,14 +916,14 @@ int amdgpu_display_modeset_create_props(struct amdgpu_device *adev) return -ENOMEM; #ifndef HAVE_DRM_VRR_SUPPORTED adev->mode_info.vrr_capable_property = - drm_property_create_bool(adev->ddev, + drm_property_create_bool(adev_to_drm(adev), DRM_MODE_PROP_IMMUTABLE, "vrr_capable"); if (!adev->mode_info.vrr_capable_property) return -ENOMEM; adev->mode_info.vrr_enabled_property = - drm_property_create_bool(adev->ddev, + drm_property_create_bool(adev_to_drm(adev), 0, "VRR_ENABLED"); if (!adev->mode_info.vrr_enabled_property) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index bbbe760788dc..e2efce607c51 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -1191,7 +1191,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev, ret = drm_dev_init(ddev, &kms_driver, &pdev->dev); if (ret) goto err_free; - kcl_drm_vma_offset_manager_init(dev->vma_offset_manager); + kcl_drm_vma_offset_manager_init(ddev->vma_offset_manager); #ifdef HAVE_DRM_DRV_DRIVER_ATOMIC #ifdef HAVE_DRM_DEVICE_DRIVER_FEATURES diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c index 8758f6f5cb79..3e8938cad3da 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c @@ -300,7 +300,7 @@ int amdgpu_irq_init(struct amdgpu_device *adev) #ifdef PCI_IRQ_MSI r = drm_irq_install(adev_to_drm(adev), pci_irq_vector(adev->pdev, 0)); #else - r = drm_irq_install(adev_to_drm(adev), adev->ddev->pdev->irq); + r = drm_irq_install(adev_to_drm(adev), adev_to_drm(adev)->pdev->irq); #endif if (r) { adev->irq.installed = false; |