Skip to content

Commit abf301e

Browse files
committed
Merge tag 'drm-misc-fixes-2023-02-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
A fix for a non-unique CEC adapter name registration in vc4, a regression breaking the display in ssd130x, a signaling bit issue in dma-fence, a couple of fixes in nouveau for Turing and Ampere, and a disable fix for the boe-tv101wum-nl6 panel. Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20230202085724.pz22m7bmei3wyuzp@houat
2 parents 6d796c5 + a3ee9e0 commit abf301e

File tree

15 files changed

+127
-36
lines changed

15 files changed

+127
-36
lines changed

drivers/dma-buf/dma-fence.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ struct dma_fence *dma_fence_allocate_private_stub(void)
167167
0, 0);
168168

169169
set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
170-
&dma_fence_stub.flags);
170+
&fence->flags);
171171

172172
dma_fence_signal(fence);
173173

drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ int gp100_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct n
9797
int gp102_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
9898
int gp10b_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
9999
int gv100_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
100+
int tu102_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
100101
int ga100_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
101102
int ga102_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
102103

drivers/gpu/drm/nouveau/nvkm/core/firmware.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ nvkm_firmware_mem_page(struct nvkm_memory *memory)
151151
static enum nvkm_memory_target
152152
nvkm_firmware_mem_target(struct nvkm_memory *memory)
153153
{
154+
if (nvkm_firmware_mem(memory)->device->func->tegra)
155+
return NVKM_MEM_TARGET_NCOH;
156+
154157
return NVKM_MEM_TARGET_HOST;
155158
}
156159

