Skip to content

drm/msm: Add the MSM_WAIT_IOVA ioctl

Brian Ho dri-devel linux-arm-msm lkml 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesNew
  2. v22 patches 1 replySuperseded
  3. v12 patches 16 repliesSuperseded

Changes in v3 from the cover letter

* Fixed a bug where the mask was being applied incorrectly

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/msm: Add a GPU-wide wait queuedrivers/gpu/drm/msm/msm_gpu.c drivers/gpu/drm/msm/msm_gpu.h+7 -00 replies
2/2drm/msm: Add MSM_WAIT_IOVA ioctldrivers/gpu/drm/msm/msm_drv.c include/uapi/drm/msm_drm.h+73 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] drm/msm: Add the MSM_WAIT_IOVA ioctl

This patch set implements the MSM_WAIT_IOVA ioctl which lets userspace sleep until the value at a given iova reaches a certain condition. This is needed in turnip to implement the VK_QUERY_RESULT_WAIT_BIT flag for vkGetQueryPoolResults.

First, we add a GPU-wide wait queue that is signaled on all IRQs. We can then wait on this wait queue inside MSM_WAIT_IOVA until the condition is met.

The corresponding merge request in mesa can be found at:
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3279

Changes in v2:
* Updated cleanup logic on error
* Added a mask
* 32 bit values by default

Changes in v3:
* Fixed a bug where the mask was being applied incorrectly

Brian Ho (2):
drm/msm: Add a GPU-wide wait queue
drm/msm: Add MSM_WAIT_IOVA ioctl

 drivers/gpu/drm/msm/msm_drv.c | 61 +++++++++++++++++++++++++++++++++--
 drivers/gpu/drm/msm/msm_gpu.c |  4 +++
 drivers/gpu/drm/msm/msm_gpu.h |  3 ++
 include/uapi/drm/msm_drm.h    | 14 ++++++++
 4 files changed, 80 insertions(+), 2 deletions(-)
Signature · 1 line
2.25.0.341.g760bfbb309-goog