Merge drm/drm-fixes into drm-misc-fixes
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 17 Aug 2022 06:40:32 +0000 (08:40 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 17 Aug 2022 06:40:32 +0000 (08:40 +0200)
Backmerging for v6.0-rc1.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
drivers/gpu/drm/bridge/lvds-codec.c
drivers/gpu/drm/imx/dcss/dcss-kms.c
drivers/gpu/drm/meson/meson_drv.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
drivers/gpu/drm/ttm/ttm_bo.c

index 4a92a4c7dcd70ef2f4cc63446cb48bf323ae9476..f8168986a0a9eaf02b33fce13a8eddaed57c087d 100644 (file)
@@ -233,6 +233,7 @@ allOf:
               - allwinner,sun8i-a83t-tcon-lcd
               - allwinner,sun8i-v3s-tcon
               - allwinner,sun9i-a80-tcon-lcd
+              - allwinner,sun20i-d1-tcon-lcd
 
     then:
       properties:
@@ -252,6 +253,7 @@ allOf:
               - allwinner,sun8i-a83t-tcon-tv
               - allwinner,sun8i-r40-tcon-tv
               - allwinner,sun9i-a80-tcon-tv
+              - allwinner,sun20i-d1-tcon-tv
 
     then:
       properties:
@@ -278,6 +280,7 @@ allOf:
               - allwinner,sun9i-a80-tcon-lcd
               - allwinner,sun4i-a10-tcon
               - allwinner,sun8i-a83t-tcon-lcd
+              - allwinner,sun20i-d1-tcon-lcd
 
     then:
       required:
@@ -294,6 +297,7 @@ allOf:
               - allwinner,sun8i-a23-tcon
               - allwinner,sun8i-a33-tcon
               - allwinner,sun8i-a83t-tcon-lcd
+              - allwinner,sun20i-d1-tcon-lcd
 
     then:
       properties:
index 702ea803a743c43ce71786889c11c90ede80c1ae..39e7004de720056b37cc2eb1c9f70dff2d8ec796 100644 (file)
@@ -180,7 +180,7 @@ static int lvds_codec_probe(struct platform_device *pdev)
                of_node_put(bus_node);
                if (ret == -ENODEV) {
                        dev_warn(dev, "missing 'data-mapping' DT property\n");
-               } else if (ret) {
+               } else if (ret < 0) {
                        dev_err(dev, "invalid 'data-mapping' DT property\n");
                        return ret;
                } else {
index 9b84df34a6a12bbe8cd2f5b76948525749f90324..8cf3352d88582380e82e69cf9b10b1cc91829a2f 100644 (file)
@@ -142,8 +142,6 @@ struct dcss_kms_dev *dcss_kms_attach(struct dcss_dev *dcss)
 
        drm_kms_helper_poll_init(drm);
 
-       drm_bridge_connector_enable_hpd(kms->connector);
-
        ret = drm_dev_register(drm, 0);
        if (ret)
                goto cleanup_crtc;
index 1b70938cfd2c43b327cc3df086a57a7efc8d07e4..bd4ca11d3ff536fbf8a297433dc35392cd560e7b 100644 (file)
@@ -115,8 +115,11 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
        for_each_endpoint_of_node(dev->of_node, ep) {
                /* If the endpoint node exists, consider it enabled */
                remote = of_graph_get_remote_port(ep);
-               if (remote)
+               if (remote) {
+                       of_node_put(remote);
+                       of_node_put(ep);
                        return true;
+               }
        }
 
        return false;
index 568182e68dd73bb7bb8268ed4fffc09ec5657b50..d8cf71fb0512813f14732bf5d142a17cb17cfe60 100644 (file)
@@ -2604,6 +2604,27 @@ nv172_chipset = {
        .fifo     = { 0x00000001, ga102_fifo_new },
 };
 
+static const struct nvkm_device_chip
+nv173_chipset = {
+       .name = "GA103",
+       .bar      = { 0x00000001, tu102_bar_new },
+       .bios     = { 0x00000001, nvkm_bios_new },
+       .devinit  = { 0x00000001, ga100_devinit_new },
+       .fb       = { 0x00000001, ga102_fb_new },
+       .gpio     = { 0x00000001, ga102_gpio_new },
+       .i2c      = { 0x00000001, gm200_i2c_new },
+       .imem     = { 0x00000001, nv50_instmem_new },
+       .mc       = { 0x00000001, ga100_mc_new },
+       .mmu      = { 0x00000001, tu102_mmu_new },
+       .pci      = { 0x00000001, gp100_pci_new },
+       .privring = { 0x00000001, gm200_privring_new },
+       .timer    = { 0x00000001, gk20a_timer_new },
+       .top      = { 0x00000001, ga100_top_new },
+       .disp     = { 0x00000001, ga102_disp_new },
+       .dma      = { 0x00000001, gv100_dma_new },
+       .fifo     = { 0x00000001, ga102_fifo_new },
+};
+
 static const struct nvkm_device_chip
 nv174_chipset = {
        .name = "GA104",
@@ -3067,6 +3088,7 @@ nvkm_device_ctor(const struct nvkm_device_func *func,
                case 0x167: device->chip = &nv167_chipset; break;
                case 0x168: device->chip = &nv168_chipset; break;
                case 0x172: device->chip = &nv172_chipset; break;
+               case 0x173: device->chip = &nv173_chipset; break;
                case 0x174: device->chip = &nv174_chipset; break;
                case 0x176: device->chip = &nv176_chipset; break;
                case 0x177: device->chip = &nv177_chipset; break;
index b4dfa166eccdfa070b0c16082c0ea9f3b54c2893..34234a144e87dab393dd024577a6f5f21d415269 100644 (file)
@@ -531,7 +531,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
                                    struct drm_display_mode *mode)
 {
        struct mipi_dsi_device *device = dsi->device;
-       unsigned int Bpp = mipi_dsi_pixel_format_to_bpp(device->format) / 8;
+       int Bpp = mipi_dsi_pixel_format_to_bpp(device->format) / 8;
        u16 hbp = 0, hfp = 0, hsa = 0, hblk = 0, vblk = 0;
        u32 basic_ctl = 0;
        size_t bytes;
@@ -555,7 +555,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
                 * (4 bytes). Its minimal size is therefore 10 bytes
                 */
 #define HSA_PACKET_OVERHEAD    10
-               hsa = max((unsigned int)HSA_PACKET_OVERHEAD,
+               hsa = max(HSA_PACKET_OVERHEAD,
                          (mode->hsync_end - mode->hsync_start) * Bpp - HSA_PACKET_OVERHEAD);
 
                /*
@@ -564,7 +564,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
                 * therefore 6 bytes
                 */
 #define HBP_PACKET_OVERHEAD    6
-               hbp = max((unsigned int)HBP_PACKET_OVERHEAD,
+               hbp = max(HBP_PACKET_OVERHEAD,
                          (mode->htotal - mode->hsync_end) * Bpp - HBP_PACKET_OVERHEAD);
 
                /*
@@ -574,7 +574,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
                 * 16 bytes
                 */
 #define HFP_PACKET_OVERHEAD    16
-               hfp = max((unsigned int)HFP_PACKET_OVERHEAD,
+               hfp = max(HFP_PACKET_OVERHEAD,
                          (mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD);
 
                /*
@@ -583,7 +583,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
                 * bytes). Its minimal size is therefore 10 bytes.
                 */
 #define HBLK_PACKET_OVERHEAD   10
-               hblk = max((unsigned int)HBLK_PACKET_OVERHEAD,
+               hblk = max(HBLK_PACKET_OVERHEAD,
                           (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp -
                           HBLK_PACKET_OVERHEAD);
 
index 0e210df65c305393477085e8cfcf6032587b2c8d..97184c33352662662bbd27de462eacb111045435 100644 (file)
@@ -912,7 +912,7 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
        /*
         * We might need to add a TTM.
         */
-       if (bo->resource->mem_type == TTM_PL_SYSTEM) {
+       if (!bo->resource || bo->resource->mem_type == TTM_PL_SYSTEM) {
                ret = ttm_tt_create(bo, true);
                if (ret)
                        return ret;