• Lucas Stach's avatar
    drm/etnaviv: add DMA configuration for etnaviv platform device · 1a866306
    Lucas Stach authored
    The etnaviv device is a virtual device backing the DRM device, which may
    drive multiple hardware GPU core devices. As most of the dma-mapping handling
    is done through the virtual device, we need to make sure that a proper DMA
    setup is in place. The easiest way to get a reasonable configuration is
    to let the virtual device share the DMA configuration with one of the GPU
    devices, so call of_dma_configure() with the right parameters manually.
    
    This assumes that all etnaviv driven GPU devices in the system share the
    same DMA configuration. If we ever encounter a SoC where the GPUs are on
    busses with different offsets or behind different IOMMUs that will require
    much deeper changes to the driver, as we would need to implement etnaviv
    specific versions of most of the DRM helper functions.
    
    For now we should be fine with this solution.
    Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
    Tested-by: default avatarGuido Günther <agx@sigxcpu.org>
    Tested-by: default avatarEugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
    1a866306
etnaviv_drv.c 16.3 KB