aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2022-06-01 20:46:29 +1000
committerDave Airlie <airlied@redhat.com>2022-07-27 09:05:48 +1000
commit889fcbe949bdd8470931a90b91f273ca18c510c1 (patch)
tree8f30ff553c952128cd61ad4e3feca7a85c564066 /drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c
parentdrm/nouveau/disp: split sor hda funcs out to their own struct (diff)
downloadlinux-dev-889fcbe949bdd8470931a90b91f273ca18c510c1.tar.xz
linux-dev-889fcbe949bdd8470931a90b91f273ca18c510c1.zip
drm/nouveau/disp: add common channel class handling
Replaces a bunch of unnecessarily duplicated boilerplate in per-chipset code with a simpler, common, implementation. Channel "awaken" notify code is completely gone for now. KMS has never made use of it so far, and event notify handling is about to be changed in general anyway. 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 '')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c
index ec17254890d1..f756208d4a14 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/udisp.c
@@ -24,24 +24,13 @@
#include <nvif/if0010.h>
static int
-nvkm_udisp_sclass_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
- struct nvkm_object **pobject)
-{
- struct nvkm_disp *disp = nvkm_udisp(oclass->parent);
- const struct nvkm_disp_user *user = oclass->priv;
-
- return user->ctor(oclass, argv, argc, disp, pobject);
-}
-
-static int
nvkm_udisp_sclass(struct nvkm_object *object, int index, struct nvkm_oclass *sclass)
{
struct nvkm_disp *disp = nvkm_udisp(object);
if (disp->func->user[index].ctor) {
sclass->base = disp->func->user[index].base;
- sclass->priv = disp->func->user + index;
- sclass->ctor = nvkm_udisp_sclass_new;
+ sclass->ctor = disp->func->user[index].ctor;
return 0;
}