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

Commit 78f1ad6f authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/disp: introduce input/output resource abstraction



In order to properly support the SOR -> SOR + pad macro separation
that occurred with GM20x GPUs, we need to separate OR handling out
of the output path code.

This will be used as the base to support ORs (DAC, SOR, PIOR).

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 57b2d73b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ struct nvkm_disp {
	struct nvkm_engine engine;

	struct list_head head;
	struct list_head ior;
	struct list_head outp;
	struct list_head conn;

+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ nvkm-y += nvkm/engine/disp/headnv04.o
nvkm-y += nvkm/engine/disp/headnv50.o
nvkm-y += nvkm/engine/disp/headgf119.o

nvkm-y += nvkm/engine/disp/ior.o
nvkm-y += nvkm/engine/disp/dacnv50.o
nvkm-y += nvkm/engine/disp/piornv50.o
nvkm-y += nvkm/engine/disp/sornv50.o
+8 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include "priv.h"
#include "conn.h"
#include "head.h"
#include "ior.h"
#include "outp.h"

#include <core/client.h>
@@ -414,6 +415,12 @@ nvkm_disp_dtor(struct nvkm_engine *engine)
		nvkm_outp_del(&outp);
	}

	while (!list_empty(&disp->ior)) {
		struct nvkm_ior *ior =
			list_first_entry(&disp->ior, typeof(*ior), head);
		nvkm_ior_del(&ior);
	}

	while (!list_empty(&disp->head)) {
		struct nvkm_head *head =
			list_first_entry(&disp->head, typeof(*head), head);
@@ -439,6 +446,7 @@ nvkm_disp_ctor(const struct nvkm_disp_func *func, struct nvkm_device *device,
{
	disp->func = func;
	INIT_LIST_HEAD(&disp->head);
	INIT_LIST_HEAD(&disp->ior);
	INIT_LIST_HEAD(&disp->outp);
	INIT_LIST_HEAD(&disp->conn);
	return nvkm_engine_ctor(&nvkm_disp, device, index, true, &disp->engine);
+11 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
 *
 * Authors: Ben Skeggs
 */
#include "ior.h"
#include "nv50.h"
#include "outp.h"

@@ -124,3 +125,13 @@ nv50_dac_power(NV50_DISP_MTHD_V1)
	);
	return 0;
}

static const struct nvkm_ior_func
nv50_dac = {
};

int
nv50_dac_new(struct nvkm_disp *disp, int id)
{
	return nvkm_ior_new_(&nv50_dac, disp, DAC, id);
}
+4 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
 */
#include "nv50.h"
#include "head.h"
#include "ior.h"
#include "rootnv50.h"

static const struct nv50_disp_func
@@ -38,12 +39,15 @@ g84_disp = {
	.outp.external.tmds = nv50_pior_output_new,
	.outp.external.dp = nv50_pior_dp_new,
	.dac.nr = 3,
	.dac.new = nv50_dac_new,
	.dac.power = nv50_dac_power,
	.dac.sense = nv50_dac_sense,
	.sor.nr = 2,
	.sor.new = nv50_sor_new,
	.sor.power = nv50_sor_power,
	.sor.hdmi = g84_hdmi_ctrl,
	.pior.nr = 3,
	.pior.new = nv50_pior_new,
	.pior.power = nv50_pior_power,
};

Loading