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 #include "PanelFitter.h" 20 21 22 #define MAX_PIPES 2 23 24 25 void program_pipe_color_modes(uint32 colorMode); 26 27 //class FDILink; 28 //class PanelFitter; 29 30 class Pipe { 31 public: 32 Pipe(pipe_index pipeIndex); 33 ~Pipe(); 34 35 pipe_index Index() 36 { return fPipeIndex; } 37 38 bool IsEnabled(); 39 void Enable(bool enable); 40 void Disable(); 41 42 void Configure(display_mode* mode); 43 status_t SetFDILink( 44 const display_timing& timing, 45 uint32 linkBandwidth, 46 uint32 lanes, 47 uint32 bitsPerPixel); 48 void ConfigureScalePos(display_mode* mode); 49 void ConfigureTimings(display_mode* mode, 50 bool hardware = true); 51 void ConfigureClocks( 52 const pll_divisors& divisors, 53 uint32 pixelClock, 54 uint32 extraFlags); 55 void ConfigureClocksSKL( 56 const skl_wrpll_params& wrpll_params, 57 uint32 pixelClock, 58 port_index pllForPort, 59 uint32* pllSel); 60 61 // access to the various parts of the pipe 62 ::FDILink* FDI() 63 { return fFDILink; } 64 ::PanelFitter* PFT() 65 { return fPanelFitter; } 66 67 private: 68 void _ConfigureTranscoder(display_mode* mode); 69 70 bool fHasTranscoder; 71 72 FDILink* fFDILink; 73 PanelFitter* fPanelFitter; 74 75 pipe_index fPipeIndex; 76 77 addr_t fPipeOffset; 78 addr_t fPlaneOffset; 79 }; 80 81 82 #endif // INTEL_PIPE_H 83