Commit 9b096283 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/disp/nv50-: simplify definiton of core channels



Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 6d41a753
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -79,14 +79,8 @@ nvkm-y += nvkm/engine/disp/basegp102.o
nvkm-y += nvkm/engine/disp/corenv50.o
nvkm-y += nvkm/engine/disp/coreg84.o
nvkm-y += nvkm/engine/disp/coreg94.o
nvkm-y += nvkm/engine/disp/coregt200.o
nvkm-y += nvkm/engine/disp/coregt215.o
nvkm-y += nvkm/engine/disp/coregf119.o
nvkm-y += nvkm/engine/disp/coregk104.o
nvkm-y += nvkm/engine/disp/coregk110.o
nvkm-y += nvkm/engine/disp/coregm107.o
nvkm-y += nvkm/engine/disp/coregm200.o
nvkm-y += nvkm/engine/disp/coregp100.o
nvkm-y += nvkm/engine/disp/coregp102.o

nvkm-y += nvkm/engine/disp/ovlynv50.o
+21 −3
Original line number Diff line number Diff line
@@ -63,6 +63,11 @@ int nv50_disp_base_new_(const struct nv50_disp_dmac_func *,
			struct nv50_disp *, int chid,
			const struct nvkm_oclass *, void *argv, u32 argc,
			struct nvkm_object **);
int nv50_disp_core_new_(const struct nv50_disp_dmac_func *,
			const struct nv50_disp_chan_mthd *,
			struct nv50_disp *, int chid,
			const struct nvkm_oclass *oclass, void *argv, u32 argc,
			struct nvkm_object **);
int nv50_disp_ovly_new_(const struct nv50_disp_dmac_func *,
			const struct nv50_disp_chan_mthd *,
			struct nv50_disp *, int chid,
@@ -75,14 +80,21 @@ int nv50_disp_oimm_new(const struct nvkm_oclass *, void *, u32,
		       struct nv50_disp *, struct nvkm_object **);
int nv50_disp_base_new(const struct nvkm_oclass *, void *, u32,
		       struct nv50_disp *, struct nvkm_object **);
int nv50_disp_core_new(const struct nvkm_oclass *, void *, u32,
		       struct nv50_disp *, struct nvkm_object **);
int nv50_disp_ovly_new(const struct nvkm_oclass *, void *, u32,
		       struct nv50_disp *, struct nvkm_object **);

int g84_disp_base_new(const struct nvkm_oclass *, void *, u32,
		      struct nv50_disp *, struct nvkm_object **);
int g84_disp_core_new(const struct nvkm_oclass *, void *, u32,
		      struct nv50_disp *, struct nvkm_object **);
int g84_disp_ovly_new(const struct nvkm_oclass *, void *, u32,
		      struct nv50_disp *, struct nvkm_object **);

int g94_disp_core_new(const struct nvkm_oclass *, void *, u32,
		      struct nv50_disp *, struct nvkm_object **);

int gt200_disp_ovly_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);

@@ -92,9 +104,13 @@ int gf119_disp_oimm_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);
int gf119_disp_base_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);
int gf119_disp_core_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);
int gf119_disp_ovly_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);

int gk104_disp_core_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);
int gk104_disp_ovly_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);

@@ -104,6 +120,8 @@ int gp102_disp_oimm_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);
int gp102_disp_base_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);
int gp102_disp_core_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);
int gp102_disp_ovly_new(const struct nvkm_oclass *, void *, u32,
			struct nv50_disp *, struct nvkm_object **);

@@ -135,11 +153,11 @@ extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_sor;
extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_pior;
extern const struct nv50_disp_mthd_list nv50_disp_base_mthd_image;

extern const struct nv50_disp_chan_mthd g84_disp_core_chan_mthd;
extern const struct nv50_disp_chan_mthd g84_disp_core_mthd;
extern const struct nv50_disp_mthd_list g84_disp_core_mthd_dac;
extern const struct nv50_disp_mthd_list g84_disp_core_mthd_head;

extern const struct nv50_disp_chan_mthd g94_disp_core_chan_mthd;
extern const struct nv50_disp_chan_mthd g94_disp_core_mthd;

extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_base;
extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_dac;
@@ -147,6 +165,6 @@ extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_sor;
extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_pior;
extern const struct nv50_disp_chan_mthd gf119_disp_base_mthd;

