Commit 7bcf89ee authored by Ben Skeggs's avatar Ben Skeggs Committed by Dave Airlie
Browse files

drm/nouveau/disp: split sor hda funcs out to their own struct



Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 9a4514fb
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -110,11 +110,7 @@ ga102_sor = {
		.scdc = gm200_sor_hdmi_scdc,
	},
	.dp = &ga102_sor_dp,
	.hda = {
		.hpd = gf119_sor_hda_hpd,
		.eld = gf119_sor_hda_eld,
		.device_entry = gv100_sor_hda_device_entry,
	},
	.hda = &gv100_sor_hda,
};

static int
+10 −7
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@

#include <nvif/class.h>

void
static void
gf119_sor_hda_device_entry(struct nvkm_ior *ior, int head)
{
	struct nvkm_device *device = ior->disp->engine.subdev.device;
@@ -65,7 +65,7 @@ gf119_sor_hda_hpd(struct nvkm_ior *ior, int head, bool present)
	u32 mask = 0x80000001;

	if (present) {
		ior->func->hda.device_entry(ior, head);
		ior->func->hda->device_entry(ior, head);
		data |= 0x00000001;
	} else {
		mask |= 0x00000002;
@@ -74,6 +74,13 @@ gf119_sor_hda_hpd(struct nvkm_ior *ior, int head, bool present)
	nvkm_mask(device, 0x10ec10 + soff, mask, data);
}

const struct nvkm_ior_func_hda
gf119_sor_hda = {
	.hpd = gf119_sor_hda_hpd,
	.eld = gf119_sor_hda_eld,
	.device_entry = gf119_sor_hda_device_entry,
};

void
gf119_sor_dp_watermark(struct nvkm_ior *sor, int head, u8 watermark)
{
@@ -302,11 +309,7 @@ gf119_sor = {
		.ctrl = gf119_sor_hdmi_ctrl,
	},
	.dp = &gf119_sor_dp,
	.hda = {
		.hpd = gf119_sor_hda_hpd,
		.eld = gf119_sor_hda_eld,
		.device_entry = gf119_sor_hda_device_entry,
	},
	.hda = &gf119_sor_hda,
};

static int
+1 −5
Original line number Diff line number Diff line
@@ -96,11 +96,7 @@ gk104_sor = {
		.ctrl = gk104_sor_hdmi_ctrl,
	},
	.dp = &gf119_sor_dp,
	.hda = {
		.hpd = gf119_sor_hda_hpd,
		.eld = gf119_sor_hda_eld,
		.device_entry = gf119_sor_hda_device_entry,
	},
	.hda = &gf119_sor_hda,
};

int
+1 −5
Original line number Diff line number Diff line
@@ -74,11 +74,7 @@ gm107_sor = {
		.ctrl = gk104_sor_hdmi_ctrl,
	},
	.dp = &gm107_sor_dp,
	.hda = {
		.hpd = gf119_sor_hda_hpd,
		.eld = gf119_sor_hda_eld,
		.device_entry = gf119_sor_hda_device_entry,
	},
	.hda = &gf119_sor_hda,
};

static int
+1 −5
Original line number Diff line number Diff line
@@ -136,11 +136,7 @@ gm200_sor = {
		.scdc = gm200_sor_hdmi_scdc,
	},
	.dp = &gm200_sor_dp,
	.hda = {
		.hpd = gf119_sor_hda_hpd,
		.eld = gf119_sor_hda_eld,
		.device_entry = gf119_sor_hda_device_entry,
	},
	.hda = &gf119_sor_hda,
};

static int
Loading