drm/nouveau/me: switch to instanced constructor
authorBen Skeggs <bskeggs@redhat.com>
Fri, 4 Dec 2020 05:41:33 +0000 (15:41 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 11 Feb 2021 01:49:58 +0000 (11:49 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/core/device.h
drivers/gpu/drm/nouveau/include/nvkm/core/layout.h
drivers/gpu/drm/nouveau/nvkm/core/subdev.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c

index 28d0b369ccbb28350bcf6ba9598fe1a3a33f1c10..606e4ba5f6a4cb39e5d62faba92b3ecc11c7da5e 100644 (file)
@@ -60,7 +60,6 @@ struct nvkm_device {
                struct notifier_block nb;
        } acpi;
 
-       struct nvkm_engine *me;
        struct nvkm_engine *mpeg;
        struct nvkm_engine *msenc;
        struct nvkm_engine *mspdec;
@@ -114,7 +113,6 @@ struct nvkm_device_chip {
 #undef NVKM_LAYOUT_INST
 #undef NVKM_LAYOUT_ONCE
 
-       int (*me      )(struct nvkm_device *, int idx, struct nvkm_engine **);
        int (*mpeg    )(struct nvkm_device *, int idx, struct nvkm_engine **);
        int (*msenc   )(struct nvkm_device *, int idx, struct nvkm_engine **);
        int (*mspdec  )(struct nvkm_device *, int idx, struct nvkm_engine **);
index 3ca06513708f72159b20b06511e74d44dbacc090..87964d28033018e260bf84a1f384979afb9e8070 100644 (file)
@@ -33,4 +33,5 @@ NVKM_LAYOUT_ONCE(NVKM_ENGINE_DMAOBJ  , struct nvkm_dma     ,      dma)
 NVKM_LAYOUT_ONCE(NVKM_ENGINE_FIFO    , struct nvkm_fifo    ,     fifo)
 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_VP      , struct nvkm_engine  ,       vp)
index 616e005b8a58771a2bb6709a5d8a3947d753626d..02b4b77b068361f6af789bba2426b8ceb7fd6fe0 100644 (file)
@@ -33,7 +33,6 @@ nvkm_subdev_type[NVKM_SUBDEV_NR] = {
 #include <core/layout.h>
 #undef NVKM_LAYOUT_ONCE
 #undef NVKM_LAYOUT_INST
-       [NVKM_ENGINE_ME      ] = "me",
        [NVKM_ENGINE_MPEG    ] = "mpeg",
        [NVKM_ENGINE_MSENC   ] = "msenc",
        [NVKM_ENGINE_MSPDEC  ] = "mspdec",
index 6712b8fe50a0f928b7d2ad33a85527c08f5b67a2..713cfa5e5d3b2c6e88d0c1c1956ff5e9a4a16c19 100644 (file)
@@ -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_ME      ,       me);
                _(NVKM_ENGINE_MPEG    ,     mpeg);
                _(NVKM_ENGINE_MSENC   ,    msenc);
                _(NVKM_ENGINE_MSPDEC  ,   mspdec);