diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2022-06-01 20:46:29 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2022-07-27 09:05:48 +1000 |
commit | 7bcf89eed48f3fba8d0e2c19236e7dc547b6e037 (patch) | |
tree | 6bfdeef6898a18e3add05e91c566b638ad9c35c8 /drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | |
parent | 9a4514fbffda6083d9f7fba4882142686783cfe4 (diff) |
drm/nouveau/disp: split sor hda funcs out to their own struct
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/gf119.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c index 44bf07d8e244..7e099e4f3c22 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c @@ -33,7 +33,7 @@ #include <nvif/class.h> -void +static void gf119_sor_hda_device_entry(struct nvkm_ior *ior, int head) { struct nvkm_device *device = ior->disp->engine.subdev.device; @@ -65,7 +65,7 @@ gf119_sor_hda_hpd(struct nvkm_ior *ior, int head, bool present) u32 mask = 0x80000001; if (present) { - ior->func->hda.device_entry(ior, head); + ior->func->hda->device_entry(ior, head); data |= 0x00000001; } else { mask |= 0x00000002; @@ -74,6 +74,13 @@ gf119_sor_hda_hpd(struct nvkm_ior *ior, int head, bool present) nvkm_mask(device, 0x10ec10 + soff, mask, data); } +const struct nvkm_ior_func_hda +gf119_sor_hda = { + .hpd = gf119_sor_hda_hpd, + .eld = gf119_sor_hda_eld, + .device_entry = gf119_sor_hda_device_entry, +}; + void gf119_sor_dp_watermark(struct nvkm_ior *sor, int head, u8 watermark) { @@ -302,11 +309,7 @@ gf119_sor = { .ctrl = gf119_sor_hdmi_ctrl, }, .dp = &gf119_sor_dp, - .hda = { - .hpd = gf119_sor_hda_hpd, - .eld = gf119_sor_hda_eld, - .device_entry = gf119_sor_hda_device_entry, - }, + .hda = &gf119_sor_hda, }; static int |