1. 14 Oct, 2021 27 commits
  2. 13 Oct, 2021 3 commits
  3. 12 Oct, 2021 6 commits
  4. 11 Oct, 2021 4 commits
    • Dan Carpenter's avatar
      drm/v3d: fix copy_from_user() error codes · ee30840b
      Dan Carpenter authored
      The copy_to/from_user() function returns the number of bytes remaining
      to be copied, but we want to return -EFAULT on error.
      
      Fixes: e4165ae8 ("drm/v3d: add multiple syncobjs support")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarMelissa Wen <mwen@igalia.com>
      Signed-off-by: default avatarMelissa Wen <melissa.srw@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211011123303.GA14314@kili
      ee30840b
    • Randy Dunlap's avatar
      drm/connector: fix all kernel-doc warnings · f85d9e59
      Randy Dunlap authored
      Clean up all of the kernel-doc issues in drm_connector.c:
      
      drivers/gpu/drm/drm_connector.c:2611: warning: Excess function parameter 'connector' description in 'drm_connector_oob_hotplug_event'
      drivers/gpu/drm/drm_connector.c:2611: warning: Function parameter or member 'connector_fwnode' not described in 'drm_connector_oob_hotplug_event'
      
      drm_connector.c:630: warning: No description found for return value of 'drm_get_connector_status_name'
      drm_connector.c:715: warning: No description found for return value of 'drm_connector_list_iter_next'
      drm_connector.c:785: warning: No description found for return value of 'drm_get_subpixel_order_name'
      drm_connector.c:816: warning: No description found for return value of 'drm_display_info_set_bus_formats'
      drm_connector.c:1331: warning: No description found for return value of 'drm_mode_create_dvi_i_properties'
      drm_connector.c:1412: warning: No description found for return value of 'drm_connector_attach_content_type_property'
      drm_connector.c:1492: warning: No description found for return value of 'drm_mode_create_tv_margin_properties'
      drm_connector.c:1534: warning: No description found for return value of 'drm_mode_create_tv_properties'
      drm_connector.c:1627: warning: No description found for return value of 'drm_mode_create_scaling_mode_property'
      drm_connector.c:1944: warning: No description found for return value of 'drm_mode_create_suggested_offset_properties'
      
      drm_connector.c:2315: warning: missing initial short description on line:
       * drm_connector_set_panel_orientation_with_quirk -
      
      [The last warning listed is probably a quirk/bug in scripts/kernel-doc.]
      
      Fixes: 613051da ("drm: locking&new iterators for connector_list")
      Fixes: 52217195 ("drm: Extract drm_connector.[hc]")
      Fixes: b3c6c8bf ("drm: document drm_display_info")
      Fixes: 50525c33 ("drm: content-type property for HDMI connector")
      Fixes: 6c4f52dc ("drm/connector: Allow creation of margin props alone")
      Fixes: 69654c63 ("drm/connector: Split out orientation quirk detection (v2)")
      Fixes: 72ad4968 ("drm/connector: Add support for out-of-band hotplug notification (v3)")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: dri-devel@lists.freedesktop.org
      Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Derek Basehore <dbasehore@chromium.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211010224459.3603-1-rdunlap@infradead.org
      f85d9e59
    • Uwe Kleine-König's avatar
      drm/panel: s6e63m0: Make s6e63m0_remove() return void · 90c45fc1
      Uwe Kleine-König authored
      Up to now s6e63m0_remove() returns zero unconditionally. Make it return
      void instead which makes it easier to see in the callers that there is
      no error to handle.
      
      Also the return value of spi remove callbacks is ignored anyway.
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211011132754.2479853-2-u.kleine-koenig@pengutronix.de
      90c45fc1
    • Tvrtko Ursulin's avatar
      dma-resv: Fix dma_resv_get_fences and dma_resv_copy_fences after conversion · 5e51cc00
      Tvrtko Ursulin authored
      Cache the count of shared fences in the iterator to avoid dereferencing
      the dma_resv_object outside the RCU protection. Otherwise iterator and its
      users can observe an incosistent state which makes it impossible to use
      safely. Such as:
      
      <6> [187.517041] [IGT] gem_sync: executing
      <7> [187.536343] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
      <7> [187.536793] i915 0000:00:02.0: [drm:i915_gem_context_create_ioctl [i915]] HW context 1 created
      <6> [187.551235] [IGT] gem_sync: starting subtest basic-many-each
      <1> [188.935462] BUG: kernel NULL pointer dereference, address: 0000000000000010
      <1> [188.935485] #PF: supervisor write access in kernel mode
      <1> [188.935495] #PF: error_code(0x0002) - not-present page
      <6> [188.935504] PGD 0 P4D 0
      <4> [188.935512] Oops: 0002 [#1] PREEMPT SMP NOPTI
      <4> [188.935521] CPU: 2 PID: 1467 Comm: gem_sync Not tainted 5.15.0-rc4-CI-Patchwork_21264+ #1
      <4> [188.935535] Hardware name:  /NUC6CAYB, BIOS AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018
      <4> [188.935546] RIP: 0010:dma_resv_get_fences+0x116/0x2d0
      <4> [188.935560] Code: 10 85 c0 7f c9 be 03 00 00 00 e8 15 8b df ff eb bd e8 8e c6 ff ff eb b6 41 8b 04 24 49 8b 55 00 48 89 e7 8d 48 01 41 89 0c 24 <4c> 89 34 c2 e8 41 f2 ff ff 49 89 c6 48 85 c0 75 8c 48 8b 44 24 10
      <4> [188.935583] RSP: 0018:ffffc900011dbcc8 EFLAGS: 00010202
      <4> [188.935593] RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 0000000000000001
      <4> [188.935603] RDX: 0000000000000010 RSI: ffffffff822e343c RDI: ffffc900011dbcc8
      <4> [188.935613] RBP: ffffc900011dbd48 R08: ffff88812d255bb8 R09: 00000000fffffffe
      <4> [188.935623] R10: 0000000000000001 R11: 0000000000000000 R12: ffffc900011dbd44
      <4> [188.935633] R13: ffffc900011dbd50 R14: ffff888113d29cc0 R15: 0000000000000000
      <4> [188.935643] FS:  00007f68d17e9700(0000) GS:ffff888277900000(0000) knlGS:0000000000000000
      <4> [188.935655] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4> [188.935665] CR2: 0000000000000010 CR3: 000000012d0a4000 CR4: 00000000003506e0
      <4> [188.935676] Call Trace:
      <4> [188.935685]  i915_gem_object_wait+0x1ff/0x410 [i915]
      <4> [188.935988]  i915_gem_wait_ioctl+0xf2/0x2a0 [i915]
      <4> [188.936272]  ? i915_gem_object_wait+0x410/0x410 [i915]
      <4> [188.936533]  drm_ioctl_kernel+0xae/0x140
      <4> [188.936546]  drm_ioctl+0x201/0x3d0
      <4> [188.936555]  ? i915_gem_object_wait+0x410/0x410 [i915]
      <4> [188.936820]  ? __fget_files+0xc2/0x1c0
      <4> [188.936830]  ? __fget_files+0xda/0x1c0
      <4> [188.936839]  __x64_sys_ioctl+0x6d/0xa0
      <4> [188.936848]  do_syscall_64+0x3a/0xb0
      <4> [188.936859]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      
      If the shared object has changed during the RCU unlocked period
      callers will correctly handle the restart on the next iteration.
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Fixes: 96601e8a ("dma-buf: use new iterator in dma_resv_copy_fences")
      Fixes: d3c80698 ("dma-buf: use new iterator in dma_resv_get_fences v3")
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4274
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: linaro-mm-sig@lists.linaro.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20211008095007.972693-1-tvrtko.ursulin@linux.intel.comReviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      5e51cc00