diff options
author | Thierry Reding <treding@nvidia.com> | 2021-07-09 18:55:18 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-08-13 18:23:32 +0200 |
commit | ff41dd274858436f35bd20abc76f3f3b65ea6872 (patch) | |
tree | 2cc46a725b5f82112393364576b1a73bab021352 /drivers/gpu/host1x | |
parent | ad85b0843ee4536593415ca890d7fb52cd7f1fbe (diff) | |
download | linux-ff41dd274858436f35bd20abc76f3f3b65ea6872.tar.gz linux-ff41dd274858436f35bd20abc76f3f3b65ea6872.tar.bz2 linux-ff41dd274858436f35bd20abc76f3f3b65ea6872.zip |
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 <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r-- | drivers/gpu/host1x/hw/debug_hw.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c index 35952fd5597e..387ac102ff90 100644 --- a/drivers/gpu/host1x/hw/debug_hw.c +++ b/drivers/gpu/host1x/hw/debug_hw.c @@ -156,9 +156,9 @@ static unsigned int show_channel_command(struct output *o, u32 val, } } -static void show_gather(struct output *o, phys_addr_t phys_addr, +static void show_gather(struct output *o, dma_addr_t phys_addr, unsigned int words, struct host1x_cdma *cdma, - phys_addr_t pin_addr, u32 *map_addr) + dma_addr_t pin_addr, u32 *map_addr) { /* Map dmaget cursor to corresponding mem handle */ u32 offset = phys_addr - pin_addr; @@ -176,11 +176,11 @@ static void show_gather(struct output *o, phys_addr_t phys_addr, } for (i = 0; i < words; i++) { - u32 addr = phys_addr + i * 4; + dma_addr_t addr = phys_addr + i * 4; u32 val = *(map_addr + offset / 4 + i); if (!data_count) { - host1x_debug_output(o, "%08x: %08x: ", addr, val); + host1x_debug_output(o, "%pad: %08x: ", &addr, val); data_count = show_channel_command(o, val, &payload); } else { host1x_debug_cont(o, "%08x%s", val, |