60fd626
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
60fd626
From: Ben Skeggs <bskeggs@redhat.com>
60fd626
Date: Wed, 6 May 2020 14:40:52 +1000
60fd626
Subject: [PATCH] disp/hda/gt215-: pass head to nvkm_ior.hda.eld()
60fd626
60fd626
We're going to use the bound head to select HDA device entry.
60fd626
60fd626
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
60fd626
---
60fd626
 drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c | 2 +-
60fd626
 drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c | 2 +-
60fd626
 drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h      | 6 +++---
60fd626
 drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c | 2 +-
60fd626
 4 files changed, 6 insertions(+), 6 deletions(-)
60fd626
60fd626
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
60fd626
index 0fa0ec0a1de0..1080ba6ecd64 100644
60fd626
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
60fd626
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
60fd626
@@ -24,7 +24,7 @@
60fd626
 #include "ior.h"
60fd626
60fd626
 void
60fd626
-gf119_hda_eld(struct nvkm_ior *ior, u8 *data, u8 size)
60fd626
+gf119_hda_eld(struct nvkm_ior *ior, int head, u8 *data, u8 size)
60fd626
 {
60fd626
 	struct nvkm_device *device = ior->disp->engine.subdev.device;
60fd626
 	const u32 soff = 0x030 * ior->id;
60fd626
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c
60fd626
index 4509d2ba880e..0d1b81fe1093 100644
60fd626
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c
60fd626
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagt215.c
60fd626
@@ -24,7 +24,7 @@
60fd626
 #include "ior.h"
60fd626
60fd626
 void
60fd626
-gt215_hda_eld(struct nvkm_ior *ior, u8 *data, u8 size)
60fd626
+gt215_hda_eld(struct nvkm_ior *ior, int head, u8 *data, u8 size)
60fd626
 {
60fd626
 	struct nvkm_device *device = ior->disp->engine.subdev.device;
60fd626
 	const u32 soff = ior->id * 0x800;
60fd626
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
60fd626
index 009d3a8b7a50..c60acf71831e 100644
60fd626
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
60fd626
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/ior.h
60fd626
@@ -87,7 +87,7 @@ struct nvkm_ior_func {
60fd626
60fd626
 	struct {
60fd626
 		void (*hpd)(struct nvkm_ior *, int head, bool present);
60fd626
-		void (*eld)(struct nvkm_ior *, u8 *data, u8 size);
60fd626
+		void (*eld)(struct nvkm_ior *, int head, u8 *data, u8 size);
60fd626
 	} hda;
60fd626
 };
60fd626
60fd626
@@ -158,10 +158,10 @@ void gv100_hdmi_ctrl(struct nvkm_ior *, int, bool, u8, u8, u8 *, u8 , u8 *, u8);
60fd626
 void gm200_hdmi_scdc(struct nvkm_ior *, int, u8);
60fd626
60fd626
 void gt215_hda_hpd(struct nvkm_ior *, int, bool);
60fd626
-void gt215_hda_eld(struct nvkm_ior *, u8 *, u8);
60fd626
+void gt215_hda_eld(struct nvkm_ior *, int, u8 *, u8);
60fd626
60fd626
 void gf119_hda_hpd(struct nvkm_ior *, int, bool);
60fd626
-void gf119_hda_eld(struct nvkm_ior *, u8 *, u8);
60fd626
+void gf119_hda_eld(struct nvkm_ior *, int, u8 *, u8);
60fd626
60fd626
 #define IOR_MSG(i,l,f,a...) do {                                               \
60fd626
 	struct nvkm_ior *_ior = (i);                                           \
60fd626
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
60fd626
index 5f758948d6e1..a7672ef17d3b 100644
60fd626
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
60fd626
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
60fd626
@@ -155,7 +155,7 @@ nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size)
60fd626
 			if (outp->info.type == DCB_OUTPUT_DP)
60fd626
 				ior->func->dp.audio(ior, hidx, true);
60fd626
 			ior->func->hda.hpd(ior, hidx, true);
60fd626
-			ior->func->hda.eld(ior, data, size);
60fd626
+			ior->func->hda.eld(ior, hidx, data, size);
60fd626
 		} else {
60fd626
 			if (outp->info.type == DCB_OUTPUT_DP)
60fd626
 				ior->func->dp.audio(ior, hidx, false);
60fd626
-- 
60fd626
2.26.2
60fd626