• Jamie Fox's avatar
    drm/malidp: Enable MMU prefetch on Mali-DP650 · 1f23a56a
    Jamie Fox authored
    Mali-DP650 supports warming up the SMMU translations, by sending
    requsts to the SMMU before a buffer is read.
    
    There are two modes supported:
    
    - PARTIAL: could be enabled when the buffer is composed of 4K or 64K
      pages, the display hardware will send a configurable number of
      requests before the actual reading.
    
    - FULL: could be enabled when the buffer is composed of 1M or 2M
      pages, the display hardware will send requests before reading for
      all pages composing the buffer.
    
    This patch adds a mechanism for detecting the page size and set the
    MMU prefetch mode if possible.
    
    Changes since v1:
     - For imported buffers use the already populated
       drm_gem_cma_object.sgt instead of calling
       driver.gem_prime_get_sg_table, which works just for buffers
       allocated through the gem_cma API.
    Signed-off-by: default avatarJamie Fox <jamie.fox@arm.com>
    Signed-off-by: default avatarAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
    Acked-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
    [rebased and re-ordered functions]
    Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
    1f23a56a
malidp_planes.c 21.5 KB