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
27class ArchFramebuffer {
28public:
29							ArchFramebuffer(addr_t base)
30								:
31								fBase(base) {};
32							~ArchFramebuffer() {};
33
34	virtual status_t		Init() { return B_OK; };
35	virtual status_t		Probe() { return B_OK; };
36	virtual status_t		SetDefaultMode() { return B_OK; };
37	virtual status_t		SetVideoMode(int width, int height, int depth)
38								{ return B_OK; };
39
40	virtual addr_t			Base() { return fBase; };
41			phys_addr_t		PhysicalBase() { return fPhysicalBase; };
42			size_t			Size() { return fSize; };
43
44			int				Width() { return fCurrentWidth; };
45			int				Height() { return fCurrentHeight; };
46			int				Depth() { return fCurrentDepth; };
47			int				BytesPerRow() { return fCurrentBytesPerRow; };
48
49protected:
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