Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d7ef84d authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/disp/nv50-: implement a common supervisor 2.2



This makes use of all the additional routing and state added in previous
commits, making it possible to deal with GM20x macro link routing, while
also sharing code between the NV50 and GF119 implementations.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 1f0c9eaf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include "rootnv50.h"

#include <core/client.h>
#include <core/notify.h>
#include <core/ramht.h>
#include <engine/dma.h>

+9 −0
Original line number Diff line number Diff line
@@ -21,6 +21,14 @@
 */
#include "ior.h"

static void
gf119_dac_clock(struct nvkm_ior *dac)
{
	struct nvkm_device *device = dac->disp->engine.subdev.device;
	const u32 doff = nv50_ior_base(dac);
	nvkm_mask(device, 0x612280 + doff, 0x07070707, 0x00000000);
}

static void
gf119_dac_state(struct nvkm_ior *dac, struct nvkm_ior_state *state)
{
@@ -44,6 +52,7 @@ gf119_dac = {
	.state = gf119_dac_state,
	.power = nv50_dac_power,
	.sense = nv50_dac_sense,
	.clock = gf119_dac_clock,
};

int
+9 −0
Original line number Diff line number Diff line
@@ -25,6 +25,14 @@

#include <subdev/timer.h>

static void
nv50_dac_clock(struct nvkm_ior *dac)
{
	struct nvkm_device *device = dac->disp->engine.subdev.device;
	const u32 doff = nv50_ior_base(dac);
	nvkm_mask(device, 0x614280 + doff, 0x07070707, 0x00000000);
}

int
nv50_dac_sense(struct nvkm_ior *dac, u32 loadval)
{
@@ -95,6 +103,7 @@ nv50_dac = {
	.state = nv50_dac_state,
	.power = nv50_dac_power,
	.sense = nv50_dac_sense,
	.clock = nv50_dac_clock,
};

int
+4 −3
Original line number Diff line number Diff line
@@ -428,8 +428,8 @@ nvkm_dp_release(struct nvkm_outp *outp, struct nvkm_ior *ior)
	);
}

int
nvkm_output_dp_train(struct nvkm_outp *outp, u32 unused)
static int
nvkm_dp_acquire(struct nvkm_outp *outp)
{
	struct nvkm_dp *dp = nvkm_dp(outp);
	struct nvkm_ior *ior = dp->outp.ior;
@@ -529,7 +529,7 @@ nvkm_dp_hpd(struct nvkm_notify *notify)
	OUTP_DBG(&dp->outp, "HPD: %d", line->mask);
	if (line->mask & NVKM_I2C_IRQ) {
		if (atomic_read(&dp->lt.done))
			nvkm_output_dp_train(&dp->outp, 0);
			dp->outp.func->acquire(&dp->outp);
		rep.mask |= NVIF_NOTIFY_CONN_V0_IRQ;
	} else {
		nvkm_dp_enable(dp, true);
@@ -574,6 +574,7 @@ nvkm_dp_func = {
	.dtor = nvkm_dp_dtor,
	.init = nvkm_dp_init,
	.fini = nvkm_dp_fini,
	.acquire = nvkm_dp_acquire,
	.release = nvkm_dp_release,
};

+0 −4
Original line number Diff line number Diff line
@@ -29,10 +29,6 @@ struct nvkm_dp {
	} lt;
};

#define nvkm_output_dp nvkm_dp

int nvkm_output_dp_train(struct nvkm_output *, u32 rate);

int nvkm_dp_new(struct nvkm_disp *, int index, struct dcb_output *,
		struct nvkm_outp **);

Loading