From ee532a8d0e644b6ef3dd8da9633b3b629a97e42c Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Fri, 4 Dec 2020 16:04:23 +1000 Subject: drm/nouveau/nvenc: switch to instanced constructor Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'drivers/gpu/drm/nouveau/nvkm/core/subdev.c') 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 #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 -- cgit v1.2.3-59-g8ed1b