vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / accelerants / intel_extreme / FlexibleDisplayInterface.h
blobd6220ca6f2d60728beb5fc7dccaa58a18e7a378d
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_FDI_H
10 #define INTEL_FDI_H
13 #include "intel_extreme.h"
16 class FDITransmitter {
17 public:
18 FDITransmitter(pipe_index pipeIndex);
19 ~FDITransmitter();
21 void Enable();
22 void Disable();
24 bool IsPLLEnabled();
25 void EnablePLL(uint32 lanes);
26 void DisablePLL();
28 uint32 Base()
29 { return fRegisterBase; };
31 private:
32 uint32 fRegisterBase;
36 class FDIReceiver {
37 public:
38 FDIReceiver(pipe_index pipeIndex);
39 ~FDIReceiver();
41 void Enable();
42 void Disable();
44 bool IsPLLEnabled();
45 void EnablePLL(uint32 lanes);
46 void DisablePLL();
48 void SwitchClock(bool toPCDClock);
50 uint32 Base()
51 { return fRegisterBase; };
53 protected:
54 uint32 fRegisterBase;
58 class FDILink {
59 public:
60 FDILink(pipe_index pipeIndex);
61 ~FDILink();
63 FDITransmitter& Transmitter()
64 { return fTransmitter; };
65 FDIReceiver& Receiver()
66 { return fReceiver; };
68 status_t Train(display_mode* target);
70 private:
71 status_t _NormalTrain(uint32 lanes);
72 status_t _IlkTrain(uint32 lanes);
73 status_t _SnbTrain(uint32 lanes);
74 status_t _ManualTrain(uint32 lanes);
75 status_t _AutoTrain(uint32 lanes);
77 FDITransmitter fTransmitter;
78 FDIReceiver fReceiver;
80 pipe_index fPipeIndex;
84 #endif // INTEL_FDI_H