summary'>refsloglog'>tree'>commitdiffstats
path: '>root//'>sys-kernel/boest-v5.1.1//raspberrypi/'>0165-gpu-vc4_firmware_kms-Fix-up-64-bit-compile-warnings.patch
blob: 6ed46bb7f645eaa1624e2d5f8000afb2de6a240a (plain) (blame) )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
From a6f738598b6ae3b0d8a8d8dcb61bcf9119a29040 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Mon, 28 Jan 2019 14:40:16 +0000
Subject: [PATCH 165/185] gpu: vc4_firmware_kms: Fix up 64 bit compile
 warnings.

Resolve two build warnings with regard using incorrectly
sized parameters in logging messages on 64 bit builds.


Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
---
 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)


diff --git a/drivers/gpu/drm/vc4/vc4_firmware_kms.c b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
index 347ad72682dc..85e273665836 100644
--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
@@ -161,14 +161,14 @@ static void vc4_primary_plane_atomic_update(struct drm_plane *plane,
 		WARN_ON_ONCE(vc4_plane->pitch != fb->pitches[0]);
 	}

 
-	DRM_DEBUG_ATOMIC("[PLANE:%d:%s] primary update %dx%d@%d +%d,%d 0x%08x/%d\n",
+	DRM_DEBUG_ATOMIC("[PLANE:%d:%s] primary update %dx%d@%d +%d,%d 0x%pad/%d\n",
 			 plane->base.id, plane->name,
 			 state->crtc_w,
 			 state->crtc_h,
 			 bpp,
 			 state->crtc_x,
 			 state->crtc_y,
-			 bo->paddr + fb->offsets[0],
+			 &fbinfo->base,
 			 fb->pitches[0]);

 
 	ret = rpi_firmware_transaction(vc4->firmware,
@@ -198,6 +198,7 @@ static void vc4_cursor_plane_atomic_update(struct drm_plane *plane,
 	struct vc4_crtc *vc4_crtc = to_vc4_crtc(state->crtc);
 	struct drm_framebuffer *fb = state->fb;
 	struct drm_gem_cma_object *bo = drm_fb_cma_get_gem_obj(fb, 0);
+	dma_addr_t addr = bo->paddr + fb->offsets[0];
 	int ret;
 	u32 packet_state[] = {
 		state->crtc->state->active,
@@ -207,13 +208,13 @@ static void vc4_cursor_plane_atomic_update(struct drm_plane *plane,
 	};
 	WARN_ON_ONCE(fb->pitches[0] != state->crtc_w * 4);

 
-	DRM_DEBUG_ATOMIC("[PLANE:%d:%s] update %dx%d cursor at %d,%d (0x%08x/%d)",
+	DRM_DEBUG_ATOMIC("[PLANE:%d:%s] update %dx%d cursor at %d,%d (0x%pad/%d)",
 			 plane->base.id, plane->name,
 			 state->crtc_w,
 			 state->crtc_h,
 			 state->crtc_x,
 			 state->crtc_y,
-			 bo->paddr + fb->offsets[0],
+			 &addr,
 			 fb->pitches[0]);

 
 	/* add on the top/left offsets when overscan is active */
@@ -239,7 +240,7 @@ static void vc4_cursor_plane_atomic_update(struct drm_plane *plane,
 	    fb != old_state->fb) {
 		u32 packet_info[] = { state->crtc_w, state->crtc_h,
 				      0, /* unused */
-				      bo->paddr + fb->offsets[0],
+				      addr,
 				      0, 0, /* hotx, hoty */};

 
 		ret = rpi_firmware_property(vc4->firmware,