linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/3] fb.h: Provide alternate screen_base pointer
@ 2015-10-07  7:20 Lars Svensson
  2015-10-07  7:20 ` [PATCH v3 2/3] staging: fbtft: use alternate screen pointer Lars Svensson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Lars Svensson @ 2015-10-07  7:20 UTC (permalink / raw)
  To: thomas.petazzoni, noralf, plagnioj, tomi.valkeinen
  Cc: linux-fbdev, gregkh, devel, linux-kernel, dan.carpenter,
	Lars Svensson

Some drivers use member screen_base of struct fb_info to store non-
__iomem pointers, creating the need for ugly __force typecasts to
avoid sparse warnings. This adds an alternate pointer without the
__iomem qualifyer for this use.

Signed-off-by: Lars Svensson <lars1.svensson@sonymobile.com>
---
Patch v3: bugfix in fbtft-bus.c:fbtft_write_vmem16_bus9() in
a separate commit.
---
 include/linux/fb.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/fb.h b/include/linux/fb.h
index bc9afa7..41a3b11 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -483,7 +483,10 @@ struct fb_info {
 #ifdef CONFIG_FB_TILEBLITTING
 	struct fb_tile_ops *tileops;    /* Tile Blitting */
 #endif
-	char __iomem *screen_base;	/* Virtual address */
+	union {
+		char __iomem *screen_base;	/* Virtual address */
+		char *screen_buffer;
+	};
 	unsigned long screen_size;	/* Amount of ioremapped VRAM or 0 */ 
 	void *pseudo_palette;		/* Fake palette of 16 colors */ 
 #define FBINFO_STATE_RUNNING	0
-- 
2.4.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-07  7:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07  7:20 [PATCH v3 1/3] fb.h: Provide alternate screen_base pointer Lars Svensson
2015-10-07  7:20 ` [PATCH v3 2/3] staging: fbtft: use alternate screen pointer Lars Svensson
2015-10-07  7:20 ` [PATCH v3 3/3] staging: fbtft: access screen buffer directly Lars Svensson
2015-10-07  7:42 ` [PATCH v3 1/3] fb.h: Provide alternate screen_base pointer Dan Carpenter

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).