Add a modify flag to struct amdgpu_mqd_prop. When set, init_mqd patches
the MQD in place, keeping the ring rptr/wptr that firmware context-saved
into it on unmap. KFD already patches the MQD in place for the same
disable/re-enable sequence.
v3: use an mqd_prop modify flag consumed by init_mqd instead of a
separate per-IP update_mqd callback, per review.
v4: drop the user_wptr field - firmware context-saves the wptr into the
MQD on unmap, so init_mqd just keeps it rather than restoring a value
read back from the wptr BO.
Signed-off-by: Jesse Zhang <[email protected]>
Suggested-by: Alexander Deucher <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
index 63670b41c26c..d231d5d283df 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
@@ -494,6 +494,7 @@ struct amdgpu_mqd_prop {
uint64_t ctx_save_area_addr;
uint32_t ctx_save_area_size;
uint32_t ctl_stack_size;
+ bool modify;
};
struct amdgpu_mqd {
--
2.49.0