diff options
author | Thierry Reding <treding@nvidia.com> | 2019-10-28 15:37:17 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2019-10-29 17:04:36 +0300 |
commit | 2e8d8749f6f9bb35b947228271dc9ec31be93335 (patch) | |
tree | 0aea36f156eaf878dbfad48ee9caf8f84b953537 /drivers/gpu/drm/tegra/plane.h | |
parent | d972d6247628054f4a9f05c084a1f52de9df209d (diff) | |
download | linux-2e8d8749f6f9bb35b947228271dc9ec31be93335.tar.xz |
drm/tegra: Support DMA API for display controllers
If a display controller is not attached to an explicit IOMMU domain,
which usually means that it's connected to an IOMMU domain controlled by
the DMA API, make sure to map the framebuffer to the display controller
address space. This allows us to transparently handle setups where the
display controller is attached to an IOMMU or setups where it isn't. It
also allows the driver to work with a DMA API that is backed by an
IOMMU.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/plane.h')
-rw-r--r-- | drivers/gpu/drm/tegra/plane.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/plane.h b/drivers/gpu/drm/tegra/plane.h index 510c394e6d9a..a158a915109a 100644 --- a/drivers/gpu/drm/tegra/plane.h +++ b/drivers/gpu/drm/tegra/plane.h @@ -39,6 +39,9 @@ struct tegra_plane_legacy_blending_state { struct tegra_plane_state { struct drm_plane_state base; + struct sg_table *sgt[3]; + dma_addr_t iova[3]; + struct tegra_bo_tiling tiling; u32 format; u32 swap; @@ -61,6 +64,11 @@ to_tegra_plane_state(struct drm_plane_state *state) extern const struct drm_plane_funcs tegra_plane_funcs; +int tegra_plane_prepare_fb(struct drm_plane *plane, + struct drm_plane_state *state); +void tegra_plane_cleanup_fb(struct drm_plane *plane, + struct drm_plane_state *state); + int tegra_plane_state_add(struct tegra_plane *plane, struct drm_plane_state *state); |