1. 03 5月, 2022 3 次提交
  2. 20 2月, 2022 1 次提交
  3. 10 2月, 2022 5 次提交
  4. 08 2月, 2022 1 次提交
    • L
      dma-buf-map: Rename to iosys-map · 7938f421
      Lucas De Marchi 提交于
      Rename struct dma_buf_map to struct iosys_map and corresponding APIs.
      Over time dma-buf-map grew up to more functionality than the one used by
      dma-buf: in fact it's just a shim layer to abstract system memory, that
      can be accessed via regular load and store, from IO memory that needs to
      be acessed via arch helpers.
      
      The idea is to extend this API so it can fulfill other needs, internal
      to a single driver. Example: in the i915 driver it's desired to share
      the implementation for integrated graphics, which uses mostly system
      memory, with discrete graphics, which may need to access IO memory.
      
      The conversion was mostly done with the following semantic patch:
      
      	@r1@
      	@@
      	- struct dma_buf_map
      	+ struct iosys_map
      
      	@r2@
      	@@
      	(
      	- DMA_BUF_MAP_INIT_VADDR
      	+ IOSYS_MAP_INIT_VADDR
      	|
      	- dma_buf_map_set_vaddr
      	+ iosys_map_set_vaddr
      	|
      	- dma_buf_map_set_vaddr_iomem
      	+ iosys_map_set_vaddr_iomem
      	|
      	- dma_buf_map_is_equal
      	+ iosys_map_is_equal
      	|
      	- dma_buf_map_is_null
      	+ iosys_map_is_null
      	|
      	- dma_buf_map_is_set
      	+ iosys_map_is_set
      	|
      	- dma_buf_map_clear
      	+ iosys_map_clear
      	|
      	- dma_buf_map_memcpy_to
      	+ iosys_map_memcpy_to
      	|
      	- dma_buf_map_incr
      	+ iosys_map_incr
      	)
      
      	@@
      	@@
      	- #include <linux/dma-buf-map.h>
      	+ #include <linux/iosys-map.h>
      
      Then some files had their includes adjusted and some comments were
      update to remove mentions to dma-buf-map.
      
      Since this is not specific to dma-buf anymore, move the documentation to
      the "Bus-Independent Device Accesses" section.
      
      v2:
        - Squash patches
      
      v3:
        - Fix wrong removal of dma-buf.h from MAINTAINERS
        - Move documentation from dma-buf.rst to device-io.rst
      
      v4:
        - Change documentation title and level
      Signed-off-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Acked-by: NChristian König <christian.koenig@amd.com>
      Acked-by: NSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: NThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220204170541.829227-1-lucas.demarchi@intel.com
      7938f421
  5. 02 2月, 2022 1 次提交
  6. 09 12月, 2021 1 次提交
  7. 11 11月, 2021 1 次提交
  8. 15 10月, 2021 1 次提交
  9. 04 10月, 2021 1 次提交
  10. 02 10月, 2021 1 次提交
  11. 02 8月, 2021 1 次提交
  12. 27 5月, 2021 1 次提交
  13. 11 3月, 2021 1 次提交
    • T
      drm/fb-helper: only unmap if buffer not null · 874a52f9
      Tong Zhang 提交于
      drm_fbdev_cleanup() can be called when fb_helper->buffer is null, hence
      fb_helper->buffer should be checked before calling
      drm_client_buffer_vunmap(). This buffer is also checked in
      drm_client_framebuffer_delete(), so we should also do the same thing for
      drm_client_buffer_vunmap().
      
      [  199.128742] RIP: 0010:drm_client_buffer_vunmap+0xd/0x20
      [  199.129031] Code: 43 18 48 8b 53 20 49 89 45 00 49 89 55 08 5b 44 89 e0 41 5c 41 5d 41 5e 5d
      c3 0f 1f 00 53 48 89 fb 48 8d 7f 10 e8 73 7d a1 ff <48> 8b 7b 10 48 8d 73 18 5b e9 75 53 fc ff 0
      f 1f 44 00 00 48 b8 00
      [  199.130041] RSP: 0018:ffff888103f3fc88 EFLAGS: 00010282
      [  199.130329] RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff8214d46d
      [  199.130733] RDX: 1ffffffff079c6b9 RSI: 0000000000000246 RDI: ffffffff83ce35c8
      [  199.131119] RBP: ffff888103d25458 R08: 0000000000000001 R09: fffffbfff0791761
      [  199.131505] R10: ffffffff83c8bb07 R11: fffffbfff0791760 R12: 0000000000000000
      [  199.131891] R13: ffff888103d25468 R14: ffff888103d25418 R15: ffff888103f18120
      [  199.132277] FS:  00007f36fdcbb6a0(0000) GS:ffff88815b400000(0000) knlGS:0000000000000000
      [  199.132721] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  199.133033] CR2: 0000000000000010 CR3: 0000000103d26000 CR4: 00000000000006f0
      [  199.133420] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  199.133807] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  199.134195] Call Trace:
      [  199.134333]  drm_fbdev_cleanup+0x179/0x1a0
      [  199.134562]  drm_fbdev_client_unregister+0x2b/0x40
      [  199.134828]  drm_client_dev_unregister+0xa8/0x180
      [  199.135088]  drm_dev_unregister+0x61/0x110
      [  199.135315]  mgag200_pci_remove+0x38/0x52 [mgag200]
      [  199.135586]  pci_device_remove+0x62/0xe0
      [  199.135806]  device_release_driver_internal+0x148/0x270
      [  199.136094]  driver_detach+0x76/0xe0
      [  199.136294]  bus_remove_driver+0x7e/0x100
      [  199.136521]  pci_unregister_driver+0x28/0xf0
      [  199.136759]  __x64_sys_delete_module+0x268/0x300
      [  199.137016]  ? __ia32_sys_delete_module+0x300/0x300
      [  199.137285]  ? call_rcu+0x3e4/0x580
      [  199.137481]  ? fpregs_assert_state_consistent+0x4d/0x60
      [  199.137767]  ? exit_to_user_mode_prepare+0x2f/0x130
      [  199.138037]  do_syscall_64+0x33/0x40
      [  199.138237]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      [  199.138517] RIP: 0033:0x7f36fdc3dcf7
      Signed-off-by: NTong Zhang <ztong0001@gmail.com>
      Fixes: 763aea17 ("drm/fb-helper: Unmap client buffer during shutdown")
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: dri-devel@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v5.11+
      Signed-off-by: NThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210228044625.171151-1-ztong0001@gmail.comSigned-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      874a52f9
  14. 08 2月, 2021 1 次提交
  15. 22 12月, 2020 1 次提交
  16. 15 12月, 2020 1 次提交
  17. 03 12月, 2020 1 次提交
  18. 24 11月, 2020 9 次提交
  19. 10 11月, 2020 1 次提交
  20. 09 11月, 2020 2 次提交
  21. 08 10月, 2020 1 次提交
  22. 02 10月, 2020 1 次提交
  23. 27 7月, 2020 1 次提交
  24. 11 7月, 2020 1 次提交
  25. 25 6月, 2020 1 次提交
    • D
      drm/fb-helper: Fix vt restore · dc5bdb68
      Daniel Vetter 提交于
      In the past we had a pile of hacks to orchestrate access between fbdev
      emulation and native kms clients. We've tried to streamline this, by
      always preferring the kms side above fbdev calls when a drm master
      exists, because drm master controls access to the display resources.
      
      Unfortunately this breaks existing userspace, specifically Xorg. When
      exiting Xorg first restores the console to text mode using the KDSET
      ioctl on the vt. This does nothing, because a drm master is still
      around. Then it drops the drm master status, which again does nothing,
      because logind is keeping additional drm fd open to be able to
      orchestrate vt switches. In the past this is the point where fbdev was
      restored, as part of the ->lastclose hook on the drm side.
      
      Now to fix this regression we don't want to go back to letting fbdev
      restore things whenever it feels like, or to the pile of hacks we've
      had before. Instead try and go with a minimal exception to make the
      KDSET case work again, and nothing else.
      
      This means that if userspace does a KDSET call when switching between
      graphical compositors, there will be some flickering with fbcon
      showing up for a bit. But a) that's not a regression and b) userspace
      can fix it by improving the vt switching dance - logind should have
      all the information it needs.
      
      While pondering all this I'm also wondering wheter we should have a
      SWITCH_MASTER ioctl to allow race-free master status handover. But
      that's for another day.
      
      v2: Somehow forgot to cc all the fbdev people.
      
      v3: Fix typo Alex spotted.
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=208179
      Cc: shlomo@fastmail.com
      Reported-and-Tested-by: shlomo@fastmail.com
      Cc: Michel Dänzer <michel@daenzer.net>
      Fixes: 64914da2 ("drm/fbdev-helper: don't force restores")
      Cc: Noralf Trønnes <noralf@tronnes.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: dri-devel@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v5.7+
      Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Nathan Chancellor <natechancellor@gmail.com>
      Cc: Qiujun Huang <hqjagain@gmail.com>
      Cc: Peter Rosin <peda@axentia.se>
      Cc: linux-fbdev@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200624092910.3280448-1-daniel.vetter@ffwll.ch
      dc5bdb68