1. 05 12月, 2019 1 次提交
  2. 03 12月, 2019 1 次提交
  3. 19 11月, 2019 1 次提交
  4. 13 11月, 2019 1 次提交
  5. 07 11月, 2019 1 次提交
  6. 28 10月, 2019 1 次提交
  7. 01 10月, 2019 1 次提交
  8. 01 8月, 2019 2 次提交
  9. 09 7月, 2019 2 次提交
  10. 19 6月, 2019 1 次提交
  11. 12 6月, 2019 1 次提交
    • T
      drm: Reverse lock order in pan_display_legacy() · 1ff30dd8
      Thomas Zimmermann 提交于
      Acquiring drm_client_dev.modeset_mutex after the locks in drm_fb_helper.dev
      creates a deadlock with drm_setup_crtcs() as shown below:
      
        [    4.959319] fbcon: radeondrmfb (fb0) is primary device
        [    4.993952] Console: switching to colour frame buffer device 240x67
        [    4.994040]
        [    4.994041] ======================================================
        [    4.994041] WARNING: possible circular locking dependency detected
        [    4.994042] 5.2.0-rc4-1-default+ #39 Tainted: G            E
        [    4.994043] ------------------------------------------------------
        [    4.994043] systemd-udevd/369 is trying to acquire lock:
        [    4.994044] 00000000fb622acb (&client->modeset_mutex){+.+.}, at: drm_fb_helper_pan_display+0x103/0x1f0 [drm_kms_helper]
        [    4.994055]
        [    4.994055] but task is already holding lock:
        [    4.994055] 0000000028767ae4 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_lock+0x42/0xf0 [drm]
        [    4.994072]
        [    4.994072] which lock already depends on the new lock.
        [    4.994072]
        [    4.994072]
        [    4.994072] the existing dependency chain (in reverse order) is:
        [    4.994073]
        [    4.994073] -> #3 (crtc_ww_class_mutex){+.+.}:
        [    4.994076]        lock_acquire+0x9e/0x170
        [    4.994079]        __ww_mutex_lock.constprop.18+0x97/0xf40
        [    4.994080]        ww_mutex_lock+0x30/0x90
        [    4.994091]        drm_modeset_lock+0x42/0xf0 [drm]
        [    4.994102]        drm_modeset_lock_all_ctx+0x1f/0xe0 [drm]
        [    4.994113]        drm_modeset_lock_all+0x5e/0x1a0 [drm]
        [    4.994163]        intel_modeset_init+0x60b/0xda0 [i915]
        ..
        [    4.994253]
        [    4.994253] -> #2 (crtc_ww_class_acquire){+.+.}:
        [    4.994255]        lock_acquire+0x9e/0x170
        [    4.994270]        drm_modeset_acquire_init+0xcc/0x100 [drm]
        [    4.994280]        drm_modeset_lock_all+0x44/0x1a0 [drm]
        [    4.994320]        intel_modeset_init+0x60b/0xda0 [i915]
        ..
        [    4.994403]
        [    4.994403] -> #1 (&dev->mode_config.mutex){+.+.}:
        [    4.994405]        lock_acquire+0x9e/0x170
        [    4.994408]        __mutex_lock+0x62/0x8c0
        [    4.994413]        drm_setup_crtcs+0x17c/0xc50 [drm_kms_helper]
        [    4.994418]        __drm_fb_helper_initial_config_and_unlock+0x34/0x530 [drm_kms_helper]
        [    4.994450]        radeon_fbdev_init+0x110/0x130 [radeon]
        ..
        [    4.994535]
        [    4.994535] -> #0 (&client->modeset_mutex){+.+.}:
        [    4.994537]        __lock_acquire+0xa85/0xe90
        [    4.994538]        lock_acquire+0x9e/0x170
        [    4.994540]        __mutex_lock+0x62/0x8c0
        [    4.994545]        drm_fb_helper_pan_display+0x103/0x1f0 [drm_kms_helper]
        [    4.994547]        fb_pan_display+0x92/0x120
        [    4.994549]        bit_update_start+0x1a/0x40
        [    4.994550]        fbcon_switch+0x392/0x580
        [    4.994552]        redraw_screen+0x12c/0x220
        [    4.994553]        do_bind_con_driver.cold.30+0xe1/0x10d
        [    4.994554]        do_take_over_console+0x113/0x190
        [    4.994555]        do_fbcon_takeover+0x58/0xb0
        [    4.994557]        notifier_call_chain+0x47/0x70
        [    4.994558]        blocking_notifier_call_chain+0x44/0x60
        [    4.994559]        register_framebuffer+0x231/0x310
        [    4.994564]        __drm_fb_helper_initial_config_and_unlock+0x2fd/0x530 [drm_kms_helper]
        [    4.994590]        radeon_fbdev_init+0x110/0x130 [radeon]
        ..
      
      This problem was introduced in
      
        d81294af	drm/fb-helper: Remove drm_fb_helper_crtc
      
      Reversing the lock ordering in pan_display_legacy() fixes the issue.
      
      Fixes: d81294af ("drm/fb-helper: Remove drm_fb_helper_crtc")
      Cc: Noralf Trønnes <noralf@tronnes.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: NThomas Zimmermann <tzimmermann@suse.de>
      Suggested-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190611115716.7052-1-tzimmermann@suse.de
      1ff30dd8
  12. 11 6月, 2019 3 次提交
  13. 08 6月, 2019 2 次提交
  14. 04 6月, 2019 1 次提交
    • N
      drm/fb-helper: Remove drm_fb_helper_crtc · d81294af
      Noralf Trønnes 提交于
      struct drm_fb_helper_crtc is now just a wrapper around drm_mode_set so
      use that directly instead and attach it as a modeset array onto
      drm_client_dev. drm_fb_helper will use this array to store its modesets
      which means it will always initialize a drm_client, but it will not
      register the client (callbacks) unless it's the generic fbdev emulation.
      
      Code will later be moved to drm_client, so add code there in a new file
      drm_client_modeset.c with MIT license to match drm_fb_helper.c.
      
      The modeset connector array size is hardcoded for the cloned case to avoid
      having to pass in a value from the driver. A value of 8 is chosen to err
      on the safe side. This means that the max connector argument for
      drm_fb_helper_init() and drm_fb_helper_fbdev_setup() isn't used anymore,
      a todo entry for this is added.
      
      In pan_display_atomic() restore_fbdev_mode_force() is used instead of
      restore_fbdev_mode_atomic() because that one will later become internal
      to drm_client_modeset.
      
      Locking order:
      1. drm_fb_helper->lock
      2. drm_master_internal_acquire
      3. drm_client_dev->modeset_mutex
      
      v6: Improve commit message (Sam Ravnborg)
      
      v3:
      - Use full drm_client_init/release for the modesets (Daniel Vetter)
      - drm_client_for_each_modeset: use lockdep_assert_held (Daniel Vetter)
      - Hook up to Documentation/gpu/drm-client.rst (Daniel Vetter)
      
      v2:
      - Add modesets array to drm_client (Daniel Vetter)
      - Use a new file for the modeset code (Daniel Vetter)
      - File has to be MIT licensed (Emmanuel Vadot)
      - Add copyrights from drm_fb_helper.c
      Signed-off-by: NNoralf Trønnes <noralf@tronnes.org>
      Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190531140117.37751-3-noralf@tronnes.org
      d81294af
  15. 28 5月, 2019 1 次提交
  16. 20 5月, 2019 2 次提交
  17. 16 5月, 2019 1 次提交
  18. 14 5月, 2019 3 次提交
  19. 24 4月, 2019 2 次提交
  20. 11 4月, 2019 2 次提交
  21. 03 4月, 2019 3 次提交
  22. 28 3月, 2019 1 次提交
  23. 27 3月, 2019 4 次提交
  24. 26 3月, 2019 1 次提交
    • D
      drm/fbdev: Make skip_vt_switch the default · 8782c647
      Daniel Vetter 提交于
      KMS drivers really should all be able to restore their display state
      on resume without fbcon helping out. So make this the default.
      
      Since I'm not entirely foolish, make it only a default, which drivers
      can still override. That way when the inevitable regression report
      happens I can fix things up with a one-liner plus FIXME comment that
      someone should fix up the suspend/resume code in that driver.
      
      But at least all new drivers won't be broken by accident as soon as
      you turn off fbcon because "suspend/resume worked when I tested it".
      
      v2: Keep this for radeon because of
      
      commit 18c437ca
      Author: Alex Deucher <alexander.deucher@amd.com>
      Date:   Tue Nov 14 17:19:29 2017 -0500
      
          Revert "drm/radeon: dont switch vt on suspend"
      
      Thanks to Michel Dänzer for pointing this one out.
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Cc: Michel Dänzer <michel@daenzer.net>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Sandy Huang <hjc@rock-chips.com>
      Cc: "Heiko Stübner" <heiko@sntech.de>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Samuel Li <Samuel.Li@amd.com>
      Cc: "Michel Dänzer" <michel.daenzer@amd.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Junwei Zhang <Jerry.Zhang@amd.com>
      Cc: Huang Rui <ray.huang@amd.com>
      Cc: Shirish S <shirish.s@amd.com>
      Cc: Daniel Stone <daniels@collabora.com>
      Cc: "Noralf Trønnes" <noralf@tronnes.org>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-rockchip@lists.infradead.org
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Acked-by: NHeiko Stuebner <heiko@sntech.de>
      Tested-by: NHeiko Stuebner <heiko@sntech.de>
      Reviewed-by: NSamuel Li <samuel.li@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181127173424.301-1-daniel.vetter@ffwll.ch
      8782c647
  25. 25 3月, 2019 1 次提交