1. 17 Nov, 2020 8 commits
    • Marc Zyngier's avatar
      drm/meson: dw-hdmi: Register a callback to disable the regulator · 0405f94a
      Marc Zyngier authored
      Removing the meson-dw-hdmi module results in the following splat:
      
      i[   43.340509] WARNING: CPU: 0 PID: 572 at drivers/regulator/core.c:2125 _regulator_put.part.0+0x16c/0x174
      [...]
      [   43.454870] CPU: 0 PID: 572 Comm: modprobe Tainted: G        W   E     5.10.0-rc4-00049-gd274813a4de3-dirty #2147
      [   43.465042] Hardware name:  , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020
      [   43.471945] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--)
      [   43.477896] pc : _regulator_put.part.0+0x16c/0x174
      [   43.482638] lr : regulator_put+0x44/0x60
      [...]
      [   43.568715] Call trace:
      [   43.571132]  _regulator_put.part.0+0x16c/0x174
      [   43.575529]  regulator_put+0x44/0x60
      [   43.579067]  devm_regulator_release+0x20/0x2c
      [   43.583380]  release_nodes+0x1c8/0x2b4
      [   43.587087]  devres_release_all+0x44/0x6c
      [   43.591056]  __device_release_driver+0x1a0/0x23c
      [   43.595626]  driver_detach+0xcc/0x160
      [   43.599249]  bus_remove_driver+0x68/0xe0
      [   43.603130]  driver_unregister+0x3c/0x6c
      [   43.607011]  platform_driver_unregister+0x20/0x2c
      [   43.611678]  meson_dw_hdmi_platform_driver_exit+0x18/0x4a8 [meson_dw_hdmi]
      [   43.618485]  __arm64_sys_delete_module+0x1bc/0x294
      
      as the HDMI regulator is still enabled on release.
      
      In order to address this, register a callback that will deal with
      the disabling when the driver is unbound, solving the problem.
      
      Fixes: 161a803f ("drm/meson: dw_hdmi: Add support for an optional external 5V regulator")
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-4-maz@kernel.org
      0405f94a
    • Marc Zyngier's avatar
      drm/meson: Unbind all connectors on module removal · e78ad18b
      Marc Zyngier authored
      Removing the meson DRM module results in the following splats:
      
      [   42.689228] WARNING: CPU: 0 PID: 572 at drivers/gpu/drm/drm_irq.c:192 drm_irq_uninstall+0x130/0x160 [drm]
      [...]
      [   42.812820] Hardware name:  , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020
      [   42.819723] pstate: 80400089 (Nzcv daIf +PAN -UAO -TCO BTYPE=--)
      [   42.825737] pc : drm_irq_uninstall+0x130/0x160 [drm]
      [   42.830647] lr : drm_irq_uninstall+0xc4/0x160 [drm]
      [...]
      [   42.917614] Call trace:
      [   42.920086]  drm_irq_uninstall+0x130/0x160 [drm]
      [   42.924612]  meson_drv_unbind+0x68/0xa4 [meson_drm]
      [   42.929436]  component_del+0xc0/0x180
      [   42.933058]  meson_dw_hdmi_remove+0x28/0x40 [meson_dw_hdmi]
      [   42.938576]  platform_drv_remove+0x38/0x60
      [   42.942628]  __device_release_driver+0x190/0x23c
      [   42.947198]  driver_detach+0xcc/0x160
      [   42.950822]  bus_remove_driver+0x68/0xe0
      [   42.954702]  driver_unregister+0x3c/0x6c
      [   42.958583]  platform_driver_unregister+0x20/0x2c
      [   42.963243]  meson_dw_hdmi_platform_driver_exit+0x18/0x4a8 [meson_dw_hdmi]
      [   42.970057]  __arm64_sys_delete_module+0x1bc/0x294
      [   42.974801]  el0_svc_common.constprop.0+0x80/0x240
      [   42.979542]  do_el0_svc+0x30/0xa0
      [   42.982821]  el0_svc+0x18/0x50
      [   42.985839]  el0_sync_handler+0x198/0x404
      [   42.989806]  el0_sync+0x158/0x180
      
      immediatelly followed by
      
      [   43.002296] WARNING: CPU: 0 PID: 572 at drivers/gpu/drm/drm_mode_config.c:504 drm_mode_config_cleanup+0x2a8/0x304 [drm]
      [...]
      [   43.128150] Hardware name:  , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020
      [   43.135052] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--)
      [   43.141062] pc : drm_mode_config_cleanup+0x2a8/0x304 [drm]
      [   43.146492] lr : drm_mode_config_cleanup+0xac/0x304 [drm]
      [...]
      [   43.233979] Call trace:
      [   43.236451]  drm_mode_config_cleanup+0x2a8/0x304 [drm]
      [   43.241538]  drm_mode_config_init_release+0x1c/0x2c [drm]
      [   43.246886]  drm_managed_release+0xa8/0x120 [drm]
      [   43.251543]  drm_dev_put+0x94/0xc0 [drm]
      [   43.255380]  meson_drv_unbind+0x78/0xa4 [meson_drm]
      [   43.260204]  component_del+0xc0/0x180
      [   43.263829]  meson_dw_hdmi_remove+0x28/0x40 [meson_dw_hdmi]
      [   43.269344]  platform_drv_remove+0x38/0x60
      [   43.273398]  __device_release_driver+0x190/0x23c
      [   43.277967]  driver_detach+0xcc/0x160
      [   43.281590]  bus_remove_driver+0x68/0xe0
      [   43.285471]  driver_unregister+0x3c/0x6c
      [   43.289352]  platform_driver_unregister+0x20/0x2c
      [   43.294011]  meson_dw_hdmi_platform_driver_exit+0x18/0x4a8 [meson_dw_hdmi]
      [   43.300826]  __arm64_sys_delete_module+0x1bc/0x294
      [   43.305570]  el0_svc_common.constprop.0+0x80/0x240
      [   43.310312]  do_el0_svc+0x30/0xa0
      [   43.313590]  el0_svc+0x18/0x50
      [   43.316608]  el0_sync_handler+0x198/0x404
      [   43.320574]  el0_sync+0x158/0x180
      [   43.323852] ---[ end trace d796a3072dab01da ]---
      [   43.328561] [drm:drm_mode_config_cleanup [drm]] *ERROR* connector HDMI-A-1 leaked!
      
      both triggered by the fact that the HDMI subsystem is still active,
      and the DRM removal doesn't result in the connectors being torn down.
      
      Call drm_atomic_helper_shutdown() and component_unbind_all() to safely
      tear the module down.
      
      Fixes: 2d8f9289 ("drm/meson: Uninstall IRQ handler")
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-3-maz@kernel.org
      e78ad18b
    • Marc Zyngier's avatar
      drm/meson: Free RDMA resources after tearing down DRM · fa62ee25
      Marc Zyngier authored
      Removing the meson DRM module results in the following splat:
      
      [ 2179.451346] Hardware name:  , BIOS 2021.01-rc2-00012-gde865f7ee1 11/16/2020
      [ 2179.458316] Workqueue: events drm_mode_rmfb_work_fn [drm]
      [ 2179.463597] pstate: 80c00009 (Nzcv daif +PAN +UAO -TCO BTYPE=--)
      [ 2179.469558] pc : meson_rdma_writel_sync+0x44/0xb0 [meson_drm]
      [ 2179.475243] lr : meson_g12a_afbcd_reset+0x34/0x60 [meson_drm]
      [ 2179.480930] sp : ffffffc01212bb70
      [ 2179.484207] x29: ffffffc01212bb70 x28: ffffff8044f66f00
      [ 2179.489469] x27: ffffff8045b13800 x26: 0000000000000001
      [ 2179.494730] x25: 0000000000000000 x24: 0000000000000001
      [ 2179.499991] x23: 0000000000000000 x22: 0000000000000000
      [ 2179.505252] x21: 0000000000280000 x20: 0000000000001a01
      [ 2179.510513] x19: ffffff8046029480 x18: 0000000000000000
      [ 2179.515775] x17: 0000000000000000 x16: 0000000000000000
      [ 2179.521036] x15: 0000000000000000 x14: 0000000000000000
      [ 2179.526297] x13: 0040000000000326 x12: 0309030303260300
      [ 2179.531558] x11: 03000000054004a0 x10: 0418054004000400
      [ 2179.536820] x9 : ffffffc008fe4914 x8 : ffffff8040a1adc0
      [ 2179.542081] x7 : 0000000000000000 x6 : ffffff8042aa0080
      [ 2179.547342] x5 : ffffff8044f66f00 x4 : ffffffc008fe5bc8
      [ 2179.552603] x3 : 0000000000010101 x2 : 0000000000000001
      [ 2179.557865] x1 : 0000000000000000 x0 : 0000000000000000
      [ 2179.563127] Call trace:
      [ 2179.565548]  meson_rdma_writel_sync+0x44/0xb0 [meson_drm]
      [ 2179.570894]  meson_g12a_afbcd_reset+0x34/0x60 [meson_drm]
      [ 2179.576241]  meson_plane_atomic_disable+0x38/0xb0 [meson_drm]
      [ 2179.581966]  drm_atomic_helper_commit_planes+0x1e0/0x21c [drm_kms_helper]
      [ 2179.588684]  drm_atomic_helper_commit_tail_rpm+0x68/0xb0 [drm_kms_helper]
      [ 2179.595410]  commit_tail+0xac/0x190 [drm_kms_helper]
      [ 2179.600326]  drm_atomic_helper_commit+0x16c/0x390 [drm_kms_helper]
      [ 2179.606484]  drm_atomic_commit+0x58/0x70 [drm]
      [ 2179.610880]  drm_framebuffer_remove+0x398/0x434 [drm]
      [ 2179.615881]  drm_mode_rmfb_work_fn+0x68/0x8c [drm]
      [ 2179.620575]  process_one_work+0x1cc/0x49c
      [ 2179.624538]  worker_thread+0x200/0x444
      [ 2179.628246]  kthread+0x14c/0x160
      [ 2179.631439]  ret_from_fork+0x10/0x38
      
      caused by the fact that the RDMA buffer has already been freed,
      resulting in meson_rdma_writel_sync() getting a NULL pointer.
      
      Move the afbcd reset and meson_rdma_free calls after the DRM
      unregistration is complete so that the teardown can safely complete.
      
      Fixes: d1b5e41e ("drm/meson: Add AFBCD module driver")
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      Acked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201116200744.495826-2-maz@kernel.org
      fa62ee25
    • Yang Yingliang's avatar
      drm/omap: dmm_tiler: fix return error code in omap_dmm_probe() · 723ae803
      Yang Yingliang authored
      Return -ENOMEM when allocating refill memory failed.
      
      Fixes: 71e8831f ("drm/omap: DMM/TILER support for OMAP4+ platform")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201117061045.3452287-1-yangyingliang@huawei.com
      723ae803
    • Daniel Vetter's avatar
      drm/qxl: Remove fbcon acceleration leftovers · 96fb3cbe
      Daniel Vetter authored
      These are leftovers from 13aff184 ("drm/qxl: remove dead qxl fbdev
      emulation code").
      
      v2: Somehow these structs provided the struct qxl_device pre-decl,
      reorder the header to not anger compilers.
      Acked-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: virtualization@lists.linux-foundation.org
      Cc: spice-devel@lists.freedesktop.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20201029133347.4088884-1-daniel.vetter@ffwll.ch
      96fb3cbe
    • Daniel Vetter's avatar
      fbcon: Drop EXPORT_SYMBOL · 9b8b641f
      Daniel Vetter authored
      Every since
      
      commit 6104c370
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Tue Aug 1 17:32:07 2017 +0200
      
          fbcon: Make fbcon a built-time depency for fbdev
      
      these are no longer distinct loadable modules, so exporting symbols is
      kinda pointless.
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jirislaby@kernel.org>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Peilin Ye <yepeilin.cs@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201029101428.4058311-2-daniel.vetter@ffwll.ch
      9b8b641f
    • Daniel Vetter's avatar
      fbcon: Disable accelerated scrolling · 39aead83
      Daniel Vetter authored
      So ever since syzbot discovered fbcon, we have solid proof that it's
      full of bugs. And often the solution is to just delete code and remove
      features, e.g.  50145474 ("fbcon: remove soft scrollback code").
      
      Now the problem is that most modern-ish drivers really only treat
      fbcon as an dumb kernel console until userspace takes over, and Oops
      printer for some emergencies. Looking at drm drivers and the basic
      vesa/efi fbdev drivers shows that only 3 drivers support any kind of
      acceleration:
      
      - nouveau, seems to be enabled by default
      - omapdrm, when a DMM remapper exists using remapper rewriting for
        y/xpanning
      - gma500, but that is getting deleted now for the GTT remapper trick,
        and the accelerated copyarea never set the FBINFO_HWACCEL_COPYAREA
        flag, so unused (and could be deleted already I think).
      
      No other driver supportes accelerated fbcon. And fbcon is the only
      user of this accel code (it's not exposed as uapi through ioctls),
      which means we could garbage collect fairly enormous amounts of code
      if we kill this.
      
      Plus because syzbot only runs on virtual hardware, and none of the
      drivers for that have acceleration, we'd remove a huge gap in testing.
      And there's no other even remotely comprehensive testing aside from
      syzbot.
      
      This patch here just disables the acceleration code by always
      redrawing when scrolling. The plan is that once this has been merged
      for well over a year in released kernels, we can start to go around
      and delete a lot of code.
      
      v2:
      - Drop a few more unused local variables, somehow I missed the
      compiler warnings (Sam)
      - Fix typo in comment (Jiri)
      - add a todo entry for the cleanup (Thomas)
      
      v3: Remove more unused variables (0day)
      Reviewed-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Jiri Slaby <jirislaby@kernel.org>
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: nouveau@lists.freedesktop.org
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jiri Slaby <jirislaby@kernel.org>
      Cc: "Gustavo A. R. Silva" <gustavoars@kernel.org>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: Peilin Ye <yepeilin.cs@gmail.com>
      Cc: George Kennedy <george.kennedy@oracle.com>
      Cc: Nathan Chancellor <natechancellor@gmail.com>
      Cc: Peter Rosin <peda@axentia.se>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201029132229.4068359-1-daniel.vetter@ffwll.ch
      39aead83
    • Yang Yingliang's avatar
      video: fbdev: atmel_lcdfb: fix return error code in atmel_lcdfb_of_init() · ba236455
      Yang Yingliang authored
      If devm_kzalloc() failed after the first time, atmel_lcdfb_of_init()
      can't return -ENOMEM, fix this by putting the error code in loop.
      
      Fixes: b985172b ("video: atmel_lcdfb: add device tree suport")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201117061350.3453742-1-yangyingliang@huawei.com
      ba236455
  2. 16 Nov, 2020 14 commits
  3. 15 Nov, 2020 7 commits
  4. 14 Nov, 2020 5 commits
  5. 13 Nov, 2020 2 commits
  6. 12 Nov, 2020 4 commits