mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
drm/nvc0/gr: 0x9197/0x9297 state init
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
847adea2c7
commit
6f376460e4
1 changed files with 43 additions and 128 deletions
|
@ -45,6 +45,9 @@ nv_mthd(struct drm_device *dev, u32 class, u32 mthd, u32 data)
|
|||
static void
|
||||
nvc0_grctx_generate_9097(struct drm_device *dev)
|
||||
{
|
||||
u32 fermi = nvc0_graph_class(dev);
|
||||
u32 mthd;
|
||||
|
||||
nv_mthd(dev, 0x9097, 0x0800, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x0840, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x0880, 0x00000000);
|
||||
|
@ -824,134 +827,10 @@ nvc0_grctx_generate_9097(struct drm_device *dev)
|
|||
nv_mthd(dev, 0x9097, 0x1eb8, 0x00000001);
|
||||
nv_mthd(dev, 0x9097, 0x1ed8, 0x00000001);
|
||||
nv_mthd(dev, 0x9097, 0x1ef8, 0x00000001);
|
||||
nv_mthd(dev, 0x9097, 0x3400, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3404, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3408, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x340c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3410, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3414, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3418, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x341c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3420, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3424, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3428, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x342c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3430, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3434, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3438, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x343c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3440, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3444, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3448, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x344c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3450, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3454, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3458, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x345c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3460, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3464, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3468, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x346c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3470, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3474, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3478, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x347c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3480, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3484, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3488, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x348c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3490, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3494, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3498, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x349c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34a0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34a4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34a8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34ac, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34b0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34b4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34b8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34bc, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34c0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34c4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34c8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34cc, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34d0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34d4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34d8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34dc, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34e0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34e4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34e8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34ec, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34f0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34f4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34f8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x34fc, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3500, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3504, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3508, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x350c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3510, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3514, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3518, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x351c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3520, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3524, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3528, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x352c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3530, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3534, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3538, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x353c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3540, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3544, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3548, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x354c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3550, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3554, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3558, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x355c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3560, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3564, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3568, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x356c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3570, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3574, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3578, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x357c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3580, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3584, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3588, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x358c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3590, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3594, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x3598, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x359c, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35a0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35a4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35a8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35ac, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35b0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35b4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35b8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35bc, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35c0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35c4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35c8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35cc, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35d0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35d4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35d8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35dc, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35e0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35e4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35e8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35ec, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35f0, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35f4, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35f8, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x35fc, 0x00000000);
|
||||
if (fermi == 0x9097) {
|
||||
for (mthd = 0x3400; mthd <= 0x35fc; mthd += 4)
|
||||
nv_mthd(dev, 0x9097, mthd, 0x00000000);
|
||||
}
|
||||
nv_mthd(dev, 0x9097, 0x030c, 0x00000001);
|
||||
nv_mthd(dev, 0x9097, 0x1944, 0x00000000);
|
||||
nv_mthd(dev, 0x9097, 0x1514, 0x00000000);
|
||||
|
@ -1320,6 +1199,37 @@ nvc0_grctx_generate_9097(struct drm_device *dev)
|
|||
nv_mthd(dev, 0x9097, 0x3410, 0x80002006);
|
||||
}
|
||||
|
||||
static void
|
||||
nvc0_grctx_generate_9197(struct drm_device *dev)
|
||||
{
|
||||
u32 fermi = nvc0_graph_class(dev);
|
||||
u32 mthd;
|
||||
|
||||
if (fermi == 0x9197) {
|
||||
for (mthd = 0x3400; mthd <= 0x35fc; mthd += 4)
|
||||
nv_mthd(dev, 0x9197, mthd, 0x00000000);
|
||||
}
|
||||
nv_mthd(dev, 0x9297, 0x02e4, 0x0000b001);
|
||||
}
|
||||
|
||||
static void
|
||||
nvc0_grctx_generate_9297(struct drm_device *dev)
|
||||
{
|
||||
u32 fermi = nvc0_graph_class(dev);
|
||||
u32 mthd;
|
||||
|
||||
if (fermi == 0x9297) {
|
||||
for (mthd = 0x3400; mthd <= 0x35fc; mthd += 4)
|
||||
nv_mthd(dev, 0x9297, mthd, 0x00000000);
|
||||
}
|
||||
nv_mthd(dev, 0x9297, 0x036c, 0x00000000);
|
||||
nv_mthd(dev, 0x9297, 0x0370, 0x00000000);
|
||||
nv_mthd(dev, 0x9297, 0x07a4, 0x00000000);
|
||||
nv_mthd(dev, 0x9297, 0x07a8, 0x00000000);
|
||||
nv_mthd(dev, 0x9297, 0x0374, 0x00000000);
|
||||
nv_mthd(dev, 0x9297, 0x0378, 0x00000020);
|
||||
}
|
||||
|
||||
static void
|
||||
nvc0_grctx_generate_902d(struct drm_device *dev)
|
||||
{
|
||||
|
@ -1801,6 +1711,7 @@ nvc0_grctx_generate(struct nouveau_channel *chan)
|
|||
struct nvc0_graph_chan *grch = chan->engctx[NVOBJ_ENGINE_GR];
|
||||
struct drm_device *dev = chan->dev;
|
||||
int i, gpc, tp, id;
|
||||
u32 fermi = nvc0_graph_class(dev);
|
||||
u32 r000260, tmp;
|
||||
|
||||
r000260 = nv_rd32(dev, 0x000260);
|
||||
|
@ -2865,6 +2776,10 @@ nvc0_grctx_generate(struct nouveau_channel *chan)
|
|||
nv_wr32(dev, 0x404154, 0x00000400);
|
||||
|
||||
nvc0_grctx_generate_9097(dev);
|
||||
if (fermi >= 0x9197)
|
||||
nvc0_grctx_generate_9197(dev);
|
||||
if (fermi >= 0x9297)
|
||||
nvc0_grctx_generate_9297(dev);
|
||||
nvc0_grctx_generate_902d(dev);
|
||||
nvc0_grctx_generate_9039(dev);
|
||||
nvc0_grctx_generate_90c0(dev);
|
||||
|
|
Loading…
Reference in a new issue