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/gt215.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/gt215.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c index e01c0533bdf5..0b97b44e52e6 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/gt215.c @@ -31,7 +31,7 @@ #include <nvif/class.h> -void +static void gt215_sor_hda_eld(struct nvkm_ior *ior, int head, u8 *data, u8 size) { struct nvkm_device *device = ior->disp->engine.subdev.device; @@ -45,7 +45,7 @@ gt215_sor_hda_eld(struct nvkm_ior *ior, int head, u8 *data, u8 size) nvkm_mask(device, 0x61c448 + soff, 0x80000002, 0x80000002); } -void +static void gt215_sor_hda_hpd(struct nvkm_ior *ior, int head, bool present) { struct nvkm_device *device = ior->disp->engine.subdev.device; @@ -58,6 +58,12 @@ gt215_sor_hda_hpd(struct nvkm_ior *ior, int head, bool present) nvkm_mask(device, 0x61c448 + ior->id * 0x800, mask, data); } +const struct nvkm_ior_func_hda +gt215_sor_hda = { + .hpd = gt215_sor_hda_hpd, + .eld = gt215_sor_hda_eld, +}; + void gt215_sor_dp_audio(struct nvkm_ior *sor, int head, bool enable) { @@ -162,10 +168,7 @@ gt215_sor = { .ctrl = gt215_sor_hdmi_ctrl, }, .dp = >215_sor_dp, - .hda = { - .hpd = gt215_sor_hda_hpd, - .eld = gt215_sor_hda_eld, - }, + .hda = >215_sor_hda, }; static int |