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

Commit 426b20e4 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/gr/gm206: initial init+ctx code



Uncertain whether the GPC pack change is due to a newer driver version,
or a legitimate difference from GM204.  My GM204 has broken vram, so
can't currently try a newer binary driver on it to confirm.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 985826bc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ extern struct nvkm_oclass *gk110b_gr_oclass;
extern struct nvkm_oclass *gk208_gr_oclass;
extern struct nvkm_oclass *gm107_gr_oclass;
extern struct nvkm_oclass *gm204_gr_oclass;
extern struct nvkm_oclass *gm206_gr_oclass;

#include <core/enum.h>

+1 −3
Original line number Diff line number Diff line
@@ -170,9 +170,7 @@ gm100_identify(struct nvkm_device *device)
		device->oclass[NVDEV_ENGINE_DMAOBJ ] =  gf110_dmaeng_oclass;
		device->oclass[NVDEV_ENGINE_FIFO   ] =  gm204_fifo_oclass;
		device->oclass[NVDEV_ENGINE_SW     ] =  gf100_sw_oclass;
#if 0
		device->oclass[NVDEV_ENGINE_GR     ] =  gm107_gr_oclass;
#endif
		device->oclass[NVDEV_ENGINE_GR     ] =  gm206_gr_oclass;
		device->oclass[NVDEV_ENGINE_DISP   ] =  gm204_disp_oclass;
		device->oclass[NVDEV_ENGINE_CE0    ] = &gm204_ce0_oclass;
		device->oclass[NVDEV_ENGINE_CE1    ] = &gm204_ce1_oclass;
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ nvkm-y += nvkm/engine/gr/ctxgk110b.o
nvkm-y += nvkm/engine/gr/ctxgk208.o
nvkm-y += nvkm/engine/gr/ctxgm107.o
nvkm-y += nvkm/engine/gr/ctxgm204.o
nvkm-y += nvkm/engine/gr/ctxgm206.o
nvkm-y += nvkm/engine/gr/nv04.o
nvkm-y += nvkm/engine/gr/nv10.o
nvkm-y += nvkm/engine/gr/nv20.o
@@ -36,3 +37,4 @@ nvkm-y += nvkm/engine/gr/gk110b.o
nvkm-y += nvkm/engine/gr/gk208.o
nvkm-y += nvkm/engine/gr/gm107.o
nvkm-y += nvkm/engine/gr/gm204.o
nvkm-y += nvkm/engine/gr/gm206.o
+18 −0
Original line number Diff line number Diff line
@@ -101,6 +101,9 @@ void gm107_grctx_generate_pagepool(struct gf100_grctx *);
void gm107_grctx_generate_attrib(struct gf100_grctx *);

extern struct nvkm_oclass *gm204_grctx_oclass;
void gm204_grctx_generate_main(struct gf100_gr_priv *, struct gf100_grctx *);

extern struct nvkm_oclass *gm206_grctx_oclass;

/* context init value lists */

@@ -207,4 +210,19 @@ extern const struct gf100_gr_init gk208_grctx_init_crstr_0[];

extern const struct gf100_gr_init gm107_grctx_init_gpc_unk_0[];
extern const struct gf100_gr_init gm107_grctx_init_wwdx_0[];

extern const struct gf100_gr_pack gm204_grctx_pack_icmd[];

extern const struct gf100_gr_pack gm204_grctx_pack_mthd[];

extern const struct gf100_gr_pack gm204_grctx_pack_hub[];

extern const struct gf100_gr_init gm204_grctx_init_prop_0[];
extern const struct gf100_gr_init gm204_grctx_init_setup_0[];
extern const struct gf100_gr_init gm204_grctx_init_gpm_0[];
extern const struct gf100_gr_init gm204_grctx_init_gpc_unk_2[];

extern const struct gf100_gr_pack gm204_grctx_pack_tpc[];

extern const struct gf100_gr_pack gm204_grctx_pack_ppc[];
#endif
+10 −10
Original line number Diff line number Diff line
@@ -294,7 +294,7 @@ gm204_grctx_init_icmd_0[] = {
	{}
};

static const struct gf100_gr_pack
const struct gf100_gr_pack
gm204_grctx_pack_icmd[] = {
	{ gm204_grctx_init_icmd_0 },
	{}
@@ -642,7 +642,7 @@ gm204_grctx_init_b197_0[] = {
	{}
};

static const struct gf100_gr_pack
const struct gf100_gr_pack
gm204_grctx_pack_mthd[] = {
	{ gm204_grctx_init_b197_0, 0xb197 },
	{ gf100_grctx_init_902d_0, 0x902d },
@@ -723,7 +723,7 @@ gm204_grctx_init_be_0[] = {
	{}
};

static const struct gf100_gr_pack
const struct gf100_gr_pack
gm204_grctx_pack_hub[] = {
	{ gf100_grctx_init_main_0 },
	{ gm204_grctx_init_fe_0 },
@@ -738,7 +738,7 @@ gm204_grctx_pack_hub[] = {
	{}
};

static const struct gf100_gr_init
const struct gf100_gr_init
gm204_grctx_init_prop_0[] = {
	{ 0x418400,   1, 0x04, 0x38e01e00 },
	{ 0x418404,   1, 0x04, 0x70001fff },
@@ -764,7 +764,7 @@ gm204_grctx_init_gpc_unk_1[] = {
	{}
};

static const struct gf100_gr_init
const struct gf100_gr_init
gm204_grctx_init_setup_0[] = {
	{ 0x418800,   1, 0x04, 0x7006863a },
	{ 0x418808,   1, 0x04, 0x00000000 },
@@ -778,7 +778,7 @@ gm204_grctx_init_setup_0[] = {
	{}
};

static const struct gf100_gr_init
const struct gf100_gr_init
gm204_grctx_init_gpm_0[] = {
	{ 0x418c10,   8, 0x04, 0x00000000 },
	{ 0x418c40,   1, 0x04, 0xffffffff },
@@ -787,7 +787,7 @@ gm204_grctx_init_gpm_0[] = {
	{}
};

static const struct gf100_gr_init
const struct gf100_gr_init
gm204_grctx_init_gpc_unk_2[] = {
	{ 0x418e00,   1, 0x04, 0x90040000 },
	{ 0x418e24,   1, 0x04, 0x00000000 },
@@ -880,7 +880,7 @@ gm204_grctx_init_sm_0[] = {
	{}
};

static const struct gf100_gr_pack
const struct gf100_gr_pack
gm204_grctx_pack_tpc[] = {
	{ gm204_grctx_init_pe_0 },
	{ gm204_grctx_init_tex_0 },
@@ -906,7 +906,7 @@ gm204_grctx_init_cbm_0[] = {
	{}
};

static const struct gf100_gr_pack
const struct gf100_gr_pack
gm204_grctx_pack_ppc[] = {
	{ gm204_grctx_init_pes_0 },
	{ gm204_grctx_init_cbm_0 },
@@ -974,7 +974,7 @@ gm204_grctx_generate_405b60(struct gf100_gr_priv *priv)
		nv_wr32(priv, 0x405ba0 + (i * 4), gpcs[i]);
}

static void
void
gm204_grctx_generate_main(struct gf100_gr_priv *priv, struct gf100_grctx *info)
{
	struct gf100_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass;
Loading