1. 18 Sep, 2020 2 commits
  2. 17 Sep, 2020 14 commits
  3. 16 Sep, 2020 8 commits
  4. 15 Sep, 2020 14 commits
  5. 14 Sep, 2020 2 commits
    • Paul Cercueil's avatar
      gpu/drm: ingenic: Add option to mmap GEM buffers cached · 37054fc8
      Paul Cercueil authored
      Ingenic SoCs are most notably used in cheap chinese handheld gaming
      consoles. There, the games and applications generally render in software
      directly into GEM buffers.
      
      Traditionally, GEM buffers are mapped write-combine. Writes to the
      buffer are accelerated, and reads are slow. Application doing lots of
      alpha-blending paint inside shadow buffers, which is then memcpy'd into
      the final GEM buffer.
      
      On recent Ingenic SoCs however, it is much faster to have a fully cached
      GEM buffer, in which applications paint directly, and whose data is
      invalidated before scanout, than having a write-combine GEM buffer, even
      when alpha blending is not used.
      
      Add an optional 'cached_gem_buffers' parameter to the ingenic-drm driver
      to allow GEM buffers to be mapped fully-cached, in order to speed up
      software rendering.
      
      v2: Use standard noncoherent DMA APIs
      
      v3: Use damage clips instead of invalidating full frames
      
      v4: Avoid dma_pgprot() which is not exported. Using vm_get_page_prot()
          is enough in this case.
      
      v5:
      - Avoid calling drm_gem_cma_prime_mmap(). It has the side effect that an
        extra object reference is obtained, which causes our dumb buffers to
        never be freed. It should have been drm_gem_cma_mmap_obj(). However,
        our custom mmap function only differs with one flag, so we can cleanly
        handle both modes in ingenic_drm_gem_mmap().
      - Call drm_gem_vm_close() if drm_mmap_attrs() failed, just like in
        drm_gem_cma_mmap_obj().
      Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200912195639.176001-1-paul@crapouillou.net
      37054fc8
    • Ville Syrjälä's avatar
      drm/i915: Drop the drm_atomic_helper_calc_timestamping_constants() call · 79628c54
      Ville Syrjälä authored
      We update the timestamping constants per-crtc explicitly in
      intel_crtc_update_active_timings(). Furtermore the helper will
      use uapi.adjusted_mode whereas we want hw.adjusted_mode. Thus
      let's drop the helper call an rely on what we already have in
      intel_crtc_update_active_timings(). We can now also drop the
      hw.adjusted_mode -> uapi.adjusted_mode copy hack that was added
      to keep the helper from deriving the timestamping constants from
      the wrong thing.
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200907120026.6360-3-ville.syrjala@linux.intel.comReviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      79628c54