Reviewed-by: Lyude Paul <[email protected]>
On Thu, 2026-08-20 at 20:49 +0400, Mohamed Ahmed wrote:
> r535_sor_hdmi_audio() pairs two RM controls (a SET_OD_PACKET carrying
> the same General Control Packet, and the audio mute-stream toggle)
> with a direct write of the GCP AVMute bit through the SF GCP unit.
> The controls are RM and stay, but the direct write is register
> programming and moves next to the other per-chip display code as
> tu102_sor_hdmi_gcp(). No functional change.
>
> Signed-off-by: Mohamed Ahmed <[email protected]>
> ---
> drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h | 1 +
> drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c | 15
> +++++++++++++++
> .../drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c | 9 +--------
> 3 files changed, 17 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
> b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
> index 3ba04bead2f9..5d682a774f2d 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
> @@ -194,6 +194,7 @@ void gv100_sor_dp_audio_sym(struct nvkm_ior *,
> int, u16, u32);
> void gv100_sor_dp_watermark(struct nvkm_ior *, int, u8);
> extern const struct nvkm_ior_func_hda gv100_sor_hda;
>
> +void tu102_sor_hdmi_gcp(struct nvkm_ior *, int, bool);
> void tu102_sor_dp_vcpi(struct nvkm_ior *, int, u8, u8, u16, u16);
>
> int nv50_pior_cnt(struct nvkm_disp *, unsigned long *);
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c
> b/drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c
> index 7b70b466fa36..6cfd52c9056f 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/tu102.c
> @@ -30,6 +30,21 @@
>
> #include <nvif/class.h>
>
> +/* General Control Packet: bracket an audio enable/disable with
> AVMute
> + * through the legacy GCP SF unit. Used by the GSP-RM path, which
> sends the
> + * equivalent packet via RM as well but keeps the direct write in
> sync.
> + */
> +void
> +tu102_sor_hdmi_gcp(struct nvkm_ior *sor, int head, bool enable)
> +{
> + struct nvkm_device *device = sor->disp-
> >engine.subdev.device;
> + const u32 hdmi = head * 0x400;
> +
> + nvkm_mask(device, 0x6f00c0 + hdmi, 0x00000001, 0x00000000);
> + nvkm_wr32(device, 0x6f00cc + hdmi, !enable ? 0x00000001 :
> 0x00000010);
> + nvkm_mask(device, 0x6f00c0 + hdmi, 0x00000001, 0x00000001);
> +}
> +
> void
> tu102_sor_dp_vcpi(struct nvkm_ior *sor, int head, u8 slot, u8
> slot_nr, u16 pbn, u16 aligned)
> {
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c
> b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c
> index 8e57bb6519e5..cd4451e62512 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/disp.c
> @@ -545,16 +545,9 @@ r535_sor_hdmi_ctrl_audio(struct nvkm_outp *outp,
> bool enable)
> static void
> r535_sor_hdmi_audio(struct nvkm_ior *sor, int head, bool enable)
> {
> - struct nvkm_device *device = sor->disp-
> >engine.subdev.device;
> - const u32 hdmi = head * 0x400;
> -
> r535_sor_hdmi_ctrl_audio(sor->asy.outp, enable);
> r535_sor_hdmi_ctrl_audio_mute(sor->asy.outp, !enable);
> -
> - /* General Control (GCP). */
> - nvkm_mask(device, 0x6f00c0 + hdmi, 0x00000001, 0x00000000);
> - nvkm_wr32(device, 0x6f00cc + hdmi, !enable ? 0x00000001 :
> 0x00000010);
> - nvkm_mask(device, 0x6f00c0 + hdmi, 0x00000001, 0x00000001);
> + tu102_sor_hdmi_gcp(sor, head, enable);
> }
>
> static void
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.