drm/amdgpu: For Navi12 SRIOV VF, register mailbox functions
Subsystems (2)
PATCH 1/1 drm/amdgpu: For Navi12 SRIOV VF, register mailbox functions
From: Jiange Zhao <[email protected]>
Mailbox functions and interrupts are only for Navi12 VF.
Register functions and irqs during initialization.
--- drivers/gpu/drm/amd/amdgpu/nv.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +19 -0
@@ -53,6 +53,7 @@#include "vcn_v2_0.h" #include "dce_virtual.h" #include "mes_v10_1.h" +#include "mxgpu_nv.h" static const struct amd_ip_funcs nv_common_ip_funcs;
@@ -426,6 +427,9 @@ int nv_set_ip_blocks(struct amdgpu_device *adev) adev->nbio.funcs->detect_hw_virt (adev); +if (amdgpu_sriov_vf (adev)) + adev->virt.ops = &xgpu_nv_virt_ops; +switch (adev->asic_type) {case CHIP_NAVI10 :case CHIP_NAVI14 :
@@ -666,16 +670,31 @@ static int nv_common_early_init(void *handle)return -EINVAL ; } +if (amdgpu_sriov_vf (adev)) { +amdgpu_virt_init_setting (adev); +xgpu_nv_mailbox_set_irq_funcs (adev); + } +return 0 ; }static int nv_common_late_init (void *handle) { +struct amdgpu_device *adev = (struct amdgpu_device *)handle; + +if (amdgpu_sriov_vf (adev)) +xgpu_nv_mailbox_get_irq (adev); +return 0 ; }static int nv_common_sw_init (void *handle) { +struct amdgpu_device *adev = (struct amdgpu_device *)handle; + +if (amdgpu_sriov_vf (adev)) +xgpu_nv_mailbox_add_irq_id (adev); +return 0 ; }
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Deng, Emily
Reviewed-by Emily DengQuoted 75 lines
-----Original Message-----
From: Zhao, Jiange <[email protected]>
Sent: Wednesday, September 11, 2019 6:25 PM
To: [email protected]
Cc: Nieto, David M <[email protected]>; Deng, Emily <[email protected]>; Koenig, Christian <[email protected]>; Zhao, Jiange <[email protected]>
Subject: [PATCH] drm/amdgpu: For Navi12 SRIOV VF, register mailbox functionsFrom: Jiange Zhao <[email protected]>
Mailbox functions and interrupts are only for Navi12 VF.
Register functions and irqs during initialization.
Signed-off-by Jiange Zhao <[email protected]>---
drivers/gpu/drm/amd/amdgpu/nv.c| 19 +++++++++++++++++++1 file changed, 19 insertions(+)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/nv.cindexa61f43c0c9df..4c24672be12a100644drivers/gpu/drm/amd/amdgpu/nv.c +19
-1@@ -53,6 +53,7 @@#include "vcn_v2_0.h" #include "dce_virtual.h" #include "mes_v10_1.h" +#include "mxgpu_nv.h" static const struct amd_ip_funcs nv_common_ip_funcs;@@ -426,6 +427,9 @@ int nv_set_ip_blocks(struct amdgpu_device *adev) adev->nbio.funcs->detect_hw_virt (adev); +if (amdgpu_sriov_vf (adev)) + adev->virt.ops = &xgpu_nv_virt_ops; +switch (adev->asic_type) {case CHIP_NAVI10 :case CHIP_NAVI14 :@@ -666,16 +670,31 @@ static int nv_common_early_init(void *handle)return -EINVAL ; } +if (amdgpu_sriov_vf (adev)) { +amdgpu_virt_init_setting (adev); +xgpu_nv_mailbox_set_irq_funcs (adev); + } +return 0 ; }static int nv_common_late_init (void *handle) { +struct amdgpu_device *adev = (struct amdgpu_device *)handle; + +if (amdgpu_sriov_vf (adev)) +xgpu_nv_mailbox_get_irq (adev); +return 0 ; }static int nv_common_sw_init (void *handle) { +struct amdgpu_device *adev = (struct amdgpu_device *)handle; + +if (amdgpu_sriov_vf (adev)) +xgpu_nv_mailbox_add_irq_id (adev); +return 0 ; } --
Quoted 1 line
2.20.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx