aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-12-04 16:04:23 +1000
committerBen Skeggs <bskeggs@redhat.com>2021-02-11 11:49:59 +1000
commitee532a8d0e644b6ef3dd8da9633b3b629a97e42c (patch)
tree683658f96399095b611ac971cbb0edd209fbaf21 /drivers/gpu/drm/nouveau/nvkm/core/subdev.c
parentdrm/nouveau/nvdec: switch to instanced constructor (diff)
downloadlinux-dev-ee532a8d0e644b6ef3dd8da9633b3b629a97e42c.tar.xz
linux-dev-ee532a8d0e644b6ef3dd8da9633b3b629a97e42c.zip
drm/nouveau/nvenc: switch to instanced constructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/core/subdev.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/subdev.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
index 77fe4e098dfa..d7e2d3e6f4db 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
@@ -33,9 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = {
#include <core/layout.h>
#undef NVKM_LAYOUT_ONCE
#undef NVKM_LAYOUT_INST
- [NVKM_ENGINE_NVENC0 ] = "nvenc0",
- [NVKM_ENGINE_NVENC1 ] = "nvenc1",
- [NVKM_ENGINE_NVENC2 ] = "nvenc2",
[NVKM_ENGINE_PM ] = "pm",
[NVKM_ENGINE_SEC ] = "sec",
[NVKM_ENGINE_SEC2 ] = "sec2",
@@ -185,18 +182,6 @@ nvkm_subdev_ctor_(const struct nvkm_subdev_func *func, bool old,
subdev->inst = inst < 0 ? 0 : inst;
subdev->index = type + subdev->inst;
- if (old) {
- switch (subdev->type) {
- case NVKM_ENGINE_NVENC0 ... NVKM_ENGINE_NVENC_LAST:
- subdev->type = NVKM_ENGINE_NVENC;
- subdev->inst = subdev->index - NVKM_ENGINE_NVENC0;
- break;
- default:
- break;
- }
- inst = -1;
- }
-
if (inst >= 0)
snprintf(subdev->name, sizeof(subdev->name), "%s%d", nvkm_subdev_type[type], inst);
else