Commit 96321606 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/mspdec: switch to instanced constructor

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent e9e9a219
...@@ -60,7 +60,6 @@ struct nvkm_device { ...@@ -60,7 +60,6 @@ struct nvkm_device {
struct notifier_block nb; struct notifier_block nb;
} acpi; } acpi;
struct nvkm_engine *mspdec;
struct nvkm_engine *msppp; struct nvkm_engine *msppp;
struct nvkm_engine *msvld; struct nvkm_engine *msvld;
struct nvkm_nvenc *nvenc[3]; struct nvkm_nvenc *nvenc[3];
...@@ -111,7 +110,6 @@ struct nvkm_device_chip { ...@@ -111,7 +110,6 @@ struct nvkm_device_chip {
#undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_INST
#undef NVKM_LAYOUT_ONCE #undef NVKM_LAYOUT_ONCE
int (*mspdec )(struct nvkm_device *, int idx, struct nvkm_engine **);
int (*msppp )(struct nvkm_device *, int idx, struct nvkm_engine **); int (*msppp )(struct nvkm_device *, int idx, struct nvkm_engine **);
int (*msvld )(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_nvenc **); int (*nvenc[3])(struct nvkm_device *, int idx, struct nvkm_nvenc **);
......
...@@ -36,4 +36,5 @@ NVKM_LAYOUT_ONCE(NVKM_ENGINE_IFB , struct nvkm_engine , ifb) ...@@ -36,4 +36,5 @@ NVKM_LAYOUT_ONCE(NVKM_ENGINE_IFB , struct nvkm_engine , ifb)
NVKM_LAYOUT_ONCE(NVKM_ENGINE_ME , struct nvkm_engine , me) NVKM_LAYOUT_ONCE(NVKM_ENGINE_ME , struct nvkm_engine , me)
NVKM_LAYOUT_ONCE(NVKM_ENGINE_MPEG , struct nvkm_engine , mpeg) NVKM_LAYOUT_ONCE(NVKM_ENGINE_MPEG , struct nvkm_engine , mpeg)
NVKM_LAYOUT_ONCE(NVKM_ENGINE_MSENC , struct nvkm_engine , msenc) NVKM_LAYOUT_ONCE(NVKM_ENGINE_MSENC , struct nvkm_engine , msenc)
NVKM_LAYOUT_ONCE(NVKM_ENGINE_MSPDEC , struct nvkm_engine , mspdec)
NVKM_LAYOUT_ONCE(NVKM_ENGINE_VP , struct nvkm_engine , vp) NVKM_LAYOUT_ONCE(NVKM_ENGINE_VP , struct nvkm_engine , vp)
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
#ifndef __NVKM_MSPDEC_H__ #ifndef __NVKM_MSPDEC_H__
#define __NVKM_MSPDEC_H__ #define __NVKM_MSPDEC_H__
#include <engine/falcon.h> #include <engine/falcon.h>
int g98_mspdec_new(struct nvkm_device *, int, struct nvkm_engine **); int g98_mspdec_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_engine **);
int gt215_mspdec_new(struct nvkm_device *, int, struct nvkm_engine **); int gt215_mspdec_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_engine **);
int gf100_mspdec_new(struct nvkm_device *, int, struct nvkm_engine **); int gf100_mspdec_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_engine **);
int gk104_mspdec_new(struct nvkm_device *, int, struct nvkm_engine **); int gk104_mspdec_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_engine **);
#endif #endif
...@@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = { ...@@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = {
#include <core/layout.h> #include <core/layout.h>
#undef NVKM_LAYOUT_ONCE #undef NVKM_LAYOUT_ONCE
#undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_INST
[NVKM_ENGINE_MSPDEC ] = "mspdec",
[NVKM_ENGINE_MSPPP ] = "msppp", [NVKM_ENGINE_MSPPP ] = "msppp",
[NVKM_ENGINE_MSVLD ] = "msvld", [NVKM_ENGINE_MSVLD ] = "msvld",
[NVKM_ENGINE_NVENC0 ] = "nvenc0", [NVKM_ENGINE_NVENC0 ] = "nvenc0",
......
...@@ -1098,7 +1098,7 @@ nv98_chipset = { ...@@ -1098,7 +1098,7 @@ nv98_chipset = {
.dma = { 0x00000001, nv50_dma_new }, .dma = { 0x00000001, nv50_dma_new },
.fifo = { 0x00000001, g84_fifo_new }, .fifo = { 0x00000001, g84_fifo_new },
.gr = { 0x00000001, g84_gr_new }, .gr = { 0x00000001, g84_gr_new },
.mspdec = g98_mspdec_new, .mspdec = { 0x00000001, g98_mspdec_new },
.msppp = g98_msppp_new, .msppp = g98_msppp_new,
.msvld = g98_msvld_new, .msvld = g98_msvld_new,
.pm = g84_pm_new, .pm = g84_pm_new,
...@@ -1165,7 +1165,7 @@ nva3_chipset = { ...@@ -1165,7 +1165,7 @@ nva3_chipset = {
.fifo = { 0x00000001, g84_fifo_new }, .fifo = { 0x00000001, g84_fifo_new },
.gr = { 0x00000001, gt215_gr_new }, .gr = { 0x00000001, gt215_gr_new },
.mpeg = { 0x00000001, g84_mpeg_new }, .mpeg = { 0x00000001, g84_mpeg_new },
.mspdec = gt215_mspdec_new, .mspdec = { 0x00000001, gt215_mspdec_new },
.msppp = gt215_msppp_new, .msppp = gt215_msppp_new,
.msvld = gt215_msvld_new, .msvld = gt215_msvld_new,
.pm = gt215_pm_new, .pm = gt215_pm_new,
...@@ -1198,7 +1198,7 @@ nva5_chipset = { ...@@ -1198,7 +1198,7 @@ nva5_chipset = {
.dma = { 0x00000001, nv50_dma_new }, .dma = { 0x00000001, nv50_dma_new },
.fifo = { 0x00000001, g84_fifo_new }, .fifo = { 0x00000001, g84_fifo_new },
.gr = { 0x00000001, gt215_gr_new }, .gr = { 0x00000001, gt215_gr_new },
.mspdec = gt215_mspdec_new, .mspdec = { 0x00000001, gt215_mspdec_new },
.msppp = gt215_msppp_new, .msppp = gt215_msppp_new,
.msvld = gt215_msvld_new, .msvld = gt215_msvld_new,
.pm = gt215_pm_new, .pm = gt215_pm_new,
...@@ -1231,7 +1231,7 @@ nva8_chipset = { ...@@ -1231,7 +1231,7 @@ nva8_chipset = {
.dma = { 0x00000001, nv50_dma_new }, .dma = { 0x00000001, nv50_dma_new },
.fifo = { 0x00000001, g84_fifo_new }, .fifo = { 0x00000001, g84_fifo_new },
.gr = { 0x00000001, gt215_gr_new }, .gr = { 0x00000001, gt215_gr_new },
.mspdec = gt215_mspdec_new, .mspdec = { 0x00000001, gt215_mspdec_new },
.msppp = gt215_msppp_new, .msppp = gt215_msppp_new,
.msvld = gt215_msvld_new, .msvld = gt215_msvld_new,
.pm = gt215_pm_new, .pm = gt215_pm_new,
...@@ -1262,7 +1262,7 @@ nvaa_chipset = { ...@@ -1262,7 +1262,7 @@ nvaa_chipset = {
.dma = { 0x00000001, nv50_dma_new }, .dma = { 0x00000001, nv50_dma_new },
.fifo = { 0x00000001, g84_fifo_new }, .fifo = { 0x00000001, g84_fifo_new },
.gr = { 0x00000001, gt200_gr_new }, .gr = { 0x00000001, gt200_gr_new },
.mspdec = g98_mspdec_new, .mspdec = { 0x00000001, g98_mspdec_new },
.msppp = g98_msppp_new, .msppp = g98_msppp_new,
.msvld = g98_msvld_new, .msvld = g98_msvld_new,
.pm = g84_pm_new, .pm = g84_pm_new,
...@@ -1294,7 +1294,7 @@ nvac_chipset = { ...@@ -1294,7 +1294,7 @@ nvac_chipset = {
.dma = { 0x00000001, nv50_dma_new }, .dma = { 0x00000001, nv50_dma_new },
.fifo = { 0x00000001, g84_fifo_new }, .fifo = { 0x00000001, g84_fifo_new },
.gr = { 0x00000001, mcp79_gr_new }, .gr = { 0x00000001, mcp79_gr_new },
.mspdec = g98_mspdec_new, .mspdec = { 0x00000001, g98_mspdec_new },
.msppp = g98_msppp_new, .msppp = g98_msppp_new,
.msvld = g98_msvld_new, .msvld = g98_msvld_new,
.pm = g84_pm_new, .pm = g84_pm_new,
...@@ -1328,7 +1328,7 @@ nvaf_chipset = { ...@@ -1328,7 +1328,7 @@ nvaf_chipset = {
.dma = { 0x00000001, nv50_dma_new }, .dma = { 0x00000001, nv50_dma_new },
.fifo = { 0x00000001, g84_fifo_new }, .fifo = { 0x00000001, g84_fifo_new },
.gr = { 0x00000001, mcp89_gr_new }, .gr = { 0x00000001, mcp89_gr_new },
.mspdec = gt215_mspdec_new, .mspdec = { 0x00000001, gt215_mspdec_new },
.msppp = gt215_msppp_new, .msppp = gt215_msppp_new,
.msvld = mcp89_msvld_new, .msvld = mcp89_msvld_new,
.pm = gt215_pm_new, .pm = gt215_pm_new,
...@@ -1364,7 +1364,7 @@ nvc0_chipset = { ...@@ -1364,7 +1364,7 @@ nvc0_chipset = {
.dma = { 0x00000001, gf100_dma_new }, .dma = { 0x00000001, gf100_dma_new },
.fifo = { 0x00000001, gf100_fifo_new }, .fifo = { 0x00000001, gf100_fifo_new },
.gr = { 0x00000001, gf100_gr_new }, .gr = { 0x00000001, gf100_gr_new },
.mspdec = gf100_mspdec_new, .mspdec = { 0x00000001, gf100_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gf100_msvld_new, .msvld = gf100_msvld_new,
.pm = gf100_pm_new, .pm = gf100_pm_new,
...@@ -1400,7 +1400,7 @@ nvc1_chipset = { ...@@ -1400,7 +1400,7 @@ nvc1_chipset = {
.dma = { 0x00000001, gf100_dma_new }, .dma = { 0x00000001, gf100_dma_new },
.fifo = { 0x00000001, gf100_fifo_new }, .fifo = { 0x00000001, gf100_fifo_new },
.gr = { 0x00000001, gf108_gr_new }, .gr = { 0x00000001, gf108_gr_new },
.mspdec = gf100_mspdec_new, .mspdec = { 0x00000001, gf100_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gf100_msvld_new, .msvld = gf100_msvld_new,
.pm = gf108_pm_new, .pm = gf108_pm_new,
...@@ -1436,7 +1436,7 @@ nvc3_chipset = { ...@@ -1436,7 +1436,7 @@ nvc3_chipset = {
.dma = { 0x00000001, gf100_dma_new }, .dma = { 0x00000001, gf100_dma_new },
.fifo = { 0x00000001, gf100_fifo_new }, .fifo = { 0x00000001, gf100_fifo_new },
.gr = { 0x00000001, gf104_gr_new }, .gr = { 0x00000001, gf104_gr_new },
.mspdec = gf100_mspdec_new, .mspdec = { 0x00000001, gf100_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gf100_msvld_new, .msvld = gf100_msvld_new,
.pm = gf100_pm_new, .pm = gf100_pm_new,
...@@ -1472,7 +1472,7 @@ nvc4_chipset = { ...@@ -1472,7 +1472,7 @@ nvc4_chipset = {
.dma = { 0x00000001, gf100_dma_new }, .dma = { 0x00000001, gf100_dma_new },
.fifo = { 0x00000001, gf100_fifo_new }, .fifo = { 0x00000001, gf100_fifo_new },
.gr = { 0x00000001, gf104_gr_new }, .gr = { 0x00000001, gf104_gr_new },
.mspdec = gf100_mspdec_new, .mspdec = { 0x00000001, gf100_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gf100_msvld_new, .msvld = gf100_msvld_new,
.pm = gf100_pm_new, .pm = gf100_pm_new,
...@@ -1508,7 +1508,7 @@ nvc8_chipset = { ...@@ -1508,7 +1508,7 @@ nvc8_chipset = {
.dma = { 0x00000001, gf100_dma_new }, .dma = { 0x00000001, gf100_dma_new },
.fifo = { 0x00000001, gf100_fifo_new }, .fifo = { 0x00000001, gf100_fifo_new },
.gr = { 0x00000001, gf110_gr_new }, .gr = { 0x00000001, gf110_gr_new },
.mspdec = gf100_mspdec_new, .mspdec = { 0x00000001, gf100_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gf100_msvld_new, .msvld = gf100_msvld_new,
.pm = gf100_pm_new, .pm = gf100_pm_new,
...@@ -1544,7 +1544,7 @@ nvce_chipset = { ...@@ -1544,7 +1544,7 @@ nvce_chipset = {
.dma = { 0x00000001, gf100_dma_new }, .dma = { 0x00000001, gf100_dma_new },
.fifo = { 0x00000001, gf100_fifo_new }, .fifo = { 0x00000001, gf100_fifo_new },
.gr = { 0x00000001, gf104_gr_new }, .gr = { 0x00000001, gf104_gr_new },
.mspdec = gf100_mspdec_new, .mspdec = { 0x00000001, gf100_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gf100_msvld_new, .msvld = gf100_msvld_new,
.pm = gf100_pm_new, .pm = gf100_pm_new,
...@@ -1580,7 +1580,7 @@ nvcf_chipset = { ...@@ -1580,7 +1580,7 @@ nvcf_chipset = {
.dma = { 0x00000001, gf100_dma_new }, .dma = { 0x00000001, gf100_dma_new },
.fifo = { 0x00000001, gf100_fifo_new }, .fifo = { 0x00000001, gf100_fifo_new },
.gr = { 0x00000001, gf104_gr_new }, .gr = { 0x00000001, gf104_gr_new },
.mspdec = gf100_mspdec_new, .mspdec = { 0x00000001, gf100_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gf100_msvld_new, .msvld = gf100_msvld_new,
.pm = gf100_pm_new, .pm = gf100_pm_new,
...@@ -1615,7 +1615,7 @@ nvd7_chipset = { ...@@ -1615,7 +1615,7 @@ nvd7_chipset = {
.dma = { 0x00000001, gf119_dma_new }, .dma = { 0x00000001, gf119_dma_new },
.fifo = { 0x00000001, gf100_fifo_new }, .fifo = { 0x00000001, gf100_fifo_new },
.gr = { 0x00000001, gf117_gr_new }, .gr = { 0x00000001, gf117_gr_new },
.mspdec = gf100_mspdec_new, .mspdec = { 0x00000001, gf100_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gf100_msvld_new, .msvld = gf100_msvld_new,
.pm = gf117_pm_new, .pm = gf117_pm_new,
...@@ -1651,7 +1651,7 @@ nvd9_chipset = { ...@@ -1651,7 +1651,7 @@ nvd9_chipset = {
.dma = { 0x00000001, gf119_dma_new }, .dma = { 0x00000001, gf119_dma_new },
.fifo = { 0x00000001, gf100_fifo_new }, .fifo = { 0x00000001, gf100_fifo_new },
.gr = { 0x00000001, gf119_gr_new }, .gr = { 0x00000001, gf119_gr_new },
.mspdec = gf100_mspdec_new, .mspdec = { 0x00000001, gf100_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gf100_msvld_new, .msvld = gf100_msvld_new,
.pm = gf117_pm_new, .pm = gf117_pm_new,
...@@ -1688,7 +1688,7 @@ nve4_chipset = { ...@@ -1688,7 +1688,7 @@ nve4_chipset = {
.dma = { 0x00000001, gf119_dma_new }, .dma = { 0x00000001, gf119_dma_new },
.fifo = { 0x00000001, gk104_fifo_new }, .fifo = { 0x00000001, gk104_fifo_new },
.gr = { 0x00000001, gk104_gr_new }, .gr = { 0x00000001, gk104_gr_new },
.mspdec = gk104_mspdec_new, .mspdec = { 0x00000001, gk104_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gk104_msvld_new, .msvld = gk104_msvld_new,
.pm = gk104_pm_new, .pm = gk104_pm_new,
...@@ -1725,7 +1725,7 @@ nve6_chipset = { ...@@ -1725,7 +1725,7 @@ nve6_chipset = {
.dma = { 0x00000001, gf119_dma_new }, .dma = { 0x00000001, gf119_dma_new },
.fifo = { 0x00000001, gk104_fifo_new }, .fifo = { 0x00000001, gk104_fifo_new },
.gr = { 0x00000001, gk104_gr_new }, .gr = { 0x00000001, gk104_gr_new },
.mspdec = gk104_mspdec_new, .mspdec = { 0x00000001, gk104_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gk104_msvld_new, .msvld = gk104_msvld_new,
.pm = gk104_pm_new, .pm = gk104_pm_new,
...@@ -1762,7 +1762,7 @@ nve7_chipset = { ...@@ -1762,7 +1762,7 @@ nve7_chipset = {
.dma = { 0x00000001, gf119_dma_new }, .dma = { 0x00000001, gf119_dma_new },
.fifo = { 0x00000001, gk104_fifo_new }, .fifo = { 0x00000001, gk104_fifo_new },
.gr = { 0x00000001, gk104_gr_new }, .gr = { 0x00000001, gk104_gr_new },
.mspdec = gk104_mspdec_new, .mspdec = { 0x00000001, gk104_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gk104_msvld_new, .msvld = gk104_msvld_new,
.pm = gk104_pm_new, .pm = gk104_pm_new,
...@@ -1824,7 +1824,7 @@ nvf0_chipset = { ...@@ -1824,7 +1824,7 @@ nvf0_chipset = {
.dma = { 0x00000001, gf119_dma_new }, .dma = { 0x00000001, gf119_dma_new },
.fifo = { 0x00000001, gk110_fifo_new }, .fifo = { 0x00000001, gk110_fifo_new },
.gr = { 0x00000001, gk110_gr_new }, .gr = { 0x00000001, gk110_gr_new },
.mspdec = gk104_mspdec_new, .mspdec = { 0x00000001, gk104_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gk104_msvld_new, .msvld = gk104_msvld_new,
.sw = gf100_sw_new, .sw = gf100_sw_new,
...@@ -1860,7 +1860,7 @@ nvf1_chipset = { ...@@ -1860,7 +1860,7 @@ nvf1_chipset = {
.dma = { 0x00000001, gf119_dma_new }, .dma = { 0x00000001, gf119_dma_new },
.fifo = { 0x00000001, gk110_fifo_new }, .fifo = { 0x00000001, gk110_fifo_new },
.gr = { 0x00000001, gk110b_gr_new }, .gr = { 0x00000001, gk110b_gr_new },
.mspdec = gk104_mspdec_new, .mspdec = { 0x00000001, gk104_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gk104_msvld_new, .msvld = gk104_msvld_new,
.sw = gf100_sw_new, .sw = gf100_sw_new,
...@@ -1896,7 +1896,7 @@ nv106_chipset = { ...@@ -1896,7 +1896,7 @@ nv106_chipset = {
.dma = { 0x00000001, gf119_dma_new }, .dma = { 0x00000001, gf119_dma_new },
.fifo = { 0x00000001, gk208_fifo_new }, .fifo = { 0x00000001, gk208_fifo_new },
.gr = { 0x00000001, gk208_gr_new }, .gr = { 0x00000001, gk208_gr_new },
.mspdec = gk104_mspdec_new, .mspdec = { 0x00000001, gk104_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gk104_msvld_new, .msvld = gk104_msvld_new,
.sw = gf100_sw_new, .sw = gf100_sw_new,
...@@ -1932,7 +1932,7 @@ nv108_chipset = { ...@@ -1932,7 +1932,7 @@ nv108_chipset = {
.dma = { 0x00000001, gf119_dma_new }, .dma = { 0x00000001, gf119_dma_new },
.fifo = { 0x00000001, gk208_fifo_new }, .fifo = { 0x00000001, gk208_fifo_new },
.gr = { 0x00000001, gk208_gr_new }, .gr = { 0x00000001, gk208_gr_new },
.mspdec = gk104_mspdec_new, .mspdec = { 0x00000001, gk104_mspdec_new },
.msppp = gf100_msppp_new, .msppp = gf100_msppp_new,
.msvld = gk104_msvld_new, .msvld = gk104_msvld_new,
.sw = gf100_sw_new, .sw = gf100_sw_new,
...@@ -3174,7 +3174,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func, ...@@ -3174,7 +3174,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
#include <core/layout.h> #include <core/layout.h>
#undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_INST
#undef NVKM_LAYOUT_ONCE #undef NVKM_LAYOUT_ONCE
_(NVKM_ENGINE_MSPDEC , mspdec);
_(NVKM_ENGINE_MSPPP , msppp); _(NVKM_ENGINE_MSPPP , msppp);
_(NVKM_ENGINE_MSVLD , msvld); _(NVKM_ENGINE_MSVLD , msvld);
_(NVKM_ENGINE_NVENC0 , nvenc[0]); _(NVKM_ENGINE_NVENC0 , nvenc[0]);
......
...@@ -24,9 +24,8 @@ ...@@ -24,9 +24,8 @@
#include "priv.h" #include "priv.h"
int int
nvkm_mspdec_new_(const struct nvkm_falcon_func *func, nvkm_mspdec_new_(const struct nvkm_falcon_func *func, struct nvkm_device *device,
struct nvkm_device *device, int index, enum nvkm_subdev_type type, int inst, struct nvkm_engine **pengine)
struct nvkm_engine **pengine)
{ {
return nvkm_falcon_new_(func, device, index, true, 0x085000, pengine); return nvkm_falcon_new_(func, device, type, inst, true, 0x085000, pengine);
} }
...@@ -43,8 +43,8 @@ g98_mspdec = { ...@@ -43,8 +43,8 @@ g98_mspdec = {
}; };
int int
g98_mspdec_new(struct nvkm_device *device, int index, g98_mspdec_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_engine **pengine) struct nvkm_engine **pengine)
{ {
return nvkm_mspdec_new_(&g98_mspdec, device, index, pengine); return nvkm_mspdec_new_(&g98_mspdec, device, type, inst, pengine);
} }
...@@ -43,8 +43,8 @@ gf100_mspdec = { ...@@ -43,8 +43,8 @@ gf100_mspdec = {
}; };
int int
gf100_mspdec_new(struct nvkm_device *device, int index, gf100_mspdec_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_engine **pengine) struct nvkm_engine **pengine)
{ {
return nvkm_mspdec_new_(&gf100_mspdec, device, index, pengine); return nvkm_mspdec_new_(&gf100_mspdec, device, type, inst, pengine);
} }
...@@ -35,8 +35,8 @@ gk104_mspdec = { ...@@ -35,8 +35,8 @@ gk104_mspdec = {
}; };
int int
gk104_mspdec_new(struct nvkm_device *device, int index, gk104_mspdec_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_engine **pengine) struct nvkm_engine **pengine)
{ {
return nvkm_mspdec_new_(&gk104_mspdec, device, index, pengine); return nvkm_mspdec_new_(&gk104_mspdec, device, type, inst, pengine);
} }
...@@ -35,8 +35,8 @@ gt215_mspdec = { ...@@ -35,8 +35,8 @@ gt215_mspdec = {
}; };
int int
gt215_mspdec_new(struct nvkm_device *device, int index, gt215_mspdec_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
struct nvkm_engine **pengine) struct nvkm_engine **pengine)
{ {
return nvkm_mspdec_new_(&gt215_mspdec, device, index, pengine); return nvkm_mspdec_new_(&gt215_mspdec, device, type, inst, pengine);
} }
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
#define __NVKM_MSPDEC_PRIV_H__ #define __NVKM_MSPDEC_PRIV_H__
#include <engine/mspdec.h> #include <engine/mspdec.h>
int nvkm_mspdec_new_(const struct nvkm_falcon_func *, struct nvkm_device *, int nvkm_mspdec_new_(const struct nvkm_falcon_func *, struct nvkm_device *, enum nvkm_subdev_type,
int index, struct nvkm_engine **); int, struct nvkm_engine **);
void g98_mspdec_init(struct nvkm_falcon *); void g98_mspdec_init(struct nvkm_falcon *);
......
...@@ -35,7 +35,7 @@ g98_devinit_disable(struct nvkm_devinit *init) ...@@ -35,7 +35,7 @@ g98_devinit_disable(struct nvkm_devinit *init)
u64 disable = 0ULL; u64 disable = 0ULL;
if (!(r001540 & 0x40000000)) { if (!(r001540 & 0x40000000)) {
disable |= (1ULL << NVKM_ENGINE_MSPDEC); nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
disable |= (1ULL << NVKM_ENGINE_MSVLD); disable |= (1ULL << NVKM_ENGINE_MSVLD);
disable |= (1ULL << NVKM_ENGINE_MSPPP); disable |= (1ULL << NVKM_ENGINE_MSPPP);
} }
......
...@@ -74,7 +74,7 @@ gf100_devinit_disable(struct nvkm_devinit *init) ...@@ -74,7 +74,7 @@ gf100_devinit_disable(struct nvkm_devinit *init)
nvkm_subdev_disable(device, NVKM_ENGINE_DISP, 0); nvkm_subdev_disable(device, NVKM_ENGINE_DISP, 0);
if (r022500 & 0x00000002) { if (r022500 & 0x00000002) {
disable |= (1ULL << NVKM_ENGINE_MSPDEC); nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
disable |= (1ULL << NVKM_ENGINE_MSPPP); disable |= (1ULL << NVKM_ENGINE_MSPPP);
} }
......
...@@ -71,7 +71,7 @@ gt215_devinit_disable(struct nvkm_devinit *init) ...@@ -71,7 +71,7 @@ gt215_devinit_disable(struct nvkm_devinit *init)
u64 disable = 0ULL; u64 disable = 0ULL;
if (!(r001540 & 0x40000000)) { if (!(r001540 & 0x40000000)) {
disable |= (1ULL << NVKM_ENGINE_MSPDEC); nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
disable |= (1ULL << NVKM_ENGINE_MSPPP); disable |= (1ULL << NVKM_ENGINE_MSPPP);
} }
......
...@@ -35,7 +35,7 @@ mcp89_devinit_disable(struct nvkm_devinit *init) ...@@ -35,7 +35,7 @@ mcp89_devinit_disable(struct nvkm_devinit *init)
u64 disable = 0; u64 disable = 0;
if (!(r001540 & 0x40000000)) { if (!(r001540 & 0x40000000)) {
disable |= (1ULL << NVKM_ENGINE_MSPDEC); nvkm_subdev_disable(device, NVKM_ENGINE_MSPDEC, 0);
disable |= (1ULL << NVKM_ENGINE_MSPPP); disable |= (1ULL << NVKM_ENGINE_MSPPP);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment