1. 04 Jan, 2024 6 commits
    • Lucas Stach's avatar
      drm/rockchip: analogix_dp: get encoder port ID from DT · bb056046
      Lucas Stach authored
      The VOP2 driver needs this port ID to properly configure the
      display data routing.
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240103181301.3339595-1-l.stach@pengutronix.de
      bb056046
    • Zack Rusin's avatar
      drm/vmwgfx: Unmap the surface before resetting it on a plane state · 27571c64
      Zack Rusin authored
      Switch to a new plane state requires unreferencing of all held surfaces.
      In the work required for mob cursors the mapped surfaces started being
      cached but the variable indicating whether the surface is currently
      mapped was not being reset. This leads to crashes as the duplicated
      state, incorrectly, indicates the that surface is mapped even when
      no surface is present. That's because after unreferencing the surface
      it's perfectly possible for the plane to be backed by a bo instead of a
      surface.
      
      Reset the surface mapped flag when unreferencing the plane state surface
      to fix null derefs in cleanup. Fixes crashes in KDE KWin 6.0 on Wayland:
      
      Oops: 0000 [#1] PREEMPT SMP PTI
      CPU: 4 PID: 2533 Comm: kwin_wayland Not tainted 6.7.0-rc3-vmwgfx #2
      Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 11/12/2020
      RIP: 0010:vmw_du_cursor_plane_cleanup_fb+0x124/0x140 [vmwgfx]
      Code: 00 00 00 75 3a 48 83 c4 10 5b 5d c3 cc cc cc cc 48 8b b3 a8 00 00 00 48 c7 c7 99 90 43 c0 e8 93 c5 db ca 48 8b 83 a8 00 00 00 <48> 8b 78 28 e8 e3 f>
      RSP: 0018:ffffb6b98216fa80 EFLAGS: 00010246
      RAX: 0000000000000000 RBX: ffff969d84cdcb00 RCX: 0000000000000027
      RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff969e75f21600
      RBP: ffff969d4143dc50 R08: 0000000000000000 R09: ffffb6b98216f920
      R10: 0000000000000003 R11: ffff969e7feb3b10 R12: 0000000000000000
      R13: 0000000000000000 R14: 000000000000027b R15: ffff969d49c9fc00
      FS:  00007f1e8f1b4180(0000) GS:ffff969e75f00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000028 CR3: 0000000104006004 CR4: 00000000003706f0
      Call Trace:
       <TASK>
       ? __die+0x23/0x70
       ? page_fault_oops+0x171/0x4e0
       ? exc_page_fault+0x7f/0x180
       ? asm_exc_page_fault+0x26/0x30
       ? vmw_du_cursor_plane_cleanup_fb+0x124/0x140 [vmwgfx]
       drm_atomic_helper_cleanup_planes+0x9b/0xc0
       commit_tail+0xd1/0x130
       drm_atomic_helper_commit+0x11a/0x140
       drm_atomic_commit+0x97/0xd0
       ? __pfx___drm_printfn_info+0x10/0x10
       drm_atomic_helper_update_plane+0xf5/0x160
       drm_mode_cursor_universal+0x10e/0x270
       drm_mode_cursor_common+0x102/0x230
       ? __pfx_drm_mode_cursor2_ioctl+0x10/0x10
       drm_ioctl_kernel+0xb2/0x110
       drm_ioctl+0x26d/0x4b0
       ? __pfx_drm_mode_cursor2_ioctl+0x10/0x10
       ? __pfx_drm_ioctl+0x10/0x10
       vmw_generic_ioctl+0xa4/0x110 [vmwgfx]
       __x64_sys_ioctl+0x94/0xd0
       do_syscall_64+0x61/0xe0
       ? __x64_sys_ioctl+0xaf/0xd0
       ? syscall_exit_to_user_mode+0x2b/0x40
       ? do_syscall_64+0x70/0xe0
       ? __x64_sys_ioctl+0xaf/0xd0
       ? syscall_exit_to_user_mode+0x2b/0x40
       ? do_syscall_64+0x70/0xe0
       ? exc_page_fault+0x7f/0x180
       entry_SYSCALL_64_after_hwframe+0x6e/0x76
      RIP: 0033:0x7f1e93f279ed
      Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff f>
      RSP: 002b:00007ffca0faf600 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      RAX: ffffffffffffffda RBX: 000055db876ed2c0 RCX: 00007f1e93f279ed
      RDX: 00007ffca0faf6c0 RSI: 00000000c02464bb RDI: 0000000000000015
      RBP: 00007ffca0faf650 R08: 000055db87184010 R09: 0000000000000007
      R10: 000055db886471a0 R11: 0000000000000246 R12: 00007ffca0faf6c0
      R13: 00000000c02464bb R14: 0000000000000015 R15: 00007ffca0faf790
       </TASK>
      Modules linked in: snd_seq_dummy snd_hrtimer nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_ine>
      CR2: 0000000000000028
      ---[ end trace 0000000000000000 ]---
      RIP: 0010:vmw_du_cursor_plane_cleanup_fb+0x124/0x140 [vmwgfx]
      Code: 00 00 00 75 3a 48 83 c4 10 5b 5d c3 cc cc cc cc 48 8b b3 a8 00 00 00 48 c7 c7 99 90 43 c0 e8 93 c5 db ca 48 8b 83 a8 00 00 00 <48> 8b 78 28 e8 e3 f>
      RSP: 0018:ffffb6b98216fa80 EFLAGS: 00010246
      RAX: 0000000000000000 RBX: ffff969d84cdcb00 RCX: 0000000000000027
      RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff969e75f21600
      RBP: ffff969d4143dc50 R08: 0000000000000000 R09: ffffb6b98216f920
      R10: 0000000000000003 R11: ffff969e7feb3b10 R12: 0000000000000000
      R13: 0000000000000000 R14: 000000000000027b R15: ffff969d49c9fc00
      FS:  00007f1e8f1b4180(0000) GS:ffff969e75f00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000028 CR3: 0000000104006004 CR4: 00000000003706f0
      Signed-off-by: default avatarZack Rusin <zack.rusin@broadcom.com>
      Fixes: 485d98d4 ("drm/vmwgfx: Add support for CursorMob and CursorBypass 4")
      Reported-by: default avatarStefan Hoffmeister <stefan.hoffmeister@econos.de>
      Closes: https://gitlab.freedesktop.org/drm/misc/-/issues/34
      Cc: Martin Krastev <martin.krastev@broadcom.com>
      Cc: Maaz Mombasawala <maaz.mombasawala@broadcom.com>
      Cc: Ian Forbes <ian.forbes@broadcom.com>
      Cc: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v5.19+
      Acked-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Reviewed-by: default avatarMaaz Mombasawala <maaz.mombasawala@broadcom.com>
      Reviewed-by: default avatarMartin Krastev <martin.krastev@broadcom.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20231224052540.605040-1-zack.rusin@broadcom.com
      27571c64
    • Randy Dunlap's avatar
      drm/vmwgfx: fix kernel-doc Excess struct member 'base' · 85110d04
      Randy Dunlap authored
      Fix a new kernel-doc warning reported by kernel test robot:
      
      vmwgfx_surface.c:55: warning: Excess struct member 'base' description in 'vmw_user_surface'
      
      The other warning is not correct: it is confused by "__counted_by".
      Kees has made a separate patch for that.
      
      In -Wall mode, kernel-doc still reports 20 warnings of this nature:
      vmwgfx_surface.c:198: warning: No description found for return value of 'vmw_surface_dma_size'
      but I am not addressing those.
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202312150701.kNI9LuM3-lkp@intel.com/
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Zack Rusin <zackr@vmware.com>
      Cc: VMware Graphics Reviewers <linux-graphics-maintainer@vmware.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Signed-off-by: default avatarZack Rusin <zack.rusin@broadcom.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20231215235638.19189-1-rdunlap@infradead.org
      85110d04
    • Zhipeng Lu's avatar
      drm/vmwgfx: fix a memleak in vmw_gmrid_man_get_node · 89709105
      Zhipeng Lu authored
      When ida_alloc_max fails, resources allocated before should be freed,
      including *res allocated by kmalloc and ttm_resource_init.
      
      Fixes: d3bcb4b0 ("drm/vmwgfx: switch the TTM backends to self alloc")
      Signed-off-by: default avatarZhipeng Lu <alexious@zju.edu.cn>
      Signed-off-by: default avatarZack Rusin <zack.rusin@broadcom.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20231204091416.3308430-1-alexious@zju.edu.cn
      89709105
    • Randy Dunlap's avatar
      drm/vmwgfx: fix all kernel-doc warnings in stdu · 834b1d72
      Randy Dunlap authored
      kernel test robot reports one kernel-doc warning in stdu, but
      running scripts/kernel-doc in -Wall mode reports several more,
      so fix all of them at one time:
      
      vmwgfx_stdu.c:76: warning: Excess struct member 'transfer' description in 'vmw_stdu_dirty'
      vmwgfx_stdu.c:103: warning: missing initial short description on line:
       * struct vmw_screen_target_display_unit
      vmwgfx_stdu.c:215: warning: No description found for return value of 'vmw_stdu_bind_st'
      vmwgfx_stdu.c:320: warning: No description found for return value of 'vmw_stdu_destroy_st'
      vmwgfx_stdu.c:551: warning: No description found for return value of 'vmw_kms_stdu_readback'
      vmwgfx_stdu.c:719: warning: No description found for return value of 'vmw_kms_stdu_surface_dirty'
      vmwgfx_stdu.c:895: warning: No description found for return value of 'vmw_stdu_primary_plane_prepare_fb'
      vmwgfx_stdu.c:1470: warning: No description found for return value of 'vmw_stdu_init'
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202312150347.5icezNlK-lkp@intel.com/
      Cc: Zack Rusin <zackr@vmware.com>
      Cc: VMware Graphics Reviewers <linux-graphics-maintainer@vmware.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarZack Rusin <zack.rusin@broadcom.com>
      Signed-off-by: default avatarZack Rusin <zack.rusin@broadcom.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20231215234102.16574-1-rdunlap@infradead.org
      834b1d72
    • Ghanshyam Agrawal's avatar
  2. 03 Jan, 2024 1 commit
  3. 02 Jan, 2024 5 commits
  4. 01 Jan, 2024 4 commits
  5. 29 Dec, 2023 21 commits
  6. 28 Dec, 2023 1 commit
  7. 22 Dec, 2023 1 commit
  8. 20 Dec, 2023 1 commit