| 1 | |
| 2 | /************************************************************************** |
| 3 | |
| 4 | Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. |
| 5 | All Rights Reserved. |
| 6 | |
| 7 | Permission is hereby granted, free of charge, to any person obtaining a |
| 8 | copy of this software and associated documentation files (the |
| 9 | "Software"), to deal in the Software without restriction, including |
| 10 | without limitation the rights to use, copy, modify, merge, publish, |
| 11 | distribute, sub license, and/or sell copies of the Software, and to |
| 12 | permit persons to whom the Software is furnished to do so, subject to |
| 13 | the following conditions: |
| 14 | |
| 15 | The above copyright notice and this permission notice (including the |
| 16 | next paragraph) shall be included in all copies or substantial portions |
| 17 | of the Software. |
| 18 | |
| 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 20 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. |
| 22 | IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR |
| 23 | ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 24 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 25 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 26 | |
| 27 | **************************************************************************/ |
| 28 | |
| 29 | #ifdef HAVE_CONFIG_Hcxx . . $ `<built-in>:410:9`! |
| 30 | #include "config.h"cxx . . $ `<file>/config.h`/ |
| 31 | #endif |
| 32 | |
| 33 | /* |
| 34 | * Authors: |
| 35 | * Keith Whitwell <[email protected]> |
| 36 | * |
| 37 | * Add ARGB HW cursor support: |
| 38 | * Alan Hourihane <[email protected]> |
| 39 | * |
| 40 | */ |
| 41 | |
| 42 | /* |
| 43 | * This server does not support these XFree86 4.0 features yet |
| 44 | * shadowFb (if requested or acceleration is off) |
| 45 | * Overlay planes |
| 46 | * DGA |
| 47 | */ |
| 48 | |
| 49 | #include <math.h> |
| 50 | #include <string.h> |
| 51 | #include <unistd.h> |
| 52 | |
| 53 | /* |
| 54 | * These are X and server generic header files. |
| 55 | */ |
| 56 | #include "xorg-server.h" |
| 57 | #include "xf86.h" |
| 58 | #include "xf86_OSproc.h" |
| 59 | #include "xf86cmap.h" |
| 60 | |
| 61 | #include "compiler.h" |
| 62 | #include "vgaHW.h" |
| 63 | #include "mipointer.h" |
| 64 | #include "micmap.h" |
| 65 | |
| 66 | #include "fb.h" |
| 67 | #include "miscstruct.h" |
| 68 | #include "xf86xv.h" |
| 69 | #include <X11/extensions/Xv.h> |
| 70 | #include "vbe.h" |
| 71 | #include "xf86fbman.h" |
| 72 | |
| 73 | #include "i810.h"cxx . . $ `<file>/src/legacy/i810/i810.h`/ |
| 74 | |
| 75 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 76 | #include "dri.h" |
| 77 | #endif |
| 78 | |
| 79 | #include "../legacy.h"cxx . . $ `<file>/src/legacy/legacy.h`/ |
| 80 | |
| 81 | static Boolcxx . . $ Bool# I810PreInitcxx . . $ I810PreInit(a4dc8c73af46c9e4).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# pScrn, int flags); |
| 82 | static Boolcxx . . $ Bool# I810ScreenInitcxx . . $ I810ScreenInit(e3a4153423ca85c8).(SCREEN_INIT_ARGS_DECLcxx . . $ `src/compat-api.h:95:9`!); |
| 83 | static Boolcxx . . $ Bool# I810EnterVTcxx . . $ I810EnterVT(69e744c47d5d770d).(VT_FUNC_ARGS_DECLcxx . . $ `src/compat-api.h:114:9`!); |
| 84 | static void I810LeaveVTcxx . . $ I810LeaveVT(f1d66590ec36ebe6).(VT_FUNC_ARGS_DECLcxx . . $ `src/compat-api.h:114:9`!); |
| 85 | static Boolcxx . . $ Bool# I810CloseScreencxx . . $ I810CloseScreen(d38b7d3414297794).(CLOSE_SCREEN_ARGS_DECLcxx . . $ `src/compat-api.h:103:9`!); |
| 86 | static Boolcxx . . $ Bool# I810SaveScreencxx . . $ I810SaveScreen(bab54c070ab52753).(ScreenPtrcxx . . $ ScreenPtr# pScreen, Boolcxx . . $ Bool# unblank); |
| 87 | static void I810FreeScreencxx . . $ I810FreeScreen(f1d66590ec36ebe6).(FREE_SCREEN_ARGS_DECLcxx . . $ `src/compat-api.h:112:9`!); |
| 88 | static void I810DisplayPowerManagementSetcxx . . $ I810DisplayPowerManagementSet(48b75b380e0d3ac6).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# pScrn, |
| 89 | int PowerManagermentMode, |
| 90 | int flags); |
| 91 | static ModeStatuscxx . . $ ModeStatus# I810ValidModecxx . . $ I810ValidMode(8976aff7f4792b82).(SCRN_ARG_TYPEcxx . . $ `src/compat-api.h:89:9`! arg, DisplayModePtrcxx . . $ DisplayModePtr# mode, |
| 92 | Boolcxx . . $ Bool# verbose, int flags); |
| 93 | |
| 94 | typedef enumcxx . . $ $anonymous_type_4d457911fd1c0617_0# { |
| 95 | OPTION_NOACCELcxx . . $ OPTION_NOACCEL., |
| 96 | OPTION_SW_CURSORcxx . . $ OPTION_SW_CURSOR., |
| 97 | OPTION_COLOR_KEYcxx . . $ OPTION_COLOR_KEY., |
| 98 | OPTION_CACHE_LINEScxx . . $ OPTION_CACHE_LINES., |
| 99 | OPTION_DAC_6BITcxx . . $ OPTION_DAC_6BIT., |
| 100 | OPTION_DRIcxx . . $ OPTION_DRI., |
| 101 | OPTION_NO_DDCcxx . . $ OPTION_NO_DDC., |
| 102 | OPTION_SHOW_CACHEcxx . . $ OPTION_SHOW_CACHE., |
| 103 | OPTION_XVMC_SURFACEScxx . . $ OPTION_XVMC_SURFACES., |
| 104 | OPTION_PAGEFLIPcxx . . $ OPTION_PAGEFLIP. |
| 105 | } I810Optscxx . . $ I810Opts#; |
| 106 | |
| 107 | static const OptionInfoReccxx . . $ OptionInfoRec# I810Optionscxx . . $ I810Options.[] = { |
| 108 | {OPTION_NOACCELcxx . . $ OPTION_NOACCEL., "NoAccel", OPTV_BOOLEANcxx . . $ OPTV_BOOLEAN., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!}, |
| 109 | {OPTION_SW_CURSORcxx . . $ OPTION_SW_CURSOR., "SWcursor", OPTV_BOOLEANcxx . . $ OPTV_BOOLEAN., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!}, |
| 110 | {OPTION_COLOR_KEYcxx . . $ OPTION_COLOR_KEY., "ColorKey", OPTV_INTEGERcxx . . $ OPTV_INTEGER., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!}, |
| 111 | {OPTION_CACHE_LINEScxx . . $ OPTION_CACHE_LINES., "CacheLines", OPTV_INTEGERcxx . . $ OPTV_INTEGER., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!}, |
| 112 | {OPTION_DAC_6BITcxx . . $ OPTION_DAC_6BIT., "Dac6Bit", OPTV_BOOLEANcxx . . $ OPTV_BOOLEAN., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!}, |
| 113 | {OPTION_DRIcxx . . $ OPTION_DRI., "DRI", OPTV_BOOLEANcxx . . $ OPTV_BOOLEAN., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!}, |
| 114 | {OPTION_NO_DDCcxx . . $ OPTION_NO_DDC., "NoDDC", OPTV_BOOLEANcxx . . $ OPTV_BOOLEAN., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!}, |
| 115 | {OPTION_SHOW_CACHEcxx . . $ OPTION_SHOW_CACHE., "ShowCache", OPTV_BOOLEANcxx . . $ OPTV_BOOLEAN., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!}, |
| 116 | {OPTION_XVMC_SURFACEScxx . . $ OPTION_XVMC_SURFACES., "XvMCSurfaces", OPTV_INTEGERcxx . . $ OPTV_INTEGER., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!}, |
| 117 | {OPTION_PAGEFLIPcxx . . $ OPTION_PAGEFLIP., "PageFlip", OPTV_BOOLEANcxx . . $ OPTV_BOOLEAN., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!}, |
| 118 | {-1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, OPTV_NONEcxx . . $ OPTV_NONE., {0}, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!} |
| 119 | }; |
| 120 | /* *INDENT-ON* */ |
| 121 | |
| 122 | #ifndef I810_DEBUGcxx . . $ `src/legacy/i810/i810_common.h:118:9`! |
| 123 | int I810_DEBUG = (0 |
| 124 | /* | DEBUG_ALWAYS_SYNC */ |
| 125 | /* | DEBUG_VERBOSE_ACCEL */ |
| 126 | /* | DEBUG_VERBOSE_SYNC */ |
| 127 | /* | DEBUG_VERBOSE_VGA */ |
| 128 | /* | DEBUG_VERBOSE_RING */ |
| 129 | /* | DEBUG_VERBOSE_OUTREG */ |
| 130 | /* | DEBUG_VERBOSE_MEMORY */ |
| 131 | /* | DEBUG_VERBOSE_CURSOR */ |
| 132 | ); |
| 133 | #endif |
| 134 | |
| 135 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 136 | static int i810_pitchescxx . . $ i810_pitches.[] = { |
| 137 | 512, |
| 138 | 1024, |
| 139 | 2048, |
| 140 | 4096, |
| 141 | 0 |
| 142 | }; |
| 143 | #endif |
| 144 | |
| 145 | /* |
| 146 | * I810GetRec and I810FreeRec -- |
| 147 | * |
| 148 | * Private data for the driver is stored in the screen structure. |
| 149 | * These two functions create and destroy that private data. |
| 150 | * |
| 151 | */ |
| 152 | static Boolcxx . . $ Bool# |
| 153 | I810GetReccxx . . $ I810GetRec(69e744c47d5d770d).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 154 | { |
| 155 | if (((uintptr_tcxx . . $ uintptr_t#)scrn->driverPrivatecxx . . $ _ScrnInfoRec#driverPrivate. & 3) == 0) |
| 156 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 157 | |
| 158 | scrn->driverPrivatecxx . . $ _ScrnInfoRec#driverPrivate. = xnfcalloccxx . . $ `<external>/17080983469304696390/os.h:78:9`!(sizeof(I810Rec), 1); |
| 159 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 160 | } |
| 161 | |
| 162 | static void |
| 163 | I810FreeReccxx . . $ I810FreeRec(f1d66590ec36ebe6).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 164 | { |
| 165 | if (!scrn) |
| 166 | return; |
| 167 | if (!scrn->driverPrivatecxx . . $ _ScrnInfoRec#driverPrivate.) |
| 168 | return; |
| 169 | freecxx . . $ free(5d22bdacc48458e8).(scrn->driverPrivatecxx . . $ _ScrnInfoRec#driverPrivate.); |
| 170 | scrn->driverPrivatecxx . . $ _ScrnInfoRec#driverPrivate. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 171 | } |
| 172 | |
| 173 | struct pci_devicecxx . . $ pci_device# * |
| 174 | intel_host_bridgecxx . . $ intel_host_bridge(a743c612dc9d8a64). (void) |
| 175 | { |
| 176 | static const struct pci_slot_matchcxx . . $ pci_slot_match# bridge_match = { |
| 177 | 0, 0, 0, PCI_MATCH_ANYcxx . . $ `<external>/7911317625834461991/pciaccess.h:182:9`!, 0 |
| 178 | }; |
| 179 | struct pci_device_iteratorcxx . . $ pci_device_iterator# *slot_iterator; |
| 180 | struct pci_devicecxx . . $ pci_device# *bridge; |
| 181 | |
| 182 | slot_iterator = pci_slot_match_iterator_createcxx . . $ pci_slot_match_iterator_create(946b064d3d14b317). (&bridge_match); |
| 183 | bridge = pci_device_nextcxx . . $ pci_device_next(8ff01eb605ad2143). (slot_iterator); |
| 184 | pci_iterator_destroycxx . . $ pci_iterator_destroy(b2135dd6e9ca726c). (slot_iterator); |
| 185 | return bridge; |
| 186 | } |
| 187 | |
| 188 | static void |
| 189 | I810ProbeDDCcxx . . $ I810ProbeDDC(dfa31234d21d6d72).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, int index) |
| 190 | { |
| 191 | vbeInfoPtrcxx . . $ vbeInfoPtr# pVbe; |
| 192 | |
| 193 | if (xf86LoadSubModulecxx . . $ xf86LoadSubModule(6052c62b4eb10e26).(scrn, "vbe")) { |
| 194 | pVbe = VBEInitcxx . . $ VBEInit(11fe90e40a0e1851).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, index); |
| 195 | ConfiguredMonitorcxx . . $ ConfiguredMonitor. = vbeDoEDIDcxx . . $ vbeDoEDID(e2b8390acea51277).(pVbe, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 196 | vbeFreecxx . . $ vbeFree(c23a579e6e26dfe).(pVbe); |
| 197 | } |
| 198 | } |
| 199 | |
| 200 | static xf86MonPtrcxx . . $ xf86MonPtr# |
| 201 | I810DoDDCcxx . . $ I810DoDDC(50f4cd3d3373f965).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, int index) |
| 202 | { |
| 203 | vbeInfoPtrcxx . . $ vbeInfoPtr# pVbe; |
| 204 | xf86MonPtrcxx . . $ xf86MonPtr# MonInfo = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 205 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 206 | |
| 207 | /* Honour Option "noDDC" */ |
| 208 | if (xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_NO_DDCcxx . . $ OPTION_NO_DDC., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!)) { |
| 209 | return MonInfo; |
| 210 | } |
| 211 | |
| 212 | if (xf86LoadSubModulecxx . . $ xf86LoadSubModule(6052c62b4eb10e26).(scrn, "vbe") && (pVbe = VBEInitcxx . . $ VBEInit(11fe90e40a0e1851).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, index))) { |
| 213 | MonInfo = vbeDoEDIDcxx . . $ vbeDoEDID(e2b8390acea51277).(pVbe, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 214 | xf86PrintEDIDcxx . . $ xf86PrintEDID(fd73ecc54b8b72ec).(MonInfo); |
| 215 | xf86SetDDCpropertiescxx . . $ xf86SetDDCproperties(5dc3a82d311f4463).(scrn, MonInfo); |
| 216 | vbeFreecxx . . $ vbeFree(c23a579e6e26dfe).(pVbe); |
| 217 | } else { |
| 218 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_INFOcxx . . $ X_INFO., |
| 219 | "this driver cannot do DDC without VBE\n"); |
| 220 | } |
| 221 | |
| 222 | return MonInfo; |
| 223 | } |
| 224 | |
| 225 | /* |
| 226 | * I810PreInit -- |
| 227 | * |
| 228 | * Do initial setup of the board before we know what resolution we will |
| 229 | * be running at. |
| 230 | * |
| 231 | */ |
| 232 | static Boolcxx . . $ Bool# |
| 233 | I810PreInitcxx . . $ I810PreInit(a4dc8c73af46c9e4).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, int flags) |
| 234 | { |
| 235 | I810Ptrcxx . . $ I810Ptr# pI810; |
| 236 | ClockRangePtrcxx . . $ ClockRangePtr# clockRanges; |
| 237 | int i; |
| 238 | MessageTypecxx . . $ MessageType# from; |
| 239 | int flags24; |
| 240 | rgbcxx . . $ rgb# defaultWeight = { 0, 0, 0 }; |
| 241 | int mem; |
| 242 | Boolcxx . . $ Bool# enable; |
| 243 | |
| 244 | if (scrn->numEntitiescxx . . $ _ScrnInfoRec#numEntities. != 1) |
| 245 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 246 | |
| 247 | /* Allocate driverPrivate */ |
| 248 | if (!I810GetReccxx . . $ I810GetRec(69e744c47d5d770d).(scrn)) |
| 249 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 250 | |
| 251 | pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 252 | |
| 253 | pI810->pEntcxx . . $ _I810Rec#pEnt. = xf86GetEntityInfocxx . . $ xf86GetEntityInfo(f72745552c1742b).(scrn->entityListcxx . . $ _ScrnInfoRec#entityList.[0]); |
| 254 | if (pI810->pEntcxx . . $ _I810Rec#pEnt. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! || pI810->pEntcxx . . $ _I810Rec#pEnt.->locationcxx . . $ _entityInfo#location..typecxx . . $ _bus#type. != BUS_PCIcxx . . $ BUS_PCI.) |
| 255 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 256 | |
| 257 | if (flags & PROBE_DETECTcxx . . $ `<external>/14714524891422995446/xf86str.h:535:9`!) { |
| 258 | I810ProbeDDCcxx . . $ I810ProbeDDC(dfa31234d21d6d72).(scrn, pI810->pEntcxx . . $ _I810Rec#pEnt.->indexcxx . . $ _entityInfo#index.); |
| 259 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 260 | } |
| 261 | |
| 262 | /* The vgahw module should be loaded here when needed */ |
| 263 | if (!xf86LoadSubModulecxx . . $ xf86LoadSubModule(6052c62b4eb10e26).(scrn, "vgahw")) |
| 264 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 265 | |
| 266 | /* Allocate a vgaHWRec */ |
| 267 | if (!vgaHWGetHWReccxx . . $ vgaHWGetHWRec(69e744c47d5d770d).(scrn)) |
| 268 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 269 | |
| 270 | pI810->PciInfocxx . . $ _I810Rec#PciInfo. = xf86GetPciInfoForEntitycxx . . $ xf86GetPciInfoForEntity(d6dfda9d9f243f67).(pI810->pEntcxx . . $ _I810Rec#pEnt.->indexcxx . . $ _entityInfo#index.); |
| 271 | |
| 272 | /* Set scrn->monitor */ |
| 273 | scrn->monitorcxx . . $ _ScrnInfoRec#monitor. = scrn->confScreencxx . . $ _ScrnInfoRec#confScreen.->monitorcxx . . $ _confscreenrec#monitor.; |
| 274 | |
| 275 | flags24 = Support24bppFbcxx . . $ `<external>/14714524891422995446/xf86str.h:732:9`! | PreferConvert32to24cxx . . $ `<external>/14714524891422995446/xf86str.h:737:9`! | SupportConvert32to24cxx . . $ `<external>/14714524891422995446/xf86str.h:735:9`!; |
| 276 | if (!xf86SetDepthBppcxx . . $ xf86SetDepthBpp(a812032cb84e1db2).(scrn, 16, 0, 16, flags24)) { |
| 277 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 278 | } else { |
| 279 | switch (scrn->depthcxx . . $ _ScrnInfoRec#depth.) { |
| 280 | case 8: |
| 281 | case 15: |
| 282 | case 16: |
| 283 | case 24: |
| 284 | break; |
| 285 | default: |
| 286 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 287 | "Given depth (%d) is not supported by i810 driver\n", |
| 288 | scrn->depthcxx . . $ _ScrnInfoRec#depth.); |
| 289 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 290 | } |
| 291 | } |
| 292 | xf86PrintDepthBppcxx . . $ xf86PrintDepthBpp(f1d66590ec36ebe6).(scrn); |
| 293 | |
| 294 | switch (scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel.) { |
| 295 | case 8: |
| 296 | case 16: |
| 297 | case 24: |
| 298 | break; |
| 299 | default: |
| 300 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 301 | "Given bpp (%d) is not supported by i810 driver\n", |
| 302 | scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel.); |
| 303 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 304 | } |
| 305 | |
| 306 | if (!xf86SetWeightcxx . . $ xf86SetWeight(f8180e6e67d7475).(scrn, defaultWeight, defaultWeight)) |
| 307 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 308 | |
| 309 | if (!xf86SetDefaultVisualcxx . . $ xf86SetDefaultVisual(a4dc8c73af46c9e4).(scrn, -1)) |
| 310 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 311 | |
| 312 | /* We use a programmable clock */ |
| 313 | scrn->progClockcxx . . $ _ScrnInfoRec#progClock. = TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 314 | |
| 315 | pI810->cppcxx . . $ _I810Rec#cpp. = scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel. / 8; |
| 316 | |
| 317 | /* Process the options */ |
| 318 | xf86CollectOptionscxx . . $ xf86CollectOptions(babeaaa03b79f6c8).(scrn, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 319 | if (!(pI810->Optionscxx . . $ _I810Rec#Options. = malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(sizeof(I810Optionscxx . . $ I810Options.)))) |
| 320 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 321 | memcpycxx . . $ memcpy(cc817cb175f282d).(pI810->Optionscxx . . $ _I810Rec#Options., I810Optionscxx . . $ I810Options., sizeof(I810Optionscxx . . $ I810Options.)); |
| 322 | xf86ProcessOptionscxx . . $ xf86ProcessOptions(950c5518776925b4).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., scrn->optionscxx . . $ _ScrnInfoRec#options., pI810->Optionscxx . . $ _I810Rec#Options.); |
| 323 | |
| 324 | scrn->rgbBitscxx . . $ _ScrnInfoRec#rgbBits. = 8; |
| 325 | if (xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_DAC_6BITcxx . . $ OPTION_DAC_6BIT., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!)) |
| 326 | scrn->rgbBitscxx . . $ _ScrnInfoRec#rgbBits. = 6; |
| 327 | |
| 328 | if (xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_SHOW_CACHEcxx . . $ OPTION_SHOW_CACHE., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!)) |
| 329 | pI810->showCachecxx . . $ _I810Rec#showCache. = TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 330 | else |
| 331 | pI810->showCachecxx . . $ _I810Rec#showCache. = FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 332 | |
| 333 | /* 6-BIT dac isn't reasonable for modes with > 8bpp */ |
| 334 | if (xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_DAC_6BITcxx . . $ OPTION_DAC_6BIT., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!) && |
| 335 | scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel. > 8) { |
| 336 | OptionInfoPtrcxx . . $ OptionInfoPtr# ptr; |
| 337 | |
| 338 | ptr = xf86TokenToOptinfocxx . . $ xf86TokenToOptinfo(14ba814024f19d6b).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_DAC_6BITcxx . . $ OPTION_DAC_6BIT.); |
| 339 | ptr->foundcxx . . $ $anonymous_type_5d20bb09e8adb840_4#found. = FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 340 | } |
| 341 | |
| 342 | if (xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_NOACCELcxx . . $ OPTION_NOACCEL., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!)) |
| 343 | pI810->noAccelcxx . . $ _I810Rec#noAccel. = TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 344 | |
| 345 | if (!pI810->noAccelcxx . . $ _I810Rec#noAccel. && !xf86LoadSubModulecxx . . $ xf86LoadSubModule(6052c62b4eb10e26).(scrn, "xaa")) |
| 346 | pI810->noAccelcxx . . $ _I810Rec#noAccel. = TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 347 | |
| 348 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 349 | pI810->directRenderingDisabledcxx . . $ _I810Rec#directRenderingDisabled. = |
| 350 | !xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_DRIcxx . . $ OPTION_DRI., TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!); |
| 351 | |
| 352 | if (!pI810->directRenderingDisabledcxx . . $ _I810Rec#directRenderingDisabled.) { |
| 353 | if (scrn->depthcxx . . $ _ScrnInfoRec#depth.!=16) { |
| 354 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_WARNINGcxx . . $ X_WARNING., "DRI is disabled because it " |
| 355 | "runs only at 16-bit depth.\n"); |
| 356 | pI810->directRenderingDisabledcxx . . $ _I810Rec#directRenderingDisabled.=TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 357 | } |
| 358 | } |
| 359 | #endif |
| 360 | |
| 361 | /* Get DDC info from monitor */ |
| 362 | /* after xf86ProcessOptions, |
| 363 | * because it is controlled by options [no]vbe and [no]ddc |
| 364 | */ |
| 365 | I810DoDDCcxx . . $ I810DoDDC(50f4cd3d3373f965).(scrn, pI810->pEntcxx . . $ _I810Rec#pEnt.->indexcxx . . $ _entityInfo#index.); |
| 366 | |
| 367 | intel_detect_chipsetcxx . . $ intel_detect_chipset(428acb230839bb59).(scrn, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 368 | |
| 369 | pI810->LinearAddrcxx . . $ _I810Rec#LinearAddr. = pI810->PciInfocxx . . $ _I810Rec#PciInfo.->regionscxx . . $ pci_device#regions.[0].base_addrcxx . . $ pci_mem_region#base_addr.; |
| 370 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_PROBEDcxx . . $ X_PROBED., "Linear framebuffer at 0x%lX\n", |
| 371 | (unsigned long)pI810->LinearAddrcxx . . $ _I810Rec#LinearAddr.); |
| 372 | |
| 373 | pI810->MMIOAddrcxx . . $ _I810Rec#MMIOAddr. = pI810->PciInfocxx . . $ _I810Rec#PciInfo.->regionscxx . . $ pci_device#regions.[1].base_addrcxx . . $ pci_mem_region#base_addr.; |
| 374 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_PROBEDcxx . . $ X_PROBED., "IO registers at addr 0x%lX\n", |
| 375 | (unsigned long)pI810->MMIOAddrcxx . . $ _I810Rec#MMIOAddr.); |
| 376 | |
| 377 | /* AGP GART support is required. Don't proceed any further if it isn't |
| 378 | * present. |
| 379 | */ |
| 380 | if (!xf86AgpGARTSupportedcxx . . $ xf86AgpGARTSupported(b126dc7c1de90089).()) { |
| 381 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 382 | "AGP GART support is not available. Make sure your kernel has\n" |
| 383 | "\tagpgart support or that the agpgart kernel module is loaded.\n"); |
| 384 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 385 | } |
| 386 | |
| 387 | /* Find out memory bus frequency. |
| 388 | */ |
| 389 | { |
| 390 | uint32_tcxx . . $ uint32_t# whtcfg_pamr_drp; |
| 391 | |
| 392 | pci_device_cfg_read_u32cxx . . $ pci_device_cfg_read_u32(14dfbe47f2cbb0e).(pI810->PciInfocxx . . $ _I810Rec#PciInfo., & whtcfg_pamr_drp, WHTCFG_PAMR_DRPcxx . . $ `src/legacy/i810/i810_reg.h:811:9`!); |
| 393 | |
| 394 | /* Need this for choosing watermarks. |
| 395 | */ |
| 396 | if ((whtcfg_pamr_drp & LM_FREQ_MASKcxx . . $ `src/legacy/i810/i810_reg.h:831:9`!) == LM_FREQ_133cxx . . $ `src/legacy/i810/i810_reg.h:832:9`!) |
| 397 | pI810->LmFreqSelcxx . . $ _I810Rec#LmFreqSel. = 133; |
| 398 | else |
| 399 | pI810->LmFreqSelcxx . . $ _I810Rec#LmFreqSel. = 100; |
| 400 | } |
| 401 | |
| 402 | /* Default to 4MB framebuffer, which is sufficient for all |
| 403 | * supported 2d resolutions. If the user has specified a different |
| 404 | * size in the XF86Config, use that amount instead. |
| 405 | * |
| 406 | * Changed to 8 Meg so we can have acceleration by default (Mark). |
| 407 | */ |
| 408 | mem = I810CheckAvailableMemorycxx . . $ I810CheckAvailableMemory(69e744c47d5d770d).(scrn); |
| 409 | if (pI810->directRenderingDisabledcxx . . $ _I810Rec#directRenderingDisabled. || mem < 131072) /* < 128 MB */ |
| 410 | scrn->videoRamcxx . . $ _ScrnInfoRec#videoRam. = 8192; |
| 411 | else if (mem < 196608) |
| 412 | scrn->videoRamcxx . . $ _ScrnInfoRec#videoRam. = 16384; /* < 192 MB */ |
| 413 | else |
| 414 | scrn->videoRamcxx . . $ _ScrnInfoRec#videoRam. = 24576; |
| 415 | |
| 416 | from = X_DEFAULTcxx . . $ X_DEFAULT.; |
| 417 | |
| 418 | if (pI810->pEntcxx . . $ _I810Rec#pEnt.->devicecxx . . $ _entityInfo#device.->videoRamcxx . . $ $anonymous_type_3cc7af3137d0eb19_15#videoRam.) { |
| 419 | scrn->videoRamcxx . . $ _ScrnInfoRec#videoRam. = pI810->pEntcxx . . $ _I810Rec#pEnt.->devicecxx . . $ _entityInfo#device.->videoRamcxx . . $ $anonymous_type_3cc7af3137d0eb19_15#videoRam.; |
| 420 | from = X_CONFIGcxx . . $ X_CONFIG.; |
| 421 | } |
| 422 | |
| 423 | if (mem > 0 && mem < scrn->videoRamcxx . . $ _ScrnInfoRec#videoRam.) { |
| 424 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_WARNINGcxx . . $ X_WARNING., "%dk of memory was requested," |
| 425 | " but the\n\t maximum AGP memory available is %dk.\n", |
| 426 | scrn->videoRamcxx . . $ _ScrnInfoRec#videoRam., mem); |
| 427 | from = X_PROBEDcxx . . $ X_PROBED.; |
| 428 | if (mem > (6 * 1024)) { |
| 429 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_INFOcxx . . $ X_INFO., |
| 430 | "Reducing video memory to 4MB\n"); |
| 431 | scrn->videoRamcxx . . $ _ScrnInfoRec#videoRam. = 4096; |
| 432 | } else { |
| 433 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., "Less than 6MB of AGP memory" |
| 434 | " is available. Cannot proceed.\n"); |
| 435 | I810FreeReccxx . . $ I810FreeRec(f1d66590ec36ebe6).(scrn); |
| 436 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 437 | } |
| 438 | } |
| 439 | |
| 440 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., from, |
| 441 | "Will alloc AGP framebuffer: %d kByte\n", scrn->videoRamcxx . . $ _ScrnInfoRec#videoRam.); |
| 442 | |
| 443 | /* Calculate Fixed Offsets depending on graphics aperture size */ |
| 444 | { |
| 445 | struct pci_devicecxx . . $ pci_device# *bridge = intel_host_bridgecxx . . $ intel_host_bridge(a743c612dc9d8a64). (); |
| 446 | uint32_tcxx . . $ uint32_t# smram_miscc; |
| 447 | |
| 448 | pci_device_cfg_read_u32cxx . . $ pci_device_cfg_read_u32(14dfbe47f2cbb0e). (bridge, & smram_miscc, SMRAM_MISCCcxx . . $ `src/legacy/i810/i810_reg.h:788:9`!); |
| 449 | |
| 450 | if ((smram_miscc & GFX_MEM_WIN_SIZEcxx . . $ `src/legacy/i810/i810_reg.h:799:9`!) == GFX_MEM_WIN_32Mcxx . . $ `src/legacy/i810/i810_reg.h:800:9`!) { |
| 451 | pI810->FbMapSizecxx . . $ _I810Rec#FbMapSize. = 0x1000000; |
| 452 | pI810->DepthOffsetcxx . . $ _I810Rec#DepthOffset. = 0x1000000; |
| 453 | pI810->BackOffsetcxx . . $ _I810Rec#BackOffset. = 0x1800000; |
| 454 | } else { |
| 455 | pI810->FbMapSizecxx . . $ _I810Rec#FbMapSize. = 0x3000000; |
| 456 | pI810->DepthOffsetcxx . . $ _I810Rec#DepthOffset. = 0x3000000; |
| 457 | pI810->BackOffsetcxx . . $ _I810Rec#BackOffset. = 0x3800000; |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | /* |
| 462 | * If the driver can do gamma correction, it should call xf86SetGamma() |
| 463 | * here. |
| 464 | */ |
| 465 | { |
| 466 | Gammacxx . . $ Gamma# zeros = { 0.0, 0.0, 0.0 }; |
| 467 | |
| 468 | if (!xf86SetGammacxx . . $ xf86SetGamma(ae787ac83c780a22).(scrn, zeros)) { |
| 469 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | pI810->MaxClockcxx . . $ _I810Rec#MaxClock. = 0; |
| 474 | if (pI810->pEntcxx . . $ _I810Rec#pEnt.->devicecxx . . $ _entityInfo#device.->dacSpeedscxx . . $ $anonymous_type_3cc7af3137d0eb19_15#dacSpeeds.[0]) { |
| 475 | switch (scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel.) { |
| 476 | case 8: |
| 477 | pI810->MaxClockcxx . . $ _I810Rec#MaxClock. = pI810->pEntcxx . . $ _I810Rec#pEnt.->devicecxx . . $ _entityInfo#device.->dacSpeedscxx . . $ $anonymous_type_3cc7af3137d0eb19_15#dacSpeeds.[DAC_BPP8cxx . . $ DAC_BPP8.]; |
| 478 | break; |
| 479 | case 16: |
| 480 | pI810->MaxClockcxx . . $ _I810Rec#MaxClock. = pI810->pEntcxx . . $ _I810Rec#pEnt.->devicecxx . . $ _entityInfo#device.->dacSpeedscxx . . $ $anonymous_type_3cc7af3137d0eb19_15#dacSpeeds.[DAC_BPP16cxx . . $ DAC_BPP16.]; |
| 481 | break; |
| 482 | case 24: |
| 483 | pI810->MaxClockcxx . . $ _I810Rec#MaxClock. = pI810->pEntcxx . . $ _I810Rec#pEnt.->devicecxx . . $ _entityInfo#device.->dacSpeedscxx . . $ $anonymous_type_3cc7af3137d0eb19_15#dacSpeeds.[DAC_BPP24cxx . . $ DAC_BPP24.]; |
| 484 | break; |
| 485 | case 32: /* not supported */ |
| 486 | pI810->MaxClockcxx . . $ _I810Rec#MaxClock. = pI810->pEntcxx . . $ _I810Rec#pEnt.->devicecxx . . $ _entityInfo#device.->dacSpeedscxx . . $ $anonymous_type_3cc7af3137d0eb19_15#dacSpeeds.[DAC_BPP32cxx . . $ DAC_BPP32.]; |
| 487 | break; |
| 488 | } |
| 489 | if (!pI810->MaxClockcxx . . $ _I810Rec#MaxClock.) |
| 490 | pI810->MaxClockcxx . . $ _I810Rec#MaxClock. = pI810->pEntcxx . . $ _I810Rec#pEnt.->devicecxx . . $ _entityInfo#device.->dacSpeedscxx . . $ $anonymous_type_3cc7af3137d0eb19_15#dacSpeeds.[0]; |
| 491 | } else { |
| 492 | switch (scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel.) { |
| 493 | case 8: |
| 494 | pI810->MaxClockcxx . . $ _I810Rec#MaxClock. = 203000; |
| 495 | break; |
| 496 | case 16: |
| 497 | pI810->MaxClockcxx . . $ _I810Rec#MaxClock. = 163000; |
| 498 | break; |
| 499 | case 24: |
| 500 | pI810->MaxClockcxx . . $ _I810Rec#MaxClock. = 136000; |
| 501 | break; |
| 502 | case 32: /* not supported */ |
| 503 | pI810->MaxClockcxx . . $ _I810Rec#MaxClock. = 86000; |
| 504 | } |
| 505 | } |
| 506 | clockRanges = xnfcalloccxx . . $ `<external>/17080983469304696390/os.h:78:9`!(sizeof(ClockRange), 1); |
| 507 | clockRanges->nextcxx . . $ x_ClockRange#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 508 | /* 9.4MHz appears to be the smallest that works. */ |
| 509 | clockRanges->minClockcxx . . $ x_ClockRange#minClock. = 9500; |
| 510 | clockRanges->maxClockcxx . . $ x_ClockRange#maxClock. = pI810->MaxClockcxx . . $ _I810Rec#MaxClock.; |
| 511 | clockRanges->clockIndexcxx . . $ x_ClockRange#clockIndex. = -1; |
| 512 | clockRanges->interlaceAllowedcxx . . $ x_ClockRange#interlaceAllowed. = TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 513 | clockRanges->doubleScanAllowedcxx . . $ x_ClockRange#doubleScanAllowed. = FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 514 | |
| 515 | i = xf86ValidateModescxx . . $ xf86ValidateModes(68ce95b5b630c03b).(scrn, scrn->monitorcxx . . $ _ScrnInfoRec#monitor.->Modescxx . . $ $anonymous_type_3cc7af3137d0eb19_6#Modes., |
| 516 | scrn->displaycxx . . $ _ScrnInfoRec#display.->modescxx . . $ $anonymous_type_3cc7af3137d0eb19_16#modes., clockRanges, |
| 517 | #ifndef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 518 | 0, 320, 1600, 64 * scrn->bitsPerPixel, |
| 519 | #else |
| 520 | i810_pitchescxx . . $ i810_pitches., 0, 0, 64 * scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel., |
| 521 | #endif |
| 522 | 200, 1200, |
| 523 | scrn->displaycxx . . $ _ScrnInfoRec#display.->virtualXcxx . . $ $anonymous_type_3cc7af3137d0eb19_16#virtualX., scrn->displaycxx . . $ _ScrnInfoRec#display.->virtualYcxx . . $ $anonymous_type_3cc7af3137d0eb19_16#virtualY., |
| 524 | scrn->videoRamcxx . . $ _ScrnInfoRec#videoRam. * 1024, LOOKUP_BEST_REFRESHcxx . . $ LOOKUP_BEST_REFRESH.); |
| 525 | |
| 526 | if (i == -1) { |
| 527 | I810FreeReccxx . . $ I810FreeRec(f1d66590ec36ebe6).(scrn); |
| 528 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 529 | } |
| 530 | |
| 531 | xf86PruneDriverModescxx . . $ xf86PruneDriverModes(f1d66590ec36ebe6).(scrn); |
| 532 | |
| 533 | if (!i || !scrn->modescxx . . $ _ScrnInfoRec#modes.) { |
| 534 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., "No valid modes found\n"); |
| 535 | I810FreeReccxx . . $ I810FreeRec(f1d66590ec36ebe6).(scrn); |
| 536 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 537 | } |
| 538 | |
| 539 | xf86SetCrtcForModescxx . . $ xf86SetCrtcForModes(dfa31234d21d6d72).(scrn, INTERLACE_HALVE_Vcxx . . $ INTERLACE_HALVE_V.); |
| 540 | |
| 541 | scrn->currentModecxx . . $ _ScrnInfoRec#currentMode. = scrn->modescxx . . $ _ScrnInfoRec#modes.; |
| 542 | |
| 543 | xf86PrintModescxx . . $ xf86PrintModes(f1d66590ec36ebe6).(scrn); |
| 544 | |
| 545 | xf86SetDpicxx . . $ xf86SetDpi(48b75b380e0d3ac6).(scrn, 0, 0); |
| 546 | |
| 547 | if (!xf86LoadSubModulecxx . . $ xf86LoadSubModule(6052c62b4eb10e26).(scrn, "fb")) { |
| 548 | I810FreeReccxx . . $ I810FreeRec(f1d66590ec36ebe6).(scrn); |
| 549 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 550 | } |
| 551 | |
| 552 | if (!xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_SW_CURSORcxx . . $ OPTION_SW_CURSOR., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!)) { |
| 553 | if (!xf86LoadSubModulecxx . . $ xf86LoadSubModule(6052c62b4eb10e26).(scrn, "ramdac")) { |
| 554 | I810FreeReccxx . . $ I810FreeRec(f1d66590ec36ebe6).(scrn); |
| 555 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 556 | } |
| 557 | } |
| 558 | |
| 559 | if (xf86GetOptValIntegercxx . . $ xf86GetOptValInteger(462756413040cef9). |
| 560 | (pI810->Optionscxx . . $ _I810Rec#Options., OPTION_COLOR_KEYcxx . . $ OPTION_COLOR_KEY., &(pI810->colorKeycxx . . $ _I810Rec#colorKey.))) { |
| 561 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_CONFIGcxx . . $ X_CONFIG., |
| 562 | "video overlay key set to 0x%x\n", pI810->colorKeycxx . . $ _I810Rec#colorKey.); |
| 563 | } else { |
| 564 | pI810->colorKeycxx . . $ _I810Rec#colorKey. = (1 << scrn->offsetcxx . . $ _ScrnInfoRec#offset..redcxx . . $ $anonymous_type_3cc7af3137d0eb19_4#red.) | |
| 565 | (1 << scrn->offsetcxx . . $ _ScrnInfoRec#offset..greencxx . . $ $anonymous_type_3cc7af3137d0eb19_4#green.) | |
| 566 | (((scrn->maskcxx . . $ _ScrnInfoRec#mask..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue. >> scrn->offsetcxx . . $ _ScrnInfoRec#offset..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue.) - |
| 567 | 1) << scrn->offsetcxx . . $ _ScrnInfoRec#offset..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue.); |
| 568 | } |
| 569 | |
| 570 | pI810->allowPageFlipcxx . . $ _I810Rec#allowPageFlip.=FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 571 | enable = xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_PAGEFLIPcxx . . $ OPTION_PAGEFLIP., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!); |
| 572 | |
| 573 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 574 | if (!pI810->directRenderingDisabledcxx . . $ _I810Rec#directRenderingDisabled.) { |
| 575 | pI810->allowPageFlipcxx . . $ _I810Rec#allowPageFlip. = enable; |
| 576 | if (pI810->allowPageFlipcxx . . $ _I810Rec#allowPageFlip. == TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!) |
| 577 | { |
| 578 | if (!xf86LoadSubModulecxx . . $ xf86LoadSubModule(6052c62b4eb10e26).(scrn, "shadowfb")) { |
| 579 | pI810->allowPageFlipcxx . . $ _I810Rec#allowPageFlip. = 0; |
| 580 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 581 | "Couldn't load shadowfb module:\n"); |
| 582 | } |
| 583 | } |
| 584 | |
| 585 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_CONFIGcxx . . $ X_CONFIG., "page flipping %s\n", |
| 586 | enable ? "enabled" : "disabled"); |
| 587 | |
| 588 | } |
| 589 | #endif |
| 590 | |
| 591 | if (xf86GetOptValIntegercxx . . $ xf86GetOptValInteger(462756413040cef9).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_XVMC_SURFACEScxx . . $ OPTION_XVMC_SURFACES., |
| 592 | &(pI810->numSurfacescxx . . $ _I810Rec#numSurfaces.))) { |
| 593 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_CONFIGcxx . . $ X_CONFIG., "%d XvMC Surfaces Requested.\n", |
| 594 | pI810->numSurfacescxx . . $ _I810Rec#numSurfaces.); |
| 595 | if (pI810->numSurfacescxx . . $ _I810Rec#numSurfaces. > 7) { |
| 596 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_PROBEDcxx . . $ X_PROBED., |
| 597 | "Using 7 XvMC Surfaces (Maximum Allowed).\n"); |
| 598 | pI810->numSurfacescxx . . $ _I810Rec#numSurfaces. = 7; |
| 599 | } |
| 600 | if (pI810->numSurfacescxx . . $ _I810Rec#numSurfaces. < 6) { |
| 601 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_PROBEDcxx . . $ X_PROBED., |
| 602 | "Using 6 XvMC Surfaces (Minimum Allowed).\n"); |
| 603 | pI810->numSurfacescxx . . $ _I810Rec#numSurfaces. = 6; |
| 604 | } |
| 605 | } else { |
| 606 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_INFOcxx . . $ X_INFO., |
| 607 | "XvMC is Disabled: use XvMCSurfaces config option to enable.\n"); |
| 608 | pI810->numSurfacescxx . . $ _I810Rec#numSurfaces. = 0; |
| 609 | } |
| 610 | |
| 611 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 612 | /* Load the dri module if requested. */ |
| 613 | if (xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_DRIcxx . . $ OPTION_DRI., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!)) { |
| 614 | xf86LoadSubModulecxx . . $ xf86LoadSubModule(6052c62b4eb10e26).(scrn, "dri"); |
| 615 | } |
| 616 | #endif |
| 617 | |
| 618 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 619 | } |
| 620 | |
| 621 | static Boolcxx . . $ Bool# |
| 622 | I810MapMMIOcxx . . $ I810MapMMIO(69e744c47d5d770d).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 623 | { |
| 624 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 625 | struct pci_devicecxx . . $ pci_device# *const device = pI810->PciInfocxx . . $ _I810Rec#PciInfo.; |
| 626 | int err; |
| 627 | |
| 628 | err = pci_device_map_rangecxx . . $ pci_device_map_range(3d8a456146fc9a42). (device, |
| 629 | pI810->MMIOAddrcxx . . $ _I810Rec#MMIOAddr., |
| 630 | I810_REG_SIZEcxx . . $ `src/legacy/i810/i810_common.h:138:9`!, |
| 631 | PCI_DEV_MAP_FLAG_WRITABLEcxx . . $ `<external>/7911317625834461991/pciaccess.h:176:9`!, |
| 632 | (void **) &pI810->MMIOBasecxx . . $ _I810Rec#MMIOBase.); |
| 633 | if (err) |
| 634 | { |
| 635 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb). (scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 636 | "Unable to map mmio BAR. %s (%d)\n", |
| 637 | strerrorcxx . . $ strerror(ff224f080444ee45). (err), err); |
| 638 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 639 | } |
| 640 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 641 | } |
| 642 | |
| 643 | static Boolcxx . . $ Bool# |
| 644 | I810MapMemcxx . . $ I810MapMem(69e744c47d5d770d).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 645 | { |
| 646 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 647 | struct pci_devicecxx . . $ pci_device# *const device = pI810->PciInfocxx . . $ _I810Rec#PciInfo.; |
| 648 | int err; |
| 649 | |
| 650 | if (!I810MapMMIOcxx . . $ I810MapMMIO(69e744c47d5d770d).(scrn)) |
| 651 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 652 | |
| 653 | err = pci_device_map_rangecxx . . $ pci_device_map_range(3d8a456146fc9a42). (device, |
| 654 | pI810->LinearAddrcxx . . $ _I810Rec#LinearAddr., |
| 655 | pI810->FbMapSizecxx . . $ _I810Rec#FbMapSize., |
| 656 | PCI_DEV_MAP_FLAG_WRITABLEcxx . . $ `<external>/7911317625834461991/pciaccess.h:176:9`! | PCI_DEV_MAP_FLAG_WRITE_COMBINEcxx . . $ `<external>/7911317625834461991/pciaccess.h:177:9`!, |
| 657 | (void **) &pI810->FbBasecxx . . $ _I810Rec#FbBase.); |
| 658 | if (err) |
| 659 | { |
| 660 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb). (scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 661 | "Unable to map frame buffer BAR. %s (%d)\n", |
| 662 | strerrorcxx . . $ strerror(ff224f080444ee45). (err), err); |
| 663 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 664 | } |
| 665 | |
| 666 | pI810->LpRingcxx . . $ _I810Rec#LpRing.->virtual_startcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#virtual_start. = pI810->FbBasecxx . . $ _I810Rec#FbBase. + pI810->LpRingcxx . . $ _I810Rec#LpRing.->memcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#mem..Startcxx . . $ $anonymous_type_548a72e1bd8fd39a_0#Start.; |
| 667 | |
| 668 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 669 | } |
| 670 | |
| 671 | static void |
| 672 | I810UnmapMMIOcxx . . $ I810UnmapMMIO(f1d66590ec36ebe6).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 673 | { |
| 674 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 675 | |
| 676 | pci_device_unmap_rangecxx . . $ pci_device_unmap_range(85c8552ef696b3f2). (pI810->PciInfocxx . . $ _I810Rec#PciInfo., pI810->MMIOBasecxx . . $ _I810Rec#MMIOBase., I810_REG_SIZEcxx . . $ `src/legacy/i810/i810_common.h:138:9`!); |
| 677 | pI810->MMIOBasecxx . . $ _I810Rec#MMIOBase. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 678 | } |
| 679 | |
| 680 | static Boolcxx . . $ Bool# |
| 681 | I810UnmapMemcxx . . $ I810UnmapMem(69e744c47d5d770d).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 682 | { |
| 683 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 684 | |
| 685 | pci_device_unmap_rangecxx . . $ pci_device_unmap_range(85c8552ef696b3f2). (pI810->PciInfocxx . . $ _I810Rec#PciInfo., pI810->FbBasecxx . . $ _I810Rec#FbBase., pI810->FbMapSizecxx . . $ _I810Rec#FbMapSize.); |
| 686 | pI810->FbBasecxx . . $ _I810Rec#FbBase. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 687 | I810UnmapMMIOcxx . . $ I810UnmapMMIO(f1d66590ec36ebe6).(scrn); |
| 688 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 689 | } |
| 690 | |
| 691 | /* Famous last words |
| 692 | */ |
| 693 | void |
| 694 | I810PrintErrorStatecxx . . $ I810PrintErrorState(f1d66590ec36ebe6).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 695 | { |
| 696 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 697 | |
| 698 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("pgetbl_ctl: 0x%lx pgetbl_err: 0x%lx\n", |
| 699 | (unsigned long) INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(PGETBL_CTLcxx . . $ `src/legacy/i810/i810_reg.h:604:9`!), (unsigned long) INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(PGE_ERRcxx . . $ `src/legacy/i810/i810_reg.h:633:9`!)); |
| 700 | |
| 701 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("ipeir: %lx iphdr: %lx\n", (unsigned long) INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(IPEIRcxx . . $ `src/legacy/i810/i810_reg.h:368:9`!), |
| 702 | (unsigned long) INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(IPEHRcxx . . $ `src/legacy/i810/i810_reg.h:369:9`!)); |
| 703 | |
| 704 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("LP ring tail: %lx head: %lx len: %lx start %lx\n", |
| 705 | (unsigned long) INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_TAILcxx . . $ `src/legacy/i810/i810_reg.h:685:9`!), |
| 706 | (unsigned long) INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_HEADcxx . . $ `src/legacy/i810/i810_reg.h:689:9`!) & HEAD_ADDRcxx . . $ `src/legacy/i810/i810_reg.h:692:9`!, |
| 707 | (unsigned long) INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_LENcxx . . $ `src/legacy/i810/i810_reg.h:699:9`!), |
| 708 | (unsigned long) INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_STARTcxx . . $ `src/legacy/i810/i810_reg.h:695:9`!)); |
| 709 | |
| 710 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("eir: %x esr: %x emr: %x\n", |
| 711 | INREG16cxx . . $ `src/legacy/i810/i810_common.h:85:9`!(EIRcxx . . $ `src/legacy/i810/i810_reg.h:494:9`!), INREG16cxx . . $ `src/legacy/i810/i810_common.h:85:9`!(ESRcxx . . $ `src/legacy/i810/i810_reg.h:496:9`!), INREG16cxx . . $ `src/legacy/i810/i810_common.h:85:9`!(EMRcxx . . $ `src/legacy/i810/i810_reg.h:495:9`!)); |
| 712 | |
| 713 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("instdone: %x instpm: %x\n", INREG16cxx . . $ `src/legacy/i810/i810_common.h:85:9`!(INST_DONEcxx . . $ `src/legacy/i810/i810_reg.h:371:9`!), INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(INST_PMcxx . . $ `src/legacy/i810/i810_reg.h:354:9`!)); |
| 714 | |
| 715 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("memmode: %lx instps: %lx\n", (unsigned long) INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(MEMMODEcxx . . $ `src/legacy/i810/i810_reg.h:363:9`!), |
| 716 | (unsigned long) INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(INST_PScxx . . $ `src/legacy/i810/i810_reg.h:402:9`!)); |
| 717 | |
| 718 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("hwstam: %x ier: %x imr: %x iir: %x\n", |
| 719 | INREG16cxx . . $ `src/legacy/i810/i810_common.h:85:9`!(HWSTAMcxx . . $ `src/legacy/i810/i810_reg.h:511:9`!), INREG16cxx . . $ `src/legacy/i810/i810_common.h:85:9`!(IERcxx . . $ `src/legacy/i810/i810_reg.h:512:9`!), INREG16cxx . . $ `src/legacy/i810/i810_common.h:85:9`!(IMRcxx . . $ `src/legacy/i810/i810_reg.h:514:9`!), INREG16cxx . . $ `src/legacy/i810/i810_common.h:85:9`!(IIRcxx . . $ `src/legacy/i810/i810_reg.h:513:9`!)); |
| 720 | } |
| 721 | |
| 722 | /* |
| 723 | * I810Save -- |
| 724 | * |
| 725 | * This function saves the video state. It reads all of the SVGA registers |
| 726 | * into the vgaI810Rec data structure. There is in general no need to |
| 727 | * mask out bits here - just read the registers. |
| 728 | */ |
| 729 | static void |
| 730 | DoSavecxx . . $ DoSave(980b56d05455cf8f).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, vgaRegPtrcxx . . $ vgaRegPtr# vgaReg, I810RegPtrcxx . . $ I810RegPtr# i810Reg, |
| 731 | Boolcxx . . $ Bool# saveFonts) |
| 732 | { |
| 733 | I810Ptrcxx . . $ I810Ptr# pI810; |
| 734 | vgaHWPtrcxx . . $ vgaHWPtr# hwp; |
| 735 | int i; |
| 736 | |
| 737 | pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 738 | hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 739 | |
| 740 | /* |
| 741 | * This function will handle creating the data structure and filling |
| 742 | * in the generic VGA portion. |
| 743 | */ |
| 744 | if (saveFonts) |
| 745 | vgaHWSavecxx . . $ vgaHWSave(bd124082a93ed4de).(scrn, vgaReg, VGA_SR_MODEcxx . . $ `<external>/16318509353989860240/vgaHW.h:69:9`! | VGA_SR_FONTScxx . . $ `<external>/16318509353989860240/vgaHW.h:70:9`! | VGA_SR_CMAPcxx . . $ `<external>/16318509353989860240/vgaHW.h:71:9`!); |
| 746 | else |
| 747 | vgaHWSavecxx . . $ vgaHWSave(bd124082a93ed4de).(scrn, vgaReg, VGA_SR_MODEcxx . . $ `<external>/16318509353989860240/vgaHW.h:69:9`! | VGA_SR_CMAPcxx . . $ `<external>/16318509353989860240/vgaHW.h:71:9`!); |
| 748 | |
| 749 | /* |
| 750 | * The port I/O code necessary to read in the extended registers |
| 751 | * into the fields of the vgaI810Rec structure goes here. |
| 752 | */ |
| 753 | i810Reg->IOControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#IOControl. = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, IO_CTNLcxx . . $ `src/legacy/i810/i810_reg.h:88:9`!); |
| 754 | i810Reg->AddressMappingcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#AddressMapping. = hwp->readGrcxx . . $ _vgaHWRec#readGr.(hwp, ADDRESS_MAPPINGcxx . . $ `src/legacy/i810/i810_reg.h:94:9`!); |
| 755 | i810Reg->BitBLTControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#BitBLTControl. = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(BITBLT_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:107:9`!); |
| 756 | i810Reg->VideoClk2_Mcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_M. = INREG16cxx . . $ `src/legacy/i810/i810_common.h:85:9`!(VCLK2_VCO_Mcxx . . $ `src/legacy/i810/i810_reg.h:317:9`!); |
| 757 | i810Reg->VideoClk2_Ncxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_N. = INREG16cxx . . $ `src/legacy/i810/i810_common.h:85:9`!(VCLK2_VCO_Ncxx . . $ `src/legacy/i810/i810_reg.h:318:9`!); |
| 758 | i810Reg->VideoClk2_DivisorSelcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_DivisorSel. = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(VCLK2_VCO_DIV_SELcxx . . $ `src/legacy/i810/i810_reg.h:319:9`!); |
| 759 | |
| 760 | i810Reg->ExtVertTotalcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertTotal. = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, EXT_VERT_TOTALcxx . . $ `src/legacy/i810/i810_reg.h:63:9`!); |
| 761 | i810Reg->ExtVertDispEndcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertDispEnd. = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, EXT_VERT_DISPLAYcxx . . $ `src/legacy/i810/i810_reg.h:64:9`!); |
| 762 | i810Reg->ExtVertSyncStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertSyncStart. = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, EXT_VERT_SYNC_STARTcxx . . $ `src/legacy/i810/i810_reg.h:65:9`!); |
| 763 | i810Reg->ExtVertBlankStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertBlankStart. = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, EXT_VERT_BLANK_STARTcxx . . $ `src/legacy/i810/i810_reg.h:66:9`!); |
| 764 | i810Reg->ExtHorizTotalcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtHorizTotal. = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, EXT_HORIZ_TOTALcxx . . $ `src/legacy/i810/i810_reg.h:67:9`!); |
| 765 | i810Reg->ExtHorizBlankcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtHorizBlank. = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, EXT_HORIZ_BLANKcxx . . $ `src/legacy/i810/i810_reg.h:68:9`!); |
| 766 | i810Reg->ExtOffsetcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtOffset. = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, EXT_OFFSETcxx . . $ `src/legacy/i810/i810_reg.h:71:9`!); |
| 767 | i810Reg->InterlaceControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#InterlaceControl. = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, INTERLACE_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:73:9`!); |
| 768 | |
| 769 | i810Reg->PixelPipeCfg0cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg0. = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(PIXPIPE_CONFIG_0cxx . . $ `src/legacy/i810/i810_reg.h:142:9`!); |
| 770 | i810Reg->PixelPipeCfg1cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg1. = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(PIXPIPE_CONFIG_1cxx . . $ `src/legacy/i810/i810_reg.h:150:9`!); |
| 771 | i810Reg->PixelPipeCfg2cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg2. = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(PIXPIPE_CONFIG_2cxx . . $ `src/legacy/i810/i810_reg.h:161:9`!); |
| 772 | i810Reg->DisplayControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#DisplayControl. = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(DISPLAY_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:132:9`!); |
| 773 | i810Reg->LMI_FIFO_Watermarkcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LMI_FIFO_Watermark. = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(FWATER_BLCcxx . . $ `src/legacy/i810/i810_reg.h:546:9`!); |
| 774 | |
| 775 | for (i = 0; i < 8; i++) |
| 776 | i810Reg->Fencecxx . . $ $anonymous_type_548a72e1bd8fd39a_2#Fence.[i] = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(FENCEcxx . . $ `src/legacy/i810/i810_reg.h:556:9`! + i * 4); |
| 777 | |
| 778 | i810Reg->LprbTailcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbTail. = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_TAILcxx . . $ `src/legacy/i810/i810_reg.h:685:9`!); |
| 779 | i810Reg->LprbHeadcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbHead. = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_HEADcxx . . $ `src/legacy/i810/i810_reg.h:689:9`!); |
| 780 | i810Reg->LprbStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbStart. = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_STARTcxx . . $ `src/legacy/i810/i810_reg.h:695:9`!); |
| 781 | i810Reg->LprbLencxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbLen. = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_LENcxx . . $ `src/legacy/i810/i810_reg.h:699:9`!); |
| 782 | |
| 783 | if ((i810Reg->LprbTailcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbTail. & TAIL_ADDRcxx . . $ `src/legacy/i810/i810_reg.h:686:9`!) != (i810Reg->LprbHeadcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbHead. & HEAD_ADDRcxx . . $ `src/legacy/i810/i810_reg.h:692:9`!) && |
| 784 | i810Reg->LprbLencxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbLen. & RING_VALIDcxx . . $ `src/legacy/i810/i810_reg.h:707:9`!) { |
| 785 | I810PrintErrorStatecxx . . $ I810PrintErrorState(f1d66590ec36ebe6).(scrn); |
| 786 | FatalErrorcxx . . $ FatalError(f6bc48f0426f26ee).("Active ring not flushed\n"); |
| 787 | } |
| 788 | } |
| 789 | |
| 790 | static void |
| 791 | I810Savecxx . . $ I810Save(f1d66590ec36ebe6).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 792 | { |
| 793 | vgaHWPtrcxx . . $ vgaHWPtr# hwp; |
| 794 | I810Ptrcxx . . $ I810Ptr# pI810; |
| 795 | uint32_tcxx . . $ uint32_t# temp; |
| 796 | |
| 797 | hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 798 | pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 799 | DoSavecxx . . $ DoSave(980b56d05455cf8f).(scrn, &hwp->SavedRegcxx . . $ _vgaHWRec#SavedReg., &pI810->SavedRegcxx . . $ _I810Rec#SavedReg., TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!); |
| 800 | |
| 801 | temp = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(MEMMODEcxx . . $ `src/legacy/i810/i810_reg.h:363:9`!); |
| 802 | temp |= 4; |
| 803 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(MEMMODEcxx . . $ `src/legacy/i810/i810_reg.h:363:9`!, temp); |
| 804 | } |
| 805 | |
| 806 | static void |
| 807 | i810PrintModecxx . . $ i810PrintMode(cfefbafcb64b4ecd).(vgaRegPtrcxx . . $ vgaRegPtr# vgaReg, I810RegPtrcxx . . $ I810RegPtr# mode) |
| 808 | { |
| 809 | int i; |
| 810 | |
| 811 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" MiscOut: %x\n", vgaReg->MiscOutRegcxx . . $ $anonymous_type_6387b06e15418bca_0#MiscOutReg.); |
| 812 | |
| 813 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("SEQ: "); |
| 814 | for (i = 0; i < vgaReg->numSequencercxx . . $ $anonymous_type_6387b06e15418bca_0#numSequencer.; i++) { |
| 815 | if ((i & 7) == 0) |
| 816 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("\n"); |
| 817 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" %d: %x", i, vgaReg->Sequencercxx . . $ $anonymous_type_6387b06e15418bca_0#Sequencer.[i]); |
| 818 | } |
| 819 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("\n"); |
| 820 | |
| 821 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("CRTC: "); |
| 822 | for (i = 0; i < vgaReg->numCRTCcxx . . $ $anonymous_type_6387b06e15418bca_0#numCRTC.; i++) { |
| 823 | if ((i & 3) == 0) |
| 824 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("\n"); |
| 825 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" %d: %x", i, vgaReg->CRTCcxx . . $ $anonymous_type_6387b06e15418bca_0#CRTC.[i]); |
| 826 | } |
| 827 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("\n"); |
| 828 | |
| 829 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("GFX: "); |
| 830 | for (i = 0; i < vgaReg->numGraphicscxx . . $ $anonymous_type_6387b06e15418bca_0#numGraphics.; i++) { |
| 831 | if ((i & 7) == 0) |
| 832 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("\n"); |
| 833 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" %d: %x", i, vgaReg->Graphicscxx . . $ $anonymous_type_6387b06e15418bca_0#Graphics.[i]); |
| 834 | } |
| 835 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("\n"); |
| 836 | |
| 837 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("ATTR: "); |
| 838 | for (i = 0; i < vgaReg->numAttributecxx . . $ $anonymous_type_6387b06e15418bca_0#numAttribute.; i++) { |
| 839 | if ((i & 7) == 0) |
| 840 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("\n"); |
| 841 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" %d: %x", i, vgaReg->Attributecxx . . $ $anonymous_type_6387b06e15418bca_0#Attribute.[i]); |
| 842 | } |
| 843 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("\n"); |
| 844 | |
| 845 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" DisplayControl: %x\n", mode->DisplayControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#DisplayControl.); |
| 846 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" PixelPipeCfg0: %x\n", mode->PixelPipeCfg0cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg0.); |
| 847 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" PixelPipeCfg1: %x\n", mode->PixelPipeCfg1cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg1.); |
| 848 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" PixelPipeCfg2: %x\n", mode->PixelPipeCfg2cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg2.); |
| 849 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" VideoClk2_M: %x\n", mode->VideoClk2_Mcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_M.); |
| 850 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" VideoClk2_N: %x\n", mode->VideoClk2_Ncxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_N.); |
| 851 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" VideoClk2_DivisorSel: %x\n", mode->VideoClk2_DivisorSelcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_DivisorSel.); |
| 852 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" AddressMapping: %x\n", mode->AddressMappingcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#AddressMapping.); |
| 853 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" IOControl: %x\n", mode->IOControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#IOControl.); |
| 854 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" BitBLTControl: %x\n", mode->BitBLTControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#BitBLTControl.); |
| 855 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" ExtVertTotal: %x\n", mode->ExtVertTotalcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertTotal.); |
| 856 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" ExtVertDispEnd: %x\n", mode->ExtVertDispEndcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertDispEnd.); |
| 857 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" ExtVertSyncStart: %x\n", mode->ExtVertSyncStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertSyncStart.); |
| 858 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" ExtVertBlankStart: %x\n", mode->ExtVertBlankStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertBlankStart.); |
| 859 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" ExtHorizTotal: %x\n", mode->ExtHorizTotalcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtHorizTotal.); |
| 860 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" ExtHorizBlank: %x\n", mode->ExtHorizBlankcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtHorizBlank.); |
| 861 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" ExtOffset: %x\n", mode->ExtOffsetcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtOffset.); |
| 862 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" InterlaceControl: %x\n", mode->InterlaceControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#InterlaceControl.); |
| 863 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" LMI_FIFO_Watermark: %x\n", mode->LMI_FIFO_Watermarkcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LMI_FIFO_Watermark.); |
| 864 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" LprbTail: %x\n", mode->LprbTailcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbTail.); |
| 865 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" LprbHead: %x\n", mode->LprbHeadcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbHead.); |
| 866 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" LprbStart: %x\n", mode->LprbStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbStart.); |
| 867 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).(" LprbLen: %x\n", mode->LprbLencxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbLen.); |
| 868 | } |
| 869 | |
| 870 | static void |
| 871 | DoRestorecxx . . $ DoRestore(980b56d05455cf8f).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, vgaRegPtrcxx . . $ vgaRegPtr# vgaReg, I810RegPtrcxx . . $ I810RegPtr# i810Reg, |
| 872 | Boolcxx . . $ Bool# restoreFonts) |
| 873 | { |
| 874 | I810Ptrcxx . . $ I810Ptr# pI810; |
| 875 | vgaHWPtrcxx . . $ vgaHWPtr# hwp; |
| 876 | unsigned char temp; |
| 877 | unsigned int itemp; |
| 878 | int i; |
| 879 | |
| 880 | pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 881 | hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 882 | |
| 883 | if (I810_DEBUGcxx . . $ `src/legacy/i810/i810_common.h:118:9`! & DEBUG_VERBOSE_VGAcxx . . $ `src/legacy/i810/i810_common.h:127:9`!) { |
| 884 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("Setting mode in I810Restore:\n"); |
| 885 | i810PrintModecxx . . $ i810PrintMode(cfefbafcb64b4ecd).(vgaReg, i810Reg); |
| 886 | } |
| 887 | |
| 888 | vgaHWProtectcxx . . $ vgaHWProtect(dfa31234d21d6d72).(scrn, TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!); |
| 889 | |
| 890 | usleepcxx . . $ usleep(4c679297bf94b9eb).(50000); |
| 891 | |
| 892 | /* Turn off DRAM Refresh */ |
| 893 | temp = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(DRAM_ROW_CNTL_HIcxx . . $ `src/legacy/i810/i810_reg.h:261:9`!); |
| 894 | temp &= ~DRAM_REFRESH_RATEcxx . . $ `src/legacy/i810/i810_reg.h:262:9`!; |
| 895 | temp |= DRAM_REFRESH_DISABLEcxx . . $ `src/legacy/i810/i810_reg.h:263:9`!; |
| 896 | OUTREG8cxx . . $ `src/legacy/i810/i810_common.h:90:9`!(DRAM_ROW_CNTL_HIcxx . . $ `src/legacy/i810/i810_reg.h:261:9`!, temp); |
| 897 | |
| 898 | usleepcxx . . $ usleep(4c679297bf94b9eb).(1000); /* Wait 1 ms */ |
| 899 | |
| 900 | /* Write the M, N and P values */ |
| 901 | OUTREG16cxx . . $ `src/legacy/i810/i810_common.h:98:9`!(VCLK2_VCO_Mcxx . . $ `src/legacy/i810/i810_reg.h:317:9`!, i810Reg->VideoClk2_M); |
| 902 | OUTREG16cxx . . $ `src/legacy/i810/i810_common.h:98:9`!(VCLK2_VCO_Ncxx . . $ `src/legacy/i810/i810_reg.h:318:9`!, i810Reg->VideoClk2_N); |
| 903 | OUTREG8cxx . . $ `src/legacy/i810/i810_common.h:90:9`!(VCLK2_VCO_DIV_SELcxx . . $ `src/legacy/i810/i810_reg.h:319:9`!, i810Reg->VideoClk2_DivisorSel); |
| 904 | |
| 905 | /* |
| 906 | * Turn on 8 bit dac mode, if requested. This is needed to make |
| 907 | * sure that vgaHWRestore writes the values into the DAC properly. |
| 908 | * The problem occurs if 8 bit dac mode is requested and the HW is |
| 909 | * in 6 bit dac mode. If this happens, all the values are |
| 910 | * automatically shifted left twice by the HW and incorrect colors |
| 911 | * will be displayed on the screen. The only time this can happen |
| 912 | * is at server startup time and when switching back from a VT. |
| 913 | */ |
| 914 | temp = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(PIXPIPE_CONFIG_0cxx . . $ `src/legacy/i810/i810_reg.h:142:9`!); |
| 915 | temp &= 0x7F; /* Save all but the 8 bit dac mode bit */ |
| 916 | temp |= (i810Reg->PixelPipeCfg0cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg0. & DAC_8_BITcxx . . $ `src/legacy/i810/i810_reg.h:143:9`!); |
| 917 | OUTREG8cxx . . $ `src/legacy/i810/i810_common.h:90:9`!(PIXPIPE_CONFIG_0cxx . . $ `src/legacy/i810/i810_reg.h:142:9`!, temp); |
| 918 | |
| 919 | /* |
| 920 | * Code to restore any SVGA registers that have been saved/modified |
| 921 | * goes here. Note that it is allowable, and often correct, to |
| 922 | * only modify certain bits in a register by a read/modify/write cycle. |
| 923 | * |
| 924 | * A special case - when using an external clock-setting program, |
| 925 | * this function must not change bits associated with the clock |
| 926 | * selection. This condition can be checked by the condition: |
| 927 | * |
| 928 | * if (i810Reg->std.NoClock >= 0) |
| 929 | * restore clock-select bits. |
| 930 | */ |
| 931 | if (restoreFonts) |
| 932 | vgaHWRestorecxx . . $ vgaHWRestore(bd124082a93ed4de).(scrn, vgaReg, VGA_SR_FONTScxx . . $ `<external>/16318509353989860240/vgaHW.h:70:9`! | VGA_SR_MODEcxx . . $ `<external>/16318509353989860240/vgaHW.h:69:9`! | VGA_SR_CMAPcxx . . $ `<external>/16318509353989860240/vgaHW.h:71:9`!); |
| 933 | else |
| 934 | vgaHWRestorecxx . . $ vgaHWRestore(bd124082a93ed4de).(scrn, vgaReg, VGA_SR_MODEcxx . . $ `<external>/16318509353989860240/vgaHW.h:69:9`! | VGA_SR_CMAPcxx . . $ `<external>/16318509353989860240/vgaHW.h:71:9`!); |
| 935 | |
| 936 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, EXT_VERT_TOTALcxx . . $ `src/legacy/i810/i810_reg.h:63:9`!, i810Reg->ExtVertTotalcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertTotal.); |
| 937 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, EXT_VERT_DISPLAYcxx . . $ `src/legacy/i810/i810_reg.h:64:9`!, i810Reg->ExtVertDispEndcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertDispEnd.); |
| 938 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, EXT_VERT_SYNC_STARTcxx . . $ `src/legacy/i810/i810_reg.h:65:9`!, i810Reg->ExtVertSyncStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertSyncStart.); |
| 939 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, EXT_VERT_BLANK_STARTcxx . . $ `src/legacy/i810/i810_reg.h:66:9`!, i810Reg->ExtVertBlankStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertBlankStart.); |
| 940 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, EXT_HORIZ_TOTALcxx . . $ `src/legacy/i810/i810_reg.h:67:9`!, i810Reg->ExtHorizTotalcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtHorizTotal.); |
| 941 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, EXT_HORIZ_BLANKcxx . . $ `src/legacy/i810/i810_reg.h:68:9`!, i810Reg->ExtHorizBlankcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtHorizBlank.); |
| 942 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, EXT_OFFSETcxx . . $ `src/legacy/i810/i810_reg.h:71:9`!, i810Reg->ExtOffsetcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtOffset.); |
| 943 | |
| 944 | temp = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, INTERLACE_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:73:9`!); |
| 945 | temp &= ~INTERLACE_ENABLEcxx . . $ `src/legacy/i810/i810_reg.h:74:9`!; |
| 946 | temp |= i810Reg->InterlaceControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#InterlaceControl.; |
| 947 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, INTERLACE_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:73:9`!, temp); |
| 948 | |
| 949 | temp = hwp->readGrcxx . . $ _vgaHWRec#readGr.(hwp, ADDRESS_MAPPINGcxx . . $ `src/legacy/i810/i810_reg.h:94:9`!); |
| 950 | temp &= 0xE0; /* Save reserved bits 7:5 */ |
| 951 | temp |= i810Reg->AddressMappingcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#AddressMapping.; |
| 952 | hwp->writeGrcxx . . $ _vgaHWRec#writeGr.(hwp, ADDRESS_MAPPINGcxx . . $ `src/legacy/i810/i810_reg.h:94:9`!, temp); |
| 953 | |
| 954 | /* Setting the OVRACT Register for video overlay */ |
| 955 | { |
| 956 | uint32_tcxx . . $ uint32_t# LCD_TV_Control = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LCD_TV_Ccxx . . $ `src/legacy/i810/i810_reg.h:870:9`!); |
| 957 | uint32_tcxx . . $ uint32_t# TV_HTotal = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LCD_TV_HTOTALcxx . . $ `src/legacy/i810/i810_reg.h:869:9`!); |
| 958 | uint32_tcxx . . $ uint32_t# ActiveStart, ActiveEnd; |
| 959 | |
| 960 | if((LCD_TV_Control & LCD_TV_ENABLEcxx . . $ `src/legacy/i810/i810_reg.h:873:9`!) |
| 961 | && !(LCD_TV_Control & LCD_TV_VGAMODcxx . . $ `src/legacy/i810/i810_reg.h:874:9`!) |
| 962 | && TV_HTotal) { |
| 963 | ActiveStart = ((TV_HTotal >> 16) & 0xfff) - 31; |
| 964 | ActiveEnd = (TV_HTotal & 0x3ff) - 31; |
| 965 | } else { |
| 966 | ActiveStart = i810Reg->OverlayActiveStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#OverlayActiveStart.; |
| 967 | ActiveEnd = i810Reg->OverlayActiveEndcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#OverlayActiveEnd.; |
| 968 | } |
| 969 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(LCD_TV_OVRACTcxx . . $ `src/legacy/i810/i810_reg.h:871:9`!, |
| 970 | (ActiveEnd << 16) | ActiveStart); |
| 971 | } |
| 972 | |
| 973 | /* Turn on DRAM Refresh */ |
| 974 | temp = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(DRAM_ROW_CNTL_HIcxx . . $ `src/legacy/i810/i810_reg.h:261:9`!); |
| 975 | temp &= ~DRAM_REFRESH_RATEcxx . . $ `src/legacy/i810/i810_reg.h:262:9`!; |
| 976 | temp |= DRAM_REFRESH_60HZcxx . . $ `src/legacy/i810/i810_reg.h:264:9`!; |
| 977 | OUTREG8cxx . . $ `src/legacy/i810/i810_common.h:90:9`!(DRAM_ROW_CNTL_HIcxx . . $ `src/legacy/i810/i810_reg.h:261:9`!, temp); |
| 978 | |
| 979 | temp = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(BITBLT_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:107:9`!); |
| 980 | temp &= ~COLEXP_MODEcxx . . $ `src/legacy/i810/i810_reg.h:108:9`!; |
| 981 | temp |= i810Reg->BitBLTControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#BitBLTControl.; |
| 982 | OUTREG8cxx . . $ `src/legacy/i810/i810_common.h:90:9`!(BITBLT_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:107:9`!, temp); |
| 983 | |
| 984 | temp = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(DISPLAY_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:132:9`!); |
| 985 | temp &= ~(VGA_WRAP_MODEcxx . . $ `src/legacy/i810/i810_reg.h:133:9`! | GUI_MODEcxx . . $ `src/legacy/i810/i810_reg.h:136:9`!); |
| 986 | temp |= i810Reg->DisplayControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#DisplayControl.; |
| 987 | OUTREG8cxx . . $ `src/legacy/i810/i810_common.h:90:9`!(DISPLAY_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:132:9`!, temp); |
| 988 | |
| 989 | temp = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(PIXPIPE_CONFIG_0cxx . . $ `src/legacy/i810/i810_reg.h:142:9`!); |
| 990 | temp &= 0x64; /* Save reserved bits 6:5,2 */ |
| 991 | temp |= i810Reg->PixelPipeCfg0cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg0.; |
| 992 | OUTREG8cxx . . $ `src/legacy/i810/i810_common.h:90:9`!(PIXPIPE_CONFIG_0cxx . . $ `src/legacy/i810/i810_reg.h:142:9`!, temp); |
| 993 | |
| 994 | temp = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(PIXPIPE_CONFIG_2cxx . . $ `src/legacy/i810/i810_reg.h:161:9`!); |
| 995 | temp &= 0xF3; /* Save reserved bits 7:4,1:0 */ |
| 996 | temp |= i810Reg->PixelPipeCfg2cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg2.; |
| 997 | OUTREG8cxx . . $ `src/legacy/i810/i810_common.h:90:9`!(PIXPIPE_CONFIG_2cxx . . $ `src/legacy/i810/i810_reg.h:161:9`!, temp); |
| 998 | |
| 999 | temp = INREG8cxx . . $ `src/legacy/i810/i810_common.h:84:9`!(PIXPIPE_CONFIG_1cxx . . $ `src/legacy/i810/i810_reg.h:150:9`!); |
| 1000 | temp &= ~DISPLAY_COLOR_MODEcxx . . $ `src/legacy/i810/i810_reg.h:151:9`!; |
| 1001 | temp &= 0xEF; /* Restore the CRT control bit */ |
| 1002 | temp |= i810Reg->PixelPipeCfg1cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg1.; |
| 1003 | OUTREG8cxx . . $ `src/legacy/i810/i810_common.h:90:9`!(PIXPIPE_CONFIG_1cxx . . $ `src/legacy/i810/i810_reg.h:150:9`!, temp); |
| 1004 | |
| 1005 | OUTREG16cxx . . $ `src/legacy/i810/i810_common.h:98:9`!(EIRcxx . . $ `src/legacy/i810/i810_reg.h:494:9`!, 0); |
| 1006 | |
| 1007 | itemp = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(FWATER_BLCcxx . . $ `src/legacy/i810/i810_reg.h:546:9`!); |
| 1008 | itemp &= ~(LM_BURST_LENGTHcxx . . $ `src/legacy/i810/i810_reg.h:550:9`! | LM_FIFO_WATERMARKcxx . . $ `src/legacy/i810/i810_reg.h:551:9`! | |
| 1009 | MM_BURST_LENGTHcxx . . $ `src/legacy/i810/i810_reg.h:548:9`! | MM_FIFO_WATERMARKcxx . . $ `src/legacy/i810/i810_reg.h:549:9`!); |
| 1010 | itemp |= i810Reg->LMI_FIFO_Watermarkcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LMI_FIFO_Watermark.; |
| 1011 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(FWATER_BLCcxx . . $ `src/legacy/i810/i810_reg.h:546:9`!, itemp); |
| 1012 | |
| 1013 | for (i = 0; i < 8; i++) { |
| 1014 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(FENCEcxx . . $ `src/legacy/i810/i810_reg.h:556:9`! + i * 4, i810Reg->Fence[i]); |
| 1015 | if (I810_DEBUGcxx . . $ `src/legacy/i810/i810_common.h:118:9`! & DEBUG_VERBOSE_VGAcxx . . $ `src/legacy/i810/i810_common.h:127:9`!) |
| 1016 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("Fence Register : %x\n", i810Reg->Fencecxx . . $ $anonymous_type_548a72e1bd8fd39a_2#Fence.[i]); |
| 1017 | } |
| 1018 | |
| 1019 | /* First disable the ring buffer (Need to wait for empty first?, if so |
| 1020 | * should probably do it before entering this section) |
| 1021 | */ |
| 1022 | itemp = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_LENcxx . . $ `src/legacy/i810/i810_reg.h:699:9`!); |
| 1023 | itemp &= ~RING_VALID_MASKcxx . . $ `src/legacy/i810/i810_reg.h:706:9`!; |
| 1024 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_LENcxx . . $ `src/legacy/i810/i810_reg.h:699:9`!, itemp); |
| 1025 | |
| 1026 | /* Set up the low priority ring buffer. |
| 1027 | */ |
| 1028 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_TAILcxx . . $ `src/legacy/i810/i810_reg.h:685:9`!, 0); |
| 1029 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_HEADcxx . . $ `src/legacy/i810/i810_reg.h:689:9`!, 0); |
| 1030 | |
| 1031 | pI810->LpRingcxx . . $ _I810Rec#LpRing.->headcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#head. = 0; |
| 1032 | pI810->LpRingcxx . . $ _I810Rec#LpRing.->tailcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#tail. = 0; |
| 1033 | |
| 1034 | itemp = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_STARTcxx . . $ `src/legacy/i810/i810_reg.h:695:9`!); |
| 1035 | itemp &= ~(START_ADDRcxx . . $ `src/legacy/i810/i810_reg.h:696:9`!); |
| 1036 | itemp |= i810Reg->LprbStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbStart.; |
| 1037 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_STARTcxx . . $ `src/legacy/i810/i810_reg.h:695:9`!, itemp); |
| 1038 | |
| 1039 | itemp = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_LENcxx . . $ `src/legacy/i810/i810_reg.h:699:9`!); |
| 1040 | itemp &= ~(RING_NR_PAGEScxx . . $ `src/legacy/i810/i810_reg.h:700:9`! | RING_REPORT_MASKcxx . . $ `src/legacy/i810/i810_reg.h:702:9`! | RING_VALID_MASKcxx . . $ `src/legacy/i810/i810_reg.h:706:9`!); |
| 1041 | itemp |= i810Reg->LprbLencxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbLen.; |
| 1042 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_LENcxx . . $ `src/legacy/i810/i810_reg.h:699:9`!, itemp); |
| 1043 | |
| 1044 | if (!(vgaReg->Attributecxx . . $ $anonymous_type_6387b06e15418bca_0#Attribute.[0x10] & 0x1)) { |
| 1045 | usleepcxx . . $ usleep(4c679297bf94b9eb).(50000); |
| 1046 | if (restoreFonts) |
| 1047 | vgaHWRestorecxx . . $ vgaHWRestore(bd124082a93ed4de).(scrn, vgaReg, |
| 1048 | VGA_SR_FONTScxx . . $ `<external>/16318509353989860240/vgaHW.h:70:9`! | VGA_SR_MODEcxx . . $ `<external>/16318509353989860240/vgaHW.h:69:9`! | VGA_SR_CMAPcxx . . $ `<external>/16318509353989860240/vgaHW.h:71:9`!); |
| 1049 | else |
| 1050 | vgaHWRestorecxx . . $ vgaHWRestore(bd124082a93ed4de).(scrn, vgaReg, VGA_SR_MODEcxx . . $ `<external>/16318509353989860240/vgaHW.h:69:9`! | VGA_SR_CMAPcxx . . $ `<external>/16318509353989860240/vgaHW.h:71:9`!); |
| 1051 | } |
| 1052 | |
| 1053 | vgaHWProtectcxx . . $ vgaHWProtect(dfa31234d21d6d72).(scrn, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!); |
| 1054 | |
| 1055 | temp = hwp->readCrtccxx . . $ _vgaHWRec#readCrtc.(hwp, IO_CTNLcxx . . $ `src/legacy/i810/i810_reg.h:88:9`!); |
| 1056 | temp &= ~(EXTENDED_ATTR_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:89:9`! | EXTENDED_CRTC_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:90:9`!); |
| 1057 | temp |= i810Reg->IOControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#IOControl.; |
| 1058 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, IO_CTNLcxx . . $ `src/legacy/i810/i810_reg.h:88:9`!, temp); |
| 1059 | } |
| 1060 | |
| 1061 | static void |
| 1062 | I810SetRingRegscxx . . $ I810SetRingRegs(f1d66590ec36ebe6).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 1063 | { |
| 1064 | unsigned int itemp; |
| 1065 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1066 | |
| 1067 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_TAILcxx . . $ `src/legacy/i810/i810_reg.h:685:9`!, 0); |
| 1068 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_HEADcxx . . $ `src/legacy/i810/i810_reg.h:689:9`!, 0); |
| 1069 | |
| 1070 | itemp = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_STARTcxx . . $ `src/legacy/i810/i810_reg.h:695:9`!); |
| 1071 | itemp &= ~(START_ADDRcxx . . $ `src/legacy/i810/i810_reg.h:696:9`!); |
| 1072 | itemp |= pI810->LpRingcxx . . $ _I810Rec#LpRing.->memcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#mem..Startcxx . . $ $anonymous_type_548a72e1bd8fd39a_0#Start.; |
| 1073 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_STARTcxx . . $ `src/legacy/i810/i810_reg.h:695:9`!, itemp); |
| 1074 | |
| 1075 | itemp = INREGcxx . . $ `src/legacy/i810/i810_common.h:86:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_LENcxx . . $ `src/legacy/i810/i810_reg.h:699:9`!); |
| 1076 | itemp &= ~(RING_NR_PAGEScxx . . $ `src/legacy/i810/i810_reg.h:700:9`! | RING_REPORT_MASKcxx . . $ `src/legacy/i810/i810_reg.h:702:9`! | RING_VALID_MASKcxx . . $ `src/legacy/i810/i810_reg.h:706:9`!); |
| 1077 | itemp |= ((pI810->LpRingcxx . . $ _I810Rec#LpRing.->memcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#mem..Sizecxx . . $ $anonymous_type_548a72e1bd8fd39a_0#Size. - 4096) | RING_NO_REPORTcxx . . $ `src/legacy/i810/i810_reg.h:705:9`! | RING_VALIDcxx . . $ `src/legacy/i810/i810_reg.h:707:9`!); |
| 1078 | OUTREGcxx . . $ `src/legacy/i810/i810_common.h:106:9`!(LP_RINGcxx . . $ `src/legacy/i810/i810_reg.h:682:9`! + RING_LENcxx . . $ `src/legacy/i810/i810_reg.h:699:9`!, itemp); |
| 1079 | } |
| 1080 | |
| 1081 | static void |
| 1082 | I810Restorecxx . . $ I810Restore(f1d66590ec36ebe6).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 1083 | { |
| 1084 | vgaHWPtrcxx . . $ vgaHWPtr# hwp; |
| 1085 | I810Ptrcxx . . $ I810Ptr# pI810; |
| 1086 | |
| 1087 | hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 1088 | pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1089 | |
| 1090 | DoRestorecxx . . $ DoRestore(980b56d05455cf8f).(scrn, &hwp->SavedRegcxx . . $ _vgaHWRec#SavedReg., &pI810->SavedRegcxx . . $ _I810Rec#SavedReg., TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!); |
| 1091 | } |
| 1092 | |
| 1093 | /* |
| 1094 | * I810CalcVCLK -- |
| 1095 | * |
| 1096 | * Determine the closest clock frequency to the one requested. |
| 1097 | */ |
| 1098 | |
| 1099 | #define MAX_VCO_FREQcxx . . $ `src/legacy/i810/i810_driver.c:1099:9`! 600.0 |
| 1100 | #define TARGET_MAX_Ncxx . . $ `src/legacy/i810/i810_driver.c:1100:9`! 30 |
| 1101 | #define REF_FREQcxx . . $ `src/legacy/i810/i810_driver.c:1101:9`! 24.0 |
| 1102 | |
| 1103 | #define CALC_VCLKcxx . . $ `src/legacy/i810/i810_driver.c:1103:9`!(m,n,p) \ |
| 1104 | (double)m / ((double)n * (1 << p)) * 4 * REF_FREQcxx . . $ `src/legacy/i810/i810_driver.c:1101:9`! |
| 1105 | |
| 1106 | static void |
| 1107 | I810CalcVCLKcxx . . $ I810CalcVCLK(be7346b2deb10f15).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, double freq) |
| 1108 | { |
| 1109 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1110 | I810RegPtrcxx . . $ I810RegPtr# i810Reg = &pI810->ModeRegcxx . . $ _I810Rec#ModeReg.; |
| 1111 | int m, n, p; |
| 1112 | double f_out; |
| 1113 | double f_err; |
| 1114 | double f_vco; |
| 1115 | int m_best = 0, n_best = 0, p_best = 0; |
| 1116 | double f_target = freq; |
| 1117 | double err_max = 0.005; |
| 1118 | double err_target = 0.001; |
| 1119 | double err_best = 999999.0; |
| 1120 | |
| 1121 | p_best = p = log(MAX_VCO_FREQcxx . . $ `src/legacy/i810/i810_driver.c:1099:9`! / f_target) / log((double)2); |
| 1122 | /* Make sure p is within range. */ |
| 1123 | if (p_best > 5) { |
| 1124 | p_best = p = 5; |
| 1125 | } |
| 1126 | |
| 1127 | f_vco = f_target * (1 << p); |
| 1128 | |
| 1129 | n = 2; |
| 1130 | do { |
| 1131 | n++; |
| 1132 | m = f_vco / (REF_FREQcxx . . $ `src/legacy/i810/i810_driver.c:1101:9`! / (double)n) / (double)4.0 + 0.5; |
| 1133 | if (m < 3) |
| 1134 | m = 3; |
| 1135 | f_out = CALC_VCLKcxx . . $ `src/legacy/i810/i810_driver.c:1103:9`!(m, n, p); |
| 1136 | f_err = 1.0 - (f_target / f_out); |
| 1137 | if (fabs(f_err) < err_max) { |
| 1138 | m_best = m; |
| 1139 | n_best = n; |
| 1140 | err_best = f_err; |
| 1141 | } |
| 1142 | } while ((fabs(f_err) >= err_target) && |
| 1143 | ((n <= TARGET_MAX_Ncxx . . $ `src/legacy/i810/i810_driver.c:1100:9`!) || (fabs(err_best) > err_max))); |
| 1144 | |
| 1145 | if (fabs(f_err) < err_target) { |
| 1146 | m_best = m; |
| 1147 | n_best = n; |
| 1148 | } |
| 1149 | |
| 1150 | i810Reg->VideoClk2_Mcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_M. = (m_best - 2) & 0x3FF; |
| 1151 | i810Reg->VideoClk2_Ncxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_N. = (n_best - 2) & 0x3FF; |
| 1152 | i810Reg->VideoClk2_DivisorSelcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_DivisorSel. = (p_best << 4); |
| 1153 | |
| 1154 | xf86DrvMsgVerbcxx . . $ xf86DrvMsgVerb(6b7e39cd61e125d1).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_INFOcxx . . $ X_INFO., 3, |
| 1155 | "Setting dot clock to %.1f MHz " "[ 0x%x 0x%x 0x%x ] " |
| 1156 | "[ %d %d %d ]\n", CALC_VCLKcxx . . $ `src/legacy/i810/i810_driver.c:1103:9`!(m_best, n_best, p_best), |
| 1157 | i810Reg->VideoClk2_Mcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_M., i810Reg->VideoClk2_Ncxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_N., |
| 1158 | i810Reg->VideoClk2_DivisorSelcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#VideoClk2_DivisorSel., m_best, n_best, p_best); |
| 1159 | } |
| 1160 | |
| 1161 | static Boolcxx . . $ Bool# |
| 1162 | I810SetModecxx . . $ I810SetMode(a7bcc27c258e2838).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, DisplayModePtrcxx . . $ DisplayModePtr# mode) |
| 1163 | { |
| 1164 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1165 | I810RegPtrcxx . . $ I810RegPtr# i810Reg = &pI810->ModeRegcxx . . $ _I810Rec#ModeReg.; |
| 1166 | vgaRegPtrcxx . . $ vgaRegPtr# pVga = &VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn)->ModeRegcxx . . $ _vgaHWRec#ModeReg.; |
| 1167 | double dclk = mode->Clockcxx . . $ _DisplayModeRec#Clock. / 1000.0; |
| 1168 | |
| 1169 | switch (scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel.) { |
| 1170 | case 8: |
| 1171 | pVga->CRTCcxx . . $ $anonymous_type_6387b06e15418bca_0#CRTC.[0x13] = scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth. >> 3; |
| 1172 | i810Reg->ExtOffsetcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtOffset. = scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth. >> 11; |
| 1173 | i810Reg->PixelPipeCfg1cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg1. = DISPLAY_8BPP_MODEcxx . . $ `src/legacy/i810/i810_reg.h:153:9`!; |
| 1174 | i810Reg->BitBLTControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#BitBLTControl. = COLEXP_8BPPcxx . . $ `src/legacy/i810/i810_reg.h:109:9`!; |
| 1175 | break; |
| 1176 | case 16: |
| 1177 | if (scrn->weightcxx . . $ _ScrnInfoRec#weight..greencxx . . $ $anonymous_type_3cc7af3137d0eb19_4#green. == 5) { |
| 1178 | i810Reg->PixelPipeCfg1cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg1. = DISPLAY_15BPP_MODEcxx . . $ `src/legacy/i810/i810_reg.h:154:9`!; |
| 1179 | } else { |
| 1180 | i810Reg->PixelPipeCfg1cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg1. = DISPLAY_16BPP_MODEcxx . . $ `src/legacy/i810/i810_reg.h:155:9`!; |
| 1181 | } |
| 1182 | pVga->CRTCcxx . . $ $anonymous_type_6387b06e15418bca_0#CRTC.[0x13] = scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth. >> 2; |
| 1183 | i810Reg->ExtOffsetcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtOffset. = scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth. >> 10; |
| 1184 | i810Reg->BitBLTControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#BitBLTControl. = COLEXP_16BPPcxx . . $ `src/legacy/i810/i810_reg.h:110:9`!; |
| 1185 | |
| 1186 | /* Enable Palette Programming for Direct Color visuals. -jens */ |
| 1187 | i810Reg->PixelPipeCfg2cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg2. = DISPLAY_GAMMA_ENABLEcxx . . $ `src/legacy/i810/i810_reg.h:162:9`!; |
| 1188 | break; |
| 1189 | case 24: |
| 1190 | pVga->CRTCcxx . . $ $anonymous_type_6387b06e15418bca_0#CRTC.[0x13] = (scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth. * 3) >> 3; |
| 1191 | i810Reg->ExtOffsetcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtOffset. = (scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth. * 3) >> 11; |
| 1192 | |
| 1193 | i810Reg->PixelPipeCfg1cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg1. = DISPLAY_24BPP_MODEcxx . . $ `src/legacy/i810/i810_reg.h:156:9`!; |
| 1194 | i810Reg->BitBLTControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#BitBLTControl. = COLEXP_24BPPcxx . . $ `src/legacy/i810/i810_reg.h:111:9`!; |
| 1195 | |
| 1196 | /* Enable Palette Programming for Direct Color visuals. -jens */ |
| 1197 | i810Reg->PixelPipeCfg2cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg2. = DISPLAY_GAMMA_ENABLEcxx . . $ `src/legacy/i810/i810_reg.h:162:9`!; |
| 1198 | break; |
| 1199 | default: |
| 1200 | break; |
| 1201 | } |
| 1202 | |
| 1203 | /* Turn on 8 bit dac if requested */ |
| 1204 | if (xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_DAC_6BITcxx . . $ OPTION_DAC_6BIT., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!)) |
| 1205 | i810Reg->PixelPipeCfg0cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg0. = DAC_6_BITcxx . . $ `src/legacy/i810/i810_reg.h:144:9`!; |
| 1206 | else |
| 1207 | i810Reg->PixelPipeCfg0cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg0. = DAC_8_BITcxx . . $ `src/legacy/i810/i810_reg.h:143:9`!; |
| 1208 | |
| 1209 | /* Do not delay CRT Blank: needed for video overlay */ |
| 1210 | i810Reg->PixelPipeCfg1cxx . . $ $anonymous_type_548a72e1bd8fd39a_2#PixelPipeCfg1. |= 0x10; |
| 1211 | |
| 1212 | /* Turn on Extended VGA Interpretation */ |
| 1213 | i810Reg->IOControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#IOControl. = EXTENDED_CRTC_CNTLcxx . . $ `src/legacy/i810/i810_reg.h:90:9`!; |
| 1214 | |
| 1215 | /* Turn on linear and page mapping */ |
| 1216 | i810Reg->AddressMappingcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#AddressMapping. = (LINEAR_MODE_ENABLEcxx . . $ `src/legacy/i810/i810_reg.h:98:9`! | GTT_MEM_MAP_ENABLEcxx . . $ `src/legacy/i810/i810_reg.h:96:9`!); |
| 1217 | |
| 1218 | /* Turn on GUI mode */ |
| 1219 | i810Reg->DisplayControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#DisplayControl. = HIRES_MODEcxx . . $ `src/legacy/i810/i810_reg.h:138:9`!; |
| 1220 | |
| 1221 | /* Calculate the extended CRTC regs */ |
| 1222 | i810Reg->ExtVertTotalcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertTotal. = (mode->CrtcVTotalcxx . . $ _DisplayModeRec#CrtcVTotal. - 2) >> 8; |
| 1223 | i810Reg->ExtVertDispEndcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertDispEnd. = (mode->CrtcVDisplaycxx . . $ _DisplayModeRec#CrtcVDisplay. - 1) >> 8; |
| 1224 | i810Reg->ExtVertSyncStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertSyncStart. = mode->CrtcVSyncStartcxx . . $ _DisplayModeRec#CrtcVSyncStart. >> 8; |
| 1225 | i810Reg->ExtVertBlankStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertBlankStart. = mode->CrtcVBlankStartcxx . . $ _DisplayModeRec#CrtcVBlankStart. >> 8; |
| 1226 | i810Reg->ExtHorizTotalcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtHorizTotal. = ((mode->CrtcHTotalcxx . . $ _DisplayModeRec#CrtcHTotal. >> 3) - 5) >> 8; |
| 1227 | i810Reg->ExtHorizBlankcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtHorizBlank. = (((mode->CrtcHBlankEndcxx . . $ _DisplayModeRec#CrtcHBlankEnd. >> 3) - 1) & 0x40) >> 6; |
| 1228 | |
| 1229 | /* |
| 1230 | * the KGA fix in vgaHW.c results in the first |
| 1231 | * scanline and the first character clock (8 pixels) |
| 1232 | * of each scanline thereafter on display with an i810 |
| 1233 | * to be blank. Restoring CRTC 3, 5, & 22 to their |
| 1234 | * "theoretical" values corrects the problem. KAO. |
| 1235 | */ |
| 1236 | pVga->CRTCcxx . . $ $anonymous_type_6387b06e15418bca_0#CRTC.[3] = (((mode->CrtcHBlankEndcxx . . $ _DisplayModeRec#CrtcHBlankEnd. >> 3) - 1) & 0x1F) | 0x80; |
| 1237 | pVga->CRTCcxx . . $ $anonymous_type_6387b06e15418bca_0#CRTC.[5] = ((((mode->CrtcHBlankEndcxx . . $ _DisplayModeRec#CrtcHBlankEnd. >> 3) - 1) & 0x20) << 2) |
| 1238 | | (((mode->CrtcHSyncEndcxx . . $ _DisplayModeRec#CrtcHSyncEnd. >> 3)) & 0x1F); |
| 1239 | pVga->CRTCcxx . . $ $anonymous_type_6387b06e15418bca_0#CRTC.[22] = (mode->CrtcVBlankEndcxx . . $ _DisplayModeRec#CrtcVBlankEnd. - 1) & 0xFF; |
| 1240 | |
| 1241 | i810Reg->ExtHorizBlankcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtHorizBlank. = vgaHWHBlankKGAcxx . . $ vgaHWHBlankKGA(c28b402c36d66577).(mode, pVga, 7, 0); |
| 1242 | vgaHWVBlankKGAcxx . . $ vgaHWVBlankKGA(c28b402c36d66577).(mode, pVga, 8, 0); |
| 1243 | |
| 1244 | /* |
| 1245 | * The following workarounds are needed to get video overlay working |
| 1246 | * at 1024x768 and 1280x1024 display resolutions. |
| 1247 | */ |
| 1248 | if ((mode->CrtcVDisplaycxx . . $ _DisplayModeRec#CrtcVDisplay. == 768) && (i810Reg->ExtVertBlankStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertBlankStart. == 3)) { |
| 1249 | i810Reg->ExtVertBlankStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertBlankStart. = 2; |
| 1250 | } |
| 1251 | if ((mode->CrtcVDisplaycxx . . $ _DisplayModeRec#CrtcVDisplay. == 1024) && (i810Reg->ExtVertBlankStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertBlankStart. == 4)) { |
| 1252 | i810Reg->ExtVertBlankStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertBlankStart. = 3; |
| 1253 | } |
| 1254 | |
| 1255 | /* OVRACT Register */ |
| 1256 | i810Reg->OverlayActiveStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#OverlayActiveStart. = mode->CrtcHTotalcxx . . $ _DisplayModeRec#CrtcHTotal. - 32; |
| 1257 | i810Reg->OverlayActiveEndcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#OverlayActiveEnd. = mode->CrtcHDisplaycxx . . $ _DisplayModeRec#CrtcHDisplay. - 32; |
| 1258 | |
| 1259 | /* Turn on interlaced mode if necessary */ |
| 1260 | if (mode->Flagscxx . . $ _DisplayModeRec#Flags. & V_INTERLACEcxx . . $ V_INTERLACE.) { |
| 1261 | i810Reg->InterlaceControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#InterlaceControl. = INTERLACE_ENABLEcxx . . $ `src/legacy/i810/i810_reg.h:74:9`!; |
| 1262 | i810Reg->ExtVertDispEndcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#ExtVertDispEnd. *= 2; |
| 1263 | } else |
| 1264 | i810Reg->InterlaceControlcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#InterlaceControl. = INTERLACE_DISABLEcxx . . $ `src/legacy/i810/i810_reg.h:75:9`!; |
| 1265 | |
| 1266 | /* |
| 1267 | * Set the overscan color to 0. |
| 1268 | * NOTE: This only affects >8bpp mode. |
| 1269 | */ |
| 1270 | pVga->Attributecxx . . $ $anonymous_type_6387b06e15418bca_0#Attribute.[0x11] = 0; |
| 1271 | |
| 1272 | /* |
| 1273 | * Calculate the VCLK that most closely matches the requested dot |
| 1274 | * clock. |
| 1275 | */ |
| 1276 | I810CalcVCLKcxx . . $ I810CalcVCLK(be7346b2deb10f15).(scrn, dclk); |
| 1277 | |
| 1278 | /* Since we program the clocks ourselves, always use VCLK2. */ |
| 1279 | pVga->MiscOutRegcxx . . $ $anonymous_type_6387b06e15418bca_0#MiscOutReg. |= 0x0C; |
| 1280 | |
| 1281 | /* Calculate the FIFO Watermark and Burst Length. */ |
| 1282 | i810Reg->LMI_FIFO_Watermarkcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LMI_FIFO_Watermark. = I810CalcWatermarkcxx . . $ I810CalcWatermark(b1ffd166eed10fd2).(scrn, dclk, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!); |
| 1283 | |
| 1284 | /* Setup the ring buffer */ |
| 1285 | i810Reg->LprbTailcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbTail. = 0; |
| 1286 | i810Reg->LprbHeadcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbHead. = 0; |
| 1287 | i810Reg->LprbStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbStart. = pI810->LpRingcxx . . $ _I810Rec#LpRing.->memcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#mem..Startcxx . . $ $anonymous_type_548a72e1bd8fd39a_0#Start.; |
| 1288 | |
| 1289 | if (i810Reg->LprbStartcxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbStart.) |
| 1290 | i810Reg->LprbLencxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbLen. = ((pI810->LpRingcxx . . $ _I810Rec#LpRing.->memcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#mem..Sizecxx . . $ $anonymous_type_548a72e1bd8fd39a_0#Size. - 4096) | |
| 1291 | RING_NO_REPORTcxx . . $ `src/legacy/i810/i810_reg.h:705:9`! | RING_VALIDcxx . . $ `src/legacy/i810/i810_reg.h:707:9`!); |
| 1292 | else |
| 1293 | i810Reg->LprbLencxx . . $ $anonymous_type_548a72e1bd8fd39a_2#LprbLen. = RING_INVALIDcxx . . $ `src/legacy/i810/i810_reg.h:708:9`!; |
| 1294 | |
| 1295 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 1296 | } |
| 1297 | |
| 1298 | static Boolcxx . . $ Bool# |
| 1299 | I810ModeInitcxx . . $ I810ModeInit(a7bcc27c258e2838).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, DisplayModePtrcxx . . $ DisplayModePtr# mode) |
| 1300 | { |
| 1301 | vgaHWPtrcxx . . $ vgaHWPtr# hwp; |
| 1302 | I810Ptrcxx . . $ I810Ptr# pI810; |
| 1303 | |
| 1304 | hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 1305 | pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1306 | |
| 1307 | vgaHWUnlockcxx . . $ vgaHWUnlock(c391c84ac64e3d3f).(hwp); |
| 1308 | |
| 1309 | if (!vgaHWInitcxx . . $ vgaHWInit(a7bcc27c258e2838).(scrn, mode)) |
| 1310 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1311 | |
| 1312 | scrn->vtSemacxx . . $ _ScrnInfoRec#vtSema. = TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 1313 | |
| 1314 | if (!I810SetModecxx . . $ I810SetMode(a7bcc27c258e2838).(scrn, mode)) |
| 1315 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1316 | |
| 1317 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 1318 | if (pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.) { |
| 1319 | DRILockcxx . . $ DRILock(33abafaf28700154).(xf86ScrnToScreencxx . . $ `src/compat-api.h:49:9`!(scrn), 0); |
| 1320 | pI810->LockHeldcxx . . $ _I810Rec#LockHeld. = 1; |
| 1321 | } |
| 1322 | #endif |
| 1323 | |
| 1324 | DoRestorecxx . . $ DoRestore(980b56d05455cf8f).(scrn, &hwp->ModeRegcxx . . $ _vgaHWRec#ModeReg., &pI810->ModeRegcxx . . $ _I810Rec#ModeReg., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!); |
| 1325 | |
| 1326 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 1327 | if (pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.) { |
| 1328 | DRIUnlockcxx . . $ DRIUnlock(5ab20fc0890d99f5).(xf86ScrnToScreencxx . . $ `src/compat-api.h:49:9`!(scrn)); |
| 1329 | pI810->LockHeldcxx . . $ _I810Rec#LockHeld. = 0; |
| 1330 | } |
| 1331 | #endif |
| 1332 | |
| 1333 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 1334 | } |
| 1335 | |
| 1336 | static void |
| 1337 | I810LoadPalette15cxx . . $ I810LoadPalette15(cf5996bb44d3b516).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, int numColors, int *indices, |
| 1338 | LOCOcxx . . $ LOCO# * colors, VisualPtrcxx . . $ VisualPtr# pVisual) |
| 1339 | { |
| 1340 | vgaHWPtrcxx . . $ vgaHWPtr# hwp; |
| 1341 | int i, j, index; |
| 1342 | unsigned char r, g, b; |
| 1343 | |
| 1344 | hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 1345 | |
| 1346 | for (i = 0; i < numColors; i++) { |
| 1347 | index = indices[i]; |
| 1348 | r = colors[index].redcxx . . $ $anonymous_type_1b0c449eabf9edd3_1#red.; |
| 1349 | g = colors[index].greencxx . . $ $anonymous_type_1b0c449eabf9edd3_1#green.; |
| 1350 | b = colors[index].bluecxx . . $ $anonymous_type_1b0c449eabf9edd3_1#blue.; |
| 1351 | for (j = 0; j < 8; j++) { |
| 1352 | hwp->writeDacWriteAddrcxx . . $ _vgaHWRec#writeDacWriteAddr.(hwp, (index << 3) + j); |
| 1353 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, r); |
| 1354 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, g); |
| 1355 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, b); |
| 1356 | } |
| 1357 | } |
| 1358 | } |
| 1359 | |
| 1360 | static void |
| 1361 | I810LoadPalette16cxx . . $ I810LoadPalette16(cf5996bb44d3b516).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, int numColors, int *indices, |
| 1362 | LOCOcxx . . $ LOCO# * colors, VisualPtrcxx . . $ VisualPtr# pVisual) |
| 1363 | { |
| 1364 | vgaHWPtrcxx . . $ vgaHWPtr# hwp; |
| 1365 | int i, index; |
| 1366 | unsigned char r, g, b; |
| 1367 | |
| 1368 | hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 1369 | |
| 1370 | /* Load all four entries in each of the 64 color ranges. -jens */ |
| 1371 | for (i = 0; i < numColors; i++) { |
| 1372 | index = indices[i / 2]; |
| 1373 | r = colors[index].redcxx . . $ $anonymous_type_1b0c449eabf9edd3_1#red.; |
| 1374 | b = colors[index].bluecxx . . $ $anonymous_type_1b0c449eabf9edd3_1#blue.; |
| 1375 | index = indices[i]; |
| 1376 | g = colors[index].greencxx . . $ $anonymous_type_1b0c449eabf9edd3_1#green.; |
| 1377 | |
| 1378 | hwp->writeDacWriteAddrcxx . . $ _vgaHWRec#writeDacWriteAddr.(hwp, index << 2); |
| 1379 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, r); |
| 1380 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, g); |
| 1381 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, b); |
| 1382 | |
| 1383 | hwp->writeDacWriteAddrcxx . . $ _vgaHWRec#writeDacWriteAddr.(hwp, (index << 2) + 1); |
| 1384 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, r); |
| 1385 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, g); |
| 1386 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, b); |
| 1387 | |
| 1388 | hwp->writeDacWriteAddrcxx . . $ _vgaHWRec#writeDacWriteAddr.(hwp, (index << 2) + 2); |
| 1389 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, r); |
| 1390 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, g); |
| 1391 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, b); |
| 1392 | |
| 1393 | hwp->writeDacWriteAddrcxx . . $ _vgaHWRec#writeDacWriteAddr.(hwp, (index << 2) + 3); |
| 1394 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, r); |
| 1395 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, g); |
| 1396 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, b); |
| 1397 | |
| 1398 | i++; |
| 1399 | index = indices[i]; |
| 1400 | g = colors[index].greencxx . . $ $anonymous_type_1b0c449eabf9edd3_1#green.; |
| 1401 | |
| 1402 | hwp->writeDacWriteAddrcxx . . $ _vgaHWRec#writeDacWriteAddr.(hwp, index << 2); |
| 1403 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, r); |
| 1404 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, g); |
| 1405 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, b); |
| 1406 | |
| 1407 | hwp->writeDacWriteAddrcxx . . $ _vgaHWRec#writeDacWriteAddr.(hwp, (index << 2) + 1); |
| 1408 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, r); |
| 1409 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, g); |
| 1410 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, b); |
| 1411 | |
| 1412 | hwp->writeDacWriteAddrcxx . . $ _vgaHWRec#writeDacWriteAddr.(hwp, (index << 2) + 2); |
| 1413 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, r); |
| 1414 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, g); |
| 1415 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, b); |
| 1416 | |
| 1417 | hwp->writeDacWriteAddrcxx . . $ _vgaHWRec#writeDacWriteAddr.(hwp, (index << 2) + 3); |
| 1418 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, r); |
| 1419 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, g); |
| 1420 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, b); |
| 1421 | } |
| 1422 | } |
| 1423 | |
| 1424 | static void |
| 1425 | I810LoadPalette24cxx . . $ I810LoadPalette24(cf5996bb44d3b516).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, int numColors, int *indices, |
| 1426 | LOCOcxx . . $ LOCO# * colors, VisualPtrcxx . . $ VisualPtr# pVisual) |
| 1427 | { |
| 1428 | vgaHWPtrcxx . . $ vgaHWPtr# hwp; |
| 1429 | int i, index; |
| 1430 | unsigned char r, g, b; |
| 1431 | |
| 1432 | hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 1433 | |
| 1434 | for (i = 0; i < numColors; i++) { |
| 1435 | index = indices[i]; |
| 1436 | r = colors[index].redcxx . . $ $anonymous_type_1b0c449eabf9edd3_1#red.; |
| 1437 | g = colors[index].greencxx . . $ $anonymous_type_1b0c449eabf9edd3_1#green.; |
| 1438 | b = colors[index].bluecxx . . $ $anonymous_type_1b0c449eabf9edd3_1#blue.; |
| 1439 | hwp->writeDacWriteAddrcxx . . $ _vgaHWRec#writeDacWriteAddr.(hwp, index); |
| 1440 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, r); |
| 1441 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, g); |
| 1442 | hwp->writeDacDatacxx . . $ _vgaHWRec#writeDacData.(hwp, b); |
| 1443 | } |
| 1444 | } |
| 1445 | |
| 1446 | Boolcxx . . $ Bool# |
| 1447 | I810AllocateFrontcxx . . $ I810AllocateFront(69e744c47d5d770d).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 1448 | { |
| 1449 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1450 | int cache_lines = -1; |
| 1451 | |
| 1452 | if (pI810->DoneFrontAlloccxx . . $ _I810Rec#DoneFrontAlloc.) |
| 1453 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 1454 | |
| 1455 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&(pI810->FbMemBoxcxx . . $ _I810Rec#FbMemBox.), 0, sizeof(BoxReccxx . . $ BoxRec#)); |
| 1456 | /* Alloc FrontBuffer/Ring/Accel memory */ |
| 1457 | pI810->FbMemBoxcxx . . $ _I810Rec#FbMemBox..x1cxx . . $ pixman_box16#x1. = 0; |
| 1458 | pI810->FbMemBoxcxx . . $ _I810Rec#FbMemBox..x2cxx . . $ pixman_box16#x2. = scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth.; |
| 1459 | pI810->FbMemBoxcxx . . $ _I810Rec#FbMemBox..y1cxx . . $ pixman_box16#y1. = 0; |
| 1460 | pI810->FbMemBoxcxx . . $ _I810Rec#FbMemBox..y2cxx . . $ pixman_box16#y2. = scrn->virtualYcxx . . $ _ScrnInfoRec#virtualY.; |
| 1461 | |
| 1462 | xf86GetOptValIntegercxx . . $ xf86GetOptValInteger(462756413040cef9).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_CACHE_LINEScxx . . $ OPTION_CACHE_LINES., &cache_lines); |
| 1463 | |
| 1464 | if (cache_lines < 0) { |
| 1465 | /* make sure there is enough for two DVD sized YUV buffers */ |
| 1466 | cache_lines = (scrn->depthcxx . . $ _ScrnInfoRec#depth. == 24) ? 256 : 384; |
| 1467 | if (scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth. <= 1024) |
| 1468 | cache_lines *= 2; |
| 1469 | } |
| 1470 | /* Make sure there's enough space for cache_lines. |
| 1471 | * |
| 1472 | * Had a bug here where maxCacheLines was computed to be less than 0. |
| 1473 | * Not sure why 256 was initially subtracted from videoRam in the |
| 1474 | * maxCacheLines calculation, but that was causing a problem |
| 1475 | * for configurations that have exactly enough Ram for the framebuffer. |
| 1476 | * Common code should catch the case where there isn't enough space for |
| 1477 | * framebuffer, we'll just check for no space for cache_lines. -jens |
| 1478 | * |
| 1479 | */ |
| 1480 | { |
| 1481 | int maxCacheLines; |
| 1482 | |
| 1483 | maxCacheLines = (scrn->videoRamcxx . . $ _ScrnInfoRec#videoRam. * 1024 / |
| 1484 | (scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel. / 8) / |
| 1485 | scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth.) - scrn->virtualYcxx . . $ _ScrnInfoRec#virtualY.; |
| 1486 | if (maxCacheLines < 0) |
| 1487 | maxCacheLines = 0; |
| 1488 | if (cache_lines > maxCacheLines) |
| 1489 | cache_lines = maxCacheLines; |
| 1490 | } |
| 1491 | pI810->FbMemBoxcxx . . $ _I810Rec#FbMemBox..y2cxx . . $ pixman_box16#y2. += cache_lines; |
| 1492 | |
| 1493 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_INFOcxx . . $ X_INFO., |
| 1494 | "Adding %i scanlines for pixmap caching\n", cache_lines); |
| 1495 | |
| 1496 | /* Reserve room for the framebuffer and pixcache. Put at the top |
| 1497 | * of memory so we can have nice alignment for the tiled regions at |
| 1498 | * the start of memory. |
| 1499 | */ |
| 1500 | |
| 1501 | if (!I810AllocLowcxx . . $ I810AllocLow(ae4240c8130f9653).(&(pI810->FrontBuffercxx . . $ _I810Rec#FrontBuffer.), |
| 1502 | &(pI810->SysMemcxx . . $ _I810Rec#SysMem.), |
| 1503 | ALIGNcxx . . $ `src/legacy/i810/i810_common.h:53:9`!((pI810->FbMemBox.x2 * pI810->FbMemBox.y2 * pI810->cpp), 4096))) { |
| 1504 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., |
| 1505 | X_WARNINGcxx . . $ X_WARNING., "Framebuffer allocation failed\n"); |
| 1506 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1507 | } |
| 1508 | |
| 1509 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(pI810->LpRingcxx . . $ _I810Rec#LpRing., 0, sizeof(I810RingBuffercxx . . $ I810RingBuffer#)); |
| 1510 | if (I810AllocLowcxx . . $ I810AllocLow(ae4240c8130f9653).(&(pI810->LpRingcxx . . $ _I810Rec#LpRing.->memcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#mem.), &(pI810->SysMemcxx . . $ _I810Rec#SysMem.), 16 * 4096)) { |
| 1511 | pI810->LpRingcxx . . $ _I810Rec#LpRing.->tail_maskcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#tail_mask. = pI810->LpRingcxx . . $ _I810Rec#LpRing.->memcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#mem..Sizecxx . . $ $anonymous_type_548a72e1bd8fd39a_0#Size. - 1; |
| 1512 | pI810->LpRingcxx . . $ _I810Rec#LpRing.->virtual_startcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#virtual_start. = pI810->FbBasecxx . . $ _I810Rec#FbBase. + pI810->LpRingcxx . . $ _I810Rec#LpRing.->memcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#mem..Startcxx . . $ $anonymous_type_548a72e1bd8fd39a_0#Start.; |
| 1513 | pI810->LpRingcxx . . $ _I810Rec#LpRing.->headcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#head. = 0; |
| 1514 | pI810->LpRingcxx . . $ _I810Rec#LpRing.->tailcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#tail. = 0; |
| 1515 | pI810->LpRingcxx . . $ _I810Rec#LpRing.->spacecxx . . $ $anonymous_type_548a72e1bd8fd39a_1#space. = 0; |
| 1516 | } else { |
| 1517 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 1518 | "Ring buffer allocation failed\n"); |
| 1519 | return (FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!); |
| 1520 | } |
| 1521 | |
| 1522 | if (I810AllocLowcxx . . $ I810AllocLow(ae4240c8130f9653).(&pI810->Scratchcxx . . $ _I810Rec#Scratch., &(pI810->SysMemcxx . . $ _I810Rec#SysMem.), 64 * 1024) || |
| 1523 | I810AllocLowcxx . . $ I810AllocLow(ae4240c8130f9653).(&pI810->Scratchcxx . . $ _I810Rec#Scratch., &(pI810->SysMemcxx . . $ _I810Rec#SysMem.), 16 * 1024)) { |
| 1524 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_INFOcxx . . $ X_INFO., "Allocated Scratch Memory\n"); |
| 1525 | } else { |
| 1526 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 1527 | "Scratch memory allocation failed\n"); |
| 1528 | return (FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!); |
| 1529 | } |
| 1530 | |
| 1531 | pI810->DoneFrontAlloccxx . . $ _I810Rec#DoneFrontAlloc. = TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 1532 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 1533 | } |
| 1534 | |
| 1535 | static Boolcxx . . $ Bool# |
| 1536 | I810ScreenInitcxx . . $ I810ScreenInit(e3a4153423ca85c8).(SCREEN_INIT_ARGS_DECLcxx . . $ `src/compat-api.h:95:9`!) |
| 1537 | { |
| 1538 | ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn; |
| 1539 | vgaHWPtrcxx . . $ vgaHWPtr# hwp; |
| 1540 | I810Ptrcxx . . $ I810Ptr# pI810; |
| 1541 | VisualPtrcxx . . $ VisualPtr# visual; |
| 1542 | |
| 1543 | scrn = xf86ScreenToScrncxx . . $ xf86ScreenToScrn(9f15ec202845c37c).(screen); |
| 1544 | pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1545 | hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 1546 | |
| 1547 | pI810->LpRingcxx . . $ _I810Rec#LpRing. = calloccxx . . $ calloc(63a7bf2941bfcd7a).(sizeof(I810RingBuffercxx . . $ I810RingBuffer#),1); |
| 1548 | if (!pI810->LpRingcxx . . $ _I810Rec#LpRing.) { |
| 1549 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 1550 | "Could not allocate lpring data structure.\n"); |
| 1551 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1552 | } |
| 1553 | |
| 1554 | miClearVisualTypescxx . . $ miClearVisualTypes(49f6e7a06ebc5aa8).(); |
| 1555 | |
| 1556 | /* Re-implemented Direct Color support, -jens */ |
| 1557 | if (!miSetVisualTypescxx . . $ miSetVisualTypes(d4c1ccc1fe1a56c0).(scrn->depthcxx . . $ _ScrnInfoRec#depth., miGetDefaultVisualMaskcxx . . $ miGetDefaultVisualMask(7864480464b09eea).(scrn->depthcxx . . $ _ScrnInfoRec#depth.), |
| 1558 | scrn->rgbBitscxx . . $ _ScrnInfoRec#rgbBits., scrn->defaultVisualcxx . . $ _ScrnInfoRec#defaultVisual.)) |
| 1559 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1560 | |
| 1561 | if (!miSetPixmapDepthscxx . . $ miSetPixmapDepths(b126dc7c1de90089).()) |
| 1562 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1563 | |
| 1564 | { |
| 1565 | I810RegPtrcxx . . $ I810RegPtr# i810Reg = &pI810->ModeRegcxx . . $ _I810Rec#ModeReg.; |
| 1566 | int i; |
| 1567 | |
| 1568 | for (i = 0; i < 8; i++) |
| 1569 | i810Reg->Fencecxx . . $ $anonymous_type_548a72e1bd8fd39a_2#Fence.[i] = 0; |
| 1570 | } |
| 1571 | |
| 1572 | /* Have to init the DRM earlier than in other drivers to get agp |
| 1573 | * memory. Wonder if this is going to be a problem... |
| 1574 | */ |
| 1575 | |
| 1576 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 1577 | /* |
| 1578 | * Setup DRI after visuals have been established, but before fbScreenInit |
| 1579 | * is called. fbScreenInit will eventually call into the drivers |
| 1580 | * InitGLXVisuals call back. |
| 1581 | */ |
| 1582 | /* |
| 1583 | * pI810->directRenderingDisabled is set once in PreInit. Reinitialise |
| 1584 | * pI810->directRenderingEnabled based on it each generation. |
| 1585 | */ |
| 1586 | pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled. = !pI810->directRenderingDisabledcxx . . $ _I810Rec#directRenderingDisabled.; |
| 1587 | |
| 1588 | if (pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.==TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!) |
| 1589 | pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled. = I810DRIScreenInitcxx . . $ I810DRIScreenInit(d38b7d3414297794).(screen); |
| 1590 | |
| 1591 | #else |
| 1592 | pI810->directRenderingEnabled = FALSE; |
| 1593 | if (!I810AllocateGARTMemory(scrn)) |
| 1594 | return FALSE; |
| 1595 | if (!I810AllocateFront(scrn)) |
| 1596 | return FALSE; |
| 1597 | #endif |
| 1598 | |
| 1599 | if (!I810MapMemcxx . . $ I810MapMem(69e744c47d5d770d).(scrn)) |
| 1600 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1601 | |
| 1602 | scrn->memPhysBasecxx . . $ _ScrnInfoRec#memPhysBase. = (unsigned long)pI810->LinearAddrcxx . . $ _I810Rec#LinearAddr.; |
| 1603 | scrn->fbOffsetcxx . . $ _ScrnInfoRec#fbOffset. = 0; |
| 1604 | |
| 1605 | vgaHWSetMmioFuncscxx . . $ vgaHWSetMmioFuncs(781fb7ffe6810e56).(hwp, pI810->MMIOBasecxx . . $ _I810Rec#MMIOBase., 0); |
| 1606 | vgaHWGetIOBasecxx . . $ vgaHWGetIOBase(c391c84ac64e3d3f).(hwp); |
| 1607 | if (!vgaHWMapMemcxx . . $ vgaHWMapMem(69e744c47d5d770d).(scrn)) |
| 1608 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1609 | |
| 1610 | I810Savecxx . . $ I810Save(f1d66590ec36ebe6).(scrn); |
| 1611 | if (!I810ModeInitcxx . . $ I810ModeInit(a7bcc27c258e2838).(scrn, scrn->currentModecxx . . $ _ScrnInfoRec#currentMode.)) |
| 1612 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1613 | |
| 1614 | I810SaveScreencxx . . $ I810SaveScreen(bab54c070ab52753).(screen, FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!); |
| 1615 | I810AdjustFramecxx . . $ I810AdjustFrame(48b75b380e0d3ac6).(ADJUST_FRAME_ARGScxx . . $ `src/compat-api.h:107:9`!(scrn, scrn->frameX0, scrn->frameY0)); |
| 1616 | |
| 1617 | if (!fbScreenInitcxx . . $ fbScreenInit(4dbd3d89c253fd4f).(screen, pI810->FbBasecxx . . $ _I810Rec#FbBase. + scrn->fbOffsetcxx . . $ _ScrnInfoRec#fbOffset., |
| 1618 | scrn->virtualXcxx . . $ _ScrnInfoRec#virtualX., scrn->virtualYcxx . . $ _ScrnInfoRec#virtualY., |
| 1619 | scrn->xDpicxx . . $ _ScrnInfoRec#xDpi., scrn->yDpicxx . . $ _ScrnInfoRec#yDpi., |
| 1620 | scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth., scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel.)) |
| 1621 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1622 | |
| 1623 | if (scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel. > 8) { |
| 1624 | /* Fixup RGB ordering */ |
| 1625 | visual = screen->visualscxx . . $ _Screen#visuals. + screen->numVisualscxx . . $ _Screen#numVisuals.; |
| 1626 | while (--visual >= screen->visualscxx . . $ _Screen#visuals.) { |
| 1627 | if ((visual->classcxx . . $ _Visual#class. | DynamicClasscxx . . $ `<external>/15730760900410002532/colormap.h:64:9`!) == DirectColorcxx . . $ `<external>/1208737181511191802/X.h:709:9`!) { |
| 1628 | visual->offsetRedcxx . . $ _Visual#offsetRed. = scrn->offsetcxx . . $ _ScrnInfoRec#offset..redcxx . . $ $anonymous_type_3cc7af3137d0eb19_4#red.; |
| 1629 | visual->offsetGreencxx . . $ _Visual#offsetGreen. = scrn->offsetcxx . . $ _ScrnInfoRec#offset..greencxx . . $ $anonymous_type_3cc7af3137d0eb19_4#green.; |
| 1630 | visual->offsetBluecxx . . $ _Visual#offsetBlue. = scrn->offsetcxx . . $ _ScrnInfoRec#offset..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue.; |
| 1631 | visual->redMaskcxx . . $ _Visual#redMask. = scrn->maskcxx . . $ _ScrnInfoRec#mask..redcxx . . $ $anonymous_type_3cc7af3137d0eb19_4#red.; |
| 1632 | visual->greenMaskcxx . . $ _Visual#greenMask. = scrn->maskcxx . . $ _ScrnInfoRec#mask..greencxx . . $ $anonymous_type_3cc7af3137d0eb19_4#green.; |
| 1633 | visual->blueMaskcxx . . $ _Visual#blueMask. = scrn->maskcxx . . $ _ScrnInfoRec#mask..bluecxx . . $ $anonymous_type_3cc7af3137d0eb19_4#blue.; |
| 1634 | } |
| 1635 | } |
| 1636 | } |
| 1637 | |
| 1638 | fbPictureInitcxx . . $ fbPictureInit(9b05a17fdc67210a).(screen, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, 0); |
| 1639 | |
| 1640 | xf86SetBlackWhitePixelscxx . . $ xf86SetBlackWhitePixels(5ab20fc0890d99f5).(screen); |
| 1641 | |
| 1642 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 1643 | if (pI810->LpRingcxx . . $ _I810Rec#LpRing.->memcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#mem..Startcxx . . $ $anonymous_type_548a72e1bd8fd39a_0#Start. == 0 && pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.) { |
| 1644 | pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled. = FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1645 | I810DRICloseScreencxx . . $ I810DRICloseScreen(5ab20fc0890d99f5).(screen); |
| 1646 | } |
| 1647 | |
| 1648 | if (!pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.) { |
| 1649 | pI810->DoneFrontAlloccxx . . $ _I810Rec#DoneFrontAlloc. = FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1650 | if (!I810AllocateGARTMemorycxx . . $ I810AllocateGARTMemory(69e744c47d5d770d).(scrn)) |
| 1651 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1652 | if (!I810AllocateFrontcxx . . $ I810AllocateFront(69e744c47d5d770d).(scrn)) |
| 1653 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1654 | } |
| 1655 | #endif |
| 1656 | |
| 1657 | #ifdef HAVE_DGAPROC_Hcxx . . $ `config.h:56:9`! |
| 1658 | I810DGAInitcxx . . $ I810DGAInit(d38b7d3414297794).(screen); |
| 1659 | #endif |
| 1660 | |
| 1661 | if (!xf86InitFBManagercxx . . $ xf86InitFBManager(e4f093ce5bd613d7).(screen, &(pI810->FbMemBoxcxx . . $ _I810Rec#FbMemBox.))) { |
| 1662 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 1663 | "Failed to init memory manager\n"); |
| 1664 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1665 | } |
| 1666 | |
| 1667 | if (pI810->LpRingcxx . . $ _I810Rec#LpRing.->memcxx . . $ $anonymous_type_548a72e1bd8fd39a_1#mem..Sizecxx . . $ $anonymous_type_548a72e1bd8fd39a_0#Size. != 0) { |
| 1668 | I810SetRingRegscxx . . $ I810SetRingRegs(f1d66590ec36ebe6).(scrn); |
| 1669 | |
| 1670 | if (!pI810->noAccelcxx . . $ _I810Rec#noAccel. && !I810AccelInitcxx . . $ I810AccelInit(d38b7d3414297794).(screen)) { |
| 1671 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 1672 | "Hardware acceleration initialization failed\n"); |
| 1673 | } |
| 1674 | |
| 1675 | I810EmitFlushcxx . . $ I810EmitFlush(f1d66590ec36ebe6).(scrn); |
| 1676 | } |
| 1677 | |
| 1678 | xf86SetBackingStorecxx . . $ xf86SetBackingStore(5ab20fc0890d99f5).(screen); |
| 1679 | xf86SetSilkenMousecxx . . $ xf86SetSilkenMouse(5ab20fc0890d99f5).(screen); |
| 1680 | |
| 1681 | miDCInitializecxx . . $ miDCInitialize(35552165cb149b6c).(screen, xf86GetPointerScreenFuncscxx . . $ xf86GetPointerScreenFuncs(50c7df7de5344ebb).()); |
| 1682 | |
| 1683 | if (!xf86ReturnOptValBoolcxx . . $ xf86ReturnOptValBool(f5815cd44395110f).(pI810->Optionscxx . . $ _I810Rec#Options., OPTION_SW_CURSORcxx . . $ OPTION_SW_CURSOR., FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!)) { |
| 1684 | if (!I810CursorInitcxx . . $ I810CursorInit(d38b7d3414297794).(screen)) { |
| 1685 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_ERRORcxx . . $ X_ERROR., |
| 1686 | "Hardware cursor initialization failed\n"); |
| 1687 | } |
| 1688 | } |
| 1689 | |
| 1690 | if (!miCreateDefColormapcxx . . $ miCreateDefColormap(d38b7d3414297794).(screen)) |
| 1691 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1692 | |
| 1693 | /* Use driver specific palette load routines for Direct Color support. -jens */ |
| 1694 | if (scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel. == 16) { |
| 1695 | if (scrn->depthcxx . . $ _ScrnInfoRec#depth. == 15) { |
| 1696 | if (!xf86HandleColormapscxx . . $ xf86HandleColormaps(2812154bcf86c7c6).(screen, 256, 8, I810LoadPalette15cxx . . $ I810LoadPalette15(cf5996bb44d3b516)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 1697 | CMAP_PALETTED_TRUECOLORcxx . . $ `<external>/13545692195743188239/xf86cmap.h:35:9`! | |
| 1698 | CMAP_RELOAD_ON_MODE_SWITCHcxx . . $ `<external>/13545692195743188239/xf86cmap.h:36:9`!)) |
| 1699 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1700 | } else { |
| 1701 | if (!xf86HandleColormapscxx . . $ xf86HandleColormaps(2812154bcf86c7c6).(screen, 256, 8, I810LoadPalette16cxx . . $ I810LoadPalette16(cf5996bb44d3b516)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 1702 | CMAP_PALETTED_TRUECOLORcxx . . $ `<external>/13545692195743188239/xf86cmap.h:35:9`! | |
| 1703 | CMAP_RELOAD_ON_MODE_SWITCHcxx . . $ `<external>/13545692195743188239/xf86cmap.h:36:9`!)) |
| 1704 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1705 | } |
| 1706 | } else { |
| 1707 | if (!xf86HandleColormapscxx . . $ xf86HandleColormaps(2812154bcf86c7c6).(screen, 256, 8, I810LoadPalette24cxx . . $ I810LoadPalette24(cf5996bb44d3b516)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, |
| 1708 | CMAP_PALETTED_TRUECOLORcxx . . $ `<external>/13545692195743188239/xf86cmap.h:35:9`! | |
| 1709 | CMAP_RELOAD_ON_MODE_SWITCHcxx . . $ `<external>/13545692195743188239/xf86cmap.h:36:9`!)) |
| 1710 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1711 | } |
| 1712 | |
| 1713 | xf86DPMSInitcxx . . $ xf86DPMSInit(562c6e98770a14fd).(screen, I810DisplayPowerManagementSetcxx . . $ I810DisplayPowerManagementSet(48b75b380e0d3ac6)., 0); |
| 1714 | |
| 1715 | I810InitVideocxx . . $ I810InitVideo(5ab20fc0890d99f5).(screen); |
| 1716 | |
| 1717 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 1718 | if (pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.) { |
| 1719 | /* Now that mi, fb, drm and others have done their thing, |
| 1720 | * complete the DRI setup. |
| 1721 | */ |
| 1722 | pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled. = I810DRIFinishScreenInitcxx . . $ I810DRIFinishScreenInit(d38b7d3414297794).(screen); |
| 1723 | } |
| 1724 | #ifdef XvMCExtensioncxx . . $ `<external>/9559255664802066005/xorg-server.h:145:9`! |
| 1725 | if ((pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.) && (pI810->numSurfacescxx . . $ _I810Rec#numSurfaces.)) { |
| 1726 | /* Initialize the hardware motion compensation code */ |
| 1727 | I810InitMCcxx . . $ I810InitMC(5ab20fc0890d99f5).(screen); |
| 1728 | } |
| 1729 | #endif |
| 1730 | #endif |
| 1731 | |
| 1732 | if (pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.) { |
| 1733 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_INFOcxx . . $ X_INFO., "Direct rendering enabled\n"); |
| 1734 | } else { |
| 1735 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_WARNINGcxx . . $ X_WARNING., "Direct rendering disabled\n"); |
| 1736 | } |
| 1737 | |
| 1738 | screen->SaveScreencxx . . $ _Screen#SaveScreen. = I810SaveScreencxx . . $ I810SaveScreen(bab54c070ab52753).; |
| 1739 | pI810->CloseScreencxx . . $ _I810Rec#CloseScreen. = screen->CloseScreencxx . . $ _Screen#CloseScreen.; |
| 1740 | screen->CloseScreencxx . . $ _Screen#CloseScreen. = I810CloseScreencxx . . $ I810CloseScreen(d38b7d3414297794).; |
| 1741 | |
| 1742 | if (serverGenerationcxx . . $ serverGeneration. == 1) |
| 1743 | xf86ShowUnusedOptionscxx . . $ xf86ShowUnusedOptions(e4c585818da72c2f).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., scrn->optionscxx . . $ _ScrnInfoRec#options.); |
| 1744 | |
| 1745 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 1746 | } |
| 1747 | |
| 1748 | Boolcxx . . $ Bool# |
| 1749 | I810SwitchModecxx . . $ I810SwitchMode(a7bcc27c258e2838).(SWITCH_MODE_ARGS_DECLcxx . . $ `src/compat-api.h:109:9`!) |
| 1750 | { |
| 1751 | SCRN_INFO_PTRcxx . . $ `src/compat-api.h:90:9`!(arg); |
| 1752 | #if 0 |
| 1753 | I810Ptr pI810 = I810PTR(scrn); |
| 1754 | #endif |
| 1755 | if (I810_DEBUGcxx . . $ `src/legacy/i810/i810_common.h:118:9`! & DEBUG_VERBOSE_CURSORcxx . . $ `src/legacy/i810/i810_common.h:131:9`!) |
| 1756 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("I810SwitchMode %p\n", (void *)mode); |
| 1757 | |
| 1758 | #if 0 |
| 1759 | /* |
| 1760 | * This has been added to prevent lockups on mode switch by modeling |
| 1761 | * it after I810Leave()/I810Enter() but the call to I810DRILeave() |
| 1762 | * was missing so it caused the opposite. |
| 1763 | * The version below works but it is doubtful it does any good. |
| 1764 | * If lockups on mode switch are still seen revisit this code. (EE) |
| 1765 | */ |
| 1766 | |
| 1767 | # ifdef HAVE_DRI1 |
| 1768 | if (pI810->directRenderingEnabled) { |
| 1769 | if (I810_DEBUG & DEBUG_VERBOSE_DRI) |
| 1770 | ErrorF("calling dri lock\n"); |
| 1771 | DRILock(screenInfo.screens[scrnIndex], 0); |
| 1772 | pI810->LockHeld = 1; |
| 1773 | } |
| 1774 | # endif |
| 1775 | if (pI810->AccelInfoRec != NULL) { |
| 1776 | I810RefreshRing(scrn); |
| 1777 | I810Sync(scrn); |
| 1778 | pI810->AccelInfoRec->NeedToSync = FALSE; |
| 1779 | } |
| 1780 | I810Restore(scrn); |
| 1781 | |
| 1782 | # ifdef HAVE_DRI1 |
| 1783 | if (pI810->directRenderingEnabled) { |
| 1784 | if (!I810DRILeave(scrn)) |
| 1785 | return FALSE; |
| 1786 | if (!I810DRIEnter(scrn)) |
| 1787 | return FALSE; |
| 1788 | |
| 1789 | if (I810_DEBUG & DEBUG_VERBOSE_DRI) |
| 1790 | ErrorF("calling dri unlock\n"); |
| 1791 | DRIUnlock(screenInfo.screens[scrnIndex]); |
| 1792 | pI810->LockHeld = 0; |
| 1793 | } |
| 1794 | # endif |
| 1795 | #endif |
| 1796 | return I810ModeInitcxx . . $ I810ModeInit(a7bcc27c258e2838).(scrn, mode); |
| 1797 | } |
| 1798 | |
| 1799 | void |
| 1800 | I810AdjustFramecxx . . $ I810AdjustFrame(48b75b380e0d3ac6).(ADJUST_FRAME_ARGS_DECLcxx . . $ `src/compat-api.h:106:9`!) |
| 1801 | { |
| 1802 | SCRN_INFO_PTRcxx . . $ `src/compat-api.h:90:9`!(arg); |
| 1803 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1804 | vgaHWPtrcxx . . $ vgaHWPtr# hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 1805 | int Base; |
| 1806 | |
| 1807 | #if 1 |
| 1808 | if (pI810->showCachecxx . . $ _I810Rec#showCache.) { |
| 1809 | int lastline = pI810->FbMapSizecxx . . $ _I810Rec#FbMapSize. / |
| 1810 | ((scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth. * scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel.) / 8); |
| 1811 | lastline -= scrn->currentModecxx . . $ _ScrnInfoRec#currentMode.->VDisplaycxx . . $ _DisplayModeRec#VDisplay.; |
| 1812 | if (y > 0) |
| 1813 | y += scrn->currentModecxx . . $ _ScrnInfoRec#currentMode.->VDisplaycxx . . $ _DisplayModeRec#VDisplay.; |
| 1814 | if (y > lastline) y = lastline; |
| 1815 | } |
| 1816 | #endif |
| 1817 | Base = (y * scrn->displayWidthcxx . . $ _ScrnInfoRec#displayWidth. + x) >> 2; |
| 1818 | |
| 1819 | if (I810_DEBUGcxx . . $ `src/legacy/i810/i810_common.h:118:9`! & DEBUG_VERBOSE_CURSORcxx . . $ `src/legacy/i810/i810_common.h:131:9`!) |
| 1820 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("I810AdjustFrame %d,%d\n", x, y); |
| 1821 | |
| 1822 | switch (scrn->bitsPerPixelcxx . . $ _ScrnInfoRec#bitsPerPixel.) { |
| 1823 | case 8: |
| 1824 | break; |
| 1825 | case 16: |
| 1826 | Base *= 2; |
| 1827 | break; |
| 1828 | case 24: |
| 1829 | /* KW: Need to do 16-pixel alignment for i810, otherwise you |
| 1830 | * get bad watermark problems. Need to fixup the mouse |
| 1831 | * pointer positioning to take this into account. |
| 1832 | */ |
| 1833 | pI810->CursorOffsetcxx . . $ _I810Rec#CursorOffset. = (Base & 0x3) * 4; |
| 1834 | Base &= ~0x3; |
| 1835 | Base *= 3; |
| 1836 | break; |
| 1837 | case 32: |
| 1838 | Base *= 4; |
| 1839 | break; |
| 1840 | } |
| 1841 | |
| 1842 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, START_ADDR_LOcxx . . $ `src/legacy/i810/i810_reg.h:61:9`!, Base & 0xFF); |
| 1843 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, START_ADDR_HIcxx . . $ `src/legacy/i810/i810_reg.h:60:9`!, (Base & 0xFF00) >> 8); |
| 1844 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, EXT_START_ADDR_HIcxx . . $ `src/legacy/i810/i810_reg.h:72:9`!, (Base & 0x3FC00000) >> 22); |
| 1845 | hwp->writeCrtccxx . . $ _vgaHWRec#writeCrtc.(hwp, EXT_START_ADDRcxx . . $ `src/legacy/i810/i810_reg.h:69:9`!, |
| 1846 | ((Base & 0x00eF0000) >> 16 | EXT_START_ADDR_ENABLEcxx . . $ `src/legacy/i810/i810_reg.h:70:9`!)); |
| 1847 | } |
| 1848 | |
| 1849 | /* These functions are usually called with the lock **not held**. |
| 1850 | */ |
| 1851 | static Boolcxx . . $ Bool# |
| 1852 | I810EnterVTcxx . . $ I810EnterVT(69e744c47d5d770d).(VT_FUNC_ARGS_DECLcxx . . $ `src/compat-api.h:114:9`!) |
| 1853 | { |
| 1854 | SCRN_INFO_PTRcxx . . $ `src/compat-api.h:90:9`!(arg); |
| 1855 | |
| 1856 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 1857 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1858 | #endif |
| 1859 | |
| 1860 | if (I810_DEBUGcxx . . $ `src/legacy/i810/i810_common.h:118:9`! & DEBUG_VERBOSE_DRIcxx . . $ `src/legacy/i810/i810_common.h:133:9`!) |
| 1861 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("\n\nENTER VT\n"); |
| 1862 | |
| 1863 | if (!I810BindGARTMemorycxx . . $ I810BindGARTMemory(69e744c47d5d770d).(scrn)) { |
| 1864 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1865 | } |
| 1866 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 1867 | if (!I810DRIEntercxx . . $ I810DRIEnter(69e744c47d5d770d).(scrn)) { |
| 1868 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1869 | } |
| 1870 | if (pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.) { |
| 1871 | if (I810_DEBUGcxx . . $ `src/legacy/i810/i810_common.h:118:9`! & DEBUG_VERBOSE_DRIcxx . . $ `src/legacy/i810/i810_common.h:133:9`!) |
| 1872 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("calling dri unlock\n"); |
| 1873 | DRIUnlockcxx . . $ DRIUnlock(5ab20fc0890d99f5).(xf86ScrnToScreencxx . . $ `src/compat-api.h:49:9`!(scrn)); |
| 1874 | pI810->LockHeldcxx . . $ _I810Rec#LockHeld. = 0; |
| 1875 | } |
| 1876 | #endif |
| 1877 | |
| 1878 | if (!I810ModeInitcxx . . $ I810ModeInit(a7bcc27c258e2838).(scrn, scrn->currentModecxx . . $ _ScrnInfoRec#currentMode.)) |
| 1879 | return FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1880 | I810AdjustFramecxx . . $ I810AdjustFrame(48b75b380e0d3ac6).(ADJUST_FRAME_ARGScxx . . $ `src/compat-api.h:107:9`!(scrn, scrn->frameX0, scrn->frameY0)); |
| 1881 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 1882 | } |
| 1883 | |
| 1884 | static void |
| 1885 | I810LeaveVTcxx . . $ I810LeaveVT(f1d66590ec36ebe6).(VT_FUNC_ARGS_DECLcxx . . $ `src/compat-api.h:114:9`!) |
| 1886 | { |
| 1887 | SCRN_INFO_PTRcxx . . $ `src/compat-api.h:90:9`!(arg); |
| 1888 | vgaHWPtrcxx . . $ vgaHWPtr# hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 1889 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1890 | |
| 1891 | if (I810_DEBUGcxx . . $ `src/legacy/i810/i810_common.h:118:9`! & DEBUG_VERBOSE_DRIcxx . . $ `src/legacy/i810/i810_common.h:133:9`!) |
| 1892 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("\n\n\nLeave VT\n"); |
| 1893 | |
| 1894 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 1895 | if (pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.) { |
| 1896 | if (I810_DEBUGcxx . . $ `src/legacy/i810/i810_common.h:118:9`! & DEBUG_VERBOSE_DRIcxx . . $ `src/legacy/i810/i810_common.h:133:9`!) |
| 1897 | ErrorFcxx . . $ ErrorF(326aeb464d16410c).("calling dri lock\n"); |
| 1898 | DRILockcxx . . $ DRILock(33abafaf28700154).(xf86ScrnToScreencxx . . $ `src/compat-api.h:49:9`!(scrn), 0); |
| 1899 | pI810->LockHeldcxx . . $ _I810Rec#LockHeld. = 1; |
| 1900 | } |
| 1901 | #endif |
| 1902 | |
| 1903 | #ifdef HAVE_XAA_H |
| 1904 | if (pI810->AccelInfoRec != NULL) { |
| 1905 | I810RefreshRing(scrn); |
| 1906 | I810Sync(scrn); |
| 1907 | pI810->AccelInfoRec->NeedToSync = FALSE; |
| 1908 | } |
| 1909 | #endif |
| 1910 | I810Restorecxx . . $ I810Restore(f1d66590ec36ebe6).(scrn); |
| 1911 | |
| 1912 | if (!I810UnbindGARTMemorycxx . . $ I810UnbindGARTMemory(69e744c47d5d770d).(scrn)) |
| 1913 | return; |
| 1914 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 1915 | if (!I810DRILeavecxx . . $ I810DRILeave(69e744c47d5d770d).(scrn)) |
| 1916 | return; |
| 1917 | #endif |
| 1918 | |
| 1919 | vgaHWLockcxx . . $ vgaHWLock(c391c84ac64e3d3f).(hwp); |
| 1920 | } |
| 1921 | |
| 1922 | static Boolcxx . . $ Bool# |
| 1923 | I810CloseScreencxx . . $ I810CloseScreen(d38b7d3414297794).(CLOSE_SCREEN_ARGS_DECLcxx . . $ `src/compat-api.h:103:9`!) |
| 1924 | { |
| 1925 | ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn = xf86ScreenToScrncxx . . $ xf86ScreenToScrn(9f15ec202845c37c).(screen); |
| 1926 | vgaHWPtrcxx . . $ vgaHWPtr# hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 1927 | I810Ptrcxx . . $ I810Ptr# pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 1928 | #ifdef HAVE_XAA_H |
| 1929 | XAAInfoRecPtr infoPtr = pI810->AccelInfoRec; |
| 1930 | #endif |
| 1931 | |
| 1932 | if (scrn->vtSemacxx . . $ _ScrnInfoRec#vtSema. == TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!) { |
| 1933 | #ifdef HAVE_XAA_H |
| 1934 | if (pI810->AccelInfoRec != NULL) { |
| 1935 | I810RefreshRing(scrn); |
| 1936 | I810Sync(scrn); |
| 1937 | pI810->AccelInfoRec->NeedToSync = FALSE; |
| 1938 | } |
| 1939 | #endif |
| 1940 | I810Restorecxx . . $ I810Restore(f1d66590ec36ebe6).(scrn); |
| 1941 | vgaHWLockcxx . . $ vgaHWLock(c391c84ac64e3d3f).(hwp); |
| 1942 | } |
| 1943 | #ifdef HAVE_DRI1cxx . . $ `config.h:65:9`! |
| 1944 | if (pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled.) { |
| 1945 | I810DRICloseScreencxx . . $ I810DRICloseScreen(5ab20fc0890d99f5).(screen); |
| 1946 | pI810->directRenderingEnabledcxx . . $ _I810Rec#directRenderingEnabled. = FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1947 | } |
| 1948 | #endif |
| 1949 | |
| 1950 | if (scrn->vtSemacxx . . $ _ScrnInfoRec#vtSema. == TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!) { |
| 1951 | I810UnbindGARTMemorycxx . . $ I810UnbindGARTMemory(69e744c47d5d770d).(scrn); |
| 1952 | I810Restorecxx . . $ I810Restore(f1d66590ec36ebe6).(scrn); |
| 1953 | vgaHWLockcxx . . $ vgaHWLock(c391c84ac64e3d3f).(hwp); |
| 1954 | } |
| 1955 | |
| 1956 | I810UnmapMemcxx . . $ I810UnmapMem(69e744c47d5d770d).(scrn); |
| 1957 | vgaHWUnmapMemcxx . . $ vgaHWUnmapMem(f1d66590ec36ebe6).(scrn); |
| 1958 | |
| 1959 | if (pI810->ScanlineColorExpandBufferscxx . . $ _I810Rec#ScanlineColorExpandBuffers.) { |
| 1960 | freecxx . . $ free(5d22bdacc48458e8).(pI810->ScanlineColorExpandBufferscxx . . $ _I810Rec#ScanlineColorExpandBuffers.); |
| 1961 | pI810->ScanlineColorExpandBufferscxx . . $ _I810Rec#ScanlineColorExpandBuffers. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1962 | } |
| 1963 | |
| 1964 | #ifdef HAVE_XAA_H |
| 1965 | if (infoPtr) { |
| 1966 | if (infoPtr->ScanlineColorExpandBuffers) |
| 1967 | free(infoPtr->ScanlineColorExpandBuffers); |
| 1968 | XAADestroyInfoRec(infoPtr); |
| 1969 | pI810->AccelInfoRec = NULL; |
| 1970 | } |
| 1971 | #endif |
| 1972 | |
| 1973 | if (pI810->CursorInfoReccxx . . $ _I810Rec#CursorInfoRec.) { |
| 1974 | xf86DestroyCursorInfoReccxx . . $ xf86DestroyCursorInfoRec(1c5de324d66c6a96).(pI810->CursorInfoReccxx . . $ _I810Rec#CursorInfoRec.); |
| 1975 | pI810->CursorInfoReccxx . . $ _I810Rec#CursorInfoRec. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1976 | } |
| 1977 | |
| 1978 | /* Free all allocated video ram. |
| 1979 | */ |
| 1980 | pI810->SysMemcxx . . $ _I810Rec#SysMem. = pI810->SavedSysMemcxx . . $ _I810Rec#SavedSysMem.; |
| 1981 | pI810->DcacheMemcxx . . $ _I810Rec#DcacheMem. = pI810->SavedDcacheMemcxx . . $ _I810Rec#SavedDcacheMem.; |
| 1982 | pI810->DoneFrontAlloccxx . . $ _I810Rec#DoneFrontAlloc. = FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1983 | |
| 1984 | /* Need to actually close the gart fd, or the unbound memory will just sit |
| 1985 | * around. Will prevent the Xserver from recycling. |
| 1986 | */ |
| 1987 | xf86GARTCloseScreencxx . . $ xf86GARTCloseScreen(7864480464b09eea).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex.); |
| 1988 | |
| 1989 | freecxx . . $ free(5d22bdacc48458e8).(pI810->LpRingcxx . . $ _I810Rec#LpRing.); |
| 1990 | pI810->LpRingcxx . . $ _I810Rec#LpRing. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 1991 | |
| 1992 | scrn->vtSemacxx . . $ _ScrnInfoRec#vtSema. = FALSEcxx . . $ `<external>/18388808314464358495/misc.h:108:9`!; |
| 1993 | screen->CloseScreencxx . . $ _Screen#CloseScreen. = pI810->CloseScreencxx . . $ _I810Rec#CloseScreen.; |
| 1994 | return (*screen->CloseScreencxx . . $ _Screen#CloseScreen.) (CLOSE_SCREEN_ARGScxx . . $ `src/compat-api.h:104:9`!); |
| 1995 | } |
| 1996 | |
| 1997 | static void |
| 1998 | I810FreeScreencxx . . $ I810FreeScreen(f1d66590ec36ebe6).(FREE_SCREEN_ARGS_DECLcxx . . $ `src/compat-api.h:112:9`!) |
| 1999 | { |
| 2000 | SCRN_INFO_PTRcxx . . $ `src/compat-api.h:90:9`!(arg); |
| 2001 | I810FreeReccxx . . $ I810FreeRec(f1d66590ec36ebe6).(scrn); |
| 2002 | if (xf86LoaderCheckSymbolcxx . . $ xf86LoaderCheckSymbol(5c4306d8553b3696).("vgaHWFreeHWRec")) |
| 2003 | vgaHWFreeHWReccxx . . $ vgaHWFreeHWRec(f1d66590ec36ebe6).(scrn); |
| 2004 | } |
| 2005 | |
| 2006 | static ModeStatuscxx . . $ ModeStatus# |
| 2007 | I810ValidModecxx . . $ I810ValidMode(8976aff7f4792b82).(SCRN_ARG_TYPEcxx . . $ `src/compat-api.h:89:9`! arg, DisplayModePtrcxx . . $ DisplayModePtr# mode, Boolcxx . . $ Bool# verbose, int flags) |
| 2008 | { |
| 2009 | SCRN_INFO_PTRcxx . . $ `src/compat-api.h:90:9`!(arg); |
| 2010 | if (mode->Flagscxx . . $ _DisplayModeRec#Flags. & V_INTERLACEcxx . . $ V_INTERLACE.) { |
| 2011 | if (verbose) { |
| 2012 | xf86DrvMsgcxx . . $ xf86DrvMsg(68e14d797711febb).(scrn->scrnIndexcxx . . $ _ScrnInfoRec#scrnIndex., X_PROBEDcxx . . $ X_PROBED., |
| 2013 | "Removing interlaced mode \"%s\"\n", mode->namecxx . . $ _DisplayModeRec#name.); |
| 2014 | } |
| 2015 | return MODE_BADcxx . . $ MODE_BAD.; |
| 2016 | } |
| 2017 | return MODE_OKcxx . . $ MODE_OK.; |
| 2018 | } |
| 2019 | |
| 2020 | static Boolcxx . . $ Bool# |
| 2021 | I810SaveScreencxx . . $ I810SaveScreen(bab54c070ab52753).(ScreenPtrcxx . . $ ScreenPtr# screen, Boolcxx . . $ Bool# unblack) |
| 2022 | { |
| 2023 | return vgaHWSaveScreencxx . . $ vgaHWSaveScreen(bab54c070ab52753).(screen, unblack); |
| 2024 | } |
| 2025 | |
| 2026 | static void |
| 2027 | I810DisplayPowerManagementSetcxx . . $ I810DisplayPowerManagementSet(48b75b380e0d3ac6).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn, int PowerManagementMode, |
| 2028 | int flags) |
| 2029 | { |
| 2030 | I810Ptrcxx . . $ I810Ptr# pI810; |
| 2031 | unsigned char SEQ01 = 0; |
| 2032 | int DPMSSyncSelect = 0; |
| 2033 | vgaHWPtrcxx . . $ vgaHWPtr# hwp; |
| 2034 | |
| 2035 | pI810 = I810PTRcxx . . $ `src/legacy/i810/i810.h:265:9`!(scrn); |
| 2036 | switch (PowerManagementMode) { |
| 2037 | case DPMSModeOncxx . . $ `<external>/15110598561116227066/dpmsconst.h:37:9`!: |
| 2038 | /* Screen: On; HSync: On, VSync: On */ |
| 2039 | SEQ01 = 0x00; |
| 2040 | DPMSSyncSelect = HSYNC_ONcxx . . $ `src/legacy/i810/i810_reg.h:281:9`! | VSYNC_ONcxx . . $ `src/legacy/i810/i810_reg.h:278:9`!; |
| 2041 | break; |
| 2042 | case DPMSModeStandbycxx . . $ `<external>/15110598561116227066/dpmsconst.h:38:9`!: |
| 2043 | /* Screen: Off; HSync: Off, VSync: On */ |
| 2044 | SEQ01 = 0x20; |
| 2045 | DPMSSyncSelect = HSYNC_OFFcxx . . $ `src/legacy/i810/i810_reg.h:282:9`! | VSYNC_ONcxx . . $ `src/legacy/i810/i810_reg.h:278:9`!; |
| 2046 | break; |
| 2047 | case DPMSModeSuspendcxx . . $ `<external>/15110598561116227066/dpmsconst.h:39:9`!: |
| 2048 | /* Screen: Off; HSync: On, VSync: Off */ |
| 2049 | SEQ01 = 0x20; |
| 2050 | DPMSSyncSelect = HSYNC_ONcxx . . $ `src/legacy/i810/i810_reg.h:281:9`! | VSYNC_OFFcxx . . $ `src/legacy/i810/i810_reg.h:279:9`!; |
| 2051 | break; |
| 2052 | case DPMSModeOffcxx . . $ `<external>/15110598561116227066/dpmsconst.h:40:9`!: |
| 2053 | /* Screen: Off; HSync: Off, VSync: Off */ |
| 2054 | SEQ01 = 0x20; |
| 2055 | DPMSSyncSelect = HSYNC_OFFcxx . . $ `src/legacy/i810/i810_reg.h:282:9`! | VSYNC_OFFcxx . . $ `src/legacy/i810/i810_reg.h:279:9`!; |
| 2056 | break; |
| 2057 | } |
| 2058 | |
| 2059 | hwp = VGAHWPTRcxx . . $ `<external>/16318509353989860240/vgaHW.h:34:9`!(scrn); |
| 2060 | |
| 2061 | /* Turn the screen on/off */ |
| 2062 | SEQ01 |= hwp->readSeqcxx . . $ _vgaHWRec#readSeq.(hwp, 0x01) & ~0x20; |
| 2063 | hwp->writeSeqcxx . . $ _vgaHWRec#writeSeq.(hwp, 0x01, SEQ01); |
| 2064 | |
| 2065 | /* Set the DPMS mode */ |
| 2066 | OUTREG8cxx . . $ `src/legacy/i810/i810_common.h:90:9`!(DPMS_SYNC_SELECTcxx . . $ `src/legacy/i810/i810_reg.h:276:9`!, DPMSSyncSelect); |
| 2067 | } |
| 2068 | |
| 2069 | const OptionInfoReccxx . . $ OptionInfoRec# * |
| 2070 | lg_i810_available_optionscxx . . $ lg_i810_available_options(5cda261e2605dffd).(int chipid, int busid) |
| 2071 | { |
| 2072 | return I810Optionscxx . . $ I810Options.; |
| 2073 | } |
| 2074 | |
| 2075 | |
| 2076 | Boolcxx . . $ Bool# lg_i810_initcxx . . $ lg_i810_init(69e744c47d5d770d).(ScrnInfoPtrcxx . . $ ScrnInfoPtr# scrn) |
| 2077 | { |
| 2078 | scrn->PreInitcxx . . $ _ScrnInfoRec#PreInit. = I810PreInitcxx . . $ I810PreInit(a4dc8c73af46c9e4).; |
| 2079 | scrn->ScreenInitcxx . . $ _ScrnInfoRec#ScreenInit. = I810ScreenInitcxx . . $ I810ScreenInit(e3a4153423ca85c8).; |
| 2080 | scrn->SwitchModecxx . . $ _ScrnInfoRec#SwitchMode. = I810SwitchModecxx . . $ I810SwitchMode(a7bcc27c258e2838).; |
| 2081 | scrn->AdjustFramecxx . . $ _ScrnInfoRec#AdjustFrame. = I810AdjustFramecxx . . $ I810AdjustFrame(48b75b380e0d3ac6).; |
| 2082 | scrn->EnterVTcxx . . $ _ScrnInfoRec#EnterVT. = I810EnterVTcxx . . $ I810EnterVT(69e744c47d5d770d).; |
| 2083 | scrn->LeaveVTcxx . . $ _ScrnInfoRec#LeaveVT. = I810LeaveVTcxx . . $ I810LeaveVT(f1d66590ec36ebe6).; |
| 2084 | scrn->FreeScreencxx . . $ _ScrnInfoRec#FreeScreen. = I810FreeScreencxx . . $ I810FreeScreen(f1d66590ec36ebe6).; |
| 2085 | scrn->ValidModecxx . . $ _ScrnInfoRec#ValidMode. = I810ValidModecxx . . $ I810ValidMode(8976aff7f4792b82).; |
| 2086 | return TRUEcxx . . $ `<external>/18388808314464358495/misc.h:107:9`!; |
| 2087 | } |