diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2022-06-01 20:46:27 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2022-07-27 09:05:46 +1000 |
commit | 168c02994399f2714bc6c73f85b7ce4d827f97aa (patch) | |
tree | d305dc131d0e39b2fa1b78dfa6c548a4d7719467 /drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | |
parent | 92fba5d3c8f5b757c4e3fdc89afe76a8f6c4da68 (diff) |
drm/nouveau/disp: add common class handling between <nv50 and >=nv50
About to expose head/output path/connector objects everywhere, so we will
need support for child classes prior to nv50 now.
Somewhat cleaner than the code >=nv50 used previously.
v2:
- use ?: (lyude)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c index 42674fb3a8d8..0e8c0413d887 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c @@ -26,7 +26,6 @@ #include "ior.h" #include "outp.h" #include "channv50.h" -#include "rootnv50.h" #include <core/client.h> #include <core/ramht.h> @@ -37,6 +36,8 @@ #include <subdev/devinit.h> #include <subdev/timer.h> +#include <nvif/class.h> + void * nv50_disp_dtor_(struct nvkm_disp *disp) { @@ -727,7 +728,15 @@ nv50_disp = { .dac = { .cnt = nv50_dac_cnt, .new = nv50_dac_new }, .sor = { .cnt = nv50_sor_cnt, .new = nv50_sor_new }, .pior = { .cnt = nv50_pior_cnt, .new = nv50_pior_new }, - .root = &nv50_disp_root_oclass, + .root = { 0, 0, NV50_DISP }, + .user = { + {{0,0,NV50_DISP_CURSOR }, nv50_disp_curs_new }, + {{0,0,NV50_DISP_OVERLAY }, nv50_disp_oimm_new }, + {{0,0,NV50_DISP_BASE_CHANNEL_DMA }, nv50_disp_base_new }, + {{0,0,NV50_DISP_CORE_CHANNEL_DMA }, nv50_disp_core_new }, + {{0,0,NV50_DISP_OVERLAY_CHANNEL_DMA}, nv50_disp_ovly_new }, + {} + } }; int |