Skip to content
  1. May 27, 2021
  2. May 26, 2021
  3. May 25, 2021
    • Andrey Grodzovsky's avatar
      drm/amdgpu: Fix crash when hot unplug in BACO · e1543d83
      Andrey Grodzovsky authored
      
      
      Problem:
      When device goes into runtime suspend due to prolonged
      inactivity (e.g. BACO sleep) and then hot unplugged,
      PCI core will try to wake up the device as part of
      unplug process. Since the device is gone all HW
      programming during rpm resume fails leading
      to a bad SW state later during pci remove handling.
      
      Fix:
      Use a flag we use for PCIe error recovery to avoid
      accessing registres. This allows to successfully complete
      rpm resume sequence and finish pci remove.
      
      v2: Renamed HW access block flag
      
      Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1081
      Link: https://patchwork.freedesktop.org/patch/msgid/20210521204122.762288-2-andrey.grodzovsky@amd.com
      e1543d83
    • Andrey Grodzovsky's avatar
      drm/amdgpu: Rename flag which prevents HW access · 7afefb81
      Andrey Grodzovsky authored
      
      
      Make it's name not feature but function descriptive.
      
      Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210521204122.762288-1-andrey.grodzovsky@amd.com
      7afefb81
    • Paul Cercueil's avatar
      drm/ingenic: Add option to alloc cached GEM buffers · 4a791cb6
      Paul Cercueil authored
      
      
      Alloc GEM buffers backed by noncoherent memory on SoCs where it is
      actually faster than write-combine.
      
      This dramatically speeds up software rendering on these SoCs, even for
      tasks where write-combine memory should in theory be faster (e.g. simple
      blits).
      
      v3: The option is now selected per-SoC instead of being a module
          parameter.
      
      v5: - Fix drm_atomic_get_new_plane_state() used to retrieve the old
            state
          - Use custom drm_gem_fb_create()
          - Only check damage clips and sync DMA buffers if non-coherent
            buffers are used
      
      Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210523170415.90410-4-paul@crapouillou.net
      4a791cb6
    • Paul Cercueil's avatar
      drm: Add and export function drm_fb_cma_sync_non_coherent · b0906904
      Paul Cercueil authored
      
      
      This function can be used by drivers that use damage clips and have
      CMA GEM objects backed by non-coherent memory. Calling this function
      in a plane's .atomic_update ensures that all the data in the backing
      memory have been written to RAM.
      
      v3: - Only sync data if using GEM objects backed by non-coherent memory.
          - Use a drm_device pointer instead of device pointer in prototype
      
      v5: - Rename to drm_fb_cma_sync_non_coherent
          - Invert loops for better cache locality
          - Only sync BOs that have the non-coherent flag
          - Move to drm_fb_cma_helper.c to avoid circular dependency
      
      Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210523170415.90410-3-paul@crapouillou.net
      b0906904
    • Paul Cercueil's avatar
      drm: Add support for GEM buffers backed by non-coherent memory · cf8ccbc7
      Paul Cercueil authored
      
      
      Having GEM buffers backed by non-coherent memory is interesting in the
      particular case where it is faster to render to a non-coherent buffer
      then sync the data cache, than to render to a write-combine buffer, and
      (by extension) much faster than using a shadow buffer. This is true for
      instance on some Ingenic SoCs, where even simple blits (e.g. memcpy)
      are about three times faster using this method.
      
      Add a 'map_noncoherent' flag to the drm_gem_cma_object structure, which
      can be set by the drivers when they create the dumb buffer.
      
      Since this really only applies to software rendering, disable this flag
      as soon as the CMA objects are exported via PRIME.
      
      v3: New patch. Now uses a simple 'map_noncoherent' flag to control how
          the objects are mapped, and use the new dma_mmap_pages function.
      
      v4: Make sure map_noncoherent is always disabled when creating GEM
          objects meant to be used with dma-buf.
      
      Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210523170415.90410-2-paul@crapouillou.net
      cf8ccbc7
    • Zou Wei's avatar
      drm/vc4: hdmi: Fix PM reference leak in vc4_hdmi_encoder_pre_crtc_co() · 5e4322a8
      Zou Wei authored
      
      
      pm_runtime_get_sync will increment pm usage counter even it failed.
      Forgetting to putting operation will result in reference leak here.
      Fix it by replacing it with pm_runtime_resume_and_get to keep usage
      counter balanced.
      
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarZou Wei <zou_wei@huawei.com>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/1621840854-105978-1-git-send-email-zou_wei@huawei.com
      5e4322a8
    • Douglas Anderson's avatar
      drm/panel: panel-simple: Add missing pm_runtime_dont_use_autosuspend() calls · a596fcd9
      Douglas Anderson authored
      The PM Runtime docs specifically call out the need to call
      pm_runtime_dont_use_autosuspend() in the remove() callback if
      pm_runtime_use_autosuspend() was called in probe():
      
      > Drivers in ->remove() callback should undo the runtime PM changes done
      > in ->probe(). Usually this means calling pm_runtime_disable(),
      > pm_runtime_dont_use_autosuspend() etc.
      
      We should do this. This fixes a warning splat that I saw when I was
      testing out the panel-simple's remove().
      
      Fixes: 3235b0f2
      
       ("drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare")
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210517130450.v7.1.I9e947183e95c9bd067c9c1d51208ac6a96385139@changeid
      a596fcd9
  4. May 24, 2021