Skip to content

Commit 8b03d1e

Browse files
committed
Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-next
Some nouveau regression fixes. * 'linux-4.12' of git://github.com/skeggsb/linux: drm/nouveau/fb/gf100-: Fix 32 bit wraparound in new ram detection drm/nouveau/secboot/gm20b: fix the error return code in gm20b_secboot_tegra_read_wpr() drm/nouveau/kms: Increase max retries in scanout position queries. drm/nouveau/bios/bitP: check that table is long enough for optional pointers drm/nouveau/fifo/nv40: no ctxsw for pre-nv44 mpeg engine
2 parents 73ba2d5 + 271393b commit 8b03d1e

File tree

9 files changed

+10
-8
lines changed

9 files changed

+10
-8
lines changed

drivers/gpu/drm/nouveau/nouveau_display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
111111
};
112112
struct nouveau_display *disp = nouveau_display(crtc->dev);
113113
struct drm_vblank_crtc *vblank = &crtc->dev->vblank[drm_crtc_index(crtc)];
114-
int ret, retry = 1;
114+
int ret, retry = 20;
115115

116116
do {
117117
ret = nvif_mthd(&disp->disp, 0, &args, sizeof(args));

drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ nv40_fifo_dma_engine(struct nvkm_engine *engine, u32 *reg, u32 *ctx)
4444
*ctx = 0x38;
4545
return true;
4646
case NVKM_ENGINE_MPEG:
47+
if (engine->subdev.device->chipset < 0x44)
48+
return false;
4749
*reg = 0x00330c;
4850
*ctx = 0x54;
4951
return true;

drivers/gpu/drm/nouveau/nvkm/subdev/bios/boost.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ nvbios_boostTe(struct nvkm_bios *bios,
3333
u32 boost = 0;
3434

3535
if (!bit_entry(bios, 'P', &bit_P)) {
36-
if (bit_P.version == 2)
36+
if (bit_P.version == 2 && bit_P.length >= 0x34)
3737
boost = nvbios_rd32(bios, bit_P.offset + 0x30);
3838

3939
if (boost) {

drivers/gpu/drm/nouveau/nvkm/subdev/bios/cstep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ nvbios_cstepTe(struct nvkm_bios *bios,
3333
u32 cstep = 0;
3434

3535
if (!bit_entry(bios, 'P', &bit_P)) {
36-
if (bit_P.version == 2)
36+
if (bit_P.version == 2 && bit_P.length >= 0x38)
3737
cstep = nvbios_rd32(bios, bit_P.offset + 0x34);
3838

3939
if (cstep) {

drivers/gpu/drm/nouveau/nvkm/subdev/bios/fan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ nvbios_fan_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
3232
u32 fan = 0;
3333

3434
if (!bit_entry(bios, 'P', &bit_P)) {
35-
if (bit_P.version == 2 && bit_P.length >= 0x5a)
35+
if (bit_P.version == 2 && bit_P.length >= 0x5c)
3636
fan = nvbios_rd32(bios, bit_P.offset + 0x58);
3737

3838
if (fan) {

drivers/gpu/drm/nouveau/nvkm/subdev/bios/power_budget.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ nvbios_power_budget_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt,
3333
u32 power_budget;
3434

3535
if (bit_entry(bios, 'P', &bit_P) || bit_P.version != 2 ||
36-
bit_P.length < 0x2c)
36+
bit_P.length < 0x30)
3737
return 0;
3838

3939
power_budget = nvbios_rd32(bios, bit_P.offset + 0x2c);

drivers/gpu/drm/nouveau/nvkm/subdev/bios/vpstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ nvbios_vpstate_offset(struct nvkm_bios *b)
3131
struct bit_entry bit_P;
3232

3333
if (!bit_entry(b, 'P', &bit_P)) {
34-
if (bit_P.version == 2)
34+
if (bit_P.version == 2 && bit_P.length >= 0x3c)
3535
return nvbios_rd32(b, bit_P.offset + 0x38);
3636
}
3737

drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ gf100_ram_ctor(const struct nvkm_ram_func *func, struct nvkm_fb *fb,
589589
nvkm_debug(subdev, "FBP %d: %4d MiB, %d LTC(s)\n",
590590
fbp, size, ltcs);
591591
lcomm = min(lcomm, (u64)(size / ltcs) << 20);
592-
total += size << 20;
592+
total += (u64) size << 20;
593593
ltcn += ltcs;
594594
} else {
595595
nvkm_debug(subdev, "FBP %d: disabled\n", fbp);

drivers/gpu/drm/nouveau/nvkm/subdev/secboot/gm20b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ gm20b_secboot_tegra_read_wpr(struct gm200_secboot *gsb, u32 mc_base)
4848
mc = ioremap(mc_base, 0xd00);
4949
if (!mc) {
5050
nvkm_error(&sb->subdev, "Cannot map Tegra MC registers\n");
51-
return PTR_ERR(mc);
51+
return -ENOMEM;
5252
}
5353
sb->wpr_addr = ioread32_native(mc + MC_SECURITY_CARVEOUT2_BOM_0) |
5454
((u64)ioread32_native(mc + MC_SECURITY_CARVEOUT2_BOM_HI_0) << 32);

0 commit comments

Comments
 (0)