Commit 476e9320 authored by Thierry Reding's avatar Thierry Reding
Browse files

drm/tegra: gem: Add a clarifying comment



Clarify when a fixed IOV address can be used and when a buffer has to
be mapped before the IOVA can be used.

Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 4def888d
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -119,6 +119,14 @@ static int tegra_dc_pin(struct tegra_dc *dc, struct tegra_plane_state *state)
		dma_addr_t phys_addr, *phys;
		dma_addr_t phys_addr, *phys;
		struct sg_table *sgt;
		struct sg_table *sgt;


		/*
		 * If we're not attached to a domain, we already stored the
		 * physical address when the buffer was allocated. If we're
		 * part of a group that's shared between all display
		 * controllers, we've also already mapped the framebuffer
		 * through the SMMU. In both cases we can short-circuit the
		 * code below and retrieve the stored IOV address.
		 */
		if (!domain || dc->client.group)
		if (!domain || dc->client.group)
			phys = &phys_addr;
			phys = &phys_addr;
		else
		else