Skip to content

Commit

Permalink
drm/nouveau/disp: add hdmi audio hal function
Browse files Browse the repository at this point in the history
This just adds a hook for RM to use, HW paths remain untouched, but
should probably be cleaned up to use this too at some point.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Danilo Krummrich <me@dakr.org>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230919220442.202488-26-lyude@redhat.com
  • Loading branch information
Ben Skeggs authored and Lyude Paul committed Sep 19, 2023
1 parent 5b9c030 commit e9c9b5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ struct nvkm_ior_func {
bool scrambling_low_rates);
void (*infoframe_avi)(struct nvkm_ior *, int head, void *data, u32 size);
void (*infoframe_vsi)(struct nvkm_ior *, int head, void *data, u32 size);
void (*audio)(struct nvkm_ior *, int head, bool enable);
} *hdmi;

const struct nvkm_ior_func_dp {
Expand Down
10 changes: 9 additions & 1 deletion drivers/gpu/drm/nouveau/nvkm/engine/disp/uoutp.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,20 @@ nvkm_uoutp_mthd_hda_eld(struct nvkm_outp *outp, void *argv, u32 argc)
if (argc && args->v0.data[0]) {
if (outp->info.type == DCB_OUTPUT_DP)
ior->func->dp->audio(ior, args->v0.head, true);
else
if (ior->func->hdmi->audio)
ior->func->hdmi->audio(ior, args->v0.head, true);

ior->func->hda->hpd(ior, args->v0.head, true);
ior->func->hda->eld(ior, args->v0.head, args->v0.data, argc);
} else {
ior->func->hda->hpd(ior, args->v0.head, false);

if (outp->info.type == DCB_OUTPUT_DP)
ior->func->dp->audio(ior, args->v0.head, false);
ior->func->hda->hpd(ior, args->v0.head, false);
else
if (ior->func->hdmi->audio)
ior->func->hdmi->audio(ior, args->v0.head, false);
}

return 0;
Expand Down

0 comments on commit e9c9b5b

Please sign in to comment.