[V2,03/11] drm/amdgpu/virt: add runtime flag

Submitted by Yu, Xiangliang on Jan. 10, 2017, 10 a.m.

Details

Message ID 1484042450-22987-4-git-send-email-Xiangliang.Yu@amd.com
State New
Headers show
Series "Add support AMD GPU virtualization soultion" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Yu, Xiangliang Jan. 10, 2017, 10 a.m.
Add new flag to define gpu runtime that is out of full gpu access.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
index a6524bb..79619b6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
@@ -28,6 +28,7 @@ 
 #define AMDGPU_SRIOV_CAPS_ENABLE_IOV   (1 << 1) /* sr-iov is enabled on this GPU */
 #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 */
+#define AMDGPU_SRIOV_CAPS_RUNTIME      (1 << 4) /* is out of full access mode */
 /* GPU virtualization */
 struct amdgpu_virt {
 	uint32_t		caps;
@@ -43,6 +44,9 @@  struct amdgpu_virt {
 #define amdgpu_sriov_bios(adev) \
 ((adev)->virt.caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS)
 
+#define amdgpu_sriov_runtime(adev) \
+((adev)->virt.caps & AMDGPU_SRIOV_CAPS_RUNTIME)
+
 #define amdgpu_passthrough(adev) \
 ((adev)->virt.caps & AMDGPU_PASSTHROUGH_MODE)
 

Comments

> -----Original Message-----

> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf

> Of Xiangliang Yu

> Sent: Tuesday, January 10, 2017 5:01 AM

> To: amd-gfx@lists.freedesktop.org

> Cc: Yu, Xiangliang

> Subject: [V2 03/11] drm/amdgpu/virt: add runtime flag

> 

> Add new flag to define gpu runtime that is out of full gpu access.

> 

> Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>


Reviewed-by: Alex Deucher <alexander.deucher@amd.com>


> ---

>  drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 4 ++++

>  1 file changed, 4 insertions(+)

> 

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h

> b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h

> index a6524bb..79619b6 100644

> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h

> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h

> @@ -28,6 +28,7 @@

>  #define AMDGPU_SRIOV_CAPS_ENABLE_IOV   (1 << 1) /* sr-iov is enabled

> on this GPU */

>  #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 */

> +#define AMDGPU_SRIOV_CAPS_RUNTIME      (1 << 4) /* is out of full access

> mode */

>  /* GPU virtualization */

>  struct amdgpu_virt {

>  	uint32_t		caps;

> @@ -43,6 +44,9 @@ struct amdgpu_virt {

>  #define amdgpu_sriov_bios(adev) \

>  ((adev)->virt.caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS)

> 

> +#define amdgpu_sriov_runtime(adev) \

> +((adev)->virt.caps & AMDGPU_SRIOV_CAPS_RUNTIME)

> +

>  #define amdgpu_passthrough(adev) \

>  ((adev)->virt.caps & AMDGPU_PASSTHROUGH_MODE)

> 

> --

> 2.7.4

> 

> _______________________________________________

> amd-gfx mailing list

> amd-gfx@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/amd-gfx