diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2021-02-03 23:37:29 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2021-02-11 02:49:58 +0100 |
commit | e9e9a219e4cd01e99f0f72710a283bd004b4c73c (patch) | |
tree | 3a72793fba1a05c819dcff816bc3818194f76b65 /drivers | |
parent | drm/nouveau/mpeg: switch to instanced constructor (diff) | |
download | linux-e9e9a219e4cd01e99f0f72710a283bd004b4c73c.tar.xz linux-e9e9a219e4cd01e99f0f72710a283bd004b4c73c.zip |
drm/nouveau/msenc: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers')
5 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h index 659388e395d9..6530b4f5b147 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h @@ -60,7 +60,6 @@ struct nvkm_device { struct notifier_block nb; } acpi; - struct nvkm_engine *msenc; struct nvkm_engine *mspdec; struct nvkm_engine *msppp; struct nvkm_engine *msvld; @@ -112,7 +111,6 @@ struct nvkm_device_chip { #undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_ONCE - int (*msenc )(struct nvkm_device *, int idx, struct nvkm_engine **); int (*mspdec )(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 **); diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h index 4241048c20cb..d1ed1cf864f5 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/layout.h @@ -35,4 +35,5 @@ NVKM_LAYOUT_ONCE(NVKM_ENGINE_GR , struct nvkm_gr , gr) 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_MPEG , struct nvkm_engine , mpeg) +NVKM_LAYOUT_ONCE(NVKM_ENGINE_MSENC , struct nvkm_engine , msenc) NVKM_LAYOUT_ONCE(NVKM_ENGINE_VP , struct nvkm_engine , vp) diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c index 517a35f5e1ad..bfd366ba469b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c +++ b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c @@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = { #include <core/layout.h> #undef NVKM_LAYOUT_ONCE #undef NVKM_LAYOUT_INST - [NVKM_ENGINE_MSENC ] = "msenc", [NVKM_ENGINE_MSPDEC ] = "mspdec", [NVKM_ENGINE_MSPPP ] = "msppp", [NVKM_ENGINE_MSVLD ] = "msvld", diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c index e3417d1b9398..e256869dbb89 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c @@ -3174,7 +3174,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func, #include <core/layout.h> #undef NVKM_LAYOUT_INST #undef NVKM_LAYOUT_ONCE - _(NVKM_ENGINE_MSENC , msenc); _(NVKM_ENGINE_MSPDEC , mspdec); _(NVKM_ENGINE_MSPPP , msppp); _(NVKM_ENGINE_MSVLD , msvld); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c index 023bfbfd3b29..275616f192e2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c @@ -81,7 +81,7 @@ gf100_devinit_disable(struct nvkm_devinit *init) if (r022500 & 0x00000004) disable |= (1ULL << NVKM_ENGINE_MSVLD); if (r022500 & 0x00000008) - disable |= (1ULL << NVKM_ENGINE_MSENC); + nvkm_subdev_disable(device, NVKM_ENGINE_MSENC, 0); if (r022500 & 0x00000100) nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0); if (r022500 & 0x00000200) |