vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / accelerants / intel_extreme / Pipes.h
blobc8cb5f4c368357f07b010a47a08fdf7b223ffe20
1 /*
2 * Copyright 2011-2015, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
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
13 #include <edid.h>
15 #include "intel_extreme.h"
17 #include "pll.h"
18 #include "FlexibleDisplayInterface.h"
21 #define MAX_PIPES 2
24 void program_pipe_color_modes(uint32 colorMode);
26 //class FDILink;
27 //class PanelFitter;
29 class Pipe {
30 public:
31 Pipe(pipe_index pipeIndex);
32 ~Pipe();
34 pipe_index Index()
35 { return fPipeIndex; }
37 bool IsEnabled();
38 void Enable(bool enable);
39 void Disable();
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);
48 // access to the various parts of the pipe
49 ::FDILink* FDI()
50 { return fFDILink; }
51 // ::PanelFitter* PanelFitter()
52 // { return fPanelFitter; }
54 private:
55 void _ConfigureTranscoder(display_mode* mode);
57 bool fHasTranscoder;
59 FDILink* fFDILink;
60 // PanelFitter* fPanelFitter;
62 pipe_index fPipeIndex;
64 addr_t fPipeOffset;
65 addr_t fPlaneOffset;
69 #endif // INTEL_PIPE_H