Commit ca968634 authored by Ben Skeggs's avatar Ben Skeggs Committed by Dave Airlie
Browse files

drm/nouveau/nvjpg/r535: initial support



Adds support for allocating NVJPG classes from RM.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230918202149.4343-44-skeggsb@gmail.com
parent 08ab88f5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ struct nv_device_time_v0 {
#define NV_DEVICE_HOST_RUNLIST_ENGINES_SEC2                          0x00004000
#define NV_DEVICE_HOST_RUNLIST_ENGINES_NVDEC                         0x00008000
#define NV_DEVICE_HOST_RUNLIST_ENGINES_NVENC                         0x00010000
#define NV_DEVICE_HOST_RUNLIST_ENGINES_NVJPG                         0x00020000
/* Returns the number of available channels on runlist(data). */
#define NV_DEVICE_HOST_RUNLIST_CHANNELS               NV_DEVICE_HOST(0x00000101)
#endif
+3 −0
Original line number Diff line number Diff line
@@ -253,4 +253,7 @@
#define ADA_COMPUTE_A                                                0x0000c9c0

#define NV74_CIPHER                                                  0x000074c1

#define NVC4D1_VIDEO_NVJPG                                           0x0000c4d1
#define NVC9D1_VIDEO_NVJPG                                           0x0000c9d1
#endif
+8 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: MIT */
#ifndef __NVKM_NVJPG_H__
#define __NVKM_NVJPG_H__
#include <core/engine.h>

int ga100_nvjpg_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_engine **);
int ad102_nvjpg_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_engine **);
#endif
+7 −0
Original line number Diff line number Diff line
@@ -119,6 +119,13 @@ typedef struct
    NvU32 engineInstance;             // Select MSENC/NVENC0 or NVENC1 or NVENC2
} NV_MSENC_ALLOCATION_PARAMETERS;

typedef struct
{
    NvU32 size;
    NvU32 prohibitMultipleInstances;  // Prohibit multiple allocations of NVJPG?
    NvU32 engineInstance;
} NV_NVJPG_ALLOCATION_PARAMETERS;

typedef struct
{
    NvU32   index;
+5 −0
Original line number Diff line number Diff line
@@ -37,6 +37,11 @@
#define MC_ENGINE_IDX_MSENC2                        40

#define MC_ENGINE_IDX_GSP                           49
#define MC_ENGINE_IDX_NVJPG                         50
#define MC_ENGINE_IDX_NVJPEG                        MC_ENGINE_IDX_NVJPG
#define MC_ENGINE_IDX_NVJPEG0                       MC_ENGINE_IDX_NVJPEG

#define MC_ENGINE_IDX_NVJPEG7                       57

#define MC_ENGINE_IDX_BSP                           64
#define MC_ENGINE_IDX_NVDEC                         MC_ENGINE_IDX_BSP
Loading