]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: Fix error with dev_info_once usage
authorLijo Lazar <lijo.lazar@amd.com>
Sat, 28 Jun 2025 07:22:01 +0000 (12:52 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Jun 2025 16:08:00 +0000 (12:08 -0400)
Fixes error with dev_info_once usage in amdgpu_device_asic_has_dc_support.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202506281140.mXfWT3EN-lkp@intel.com/
Fixes: a3e510fd69c3 ("drm/amdgpu: Convert from DRM_* to dev_*")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index 3f0b1fa590c6020336c929922b0a678a9c80ad73..7edb7ba917869239c4c8883addebf06d708f3b59 100644 (file)
@@ -1390,7 +1390,8 @@ void amdgpu_device_indirect_wreg64(struct amdgpu_device *adev,
 void amdgpu_device_indirect_wreg64_ext(struct amdgpu_device *adev,
                                   u64 reg_addr, u64 reg_data);
 u32 amdgpu_device_get_rev_id(struct amdgpu_device *adev);
-bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type);
+bool amdgpu_device_asic_has_dc_support(struct pci_dev *pdev,
+                                      enum amd_asic_type asic_type);
 bool amdgpu_device_has_dc_support(struct amdgpu_device *adev);
 
 void amdgpu_device_set_sriov_virtual_display(struct amdgpu_device *adev);
index d4b0a6f84a408eb35956c7c879e6ed42089e4134..9bf7ee7875f9a62b0acae07e61b3193787762e38 100644 (file)
@@ -4099,12 +4099,14 @@ static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
 /**
  * amdgpu_device_asic_has_dc_support - determine if DC supports the asic
  *
+ * @pdev : pci device context
  * @asic_type: AMD asic type
  *
  * Check if there is DC (new modesetting infrastructre) support for an asic.
  * returns true if DC has support, false if not.
  */
-bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
+bool amdgpu_device_asic_has_dc_support(struct pci_dev *pdev,
+                                      enum amd_asic_type asic_type)
 {
        switch (asic_type) {
 #ifdef CONFIG_DRM_AMDGPU_SI
@@ -4148,7 +4150,7 @@ bool amdgpu_device_asic_has_dc_support(enum amd_asic_type asic_type)
        default:
                if (amdgpu_dc > 0)
                        dev_info_once(
-                               adev->dev,
+                               &pdev->dev,
                                "Display Core has been requested via kernel parameter but isn't supported by ASIC, ignoring\n");
                return false;
 #endif
@@ -4168,7 +4170,7 @@ bool amdgpu_device_has_dc_support(struct amdgpu_device *adev)
            (adev->harvest_ip_mask & AMD_HARVEST_IP_DMU_MASK))
                return false;
 
-       return amdgpu_device_asic_has_dc_support(adev->asic_type);
+       return amdgpu_device_asic_has_dc_support(adev->pdev, adev->asic_type);
 }
 
 static void amdgpu_device_xgmi_reset_func(struct work_struct *__work)
index 2bb02fe9c880a70d85d2140cdb55b27ef6065184..b299e15bb5e5134a006d89fe8018357aa7e73ae7 100644 (file)
@@ -2327,7 +2327,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
                amdgpu_aspm = 0;
 
        if (amdgpu_virtual_display ||
-           amdgpu_device_asic_has_dc_support(flags & AMD_ASIC_MASK))
+           amdgpu_device_asic_has_dc_support(pdev, flags & AMD_ASIC_MASK))
                supports_atomic = true;
 
        if ((flags & AMD_EXP_HW_SUPPORT) && !amdgpu_exp_hw_support) {