mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
drm/nouveau: allow allocating NVDEC channels via abi16
Add NOUVEAU_FIFO_ENGINE_NVDEC to the abi16 uAPI and accept it in channel allocation, mapping it to the NVDEC engine runlist. Skip the Turing copy-engine workaround object for NVDEC channels: the copy engines are not part of the NVDEC runlist, so the workaround object cannot be instantiated on such channels (and is not needed there). This is required for NVK to implement Vulkan Video H.264 decode on top of the NVDEC engine: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31867 Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patch.msgid.link/20260725035912.1016464-1-daniel.almeida@collabora.com
This commit is contained in:
parent
abc1e559f8
commit
15dcf7609f
|
|
@ -408,6 +408,9 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
|
|||
case NOUVEAU_FIFO_ENGINE_CE:
|
||||
engine = NV_DEVICE_HOST_RUNLIST_ENGINES_CE;
|
||||
break;
|
||||
case NOUVEAU_FIFO_ENGINE_NVDEC:
|
||||
engine = NV_DEVICE_HOST_RUNLIST_ENGINES_NVDEC;
|
||||
break;
|
||||
default:
|
||||
return nouveau_abi16_put(abi16, -ENOSYS);
|
||||
}
|
||||
|
|
@ -485,10 +488,13 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS)
|
|||
goto done;
|
||||
break;
|
||||
case NV_DEVICE_INFO_V0_TURING:
|
||||
ret = nvif_object_ctor(&chan->chan->user, "abi16CeWar", 0, TURING_DMA_COPY_A,
|
||||
NULL, 0, &chan->ce);
|
||||
if (ret)
|
||||
goto done;
|
||||
if (engine != NV_DEVICE_HOST_RUNLIST_ENGINES_NVDEC) {
|
||||
ret = nvif_object_ctor(&chan->chan->user, "abi16CeWar",
|
||||
0, TURING_DMA_COPY_A, NULL, 0,
|
||||
&chan->ce);
|
||||
if (ret)
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#define DRIVER_MAJOR 1
|
||||
#define DRIVER_MINOR 4
|
||||
#define DRIVER_PATCHLEVEL 2
|
||||
#define DRIVER_PATCHLEVEL 3
|
||||
|
||||
/*
|
||||
* 1.1.1:
|
||||
|
|
@ -39,6 +39,8 @@
|
|||
* - add variable page sizes and compression for Turing+
|
||||
* 1.4.2:
|
||||
* - tell userspace LPTE/SPTE races are fixed.
|
||||
* 1.4.3:
|
||||
* - VDEC contexts can be created.
|
||||
*/
|
||||
|
||||
#include <linux/notifier.h>
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ struct drm_nouveau_getparam {
|
|||
#define NOUVEAU_FIFO_ENGINE_PPP 0x04
|
||||
#define NOUVEAU_FIFO_ENGINE_BSP 0x08
|
||||
#define NOUVEAU_FIFO_ENGINE_CE 0x30
|
||||
#define NOUVEAU_FIFO_ENGINE_NVDEC 0x300
|
||||
|
||||
struct drm_nouveau_channel_alloc {
|
||||
__u32 fb_ctxdma_handle;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user