drm/nouveau: uapi: don't pass NO_PREFETCH flag implicitly
authorDanilo Krummrich <dakr@redhat.com>
Wed, 23 Aug 2023 18:15:34 +0000 (20:15 +0200)
committerDanilo Krummrich <dakr@redhat.com>
Wed, 23 Aug 2023 23:43:00 +0000 (01:43 +0200)
commitb715dcd3db4a9a57b3fbe7820db37cae930f0867
tree8eb8811208416cdeec651d9550eb3e97658c6c37
parentb4e9fa933551e51459c634dc4396171dc65284a6
drm/nouveau: uapi: don't pass NO_PREFETCH flag implicitly

Currently, NO_PREFETCH is passed implicitly through
drm_nouveau_gem_pushbuf_push::length and drm_nouveau_exec_push::va_len.

Since this is a direct representation of how the HW is programmed it
isn't really future proof for a uAPI. Hence, fix this up for the new
uAPI and split up the va_len field of struct drm_nouveau_exec_push,
such that we keep 32bit for va_len and 32bit for flags.

For drm_nouveau_gem_pushbuf_push::length at least provide
NOUVEAU_GEM_PUSHBUF_NO_PREFETCH to indicate the bit shift.

While at it, fix up nv50_dma_push() as well, such that the caller
doesn't need to encode the NO_PREFETCH flag into the length parameter.

Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230823181746.3446-1-dakr@redhat.com
drivers/gpu/drm/nouveau/nouveau_dma.c
drivers/gpu/drm/nouveau/nouveau_dma.h
drivers/gpu/drm/nouveau/nouveau_exec.c
drivers/gpu/drm/nouveau/nouveau_gem.c
include/uapi/drm/nouveau_drm.h