Skip to content

Commit ff41dd2

Browse files
committed
gpu: host1x: debug: Use dma_addr_t more consistently
The host1x debug code uses a mix of phys_addr_t, dma_addr_t and u32 to represent addresses. However, these addresses are always DMA addresses so use the appropriate type. This fixes some issues with how these addresses are displayed, because they could be truncated in some cases and not show the full address. Signed-off-by: Thierry Reding <[email protected]>
1 parent ad85b08 commit ff41dd2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/host1x/hw/debug_hw.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ static unsigned int show_channel_command(struct output *o, u32 val,
156156
}
157157
}
158158

159-
static void show_gather(struct output *o, phys_addr_t phys_addr,
159+
static void show_gather(struct output *o, dma_addr_t phys_addr,
160160
unsigned int words, struct host1x_cdma *cdma,
161-
phys_addr_t pin_addr, u32 *map_addr)
161+
dma_addr_t pin_addr, u32 *map_addr)
162162
{
163163
/* Map dmaget cursor to corresponding mem handle */
164164
u32 offset = phys_addr - pin_addr;
@@ -176,11 +176,11 @@ static void show_gather(struct output *o, phys_addr_t phys_addr,
176176
}
177177

178178
for (i = 0; i < words; i++) {
179-
u32 addr = phys_addr + i * 4;
179+
dma_addr_t addr = phys_addr + i * 4;
180180
u32 val = *(map_addr + offset / 4 + i);
181181

182182
if (!data_count) {
183-
host1x_debug_output(o, "%08x: %08x: ", addr, val);
183+
host1x_debug_output(o, "%pad: %08x: ", &addr, val);
184184
data_count = show_channel_command(o, val, &payload);
185185
} else {
186186
host1x_debug_cont(o, "%08x%s", val,

0 commit comments

Comments
 (0)