Skip to content

Commit 476e932

Browse files
committed
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: Thierry Reding <[email protected]>
1 parent 4def888 commit 476e932

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/gpu/drm/tegra/plane.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ static int tegra_dc_pin(struct tegra_dc *dc, struct tegra_plane_state *state)
119119
dma_addr_t phys_addr, *phys;
120120
struct sg_table *sgt;
121121

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

0 commit comments

Comments
 (0)