1. 07 Oct, 2021 3 commits
    • Laurent Pinchart's avatar
      drm: rcar-du: Set the DMA coherent mask for the DU device · 780d4223
      Laurent Pinchart authored
      The DU DMA address space is limited to 32 bits, so the DMA coherent mask
      should be set accordingly. The DMA mapping implementation will
      transparently map high memory buffers to 32-bit addresses through an
      IOMMU when present (or through bounce buffers otherwise, which isn't a
      supported use case as performances would be terrible).
      
      However, when sourcing frames from a VSP, the situation is more
      complicated. The DU delegates all memory accesses to the VSP and doesn't
      perform any DMA access by itself. Due to how the GEM CMA helpers are
      structured buffers are still mapped to the DU device. They are later
      mapped to the VSP as well to perform DMA access, through the IOMMU
      connected to the VSP.
      
      Setting the DMA coherent mask to 32 bits for the DU when using a VSP can
      cause issues when importing a dma_buf. If the buffer is located above
      the 32-bit address space, the DMA mapping implementation will try to map
      it to the DU's DMA address space. As the DU has no IOMMU a bounce buffer
      will be allocated, which in the best case will waste memory and in the
      worst case will just fail.
      
      To work around this issue, set the DMA coherent mask to the full 40-bit
      address space for the DU. All dma-buf instances will be imported without
      any restriction, and will be mapped to the VSP when preparing the
      associated framebuffer.
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Reviewed-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
      780d4223
    • Laurent Pinchart's avatar
      drm: rcar-du: Improve kernel log messages when initializing encoders · 206c5471
      Laurent Pinchart authored
      Improve the debugging and error messages printing when initializing
      encoders by replacing the output number by the output name, printing the
      bridge OF node name, and the error code of failed operations.
      
      While at it, move the related rcar_du_output enumeration from
      rcar_du_crtc.h to rcar_du_drv.h as it's not specific to the CRTC.
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      206c5471
    • Laurent Pinchart's avatar
      drm: rcar-du: Don't create encoder for unconnected LVDS outputs · 187502af
      Laurent Pinchart authored
      On R-Car D3 and E3, the LVDS encoders provide the pixel clock to the DU,
      even when LVDS outputs are not used. For this reason, the rcar-lvds
      driver probes successfully on those platforms even if no further bridge
      or panel is connected to the LVDS output, in order to provide the
      rcar_lvds_clk_enable() and rcar_lvds_clk_disable() functions to the DU
      driver.
      
      If an LVDS output isn't connected, trying to create a DRM connector for
      the output will fail. Fix this by skipping connector creation in that
      case, and also skip creation of the DRM encoder as there's no point in
      an encoder without a connector.
      
      Fixes: e9e05694 ("drm: rcar-du: lvds: Convert to DRM panel bridge helper")
      Reported-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Tested-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      187502af
  2. 28 Sep, 2021 1 commit
  3. 24 Sep, 2021 1 commit
  4. 23 Sep, 2021 35 commits