Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: cleanup idh event/req for NV headers

1) drop the headers from AI in mxgpu_nv.c, should refer to mxgpu_nv.h

2) the IDH_EVENT_MAX is not used and not aligned with host side
so drop it
3) the IDH_TEXT_MESSAG was provided in host but not defined in guest

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Emily Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Monk Liu and committed by
Alex Deucher
4d130238 ba56657d

+26 -3
+2 -1
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h
··· 46 46 IDH_SUCCESS, 47 47 IDH_FAIL, 48 48 IDH_QUERY_ALIVE, 49 - IDH_EVENT_MAX 49 + 50 + IDH_TEXT_MESSAGE = 255, 50 51 }; 51 52 52 53 extern const struct amdgpu_virt_ops xgpu_ai_virt_ops;
-1
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
··· 30 30 #include "navi10_ih.h" 31 31 #include "soc15_common.h" 32 32 #include "mxgpu_nv.h" 33 - #include "mxgpu_ai.h" 34 33 35 34 static void xgpu_nv_mailbox_send_ack(struct amdgpu_device *adev) 36 35 {
+22
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
··· 28 28 #define NV_MAILBOX_POLL_MSG_TIMEDOUT 12000 29 29 #define NV_MAILBOX_POLL_FLR_TIMEDOUT 500 30 30 31 + enum idh_request { 32 + IDH_REQ_GPU_INIT_ACCESS = 1, 33 + IDH_REL_GPU_INIT_ACCESS, 34 + IDH_REQ_GPU_FINI_ACCESS, 35 + IDH_REL_GPU_FINI_ACCESS, 36 + IDH_REQ_GPU_RESET_ACCESS, 37 + 38 + IDH_LOG_VF_ERROR = 200, 39 + }; 40 + 41 + enum idh_event { 42 + IDH_CLR_MSG_BUF = 0, 43 + IDH_READY_TO_ACCESS_GPU, 44 + IDH_FLR_NOTIFICATION, 45 + IDH_FLR_NOTIFICATION_CMPL, 46 + IDH_SUCCESS, 47 + IDH_FAIL, 48 + IDH_QUERY_ALIVE, 49 + 50 + IDH_TEXT_MESSAGE = 255, 51 + }; 52 + 31 53 extern const struct amdgpu_virt_ops xgpu_nv_virt_ops; 32 54 33 55 void xgpu_nv_mailbox_set_irq_funcs(struct amdgpu_device *adev);
+2 -1
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.h
··· 43 43 IDH_READY_TO_ACCESS_GPU, 44 44 IDH_FLR_NOTIFICATION, 45 45 IDH_FLR_NOTIFICATION_CMPL, 46 - IDH_EVENT_MAX 46 + 47 + IDH_TEXT_MESSAGE = 255 47 48 }; 48 49 49 50 extern const struct amdgpu_virt_ops xgpu_vi_virt_ops;