]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
Merge tag 'for-5.12-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_kms.c
index b16b32797624af9a38bb57094c19e41845a18765..64beb33996042647143539bace349d026fbf90dc 100644 (file)
@@ -142,7 +142,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
            (amdgpu_is_atpx_hybrid() ||
             amdgpu_has_atpx_dgpu_power_cntl()) &&
            ((flags & AMD_IS_APU) == 0) &&
-           !pci_is_thunderbolt_attached(dev->pdev))
+           !pci_is_thunderbolt_attached(to_pci_dev(dev->dev)))
                flags |= AMD_IS_PX;
 
        parent = pci_upstream_bridge(adev->pdev);
@@ -156,7 +156,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
         */
        r = amdgpu_device_init(adev, flags);
        if (r) {
-               dev_err(&dev->pdev->dev, "Fatal error during GPU init\n");
+               dev_err(dev->dev, "Fatal error during GPU init\n");
                goto out;
        }
 
@@ -173,8 +173,6 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
                switch (adev->asic_type) {
                case CHIP_VEGA20:
                case CHIP_ARCTURUS:
-               case CHIP_SIENNA_CICHLID:
-               case CHIP_NAVY_FLOUNDER:
                        /* enable runpm if runpm=1 */
                        if (amdgpu_runtime_pm > 0)
                                adev->runpm = true;
@@ -199,7 +197,7 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, unsigned long flags)
 
        acpi_status = amdgpu_acpi_init(adev);
        if (acpi_status)
-               dev_dbg(&dev->pdev->dev, "Error during ACPI methods call\n");
+               dev_dbg(dev->dev, "Error during ACPI methods call\n");
 
        if (adev->runpm) {
                /* only need to skip on ATPX */
@@ -735,10 +733,10 @@ int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
                if (!dev_info)
                        return -ENOMEM;
 
-               dev_info->device_id = dev->pdev->device;
+               dev_info->device_id = adev->pdev->device;
                dev_info->chip_rev = adev->rev_id;
                dev_info->external_rev = adev->external_rev_id;
-               dev_info->pci_rev = dev->pdev->revision;
+               dev_info->pci_rev = adev->pdev->revision;
                dev_info->family = adev->family;
                dev_info->num_shader_engines = adev->gfx.config.max_shader_engines;
                dev_info->num_shader_arrays_per_engine = adev->gfx.config.max_sh_per_se;
This page took 0.037425 seconds and 4 git commands to generate.