Skip to content

Commit 2ae6ab9

Browse files
committed
Merge tag 'drm-misc-fixes-2022-08-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
One patch for imx/dcss to get rid of a warning message, one off-by-one fix and GA103 support for nouveau, a refcounting fix for meson, a NULL pointer dereference fix for ttm, a error check fix for lvds-codec, a dt-binding schema fix and an underflow fix for sun4i Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20220816094401.wtadc7ddr6lzq6aj@houat
2 parents 8ae4be5 + 82a1356 commit 2ae6ab9

File tree

7 files changed

+37
-10
lines changed

7 files changed

+37
-10
lines changed

Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ allOf:
233233
- allwinner,sun8i-a83t-tcon-lcd
234234
- allwinner,sun8i-v3s-tcon
235235
- allwinner,sun9i-a80-tcon-lcd
236+
- allwinner,sun20i-d1-tcon-lcd
236237

237238
then:
238239
properties:
@@ -252,6 +253,7 @@ allOf:
252253
- allwinner,sun8i-a83t-tcon-tv
253254
- allwinner,sun8i-r40-tcon-tv
254255
- allwinner,sun9i-a80-tcon-tv
256+
- allwinner,sun20i-d1-tcon-tv
255257

256258
then:
257259
properties:
@@ -278,6 +280,7 @@ allOf:
278280
- allwinner,sun9i-a80-tcon-lcd
279281
- allwinner,sun4i-a10-tcon
280282
- allwinner,sun8i-a83t-tcon-lcd
283+
- allwinner,sun20i-d1-tcon-lcd
281284

282285
then:
283286
required:
@@ -294,6 +297,7 @@ allOf:
294297
- allwinner,sun8i-a23-tcon
295298
- allwinner,sun8i-a33-tcon
296299
- allwinner,sun8i-a83t-tcon-lcd
300+
- allwinner,sun20i-d1-tcon-lcd
297301

298302
then:
299303
properties:

drivers/gpu/drm/bridge/lvds-codec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int lvds_codec_probe(struct platform_device *pdev)
180180
of_node_put(bus_node);
181181
if (ret == -ENODEV) {
182182
dev_warn(dev, "missing 'data-mapping' DT property\n");
183-
} else if (ret) {
183+
} else if (ret < 0) {
184184
dev_err(dev, "invalid 'data-mapping' DT property\n");
185185
return ret;
186186
} else {

drivers/gpu/drm/imx/dcss/dcss-kms.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss)
142142

143143
drm_kms_helper_poll_init(drm);
144144

145-
drm_bridge_connector_enable_hpd(kms->connector);
146-
147145
ret = drm_dev_register(drm, 0);
148146
if (ret)
149147
goto cleanup_crtc;

drivers/gpu/drm/meson/meson_drv.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
115115
for_each_endpoint_of_node(dev->of_node, ep) {
116116
/* If the endpoint node exists, consider it enabled */
117117
remote = of_graph_get_remote_port(ep);
118-
if (remote)
118+
if (remote) {
119+
of_node_put(remote);
120+
of_node_put(ep);
119121
return true;
122+
}
120123
}
121124

122125
return false;

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2604,6 +2604,27 @@ nv172_chipset = {
26042604
.fifo = { 0x00000001, ga102_fifo_new },
26052605
};
26062606

2607+
static const struct nvkm_device_chip
2608+
nv173_chipset = {
2609+
.name = "GA103",
2610+
.bar = { 0x00000001, tu102_bar_new },
2611+
.bios = { 0x00000001, nvkm_bios_new },
2612+
.devinit = { 0x00000001, ga100_devinit_new },
2613+
.fb = { 0x00000001, ga102_fb_new },
2614+
.gpio = { 0x00000001, ga102_gpio_new },
2615+
.i2c = { 0x00000001, gm200_i2c_new },
2616+
.imem = { 0x00000001, nv50_instmem_new },
2617+
.mc = { 0x00000001, ga100_mc_new },
2618+
.mmu = { 0x00000001, tu102_mmu_new },
2619+
.pci = { 0x00000001, gp100_pci_new },
2620+
.privring = { 0x00000001, gm200_privring_new },
2621+
.timer = { 0x00000001, gk20a_timer_new },
2622+
.top = { 0x00000001, ga100_top_new },
2623+
.disp = { 0x00000001, ga102_disp_new },
2624+
.dma = { 0x00000001, gv100_dma_new },
2625+
.fifo = { 0x00000001, ga102_fifo_new },
2626+
};
2627+
26072628
static const struct nvkm_device_chip
26082629
nv174_chipset = {
26092630
.name = "GA104",
@@ -3067,6 +3088,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
30673088
case 0x167: device->chip = &nv167_chipset; break;
30683089
case 0x168: device->chip = &nv168_chipset; break;
30693090
case 0x172: device->chip = &nv172_chipset; break;
3091+
case 0x173: device->chip = &nv173_chipset; break;
30703092
case 0x174: device->chip = &nv174_chipset; break;
30713093
case 0x176: device->chip = &nv176_chipset; break;
30723094
case 0x177: device->chip = &nv177_chipset; break;

drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
531531
struct drm_display_mode *mode)
532532
{
533533
struct mipi_dsi_device *device = dsi->device;
534-
unsigned int Bpp = mipi_dsi_pixel_format_to_bpp(device->format) / 8;
534+
int Bpp = mipi_dsi_pixel_format_to_bpp(device->format) / 8;
535535
u16 hbp = 0, hfp = 0, hsa = 0, hblk = 0, vblk = 0;
536536
u32 basic_ctl = 0;
537537
size_t bytes;
@@ -555,7 +555,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
555555
* (4 bytes). Its minimal size is therefore 10 bytes
556556
*/
557557
#define HSA_PACKET_OVERHEAD 10
558-
hsa = max((unsigned int)HSA_PACKET_OVERHEAD,
558+
hsa = max(HSA_PACKET_OVERHEAD,
559559
(mode->hsync_end - mode->hsync_start) * Bpp - HSA_PACKET_OVERHEAD);
560560

561561
/*
@@ -564,7 +564,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
564564
* therefore 6 bytes
565565
*/
566566
#define HBP_PACKET_OVERHEAD 6
567-
hbp = max((unsigned int)HBP_PACKET_OVERHEAD,
567+
hbp = max(HBP_PACKET_OVERHEAD,
568568
(mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD);
569569

570570
/*
@@ -574,7 +574,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
574574
* 16 bytes
575575
*/
576576
#define HFP_PACKET_OVERHEAD 16
577-
hfp = max((unsigned int)HFP_PACKET_OVERHEAD,
577+
hfp = max(HFP_PACKET_OVERHEAD,
578578
(mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD);
579579

580580
/*
@@ -583,7 +583,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
583583
* bytes). Its minimal size is therefore 10 bytes.
584584
*/
585585
#define HBLK_PACKET_OVERHEAD 10
586-
hblk = max((unsigned int)HBLK_PACKET_OVERHEAD,
586+
hblk = max(HBLK_PACKET_OVERHEAD,
587587
(mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp -
588588
HBLK_PACKET_OVERHEAD);
589589

drivers/gpu/drm/ttm/ttm_bo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
912912
/*
913913
* We might need to add a TTM.
914914
*/
915-
if (bo->resource->mem_type == TTM_PL_SYSTEM) {
915+
if (!bo->resource || bo->resource->mem_type == TTM_PL_SYSTEM) {
916916
ret = ttm_tt_create(bo, true);
917917
if (ret)
918918
return ret;

0 commit comments

Comments
 (0)