Skip to content
Permalink
Hsin-Yi-Wang/d…
Switch branches/tags

Commits on Jan 19, 2022

  1. dt-bindings: drm/bridge: anx7625: Add aux-bus node

    List panel under aux-bus node if it's connected to anx7625's aux bus.
    
    Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
    Reviewed-by: Xin Ji <xji@analogixsemi.com>
    hsinyi527 authored and intel-lab-lkp committed Jan 19, 2022
  2. drm/bridge: anx7625: Support reading edid through aux channel

    Support reading edid through aux channel if panel is connected to aux
    bus. Extend anx7625_aux_dpcd_trans() to implement aux transfer function:
    
    1. panel is populated in devm_of_dp_aux_populate_ep_devices(), so move
       anx7625_parse_dt() after.
    2. Use pm runtime autosuspend since aux transfer function is called
       multiple times when reading edid.
    3. No-op if aux transfer length is 0.
    
    Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
    Reviewed-by: Xin Ji <xji@analogixsemi.com>
    hsinyi527 authored and intel-lab-lkp committed Jan 19, 2022
  3. drm/bridge: anx7625: Convert to use devm_kzalloc

    Use devm_kzalloc instead of kzalloc and drop kfree(). Let the memory
    handled by driver detach.
    
    Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
    Reviewed-by: Xin Ji <xji@analogixsemi.com>
    hsinyi527 authored and intel-lab-lkp committed Jan 19, 2022
  4. drm/bridge: anx7625: send DPCD command to downstream

    Send DPCD command to downstream before anx7625 power down,
    let downstream monitor enter into standby mode.
    
    Signed-off-by: Xin Ji <xji@analogixsemi.com>
    Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
    Xin Ji authored and intel-lab-lkp committed Jan 19, 2022
  5. Merge remote-tracking branch 'drm-intel/drm-intel-gt-next' into drm-tip

    # Conflicts:
    #	drivers/gpu/drm/i915/i915_drv.h
    jnikula committed Jan 19, 2022
  6. Merge remote-tracking branch 'drm-intel/drm-intel-next' into drm-tip

    # Conflicts:
    #	drivers/gpu/drm/i915/i915_reg.h
    jnikula committed Jan 19, 2022
  7. Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tip

    # Conflicts:
    #	drivers/gpu/drm/i915/display/intel_display_types.h
    #	drivers/gpu/drm/msm/edp/edp.h
    #	drivers/gpu/drm/msm/edp/edp_ctrl.c
    jnikula committed Jan 19, 2022
  8. Merge remote-tracking branch 'drm/drm-next' into drm-tip

    # Conflicts:
    #	drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
    #	drivers/gpu/drm/amd/display/dc/core/dc_link.c
    #	drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
    jnikula committed Jan 19, 2022
  9. drm/msm: Fix include statements for DisplayPort

    Update the include statements for DisplayPort helpers. The header
    files are in the dp/ subdirectory.
    
    Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
    Fixes: 5b529e8 ("drm/dp: Move public DisplayPort headers into dp/")
    Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Cc: Lyude Paul <lyude@redhat.com>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Cc: Maxime Ripard <mripard@kernel.org>
    Cc: dri-devel@lists.freedesktop.org
    Link: https://patchwork.freedesktop.org/patch/msgid/20220118154450.25947-1-tzimmermann@suse.de
    Thomas Zimmermann committed Jan 19, 2022
  10. drm/selftests: Select DRM_DP_HELPER

    Resolve warnings about non-existing symbols by selecting DRM_DP_HELPER.
    
    Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
    Fixes: adb9d5a ("drm/dp: Move DisplayPort helpers into separate helper module")
    Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Cc: Lyude Paul <lyude@redhat.com>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Cc: Maxime Ripard <mripard@kernel.org>
    Cc: dri-devel@lists.freedesktop.org
    Link: https://patchwork.freedesktop.org/patch/msgid/20220118154418.25932-1-tzimmermann@suse.de
    Thomas Zimmermann committed Jan 19, 2022
  11. drm/vc4: Fix deadlock on DSI device attach error

    DSI device attach to DSI host will be done with host device's lock
    held.
    
    Un-registering host in "device attach" error path (ex: probe retry)
    will result in deadlock with below call trace and non operational
    DSI display.
    
    Startup Call trace:
    [   35.043036]  rt_mutex_slowlock.constprop.21+0x184/0x1b8
    [   35.043048]  mutex_lock_nested+0x7c/0xc8
    [   35.043060]  device_del+0x4c/0x3e8
    [   35.043075]  device_unregister+0x20/0x40
    [   35.043082]  mipi_dsi_remove_device_fn+0x18/0x28
    [   35.043093]  device_for_each_child+0x68/0xb0
    [   35.043105]  mipi_dsi_host_unregister+0x40/0x90
    [   35.043115]  vc4_dsi_host_attach+0xf0/0x120 [vc4]
    [   35.043199]  mipi_dsi_attach+0x30/0x48
    [   35.043209]  tc358762_probe+0x128/0x164 [tc358762]
    [   35.043225]  mipi_dsi_drv_probe+0x28/0x38
    [   35.043234]  really_probe+0xc0/0x318
    [   35.043244]  __driver_probe_device+0x80/0xe8
    [   35.043254]  driver_probe_device+0xb8/0x118
    [   35.043263]  __device_attach_driver+0x98/0xe8
    [   35.043273]  bus_for_each_drv+0x84/0xd8
    [   35.043281]  __device_attach+0xf0/0x150
    [   35.043290]  device_initial_probe+0x1c/0x28
    [   35.043300]  bus_probe_device+0xa4/0xb0
    [   35.043308]  deferred_probe_work_func+0xa0/0xe0
    [   35.043318]  process_one_work+0x254/0x700
    [   35.043330]  worker_thread+0x4c/0x448
    [   35.043339]  kthread+0x19c/0x1a8
    [   35.043348]  ret_from_fork+0x10/0x20
    
    Shutdown Call trace:
    [  365.565417] Call trace:
    [  365.565423]  __switch_to+0x148/0x200
    [  365.565452]  __schedule+0x340/0x9c8
    [  365.565467]  schedule+0x48/0x110
    [  365.565479]  schedule_timeout+0x3b0/0x448
    [  365.565496]  wait_for_completion+0xac/0x138
    [  365.565509]  __flush_work+0x218/0x4e0
    [  365.565523]  flush_work+0x1c/0x28
    [  365.565536]  wait_for_device_probe+0x68/0x158
    [  365.565550]  device_shutdown+0x24/0x348
    [  365.565561]  kernel_restart_prepare+0x40/0x50
    [  365.565578]  kernel_restart+0x20/0x70
    [  365.565591]  __do_sys_reboot+0x10c/0x220
    [  365.565605]  __arm64_sys_reboot+0x2c/0x38
    [  365.565619]  invoke_syscall+0x4c/0x110
    [  365.565634]  el0_svc_common.constprop.3+0xfc/0x120
    [  365.565648]  do_el0_svc+0x2c/0x90
    [  365.565661]  el0_svc+0x4c/0xf0
    [  365.565671]  el0t_64_sync_handler+0x90/0xb8
    [  365.565682]  el0t_64_sync+0x180/0x184
    
    Signed-off-by: Padmanabha Srinivasaiah <treasure4paddy@gmail.com>
    Signed-off-by: Maxime Ripard <maxime@cerno.tech>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220118005127.29015-1-treasure4paddy@gmail.com
    treasure4paddy authored and mripard committed Jan 19, 2022
  12. dma-buf: drop excl_fence parameter from dma_resv_get_fences

    Returning the exclusive fence separately is no longer used.
    
    Instead add a write parameter to indicate the use case.
    
    Signed-off-by: Christian König <christian.koenig@amd.com>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20211207123411.167006-4-christian.koenig@amd.com
    ChristianKoenigAMD committed Jan 19, 2022
  13. drm/amdgpu: remove excl as shared workarounds

    This was added because of the now dropped shared on excl dependency.
    
    Signed-off-by: Christian König <christian.koenig@amd.com>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20211123142111.3885-15-christian.koenig@amd.com
    ChristianKoenigAMD committed Jan 19, 2022
  14. drm: move the buddy allocator from i915 into common drm

    Move the base i915 buddy allocator code into drm
    - Move i915_buddy.h to include/drm
    - Move i915_buddy.c to drm root folder
    - Rename "i915" string with "drm" string wherever applicable
    - Rename "I915" string with "DRM" string wherever applicable
    - Fix header file dependencies
    - Fix alignment issues
    - add Makefile support for drm buddy
    - export functions and write kerneldoc description
    - Remove i915 selftest config check condition as buddy selftest
      will be moved to drm selftest folder
    
    cleanup i915 buddy references in i915 driver module
    and replace with drm buddy
    
    v2:
      - include header file in alphabetical order(Thomas)
      - merged changes listed in the body section into a single patch
        to keep the build intact(Christian, Jani)
    
    v3:
      - make drm buddy a separate module(Thomas, Christian)
    
    v4:
      - Fix build error reported by kernel test robot <lkp@intel.com>
      - removed i915 buddy selftest from i915_mock_selftests.h to
        avoid build error
      - removed selftests/i915_buddy.c file as we create a new set of
        buddy test cases in drm/selftests folder
    
    v5:
      - Fix merge conflict issue
    
    v6:
      - replace drm_buddy_mm structure name as drm_buddy(Thomas, Christian)
      - replace drm_buddy_alloc() function name as drm_buddy_alloc_blocks()
        (Thomas)
      - replace drm_buddy_free() function name as drm_buddy_free_block()
        (Thomas)
      - export drm_buddy_free_block() function
      - fix multiple instances of KMEM_CACHE() entry
    
    v7:
      - fix warnings reported by kernel test robot <lkp@intel.com>
      - modify the license(Christian)
    
    v8:
      - fix warnings reported by kernel test robot <lkp@intel.com>
    
    Signed-off-by: Arunpravin <Arunpravin.PaneerSelvam@amd.com>
    Acked-by: Christian König <christian.koenig@amd.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220118104504.2349-1-Arunpravin.PaneerSelvam@amd.com
    Signed-off-by: Christian König <christian.koenig@amd.com>
    arunpravin24 authored and ChristianKoenigAMD committed Jan 19, 2022
  15. drm/i915/guc: Remove hacks for reset and schedule disable G2H being r…

    …eceived out of order
    
    In the i915 there are several hacks in place to make request cancellation
    work with an old version of the GuC which delivered the G2H indicating
    schedule disable is done before G2H indicating a context reset. Version
    69 fixes this, so we can remove these hacks.
    
    v2:
     (Checkpatch)
      - s/cancelation/cancellation
    
    Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
    Signed-off-by: Matthew Brost <matthew.brost@intel.com>
    Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220113181351.21296-3-matthew.brost@intel.com
    mbrost05 authored and johnharr-intel committed Jan 19, 2022
  16. drm/i915/selftests: Add a cancel request selftest that triggers a reset

    Add a cancel request selftest that results in an engine reset to cancel
    the request as it is non-preemptable. Also insert a NOP request after
    the cancelled request and confirm that it completes successfully.
    
    v2:
     (Tvrtko)
      - Skip test if preemption timeout compiled out
      - Skip test if engine reset isn't supported
      - Update debug prints to be more descriptive
    v3:
      - Add comment explaining test
    v4:
     (John Harrison)
      - Fix typos in comment explaining test
      - goto out_rq is NOP creation fails
    
    Signed-off-by: Matthew Brost <matthew.brost@intel.com>
    Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
    Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220113181351.21296-2-matthew.brost@intel.com
    mbrost05 authored and johnharr-intel committed Jan 19, 2022

