mirror of https://gitee.com/openkylin/linux.git
drm/nouveau/core: increase maximum number of nvdec instances to 3
RTX2070 appears to have 3 copies of the engine. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
563737c525
commit
2d583ade74
|
@ -63,7 +63,8 @@ enum nvkm_devidx {
|
|||
|
||||
NVKM_ENGINE_NVDEC0,
|
||||
NVKM_ENGINE_NVDEC1,
|
||||
NVKM_ENGINE_NVDEC_LAST = NVKM_ENGINE_NVDEC1,
|
||||
NVKM_ENGINE_NVDEC2,
|
||||
NVKM_ENGINE_NVDEC_LAST = NVKM_ENGINE_NVDEC2,
|
||||
|
||||
NVKM_ENGINE_PM,
|
||||
NVKM_ENGINE_SEC,
|
||||
|
@ -167,7 +168,7 @@ struct nvkm_device {
|
|||
struct nvkm_engine *msppp;
|
||||
struct nvkm_engine *msvld;
|
||||
struct nvkm_engine *nvenc[3];
|
||||
struct nvkm_nvdec *nvdec[2];
|
||||
struct nvkm_nvdec *nvdec[3];
|
||||
struct nvkm_pm *pm;
|
||||
struct nvkm_engine *sec;
|
||||
struct nvkm_sec2 *sec2;
|
||||
|
@ -239,7 +240,7 @@ struct nvkm_device_chip {
|
|||
int (*msppp )(struct nvkm_device *, int idx, struct nvkm_engine **);
|
||||
int (*msvld )(struct nvkm_device *, int idx, struct nvkm_engine **);
|
||||
int (*nvenc[3])(struct nvkm_device *, int idx, struct nvkm_engine **);
|
||||
int (*nvdec[2])(struct nvkm_device *, int idx, struct nvkm_nvdec **);
|
||||
int (*nvdec[3])(struct nvkm_device *, int idx, struct nvkm_nvdec **);
|
||||
int (*pm )(struct nvkm_device *, int idx, struct nvkm_pm **);
|
||||
int (*sec )(struct nvkm_device *, int idx, struct nvkm_engine **);
|
||||
int (*sec2 )(struct nvkm_device *, int idx, struct nvkm_sec2 **);
|
||||
|
|
|
@ -81,6 +81,7 @@ nvkm_subdev_name[NVKM_SUBDEV_NR] = {
|
|||
[NVKM_ENGINE_NVENC2 ] = "nvenc2",
|
||||
[NVKM_ENGINE_NVDEC0 ] = "nvdec0",
|
||||
[NVKM_ENGINE_NVDEC1 ] = "nvdec1",
|
||||
[NVKM_ENGINE_NVDEC2 ] = "nvdec2",
|
||||
[NVKM_ENGINE_PM ] = "pm",
|
||||
[NVKM_ENGINE_SEC ] = "sec",
|
||||
[NVKM_ENGINE_SEC2 ] = "sec2",
|
||||
|
|
|
@ -2563,6 +2563,7 @@ nvkm_device_engine(struct nvkm_device *device, int index)
|
|||
_(NVENC2 , device->nvenc[2], device->nvenc[2]);
|
||||
_(NVDEC0 , device->nvdec[0], &device->nvdec[0]->engine);
|
||||
_(NVDEC1 , device->nvdec[1], &device->nvdec[1]->engine);
|
||||
_(NVDEC2 , device->nvdec[2], &device->nvdec[2]->engine);
|
||||
_(PM , device->pm , &device->pm->engine);
|
||||
_(SEC , device->sec , device->sec);
|
||||
_(SEC2 , device->sec2 , &device->sec2->engine);
|
||||
|
@ -3025,6 +3026,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
|
|||
_(NVKM_ENGINE_NVENC2 , nvenc[2]);
|
||||
_(NVKM_ENGINE_NVDEC0 , nvdec[0]);
|
||||
_(NVKM_ENGINE_NVDEC1 , nvdec[1]);
|
||||
_(NVKM_ENGINE_NVDEC2 , nvdec[2]);
|
||||
_(NVKM_ENGINE_PM , pm);
|
||||
_(NVKM_ENGINE_SEC , sec);
|
||||
_(NVKM_ENGINE_SEC2 , sec2);
|
||||
|
|
Loading…
Reference in New Issue