]> Git Repo - J-linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Merge branch 'for-next' into for-linus
[J-linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_device.c
index 64510898eedd0609a3b62a68121a5ac883196fb6..f1e9663b4051075a78c2d72f5c85ca40e1050bfa 100644 (file)
@@ -6044,3 +6044,44 @@ struct dma_fence *amdgpu_device_switch_gang(struct amdgpu_device *adev,
        dma_fence_put(old);
        return NULL;
 }
+
+bool amdgpu_device_has_display_hardware(struct amdgpu_device *adev)
+{
+       switch (adev->asic_type) {
+#ifdef CONFIG_DRM_AMDGPU_SI
+       case CHIP_HAINAN:
+#endif
+       case CHIP_TOPAZ:
+               /* chips with no display hardware */
+               return false;
+#ifdef CONFIG_DRM_AMDGPU_SI
+       case CHIP_TAHITI:
+       case CHIP_PITCAIRN:
+       case CHIP_VERDE:
+       case CHIP_OLAND:
+#endif
+#ifdef CONFIG_DRM_AMDGPU_CIK
+       case CHIP_BONAIRE:
+       case CHIP_HAWAII:
+       case CHIP_KAVERI:
+       case CHIP_KABINI:
+       case CHIP_MULLINS:
+#endif
+       case CHIP_TONGA:
+       case CHIP_FIJI:
+       case CHIP_POLARIS10:
+       case CHIP_POLARIS11:
+       case CHIP_POLARIS12:
+       case CHIP_VEGAM:
+       case CHIP_CARRIZO:
+       case CHIP_STONEY:
+               /* chips with display hardware */
+               return true;
+       default:
+               /* IP discovery */
+               if (!adev->ip_versions[DCE_HWIP][0] ||
+                   (adev->harvest_ip_mask & AMD_HARVEST_IP_DMU_MASK))
+                       return false;
+               return true;
+       }
+}
This page took 0.02861 seconds and 4 git commands to generate.