Skip to content

Commit

Permalink
drm/amdkcl: Get DRM dev from adev by inline-f
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yang Xiong authored and Yang Xiong committed Sep 3, 2020
1 parent 82fc7ac commit 73c1d68
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 73c1d68

Please sign in to comment.