aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/engine
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2021-02-04 08:33:53 +1000
committerBen Skeggs <bskeggs@redhat.com>2021-02-11 11:49:55 +1000
commitfcc08a7c0ded8c75b00e67c3d14907389a568a57 (patch)
tree1f4e0b619b84eb161379ce90553357119f7ea5f4 /drivers/gpu/drm/nouveau/nvkm/engine
parentdrm/nouveau/volt: switch to instanced constructor (diff)
downloadlinux-dev-fcc08a7c0ded8c75b00e67c3d14907389a568a57.tar.xz
linux-dev-fcc08a7c0ded8c75b00e67c3d14907389a568a57.zip
drm/nouveau/bsp,vp: 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/engine')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c5
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/device/base.c26
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c6
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c9
4 files changed, 22 insertions, 24 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c b/drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c
index 44e116f7880d..39f6db269c7a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c
@@ -36,8 +36,9 @@ g84_bsp = {
};
int
-g84_bsp_new(struct nvkm_device *device, int index, struct nvkm_engine **pengine)
+g84_bsp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+ struct nvkm_engine **pengine)
{
- return nvkm_xtensa_new_(&g84_bsp, device, index,
+ return nvkm_xtensa_new_(&g84_bsp, device, type, inst,
device->chipset != 0x92, 0x103000, pengine);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
index e605ea5df5f6..e86bff94a0f4 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
@@ -934,7 +934,7 @@ nv84_chipset = {
.therm = { 0x00000001, g84_therm_new },
.timer = { 0x00000001, nv41_timer_new },
.volt = { 0x00000001, nv40_volt_new },
- .bsp = g84_bsp_new,
+ .bsp = { 0x00000001, g84_bsp_new },
.cipher = g84_cipher_new,
.disp = g84_disp_new,
.dma = nv50_dma_new,
@@ -943,7 +943,7 @@ nv84_chipset = {
.mpeg = g84_mpeg_new,
.pm = g84_pm_new,
.sw = nv50_sw_new,
- .vp = g84_vp_new,
+ .vp = { 0x00000001, g84_vp_new },
};
static const struct nvkm_device_chip
@@ -966,7 +966,7 @@ nv86_chipset = {
.therm = { 0x00000001, g84_therm_new },
.timer = { 0x00000001, nv41_timer_new },
.volt = { 0x00000001, nv40_volt_new },
- .bsp = g84_bsp_new,
+ .bsp = { 0x00000001, g84_bsp_new },
.cipher = g84_cipher_new,
.disp = g84_disp_new,
.dma = nv50_dma_new,
@@ -975,7 +975,7 @@ nv86_chipset = {
.mpeg = g84_mpeg_new,
.pm = g84_pm_new,
.sw = nv50_sw_new,
- .vp = g84_vp_new,
+ .vp = { 0x00000001, g84_vp_new },
};
static const struct nvkm_device_chip
@@ -998,7 +998,7 @@ nv92_chipset = {
.therm = { 0x00000001, g84_therm_new },
.timer = { 0x00000001, nv41_timer_new },
.volt = { 0x00000001, nv40_volt_new },
- .bsp = g84_bsp_new,
+ .bsp = { 0x00000001, g84_bsp_new },
.cipher = g84_cipher_new,
.disp = g84_disp_new,
.dma = nv50_dma_new,
@@ -1007,7 +1007,7 @@ nv92_chipset = {
.mpeg = g84_mpeg_new,
.pm = g84_pm_new,
.sw = nv50_sw_new,
- .vp = g84_vp_new,
+ .vp = { 0x00000001, g84_vp_new },
};
static const struct nvkm_device_chip
@@ -1030,7 +1030,7 @@ nv94_chipset = {
.therm = { 0x00000001, g84_therm_new },
.timer = { 0x00000001, nv41_timer_new },
.volt = { 0x00000001, nv40_volt_new },
- .bsp = g84_bsp_new,
+ .bsp = { 0x00000001, g84_bsp_new },
.cipher = g84_cipher_new,
.disp = g94_disp_new,
.dma = nv50_dma_new,
@@ -1039,7 +1039,7 @@ nv94_chipset = {
.mpeg = g84_mpeg_new,
.pm = g84_pm_new,
.sw = nv50_sw_new,
- .vp = g84_vp_new,
+ .vp = { 0x00000001, g84_vp_new },
};
static const struct nvkm_device_chip
@@ -1062,7 +1062,7 @@ nv96_chipset = {
.therm = { 0x00000001, g84_therm_new },
.timer = { 0x00000001, nv41_timer_new },
.volt = { 0x00000001, nv40_volt_new },
- .bsp = g84_bsp_new,
+ .bsp = { 0x00000001, g84_bsp_new },
.cipher = g84_cipher_new,
.disp = g94_disp_new,
.dma = nv50_dma_new,
@@ -1071,7 +1071,7 @@ nv96_chipset = {
.mpeg = g84_mpeg_new,
.pm = g84_pm_new,
.sw = nv50_sw_new,
- .vp = g84_vp_new,
+ .vp = { 0x00000001, g84_vp_new },
};
static const struct nvkm_device_chip
@@ -1126,7 +1126,7 @@ nva0_chipset = {
.therm = { 0x00000001, g84_therm_new },
.timer = { 0x00000001, nv41_timer_new },
.volt = { 0x00000001, nv40_volt_new },
- .bsp = g84_bsp_new,
+ .bsp = { 0x00000001, g84_bsp_new },
.cipher = g84_cipher_new,
.disp = gt200_disp_new,
.dma = nv50_dma_new,
@@ -1135,7 +1135,7 @@ nva0_chipset = {
.mpeg = g84_mpeg_new,
.pm = gt200_pm_new,
.sw = nv50_sw_new,
- .vp = g84_vp_new,
+ .vp = { 0x00000001, g84_vp_new },
};
static const struct nvkm_device_chip
@@ -3248,7 +3248,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
#include <core/layout.h>
#undef NVKM_LAYOUT_INST
#undef NVKM_LAYOUT_ONCE
- _(NVKM_ENGINE_BSP , bsp);
_(NVKM_ENGINE_CE0 , ce[0]);
_(NVKM_ENGINE_CE1 , ce[1]);
_(NVKM_ENGINE_CE2 , ce[2]);
@@ -3281,7 +3280,6 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
_(NVKM_ENGINE_SEC2 , sec2);
_(NVKM_ENGINE_SW , sw);
_(NVKM_ENGINE_VIC , vic);
- _(NVKM_ENGINE_VP , vp);
default:
WARN_ON(1);
continue;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c b/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c
index 7a96178786c4..b502266c76fd 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c
@@ -36,8 +36,8 @@ g84_vp = {
};
int
-g84_vp_new(struct nvkm_device *device, int index, struct nvkm_engine **pengine)
+g84_vp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
+ struct nvkm_engine **pengine)
{
- return nvkm_xtensa_new_(&g84_vp, device, index,
- true, 0x00f000, pengine);
+ return nvkm_xtensa_new_(&g84_vp, device, type, inst, true, 0x00f000, pengine);
}
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c b/drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
index 70549381e082..f7d3ba0afb55 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
@@ -175,9 +175,9 @@ nvkm_xtensa = {
};
int
-nvkm_xtensa_new_(const struct nvkm_xtensa_func *func,
- struct nvkm_device *device, int index, bool enable,
- u32 addr, struct nvkm_engine **pengine)
+nvkm_xtensa_new_(const struct nvkm_xtensa_func *func, struct nvkm_device *device,
+ enum nvkm_subdev_type type, int inst, bool enable, u32 addr,
+ struct nvkm_engine **pengine)
{
struct nvkm_xtensa *xtensa;
@@ -187,6 +187,5 @@ nvkm_xtensa_new_(const struct nvkm_xtensa_func *func,
xtensa->addr = addr;
*pengine = &xtensa->engine;
- return nvkm_engine_ctor(&nvkm_xtensa, device, index,
- enable, &xtensa->engine);
+ return nvkm_engine_ctor(&nvkm_xtensa, device, type, inst, enable, &xtensa->engine);
}