xref: /haiku/src/system/boot/arch/ppc/arch_framebuffer.h (revision 72ddc912a60b1d172902bee43743a72e6e403247)
1 /*
2  * Copyright 2011-2012 Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Alexander von Gluck IV, kallisti5@unixzen.com
7  */
8 #ifndef _ARCH_FRAMEBUFFER_H
9 #define _ARCH_FRAMEBUFFER_H
10 
11 
12 #include <boot/platform.h>
13 #include <SupportDefs.h>
14 
15 
16 #define TRACE_VIDEO
17 #ifdef TRACE_VIDEO
18 #   define TRACE(x...) dprintf(x)
19 #	define CALLED() dprintf("%s()\n", __func__);
20 #else
21 #   define TRACE(x...) ;
22 #	define CALLED() ;
23 #endif
24 #define ERROR(x...) dprintf(x)
25 
26 
27 class ArchFramebuffer {
28 public:
ArchFramebuffer(addr_t base)29 							ArchFramebuffer(addr_t base)
30 								:
31 								fBase(base) {};
~ArchFramebuffer()32 							~ArchFramebuffer() {};
33 
Init()34 	virtual status_t		Init() { return B_OK; };
Probe()35 	virtual status_t		Probe() { return B_OK; };
SetDefaultMode()36 	virtual status_t		SetDefaultMode() { return B_OK; };
SetVideoMode(int width,int height,int depth)37 	virtual status_t		SetVideoMode(int width, int height, int depth)
38 								{ return B_OK; };
39 
Base()40 	virtual addr_t			Base() { return fBase; };
PhysicalBase()41 			phys_addr_t		PhysicalBase() { return fPhysicalBase; };
Size()42 			size_t			Size() { return fSize; };
43 
Width()44 			int				Width() { return fCurrentWidth; };
Height()45 			int				Height() { return fCurrentHeight; };
Depth()46 			int				Depth() { return fCurrentDepth; };
BytesPerRow()47 			int				BytesPerRow() { return fCurrentBytesPerRow; };
48 
49 protected:
50 			addr_t			fBase;
51 			phys_addr_t			fPhysicalBase;
52 			size_t			fSize;
53 			int				fCurrentWidth;
54 			int				fCurrentHeight;
55 			int				fCurrentDepth;
56 			int				fCurrentBytesPerRow;
57 };
58 
59 
60 #endif /* _ARCH_FRAMEBUFFER_H */
61