xref: /haiku/src/add-ons/accelerants/intel_extreme/Pipes.h (revision 4241437c836d96957da142f0263cb7f6a4056b01)
1 /*
2  * Copyright 2011-2015, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Michael Lotz, mmlr@mlotz.ch
7  *		Alexander von Gluck IV, kallisti5@unixzen.com
8  */
9 #ifndef INTEL_PIPE_H
10 #define INTEL_PIPE_H
11 
12 
13 #include <edid.h>
14 
15 #include "intel_extreme.h"
16 
17 #include "pll.h"
18 #include "FlexibleDisplayInterface.h"
19 
20 
21 #define MAX_PIPES	2
22 
23 
24 void program_pipe_color_modes(uint32 colorMode);
25 
26 //class FDILink;
27 //class PanelFitter;
28 
29 class Pipe {
30 public:
31 									Pipe(pipe_index pipeIndex);
32 									~Pipe();
33 
34 		pipe_index					Index()
35 										{ return fPipeIndex; }
36 
37 		bool						IsEnabled();
38 		void						Enable(bool enable);
39 		void						Disable();
40 
41 		void						Configure(display_mode* mode);
42 		void						ConfigureTimings(display_mode* mode);
43 		void						ConfigureClocks(
44 										const pll_divisors& divisors,
45 										uint32 pixelClock,
46 										uint32 extraFlags);
47 
48 		// access to the various parts of the pipe
49 		::FDILink*					FDI()
50 										{ return fFDILink; }
51 	//	::PanelFitter*				PanelFitter()
52 	//									{ return fPanelFitter; }
53 
54 private:
55 		void						_ConfigureTranscoder(display_mode* mode);
56 
57 		bool						fHasTranscoder;
58 
59 		FDILink*					fFDILink;
60 	//	PanelFitter*				fPanelFitter;
61 
62 		pipe_index					fPipeIndex;
63 
64 		addr_t						fPipeOffset;
65 		addr_t						fPlaneOffset;
66 };
67 
68 
69 #endif // INTEL_PIPE_H
70