Skip to content

Commit c4d66f7

Browse files
author
Ben Skeggs
committed
drm/nouveau/gr/tu102-: fix support for sw_bundle64_init
We weren't sending the high bits, though they're zero currently anyway. Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Lyude Paul <[email protected]>
1 parent 1cd97b5 commit c4d66f7

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,9 +1389,15 @@ gf100_grctx_generate_main(struct gf100_gr_chan *chan)
13891389

13901390
if (gr->bundle_veid)
13911391
gf100_gr_icmd(gr, gr->bundle_veid);
1392-
if (grctx->sw_veid_bundle_init)
1392+
else
13931393
gf100_gr_icmd(gr, grctx->sw_veid_bundle_init);
13941394

1395+
if (gr->bundle64)
1396+
gf100_gr_icmd(gr, gr->bundle64);
1397+
else
1398+
if (grctx->sw_bundle64_init)
1399+
gf100_gr_icmd(gr, grctx->sw_bundle64_init);
1400+
13951401
if (grctx->r400088) grctx->r400088(gr, true);
13961402

13971403
nvkm_wr32(device, 0x404154, idle_timeout);

drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ struct gf100_grctx_func {
2222
const struct gf100_gr_pack *icmd;
2323
const struct gf100_gr_pack *mthd;
2424
const struct gf100_gr_pack *sw_veid_bundle_init;
25+
const struct gf100_gr_pack *sw_bundle64_init;
2526
/* bundle circular buffer */
2627
void (*bundle)(struct gf100_gr_chan *, u64 addr, u32 size);
2728
u32 bundle_size;

drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ tu102_grctx_init_unknown_bundle_init_0[] = {
5050
};
5151

5252
static const struct gf100_gr_pack
53-
tu102_grctx_pack_sw_veid_bundle_init[] = {
54-
{ tu102_grctx_init_unknown_bundle_init_0 },
53+
tu102_grctx_pack_sw_bundle64_init[] = {
54+
{ tu102_grctx_init_unknown_bundle_init_0, .type = 64 },
5555
{}
5656
};
5757

@@ -69,7 +69,7 @@ tu102_grctx = {
6969
.unkn88c = gv100_grctx_unkn88c,
7070
.main = gf100_grctx_generate_main,
7171
.unkn = gv100_grctx_generate_unkn,
72-
.sw_veid_bundle_init = tu102_grctx_pack_sw_veid_bundle_init,
72+
.sw_bundle64_init = tu102_grctx_pack_sw_bundle64_init,
7373
.bundle = gm107_grctx_generate_bundle,
7474
.bundle_size = 0x3000,
7575
.bundle_min_gpm_fifo_depth = 0x180,

drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ gf100_gr_icmd(struct gf100_gr *gr, const struct gf100_gr_pack *p)
10971097
struct nvkm_device *device = gr->base.engine.subdev.device;
10981098
const struct gf100_gr_pack *pack;
10991099
const struct gf100_gr_init *init;
1100-
u32 data = 0;
1100+
u64 data = 0;
11011101

11021102
nvkm_wr32(device, 0x400208, 0x80000000);
11031103

@@ -1107,6 +1107,8 @@ gf100_gr_icmd(struct gf100_gr *gr, const struct gf100_gr_pack *p)
11071107

11081108
if ((pack == p && init == p->init) || data != init->data) {
11091109
nvkm_wr32(device, 0x400204, init->data);
1110+
if (pack->type == 64)
1111+
nvkm_wr32(device, 0x40020c, upper_32_bits(init->data));
11101112
data = init->data;
11111113
}
11121114

@@ -2139,6 +2141,7 @@ gf100_gr_dtor(struct nvkm_gr *base)
21392141
nvkm_blob_dtor(&gr->gpccs.inst);
21402142
nvkm_blob_dtor(&gr->gpccs.data);
21412143

2144+
vfree(gr->bundle64);
21422145
vfree(gr->bundle_veid);
21432146
vfree(gr->bundle);
21442147
vfree(gr->method);

drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ struct gf100_gr {
9191
struct gf100_gr_pack *sw_ctx;
9292
struct gf100_gr_pack *bundle;
9393
struct gf100_gr_pack *bundle_veid;
94+
struct gf100_gr_pack *bundle64;
9495
struct gf100_gr_pack *method;
9596

9697
struct gf100_gr_zbc_color zbc_color[NVKM_LTC_MAX_ZBC_COLOR_CNT];
@@ -286,7 +287,7 @@ struct gf100_gr_init {
286287
u32 addr;
287288
u8 count;
288289
u32 pitch;
289-
u32 data;
290+
u64 data;
290291
};
291292

292293
struct gf100_gr_pack {

0 commit comments

Comments
 (0)