drivers/gpu/drm/nouveau/nvkm/engine/device/base.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,7 +2405,7 @@ nv162_chipset = {
24052405
.bus = { 0x00000001, gf100_bus_new },
24062406
.devinit = { 0x00000001, tu102_devinit_new },
24072407
.fault = { 0x00000001, tu102_fault_new },
2408-
.fb = { 0x00000001, gv100_fb_new },
2408+
.fb = { 0x00000001, tu102_fb_new },
24092409
.fuse = { 0x00000001, gm107_fuse_new },
24102410
.gpio = { 0x00000001, gk104_gpio_new },
24112411
.gsp = { 0x00000001, gv100_gsp_new },
@@ -2440,7 +2440,7 @@ nv164_chipset = {
24402440
.bus = { 0x00000001, gf100_bus_new },
24412441
.devinit = { 0x00000001, tu102_devinit_new },
24422442
.fault = { 0x00000001, tu102_fault_new },
2443-
.fb = { 0x00000001, gv100_fb_new },
2443+
.fb = { 0x00000001, tu102_fb_new },
24442444
.fuse = { 0x00000001, gm107_fuse_new },
24452445
.gpio = { 0x00000001, gk104_gpio_new },
24462446
.gsp = { 0x00000001, gv100_gsp_new },
@@ -2475,7 +2475,7 @@ nv166_chipset = {
24752475
.bus = { 0x00000001, gf100_bus_new },
24762476
.devinit = { 0x00000001, tu102_devinit_new },
24772477
.fault = { 0x00000001, tu102_fault_new },
2478-
.fb = { 0x00000001, gv100_fb_new },
2478+
.fb = { 0x00000001, tu102_fb_new },
24792479
.fuse = { 0x00000001, gm107_fuse_new },
24802480
.gpio = { 0x00000001, gk104_gpio_new },
24812481
.gsp = { 0x00000001, gv100_gsp_new },
@@ -2510,7 +2510,7 @@ nv167_chipset = {
25102510
.bus = { 0x00000001, gf100_bus_new },
25112511
.devinit = { 0x00000001, tu102_devinit_new },
25122512
.fault = { 0x00000001, tu102_fault_new },
2513-
.fb = { 0x00000001, gv100_fb_new },
2513+
.fb = { 0x00000001, tu102_fb_new },
25142514
.fuse = { 0x00000001, gm107_fuse_new },
25152515
.gpio = { 0x00000001, gk104_gpio_new },
25162516
.gsp = { 0x00000001, gv100_gsp_new },
@@ -2545,7 +2545,7 @@ nv168_chipset = {
25452545
.bus = { 0x00000001, gf100_bus_new },
25462546
.devinit = { 0x00000001, tu102_devinit_new },
25472547
.fault = { 0x00000001, tu102_fault_new },
2548-
.fb = { 0x00000001, gv100_fb_new },
2548+
.fb = { 0x00000001, tu102_fb_new },
25492549
.fuse = { 0x00000001, gm107_fuse_new },
25502550
.gpio = { 0x00000001, gk104_gpio_new },
25512551
.gsp = { 0x00000001, gv100_gsp_new },

drivers/gpu/drm/nouveau/nvkm/falcon/gm200.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ gm200_flcn_pio_dmem_rd(struct nvkm_falcon *falcon, u8 port, const u8 *img, int l
4848
img += 4;
4949
len -= 4;
5050
}
51+
52+
/* Sigh. Tegra PMU FW's init message... */
53+
if (len) {
54+
u32 data = nvkm_falcon_rd32(falcon, 0x1c4 + (port * 8));
55+
56+
while (len--) {
57+
*(u8 *)img++ = data & 0xff;
58+
data >>= 8;
59+
}
60+
}
5161
}
5262

5363
static void
@@ -64,6 +74,8 @@ gm200_flcn_pio_dmem_wr(struct nvkm_falcon *falcon, u8 port, const u8 *img, int l
6474
img += 4;
6575
len -= 4;
6676
}
77+
78+
WARN_ON(len);
6779
}
6880

6981
static void
@@ -74,7 +86,7 @@ gm200_flcn_pio_dmem_wr_init(struct nvkm_falcon *falcon, u8 port, bool sec, u32 d
7486

7587
const struct nvkm_falcon_func_pio
7688
gm200_flcn_dmem_pio = {
77-
.min = 4,
89+
.min = 1,
7890
.max = 0x100,
7991
.wr_init = gm200_flcn_pio_dmem_wr_init,
8092
.wr = gm200_flcn_pio_dmem_wr,

drivers/gpu/drm/nouveau/nvkm/subdev/devinit/tu102.c

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,33 @@ tu102_devinit_pll_set(struct nvkm_devinit *init, u32 type, u32 freq)
6565
return ret;
6666
}
6767

68+
static int
69+
tu102_devinit_wait(struct nvkm_device *device)
70+
{
71+
unsigned timeout = 50 + 2000;
72+
73+
do {
74+
if (nvkm_rd32(device, 0x118128) & 0x00000001) {
75+
if ((nvkm_rd32(device, 0x118234) & 0x000000ff) == 0xff)
76+
return 0;
77+
}
78+
79+
usleep_range(1000, 2000);
80+
} while (timeout--);
81+
82+
return -ETIMEDOUT;
83+
}
84+
6885
int
6986
tu102_devinit_post(struct nvkm_devinit *base, bool post)
7087
{
7188
struct nv50_devinit *init = nv50_devinit(base);
89+
int ret;
90+
91+
ret = tu102_devinit_wait(init->base.subdev.device);
92+
if (ret)
93+
return ret;
94+
7295
gm200_devinit_preos(init, post);
7396
return 0;
7497
}

drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ nvkm-y += nvkm/subdev/fb/gp100.o
3232
nvkm-y += nvkm/subdev/fb/gp102.o
3333
nvkm-y += nvkm/subdev/fb/gp10b.o
3434
nvkm-y += nvkm/subdev/fb/gv100.o
35+
nvkm-y += nvkm/subdev/fb/tu102.o
3536
nvkm-y += nvkm/subdev/fb/ga100.o
3637
nvkm-y += nvkm/subdev/fb/ga102.o
3738

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,6 @@ ga102_fb_vpr_scrub(struct nvkm_fb *fb)
4040
return ret;
4141
}
4242

43-
static bool
44-
ga102_fb_vpr_scrub_required(struct nvkm_fb *fb)
45-
{
46-
return (nvkm_rd32(fb->subdev.device, 0x1fa80c) & 0x00000010) != 0;
47-
}
48-
4943
static const struct nvkm_fb_func
5044
ga102_fb = {
5145
.dtor = gf100_fb_dtor,
@@ -56,7 +50,7 @@ ga102_fb = {
5650
.sysmem.flush_page_init = gf100_fb_sysmem_flush_page_init,
5751
.ram_new = ga102_ram_new,
5852
.default_bigpage = 16,
59-
.vpr.scrub_required = ga102_fb_vpr_scrub_required,
53+
.vpr.scrub_required = tu102_fb_vpr_scrub_required,
6054
.vpr.scrub = ga102_fb_vpr_scrub,
6155
};
6256

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,3 @@ gv100_fb_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, s
4949
}
5050

5151
MODULE_FIRMWARE("nvidia/gv100/nvdec/scrubber.bin");
52-
MODULE_FIRMWARE("nvidia/tu102/nvdec/scrubber.bin");
53-
MODULE_FIRMWARE("nvidia/tu104/nvdec/scrubber.bin");
54-
MODULE_FIRMWARE("nvidia/tu106/nvdec/scrubber.bin");
55-
MODULE_FIRMWARE("nvidia/tu116/nvdec/scrubber.bin");
56-
MODULE_FIRMWARE("nvidia/tu117/nvdec/scrubber.bin");

drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,6 @@ bool gp102_fb_vpr_scrub_required(struct nvkm_fb *);
8989
int gp102_fb_vpr_scrub(struct nvkm_fb *);
9090

9191
int gv100_fb_init_page(struct nvkm_fb *);
92+
93+
bool tu102_fb_vpr_scrub_required(struct nvkm_fb *);
9294
#endif

0 commit comments

Comments
 (0)