daily pastebin goal
77%
SHARE
TWEET

Untitled

a guest Sep 25th, 2017 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. status_t
  2. radeon_set_display_mode(display_mode *mode)
  3. {
  4.     uint32 display_id = 0;
  5.  
  6.     CardFBSet(mode);
  7.     CardModeSet(mode);
  8.     CardModeScale(mode);
  9.  
  10.     // If this is DAC, set our PLL
  11.     if ((gDisplay[display_id]->connection_type & CONNECTION_DAC) != 0) {
  12.         PLLSet(gDisplay[display_id]->connection_id, mode->timing.pixel_clock);
  13.         DACSet(gDisplay[display_id]->connection_id, display_id);
  14.  
  15.         // TODO : Shutdown unused PLL/DAC
  16.  
  17.         // Power up the output
  18.         PLLPower(gDisplay[display_id]->connection_id, RHD_POWER_ON);
  19.         DACPower(gDisplay[display_id]->connection_id, RHD_POWER_ON);
  20.     }
  21.  
  22.     // Ensure screen isn't blanked
  23.     CardBlankSet(display_id, false);
  24.  
  25.     int32 crtstatus = Read32(CRT, D1CRTC_STATUS);
  26.     TRACE("CRT0 Status: 0x%X\n", crtstatus);
  27.     crtstatus = Read32(CRT, D2CRTC_STATUS);
  28.     TRACE("CRT1 Status: 0x%X\n", crtstatus);
  29.  
  30.     return B_OK;
  31. }
RAW Paste Data
Top