extern const struct nv50_disp_chan_mthd gk104_disp_core_chan_mthd;
extern const struct nv50_disp_chan_mthd gk104_disp_core_mthd;
extern const struct nv50_disp_chan_mthd gk104_disp_ovly_mthd;
#endif
+8 −14
Original line number Diff line number Diff line
@@ -22,9 +22,6 @@
 * Authors: Ben Skeggs
 */
#include "dmacnv50.h"
#include "rootnv50.h"

#include <nvif/class.h>

const struct nv50_disp_mthd_list
g84_disp_core_mthd_dac = {
@@ -91,7 +88,7 @@ g84_disp_core_mthd_head = {
};

const struct nv50_disp_chan_mthd
g84_disp_core_chan_mthd = {
g84_disp_core_mthd = {
	.name = "Core",
	.addr = 0x000000,
	.prev = 0x000004,
@@ -105,13 +102,10 @@ g84_disp_core_chan_mthd = {
	}
};

const struct nv50_disp_dmac_oclass
g84_disp_core_oclass = {
	.base.oclass = G82_DISP_CORE_CHANNEL_DMA,
	.base.minver = 0,
	.base.maxver = 0,
	.ctor = nv50_disp_core_new,
	.func = &nv50_disp_core_func,
	.mthd = &g84_disp_core_chan_mthd,
	.chid = 0,
};
int
g84_disp_core_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
		  struct nv50_disp *disp, struct nvkm_object **pobject)
{
	return nv50_disp_core_new_(&nv50_disp_core_func, &g84_disp_core_mthd,
				   disp, 0, oclass, argv, argc, pobject);
}
+8 −14
Original line number Diff line number Diff line
@@ -22,9 +22,6 @@
 * Authors: Ben Skeggs
 */
#include "dmacnv50.h"
#include "rootnv50.h"

#include <nvif/class.h>

static const struct nv50_disp_mthd_list
g94_disp_core_mthd_sor = {
@@ -37,7 +34,7 @@ g94_disp_core_mthd_sor = {
};

const struct nv50_disp_chan_mthd
g94_disp_core_chan_mthd = {
g94_disp_core_mthd = {
	.name = "Core",
	.addr = 0x000000,
	.prev = 0x000004,
@@ -51,13 +48,10 @@ g94_disp_core_chan_mthd = {
	}
};

const struct nv50_disp_dmac_oclass
g94_disp_core_oclass = {
	.base.oclass = GT206_DISP_CORE_CHANNEL_DMA,
	.base.minver = 0,
	.base.maxver = 0,
	.ctor = nv50_disp_core_new,
	.func = &nv50_disp_core_func,
	.mthd = &g94_disp_core_chan_mthd,
	.chid = 0,
};
int
g94_disp_core_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
		  struct nv50_disp *disp, struct nvkm_object **pobject)
{
	return nv50_disp_core_new_(&nv50_disp_core_func, &g94_disp_core_mthd,
				   disp, 0, oclass, argv, argc, pobject);
}
+8 −16
Original line number Diff line number Diff line
@@ -22,14 +22,9 @@
 * Authors: Ben Skeggs
 */
#include "dmacnv50.h"
#include "rootnv50.h"

#include <core/client.h>
#include <subdev/timer.h>

#include <nvif/class.h>
#include <nvif/unpack.h>

const struct nv50_disp_mthd_list
gf119_disp_core_mthd_base = {
	.mthd = 0x0000,
@@ -157,7 +152,7 @@ gf119_disp_core_mthd_head = {
};

static const struct nv50_disp_chan_mthd
gf119_disp_core_chan_mthd = {
gf119_disp_core_mthd = {
	.name = "Core",
	.addr = 0x000000,
	.prev = -0x020000,
@@ -232,13 +227,10 @@ gf119_disp_core_func = {
	.bind = gf119_disp_dmac_bind,
};

const struct nv50_disp_dmac_oclass
gf119_disp_core_oclass = {
	.base.oclass = GF110_DISP_CORE_CHANNEL_DMA,
	.base.minver = 0,
	.base.maxver = 0,
	.ctor = nv50_disp_core_new,
	.func = &gf119_disp_core_func,
	.mthd = &gf119_disp_core_chan_mthd,
	.chid = 0,
};
int
gf119_disp_core_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
		    struct nv50_disp *disp, struct nvkm_object **pobject)
{
	return nv50_disp_core_new_(&gf119_disp_core_func, &gf119_disp_core_mthd,
				   disp, 0, oclass, argv, argc, pobject);
}
Loading