drm/amdgpu/virt: rename fieldes of virtualization structure
authorXiangliang Yu <Xiangliang.Yu@amd.com>
Mon, 9 Jan 2017 23:06:57 +0000 (18:06 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 27 Jan 2017 16:13:04 +0000 (11:13 -0500)
Use acronym to rename fields to make easy to spell out.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
drivers/gpu/drm/amd/amdgpu/cik.c
drivers/gpu/drm/amd/amdgpu/si.c
drivers/gpu/drm/amd/amdgpu/vi.c

index b5ad548e2503908e0cfa2f3e51d609a150e53f70..b573ed31e47dc58d76549771b9e9c660cdc1fcc1 100644 (file)
@@ -1474,7 +1474,7 @@ struct amdgpu_device {
        /* amdkfd interface */
        struct kfd_dev          *kfd;
 
-       struct amdgpu_virtualization virtualization;
+       struct amdgpu_virt      virt;
 
        /* link all shadow bo */
        struct list_head                shadow_list;
index 02d32ee8d5b6b35490fc45770f15860a5062c281..eb66cc526950e613eb5ee13c8cd492ee4419e1ef 100644 (file)
@@ -1575,7 +1575,7 @@ static int amdgpu_resume(struct amdgpu_device *adev)
 static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
 {
        if (amdgpu_atombios_has_gpu_virtualization_table(adev))
-               adev->virtualization.virtual_caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
+               adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
 }
 
 /**
index 2c37a374917fb4bc39d676f7b1c47b08fadd9ae8..0d821d9c6932b788d3cc89f973f2d0e05675983f 100644 (file)
 #define AMDGPU_SRIOV_CAPS_IS_VF        (1 << 2) /* this GPU is a virtual function */
 #define AMDGPU_PASSTHROUGH_MODE        (1 << 3) /* thw whole GPU is pass through for VM */
 /* GPU virtualization */
-struct amdgpu_virtualization {
-       uint32_t virtual_caps;
+struct amdgpu_virt {
+       uint32_t caps;
 };
 
 #define amdgpu_sriov_enabled(adev) \
-((adev)->virtualization.virtual_caps & AMDGPU_SRIOV_CAPS_ENABLE_IOV)
+((adev)->virt.caps & AMDGPU_SRIOV_CAPS_ENABLE_IOV)
 
 #define amdgpu_sriov_vf(adev) \
-((adev)->virtualization.virtual_caps & AMDGPU_SRIOV_CAPS_IS_VF)
+((adev)->virt.caps & AMDGPU_SRIOV_CAPS_IS_VF)
 
 #define amdgpu_sriov_bios(adev) \
-((adev)->virtualization.virtual_caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS)
+((adev)->virt.caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS)
 
 #define amdgpu_passthrough(adev) \
-((adev)->virtualization.virtual_caps & AMDGPU_PASSTHROUGH_MODE)
+((adev)->virt.caps & AMDGPU_PASSTHROUGH_MODE)
 
 static inline bool is_virtual_machine(void)
 {
@@ -54,4 +54,4 @@ static inline bool is_virtual_machine(void)
 #endif
 }
 
-#endif
\ No newline at end of file
+#endif
index 302df85893ab599bce0d539c398b6b99a0b75695..84d5affce56bcc41441969b00fa1148316b03892 100644 (file)
@@ -1627,7 +1627,7 @@ static uint32_t cik_get_rev_id(struct amdgpu_device *adev)
 static void cik_detect_hw_virtualization(struct amdgpu_device *adev)
 {
        if (is_virtual_machine()) /* passthrough mode */
-               adev->virtualization.virtual_caps |= AMDGPU_PASSTHROUGH_MODE;
+               adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
 }
 
 static const struct amdgpu_asic_funcs cik_asic_funcs =
index 9bf7afb2f74ef857699dad2d7a56f65eaab45875..6a85daa63d21076d62feb9e7276b5db6bb38c2fe 100644 (file)
@@ -1138,7 +1138,7 @@ static int si_set_uvd_clocks(struct amdgpu_device *adev, u32 vclk, u32 dclk)
 static void si_detect_hw_virtualization(struct amdgpu_device *adev)
 {
        if (is_virtual_machine()) /* passthrough mode */
-               adev->virtualization.virtual_caps |= AMDGPU_PASSTHROUGH_MODE;
+               adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
 }
 
 static const struct amdgpu_asic_funcs si_asic_funcs =
index fbb7d8bf5a589aac50a77855cc0fe544cbecf74e..cff1a0ebe832830496bdce977e9956d691e5d93d 100644 (file)
@@ -445,14 +445,14 @@ static void vi_detect_hw_virtualization(struct amdgpu_device *adev)
        /* bit0: 0 means pf and 1 means vf */
        /* bit31: 0 means disable IOV and 1 means enable */
        if (reg & 1)
-               adev->virtualization.virtual_caps |= AMDGPU_SRIOV_CAPS_IS_VF;
+               adev->virt.caps |= AMDGPU_SRIOV_CAPS_IS_VF;
 
        if (reg & 0x80000000)
-               adev->virtualization.virtual_caps |= AMDGPU_SRIOV_CAPS_ENABLE_IOV;
+               adev->virt.caps |= AMDGPU_SRIOV_CAPS_ENABLE_IOV;
 
        if (reg == 0) {
                if (is_virtual_machine()) /* passthrough mode exclus sr-iov mode */
-                       adev->virtualization.virtual_caps |= AMDGPU_PASSTHROUGH_MODE;
+                       adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
        }
 }