Skip to content
  1. May 19, 2020
    • Thomas Zimmermann's avatar
      drm/mgag200: Remove HW cursor · 5a77e2bf
      Thomas Zimmermann authored
      
      
      The HW cursor of Matrox G200 cards only supports a 16-color palette
      format. Univeral planes require at least ARGB or a similar component-
      based format, so remove the HW cursor.
      
      Alternatively, the driver could dither a cursor image from ARGB to
      16 colors. But this does not produce pleasent-looking results in
      general, so it's useless for modern compositors.
      
      Without HW support, compositors will use software rendering.
      
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Tested-by: default avatarJohn Donnelly <John.p.donnelly@oracle.com>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-2-tzimmermann@suse.de
      5a77e2bf
    • Tomi Valkeinen's avatar
      drm/tilcdc: add missing static for panel_driver · acfa7fd1
      Tomi Valkeinen authored
      
      
      struct platform_driver panel_driver is only used from tilcdc_panel.c, so
      it can be static.
      
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200429104234.18910-3-tomi.valkeinen@ti.com
      Reviewed-by: default avatarJyri Sarha <jsarha@ti.com>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      acfa7fd1
    • Tomi Valkeinen's avatar
      drm/tilcdc: remove unnecessary state->fb check · 26c06633
      Tomi Valkeinen authored
      
      
      tilcdc_plane_atomic_check() exits if state->fb == NULL, so no need to
      check it again later.
      
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200429104234.18910-2-tomi.valkeinen@ti.com
      Reviewed-by: default avatarJyri Sarha <jsarha@ti.com>
      26c06633
    • Tomi Valkeinen's avatar
      drm/tilcdc: fix leak & null ref in panel_connector_get_modes · 3f9c1c87
      Tomi Valkeinen authored
      
      
      If videomode_from_timings() returns true, the mode allocated with
      drm_mode_create will be leaked.
      
      Also, the return value of drm_mode_create() is never checked, and thus
      could cause NULL deref.
      
      Fix these two issues.
      
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200429104234.18910-1-tomi.valkeinen@ti.com
      Reviewed-by: default avatarJyri Sarha <jsarha@ti.com>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      3f9c1c87
    • Douglas Anderson's avatar
      drm/bridge: ti-sn65dsi86: Implement lane reordering + polarity · 5bebaead
      Douglas Anderson authored
      
      
      The ti-sn65dsi86 MIPI DSI to eDP bridge chip supports arbitrary
      remapping of eDP lanes and also polarity inversion.  Both of these
      features have been described in the device tree bindings for the
      device since the beginning but were never implemented in the driver.
      Implement both of them.
      
      Part of this change also allows you to (via the same device tree
      bindings) specify to use fewer than the max number of DP lanes that
      the panel reports.  This could be useful if your display supports more
      lanes but only a few are hooked up on your board.
      
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
      Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200518114656.REPOST.v2.1.Ibc8eeddcee94984a608d6900b46f9ffde4045da4@changeid
      5bebaead
    • Douglas Anderson's avatar
      drm/bridge: ti-sn65dsi86: Fix off-by-one error in clock choice · fe3d7a35
      Douglas Anderson authored
      If the rate in our table is _equal_ to the rate we want then it's OK
      to pick it.  It doesn't need to be greater than the one we want.
      
      Fixes: a095f15c
      
       ("drm/bridge: add support for sn65dsi86 bridge driver")
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
      Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200504213225.1.I21646c7c37ff63f52ae6cdccc9bc829fbc3d9424@changeid
      fe3d7a35
    • Douglas Anderson's avatar
      drm/bridge: ti-sn65dsi86: Clear old error bits before AUX transfers · baef4d56
      Douglas Anderson authored
      The AUX channel transfer error bits in the status register are latched
      and need to be cleared.  Clear them before doing our transfer so we
      don't see old bits and get confused.
      
      Without this patch having a single failure would mean that all future
      transfers would look like they failed.
      
      Fixes: b814ec6d
      
       ("drm/bridge: ti-sn65dsi86: Implement AUX channel")
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200508163314.1.Idfa69d5d3fc9623083c0ff78572fea87dccb199c@changeid
      baef4d56
    • Douglas Anderson's avatar
      dt-bindings: drm/bridge: ti-sn65dsi86: Document no-hpd · 1dbc9791
      Douglas Anderson authored
      
      
      The ti-sn65dsi86 MIPI DSI to eDP bridge chip has a dedicated hardware
      HPD (Hot Plug Detect) pin on it, but it's mostly useless for eDP
      because of excessive debouncing in hardware.  Specifically there is no
      way to disable the debouncing and for eDP debouncing hurts you because
      HPD is just used for knowing when the panel is ready, not for
      detecting physical plug events.
      
      Currently the driver in Linux just assumes that nobody has HPD hooked
      up.  It relies on folks setting the "no-hpd" property in the panel
      node to specify that HPD isn't hooked up and then the panel driver
      using this to add some worst case delays when turning on the panel.
      
      Apparently it's also useful to specify "no-hpd" in the bridge node so
      that the bridge driver can make sure it's doing the right thing
      without peeking into the panel [1].  This would be used if anyone ever
      found it useful to implement support for the HW HPD pin on the bridge.
      Let's add this property to the bindings.
      
      NOTES:
      - This is somewhat of a backward-incompatible change.  All current
        known users of ti-sn65dsi86 didn't have "no-hpd" specified in the
        bridge node yet none of them had HPD hooked up.  This worked because
        the current Linux driver just assumed that HPD was never hooked up.
        We could make it less incompatible by saying that for this bridge
        it's assumed HPD isn't hooked up _unless_ a property is defined, but
        "no-hpd" is much more standard and it's unlikely to matter unless
        someone quickly goes and implements HPD in the driver.
      - It is sensible to specify "no-hpd" at the bridge chip level and
        specify "hpd-gpios" at the panel level.  That would mean HPD is
        hooked up to some other GPIO in the system, just not the hardware
        HPD pin on the bridge chip.
      
      [1] https://lore.kernel.org/r/20200417180819.GE5861@pendragon.ideasonboard.com
      
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200507143354.v5.5.I72892d485088e57378a4748c86bc0f6c2494d807@changeid
      1dbc9791
    • Douglas Anderson's avatar
      dt-bindings: drm/bridge: ti-sn65dsi86: Convert to yaml · 5a2e9b65
      Douglas Anderson authored
      
      
      This moves the bindings over, based a lot on toshiba,tc358768.yaml.
      Unless there's someone known to be better, I've set the maintainer in
      the yaml as the first person to submit bindings.
      
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200507143354.v5.4.Ifcdc4ecb12742a27862744ee1e8753cb95a38a7f@changeid
      5a2e9b65
    • Douglas Anderson's avatar
      drm/bridge: ti-sn65dsi86: Export bridge GPIOs to Linux · 27ed2b3f
      Douglas Anderson authored
      
      
      The ti-sn65dsi86 MIPI DSI to eDP bridge chip has 4 pins on it that can
      be used as GPIOs in a system.  Each pin can be configured as input,
      output, or a special function for the bridge chip.  These are:
      - GPIO1: SUSPEND Input
      - GPIO2: DSIA VSYNC
      - GPIO3: DSIA HSYNC or VSYNC
      - GPIO4: PWM
      
      Let's expose these pins as GPIOs.  A few notes:
      - Access to ti-sn65dsi86 is via i2c so we set "can_sleep".
      - These pins can't be configured for IRQ.
      - There are no programmable pulls or other fancy features.
      - Keeping the bridge chip powered might be expensive.  The driver is
        setup such that if all used GPIOs are only inputs we'll power the
        bridge chip on just long enough to read the GPIO and then power it
        off again.  Setting a GPIO as output will keep the bridge powered.
      - If someone releases a GPIO we'll implicitly switch it to an input so
        we no longer need to keep the bridge powered for it.
      
      Because of all of the above limitations we just need to implement a
      bare-bones GPIO driver.  The device tree bindings already account for
      this device being a GPIO controller so we only need the driver changes
      for it.
      
      NOTE: Despite the fact that these pins are nominally muxable I don't
      believe it makes sense to expose them through the pinctrl interface as
      well as the GPIO interface.  The special functions are things that the
      bridge chip driver itself would care about and it can just configure
      the pins as needed.
      
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
      Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      [added pdata->gchip.base = -1;]
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200507143354.v5.1.Ia50267a5549392af8b37e67092ca653a59c95886@changeid
      27ed2b3f
  2. May 18, 2020
  3. May 17, 2020
    • Emil Velikov's avatar
      drm/rockchip: vop: call vop_cfg_done() under reg_lock · 5fa63f07
      Emil Velikov authored
      
      
      The function vop_cfg_done() is a simple VOP_REG_SET(). As such it should
      be done under a reg_lock. A quick look through the driver shows that all
      other instances (apart from driver init) have the lock. Do the same here
      
      Cc: Sandy Huang <hjc@rock-chips.com>
      Cc: Heiko Stübner <heiko@sntech.de>
      Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
      Reviewed-by: default avatarSandy Huang <hjc@rock-chips.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200505151613.2932456-1-emil.l.velikov@gmail.com
      5fa63f07
    • Sam Ravnborg's avatar
      drm/tilcdc: use devm_of_find_backlight · a18dc740
      Sam Ravnborg authored
      
      
      Look up backlight device using devm_of_find_backlight().
      This simplifies the code and prevents us from hardcoding
      the node name in the driver.
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Jyri Sarha <jsarha@ti.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200514191001.457441-3-sam@ravnborg.org
      a18dc740
    • Sam Ravnborg's avatar
      drm/omap: display: use devm_of_find_backlight · 1efa9eff
      Sam Ravnborg authored
      
      
      Look up backlight device using devm_of_find_backlight().
      This simplifies the code and prevents us from hardcoding
      the node name in the driver.
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Zheng Bin <zhengbin13@huawei.com>
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Cc: Enrico Weigelt <info@metux.net>
      Cc: Allison Randal <allison@lohutok.net>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200514191001.457441-2-sam@ravnborg.org
      1efa9eff
  4. May 15, 2020
    • Maxime Ripard's avatar
      drm/sun4i: mixer: Call of_dma_configure if there's an IOMMU · b718102d
      Maxime Ripard authored
      
      
      The main DRM device is actually a virtual device so it doesn't have the
      iommus property, which is instead on the DMA masters, in this case the
      mixers.
      
      Add a call to of_dma_configure with the mixers DT node but on the DRM
      virtual device to configure it in the same way than the mixers.
      
      Reviewed-by: default avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/9a4daf438dd3f2fe07afb23688bfb793a0613d7d.1589378833.git-series.maxime@cerno.tech
      b718102d
    • Maxime Ripard's avatar
      dt-bindings: display: sun8i-mixer: Allow for an iommu property · e8ade615
      Maxime Ripard authored
      
      
      The H6 mixer is attached to an IOMMU, so let's allow that property to be
      set in the bindings.
      
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/7941e0c02794e6336da75fcac950ecd43be7fd97.1589378833.git-series.maxime@cerno.tech
      e8ade615
    • Imre Deak's avatar
      drm/dp_mst: Fix timeout handling of MST down messages · 58c17217
      Imre Deak authored
      This fixes the following use-after-free problem in case an MST down
      message times out, while waiting for the response for it:
      
      [  449.022841] [drm:drm_dp_mst_wait_tx_reply.isra.26] timedout msg send 0000000080ba7fa2 2 0
      [  449.022898] ------------[ cut here ]------------
      [  449.022903] list_add corruption. prev->next should be next (ffff88847dae32c0), but was 6b6b6b6b6b6b6b6b. (prev=ffff88847db1c140).
      [  449.022931] WARNING: CPU: 2 PID: 22 at lib/list_debug.c:28 __list_add_valid+0x4d/0x70
      [  449.022935] Modules linked in: asix usbnet mii snd_hda_codec_hdmi mei_hdcp i915 x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep e1000e snd_hda_core ptp snd_pcm pps_core mei_me mei intel_lpss_pci prime_numbers
      [  449.022966] CPU: 2 PID: 22 Comm: kworker/2:0 Not tainted 5.7.0-rc3-CI-Patchwork_17536+ #1
      [  449.022970] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019
      [  449.022976] Workqueue: events_long drm_dp_mst_link_probe_work
      [  449.022982] RIP: 0010:__list_add_valid+0x4d/0x70
      [  449.022987] Code: c3 48 89 d1 48 c7 c7 f0 e7 32 82 48 89 c2 e8 3a 49 b7 ff 0f 0b 31 c0 c3 48 89 c1 4c 89 c6 48 c7 c7 40 e8 32 82 e8 23 49 b7 ff <0f> 0b 31 c0 c3 48 89 f2 4c 89 c1 48 89 fe 48 c7 c7 90 e8 32 82 e8
      [  449.022991] RSP: 0018:ffffc900001abcb0 EFLAGS: 00010286
      [  449.022995] RAX: 0000000000000000 RBX: ffff88847dae2d58 RCX: 0000000000000001
      [  449.022999] RDX: 0000000080000001 RSI: ffff88849d914978 RDI: 00000000ffffffff
      [  449.023002] RBP: ffff88847dae32c0 R08: ffff88849d914978 R09: 0000000000000000
      [  449.023006] R10: ffffc900001abcb8 R11: 0000000000000000 R12: ffff888490d98400
      [  449.023009] R13: ffff88847dae3230 R14: ffff88847db1c140 R15: ffff888490d98540
      [  449.023013] FS:  0000000000000000(0000) GS:ffff88849ff00000(0000) knlGS:0000000000000000
      [  449.023017] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  449.023021] CR2: 00007fb96fafdc63 CR3: 0000000005610004 CR4: 0000000000760ee0
      [  449.023025] PKRU: 55555554
      [  449.023028] Call Trace:
      [  449.023034]  drm_dp_queue_down_tx+0x59/0x110
      [  449.023041]  ? rcu_read_lock_sched_held+0x4d/0x80
      [  449.023050]  ? kmem_cache_alloc_trace+0x2a6/0x2d0
      [  449.023060]  drm_dp_send_link_address+0x74/0x870
      [  449.023065]  ? __slab_free+0x3e1/0x5c0
      [  449.023071]  ? lockdep_hardirqs_on+0xe0/0x1c0
      [  449.023078]  ? lockdep_hardirqs_on+0xe0/0x1c0
      [  449.023097]  drm_dp_check_and_send_link_address+0x9a/0xc0
      [  449.023106]  drm_dp_mst_link_probe_work+0x9e/0x160
      [  449.023117]  process_one_work+0x268/0x600
      [  449.023124]  ? __schedule+0x307/0x8d0
      [  449.023139]  worker_thread+0x37/0x380
      [  449.023149]  ? process_one_work+0x600/0x600
      [  449.023153]  kthread+0x140/0x160
      [  449.023159]  ? kthread_park+0x80/0x80
      [  449.023169]  ret_from_fork+0x24/0x50
      
      Fixes: d308a881
      
       ("drm/dp_mst: Kill the second sideband tx slot, save the world")
      Cc: Lyude Paul <lyude@redhat.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: Wayne Lin <Wayne.Lin@amd.com>
      Cc: <stable@vger.kernel.org> # v3.17+
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200513103155.12336-1-imre.deak@intel.com
      58c17217
  5. May 14, 2020
    • Wolfram Sang's avatar
      drm/vblank: remove outdated and noisy output · b5850d6e
      Wolfram Sang authored
      
      
      The R-Car DU driver calls drm_vblank_init via some helper functions in
      probe(). From what I checked, most drivers do this as well. I have a
      config now where DU always stays in deferred_probe state because of a
      missing dependency. This means that every time I rebind another driver
      like MMC, the vblank init message is displayed again when the DU driver
      is retried. Because the message doesn't really carry a useful
      information, I suggest to simply drop it.
      
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200513201016.23047-1-wsa+renesas@sang-engineering.com
      b5850d6e
  6. May 13, 2020
  7. May 12, 2020
  8. May 11, 2020
  9. May 10, 2020