* [PATCH] drm: sun4i: fix LPAE warnings
@ 2016-06-03 16:57 Andre Przywara
2016-06-03 17:28 ` Thierry Reding
2016-06-06 13:06 ` Arnd Bergmann
0 siblings, 2 replies; 3+ messages in thread
From: Andre Przywara @ 2016-06-03 16:57 UTC (permalink / raw)
To: Maxime Ripard, David Airlie
Cc: Chen-Yu Tsai, dri-devel, linux-arm-kernel, linux-kernel
When the sun4i DRM driver is compiled with LPAE enabled, dma_addr_t turns
into a 64-bit type, which causes warnings with some debug printks:
=================
In file included from
drivers/gpu/drm/sun4i/sun4i_backend.c:13::
drivers/gpu/drm/sun4i/sun4i_backend.c: In function 'sun4i_backend_update_layer_buffer':
drivers/gpu/drm/sun4i/sun4i_backend.c:193:19: warning:
format '%x' expects argument of type 'unsigned int', but argument 3 has
type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]
DRM_DEBUG_DRIVER("Using GEM @ 0x%x\n", gem->paddr);
^
include/drm/drmP.h:207:34: note: in definition of macro
'DRM_DEBUG_DRIVER'
drm_ut_debug_printk(__func__, fmt, ##args); \
.....
Use the proper printk format specifier [1] for dma_addr_t which takes
care of those differences.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
[1] Documentation/printk-formats.txt
---
drivers/gpu/drm/sun4i/sun4i_backend.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c
index f7a15c1..2568e7d 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.c
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.c
@@ -190,7 +190,7 @@ int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend,
/* Get the physical address of the buffer in memory */
gem = drm_fb_cma_get_gem_obj(fb, 0);
- DRM_DEBUG_DRIVER("Using GEM @ 0x%x\n", gem->paddr);
+ DRM_DEBUG_DRIVER("Using GEM @ 0x%pad\n", &gem->paddr);
/* Compute the start of the displayed memory */
bpp = drm_format_plane_cpp(fb->pixel_format, 0);
@@ -198,7 +198,7 @@ int sun4i_backend_update_layer_buffer(struct sun4i_backend *backend,
paddr += (state->src_x >> 16) * bpp;
paddr += (state->src_y >> 16) * fb->pitches[0];
- DRM_DEBUG_DRIVER("Setting buffer address to 0x%x\n", paddr);
+ DRM_DEBUG_DRIVER("Setting buffer address to 0x%pad\n", &paddr);
/* Write the 32 lower bits of the address (in bits) */
lo_paddr = paddr << 3;
--
2.8.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: sun4i: fix LPAE warnings
2016-06-03 16:57 [PATCH] drm: sun4i: fix LPAE warnings Andre Przywara
@ 2016-06-03 17:28 ` Thierry Reding
2016-06-06 13:06 ` Arnd Bergmann
1 sibling, 0 replies; 3+ messages in thread
From: Thierry Reding @ 2016-06-03 17:28 UTC (permalink / raw)
To: Andre Przywara
Cc: Maxime Ripard, David Airlie, Chen-Yu Tsai, linux-arm-kernel,
dri-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]
On Fri, Jun 03, 2016 at 05:57:31PM +0100, Andre Przywara wrote:
> When the sun4i DRM driver is compiled with LPAE enabled, dma_addr_t turns
> into a 64-bit type, which causes warnings with some debug printks:
> =================
> In file included from
> drivers/gpu/drm/sun4i/sun4i_backend.c:13::
> drivers/gpu/drm/sun4i/sun4i_backend.c: In function 'sun4i_backend_update_layer_buffer':
> drivers/gpu/drm/sun4i/sun4i_backend.c:193:19: warning:
> format '%x' expects argument of type 'unsigned int', but argument 3 has
> type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]
> DRM_DEBUG_DRIVER("Using GEM @ 0x%x\n", gem->paddr);
> ^
> include/drm/drmP.h:207:34: note: in definition of macro
> 'DRM_DEBUG_DRIVER'
> drm_ut_debug_printk(__func__, fmt, ##args); \
> .....
>
> Use the proper printk format specifier [1] for dma_addr_t which takes
> care of those differences.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>
> [1] Documentation/printk-formats.txt
> ---
> drivers/gpu/drm/sun4i/sun4i_backend.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: sun4i: fix LPAE warnings
2016-06-03 16:57 [PATCH] drm: sun4i: fix LPAE warnings Andre Przywara
2016-06-03 17:28 ` Thierry Reding
@ 2016-06-06 13:06 ` Arnd Bergmann
1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-06-06 13:06 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Andre Przywara, Maxime Ripard, David Airlie, Chen-Yu Tsai,
dri-devel, linux-kernel
On Friday, June 3, 2016 5:57:31 PM CEST Andre Przywara wrote:
> When the sun4i DRM driver is compiled with LPAE enabled, dma_addr_t turns
> into a 64-bit type, which causes warnings with some debug printks:
> =================
> In file included from
> drivers/gpu/drm/sun4i/sun4i_backend.c:13::
> drivers/gpu/drm/sun4i/sun4i_backend.c: In function 'sun4i_backend_update_layer_buffer':
> drivers/gpu/drm/sun4i/sun4i_backend.c:193:19: warning:
> format '%x' expects argument of type 'unsigned int', but argument 3 has
> type 'dma_addr_t {aka long long unsigned int}' [-Wformat=]
> DRM_DEBUG_DRIVER("Using GEM @ 0x%x\n", gem->paddr);
> ^
> include/drm/drmP.h:207:34: note: in definition of macro
> 'DRM_DEBUG_DRIVER'
> drm_ut_debug_printk(__func__, fmt, ##args); \
> .....
>
> Use the proper printk format specifier [1] for dma_addr_t which takes
> care of those differences.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>
I submitted the same patch a month ago, and it's already in linux-next,
I assume it will show up in mainline soon.
arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-06 22:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-03 16:57 [PATCH] drm: sun4i: fix LPAE warnings Andre Przywara
2016-06-03 17:28 ` Thierry Reding
2016-06-06 13:06 ` Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).