Commits on Jan 18, 2022

  1. drm/i915: Remove short-term pins from execbuf, v6.

    Add a flag PIN_VALIDATE, to indicate we don't need to pin and only
    protected by the object lock.
    
    This removes the need to unpin, which is done by just releasing the
    lock.
    
    eb_reserve is slightly reworked for readability, but the same steps
    are still done:
    - First pass pins with NONBLOCK.
    - Second pass unbinds all objects first, then pins.
    - Third pass is only called when not all objects are softpinned, and
      unbinds all objects, then calls i915_gem_evict_vm(), then pins.
    
    Changes since v1:
    - Split out eb_reserve() into separate functions for readability.
    Changes since v2:
    - Make batch buffer mappable on platforms where only GGTT is available,
      to prevent moving the batch buffer during relocations.
    Changes since v3:
    - Preserve current behavior for batch buffer, instead be cautious when
      calling i915_gem_object_ggtt_pin_ww, and re-use the current batch vma
      if it's inside ggtt and map-and-fenceable.
    - Remove impossible condition check from eb_reserve. (Matt)
    Changes since v5:
    - Do not even temporarily pin, just call i915_gem_evict_vm() and mark
      all vma's as unpinned.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: Matthew Auld <matthew.auld@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220114132320.109030-7-maarten.lankhorst@linux.intel.com
    mlankhorst committed Jan 18, 2022
  2. drm/i915: Remove support for unlocked i915_vma unbind

    Now that we require the object lock for all ops, some code handling
    race conditions can be removed.
    
    This is required to not take short-term pins inside execbuf.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Acked-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
    Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220114132320.109030-6-maarten.lankhorst@linux.intel.com
    mlankhorst committed Jan 18, 2022
  3. drm/i915: Add i915_vma_unbind_unlocked, and take obj lock for i915_vm…

    …a_unbind, v2.
    
    We want to remove more members of i915_vma, which requires the locking to
    be held more often.
    
    Start requiring gem object lock for i915_vma_unbind, as it's one of the
    callers that may unpin pages.
    
    Some special care is needed when evicting, because the last reference to
    the object may be held by the VMA, so after __i915_vma_unbind, vma may be
    garbage, and we need to cache vma->obj before unlocking.
    
    Changes since v1:
    - Make trylock failing a WARN. (Matt)
    - Remove double i915_vma_wait_for_bind() (Matt)
    - Move atomic_set to right before mutex_unlock(), to make it more clear
      they belong together. (Matt)
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: Matthew Auld <matthew.william.auld@gmail.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220114132320.109030-5-maarten.lankhorst@linux.intel.com
    mlankhorst committed Jan 18, 2022
  4. drm/i915: Add object locking to i915_gem_evict_for_node and i915_gem_…

    …evict_something, v2.
    
    Because we will start to require the obj->resv lock for unbinding,
    ensure these vma eviction utility functions also take the lock.
    
    This requires some function signature changes, to ensure that the
    ww context is passed around, but is mostly straightforward.
    
    Previously this was split up into several patches, but reworking
    should allow for easier bisection.
    
    Changes since v1:
    - Handle evicting dead objects better.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220114132320.109030-4-maarten.lankhorst@linux.intel.com
    mlankhorst committed Jan 18, 2022
  5. drm/i915: Add locking to i915_gem_evict_vm(), v3.

    i915_gem_evict_vm will need to be able to evict objects that are
    locked by the current ctx. By testing if the current context already
    locked the object, we can do this correctly. This allows us to
    evict the entire vm even if we already hold some objects' locks.
    
    Previously, this was spread over several commits, but it makes
    more sense to commit the changes to i915_gem_evict_vm separately
    from the changes to i915_gem_evict_something() and
    i915_gem_evict_for_node().
    
    Changes since v1:
    - Handle evicting dead objects better.
    Changes since v2:
    - Use for_i915_gem_ww in igt_evict_vm. (Thomas)
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
    [mlankhorst: Fix up doc warning.]
    Link: https://patchwork.freedesktop.org/patch/msgid/20220117075604.131477-1-maarten.lankhorst@linux.intel.com
    mlankhorst committed Jan 18, 2022
  6. drm/i915: Call i915_gem_evict_vm in vm_fault_gtt to prevent new ENOSP…

    …C errors, v2.
    
    Now that we cannot unbind kill the currently locked object directly
    because we're removing short term pinning, we may have to unbind the
    object from gtt manually, using a i915_gem_evict_vm() call.
    
    Changes since v1:
    - Remove -ENOSPC warning, can still happen with concurrent mmaps
      where we can't unbind the other mmap because of the lock held.
      This  fixes the gem_mmap_gtt@cpuset tests.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220114132320.109030-2-maarten.lankhorst@linux.intel.com
    mlankhorst committed Jan 18, 2022
  7. Merge drm/drm-next into drm-intel-gt-next

    Maarten needs backmerge to account for header file renames/changes which
    landed via drm-intel-next and are interfering with his pinning work.
    
    Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
    tursulin committed Jan 18, 2022
  8. drm/virtio: Ensure that objs is not NULL in virtio_gpu_array_put_free()

    If virtio_gpu_object_shmem_init() fails (e.g. due to fault injection, as it
    happened in the bug report by syzbot), virtio_gpu_array_put_free() could be
    called with objs equal to NULL.
    
    Ensure that objs is not NULL in virtio_gpu_array_put_free(), or otherwise
    return from the function.
    
    Cc: stable@vger.kernel.org # 5.13.x
    Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
    Reported-by: syzbot+e9072e90624a31dfa85f@syzkaller.appspotmail.com
    Fixes: 377f833 ("drm/virtio: fix possible leak/unlock virtio_gpu_object_array")
    Link: http://patchwork.freedesktop.org/patch/msgid/20211213183122.838119-1-roberto.sassu@huawei.com
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    robertosassu authored and kraxel committed Jan 18, 2022
  9. udmabuf: validate ubuf->pagecount

    Syzbot has reported GPF in sg_alloc_append_table_from_pages(). The
    problem was in ubuf->pages == ZERO_PTR.
    
    ubuf->pagecount is calculated from arguments passed from user-space. If
    user creates udmabuf with list.size == 0 then ubuf->pagecount will be
    also equal to zero; it causes kmalloc_array() to return ZERO_PTR.
    
    Fix it by validating ubuf->pagecount before passing it to
    kmalloc_array().
    
    Fixes: fbb0de7 ("Add udmabuf misc device")
    Reported-and-tested-by: syzbot+2c56b725ec547fa9cb29@syzkaller.appspotmail.com
    Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
    Link: http://patchwork.freedesktop.org/patch/msgid/20211230142649.23022-1-paskripkin@gmail.com
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    pskrgag authored and kraxel committed Jan 18, 2022
  10. drm/i915: Nuke pointless middle men for skl+ plane programming

    There is no real point in having this two stage
    skl_program_plane*() vs. skl_plane_update*() wrapper stuff.
    All we need to do is determine the correct color plane and
    we're done.
    
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20211201152552.7821-15-ville.syrjala@linux.intel.com
    Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
    vsyrjala committed Jan 18, 2022
  11. drm/i915: Declutter color key register stuff

    Add a few small helpers to calculate the color key register
    values. Cleans up skl_program_plane_arm() a bit.
    
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20211201152552.7821-14-ville.syrjala@linux.intel.com
    Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
    vsyrjala committed Jan 18, 2022
  12. drm/i915: Extract skl_plane_aux_dist()

    Extract the PLANE_AUX_DIST stuff into a small helper to
    dclutter skl_program_plane_arm() a bit.
    
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20211201152552.7821-13-ville.syrjala@linux.intel.com
    Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
    vsyrjala committed Jan 18, 2022
  13. drm/i915: Clean up cursor registers

    Use REG_BIT() & co. to polish the cursor plane registers.
    
    v2: deal with gvt
    
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20211201152552.7821-12-ville.syrjala@linux.intel.com
    Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
    vsyrjala committed Jan 18, 2022
Older