drm/amdgpu: track whether the asic supports SR-IOV
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 1 Feb 2016 16:13:04 +0000 (11:13 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Feb 2016 19:17:11 +0000 (14:17 -0500)
Required to make desicions about certain code pathes.

Reviewed-by: Monk Liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 811353c3f1319e2d8b095ccb7c5228190545f6dd..f2f9b64d014160eddb2dc40c22470d405fb69c22 100644 (file)
@@ -1898,6 +1898,11 @@ void *amdgpu_cgs_create_device(struct amdgpu_device *adev);
 void amdgpu_cgs_destroy_device(void *cgs_device);
 
 
+/* GPU virtualization */
+struct amdgpu_virtualization {
+       bool supports_sr_iov;
+};
+
 /*
  * Core structure, functions and helpers.
  */
@@ -2071,6 +2076,8 @@ struct amdgpu_device {
 
        /* kernel conext for IB submission */
        struct amdgpu_ctx       kernel_ctx;
+
+       struct amdgpu_virtualization virtualization;
 };
 
 bool amdgpu_device_is_px(struct drm_device *dev);
index 4132e4ef9f835cddc77e9bdcde45a859febb8925..00f3a16333cc9bbc45baf9a7c4d7e2f83a062678 100644 (file)
@@ -1500,6 +1500,10 @@ int amdgpu_device_init(struct amdgpu_device *adev,
                return r;
        }
 
+       /* See if the asic supports SR-IOV */
+       adev->virtualization.supports_sr_iov =
+               amdgpu_atombios_has_gpu_virtualization_table(adev);
+
        /* Post card if necessary */
        if (!amdgpu_card_posted(adev)) {
                if (!adev->bios) {
This page took 0.033043 seconds and 5 git commands to generate.