forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/gpu/drm/nouveau/nvkm/engine/disp/hdagf119.c
....@@ -24,10 +24,18 @@
2424 #include "ior.h"
2525
2626 void
27
-gf119_hda_eld(struct nvkm_ior *ior, u8 *data, u8 size)
27
+gf119_hda_device_entry(struct nvkm_ior *ior, int head)
2828 {
2929 struct nvkm_device *device = ior->disp->engine.subdev.device;
30
- const u32 soff = 0x030 * ior->id;
30
+ const u32 hoff = 0x800 * head;
31
+ nvkm_mask(device, 0x616548 + hoff, 0x00000070, head << 4);
32
+}
33
+
34
+void
35
+gf119_hda_eld(struct nvkm_ior *ior, int head, u8 *data, u8 size)
36
+{
37
+ struct nvkm_device *device = ior->disp->engine.subdev.device;
38
+ const u32 soff = 0x030 * ior->id + (head * 0x04);
3139 int i;
3240
3341 for (i = 0; i < size; i++)
....@@ -41,14 +49,14 @@
4149 gf119_hda_hpd(struct nvkm_ior *ior, int head, bool present)
4250 {
4351 struct nvkm_device *device = ior->disp->engine.subdev.device;
44
- const u32 hoff = 0x800 * head;
52
+ const u32 soff = 0x030 * ior->id + (head * 0x04);
4553 u32 data = 0x80000000;
4654 u32 mask = 0x80000001;
4755 if (present) {
48
- nvkm_mask(device, 0x616548 + hoff, 0x00000070, 0x00000000);
56
+ ior->func->hda.device_entry(ior, head);
4957 data |= 0x00000001;
5058 } else {
5159 mask |= 0x00000002;
5260 }
53
- nvkm_mask(device, 0x10ec10 + ior->id * 0x030, mask, data);
61
+ nvkm_mask(device, 0x10ec10 + soff, mask, data);
5462 }