RE: [PATCH] drm/amdgpu: For Navi12 SRIOV VF, register mailbox functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Emily Deng <Emily.Deng@xxxxxxx>

>-----Original Message-----
>From: Zhao, Jiange <Jiange.Zhao@xxxxxxx>
>Sent: Wednesday, September 11, 2019 6:25 PM
>To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
>Cc: Nieto, David M <David.Nieto@xxxxxxx>; Deng, Emily
><Emily.Deng@xxxxxxx>; Koenig, Christian <Christian.Koenig@xxxxxxx>;
>Zhao, Jiange <Jiange.Zhao@xxxxxxx>
>Subject: [PATCH] drm/amdgpu: For Navi12 SRIOV VF, register mailbox
>functions
>
>From: Jiange Zhao <Jiange.Zhao@xxxxxxx>
>
>Mailbox functions and interrupts are only for Navi12 VF.
>
>Register functions and irqs during initialization.
>
>Signed-off-by: Jiange Zhao <Jiange.Zhao@xxxxxxx>
>---
> drivers/gpu/drm/amd/amdgpu/nv.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c
>b/drivers/gpu/drm/amd/amdgpu/nv.c index a61f43c0c9df..4c24672be12a
>100644
>--- a/drivers/gpu/drm/amd/amdgpu/nv.c
>+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
>@@ -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;
> }
>
>--
>2.20.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux