History log of /haiku/src/add-ons/accelerants/radeon_hd/mode.cpp
Revision Date Author Comments
# 69fdc6be 17-Dec-2021 Anarchos <sylvain_kerjean@hotmail.com>

radeon_hd : control of brightness

-detect if model > HD600
-apply change by calling ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL and ATOM_TRANSMITTER_ACTION_LCD_BLON
Author : Anarchos <sylvain_kerjean@hotmail.com>

Change-Id: I30b9dd66c71e05427b827fc3ef2c7fa6c498646f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2786
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 756884ad 25-Jul-2021 X512 <danger_mail@list.ru>

radeon_hd: 64 bit PCI bus fixes

Change-Id: If14dc31bf4c9360b5e1d0b477ba375cec8f75ba7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4306
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>


# 3de924d0 10-Nov-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Implement initial DP encoder service

* Used on older chipsets. Untested.


# 339a0181 03-Feb-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Rework dp aux functions to take connector index

* This is less pretty, but we need access to the connector
to find the HPD gpio pin mask on the card.
* dp_aux communications seem to work again.
* If you have a DisplayPort item attached to your card you
may want to just unplug it at this point. We attempt DP
link training and it fails. This failure will also cause
other monitors to not function as app_server still isn't
multi-head aware (#10486)


# 4d449fcc 02-Feb-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Fix superfluous DPMS hook calls

* The DPMS hook would be called on all
possible displays causing lots of link
training on incomplete connector structures
that may be not attached / connected.


# 142345a5 29-Dec-2013 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Disable mode line syslog spam

* Useful when driver was first developed, now it is
mostly spam however.


# 878a8d3f 28-Sep-2013 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Move to using the first found monitor's EDID

* This has positive and negitive effects. Using the
first monitor's EDID vs the VESA EDID means DisplayPort
monitors and adaptors function. I think the benefits
outweigh the risks at this point.
* Haiku will use the native display mode of the first
monitor and set it across all attached displays.
* Please open bug reports if you notice and regressions.


# 00bc40ad 28-Jan-2013 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Fix DisplayPort link training

* Original changes by Bill Randle
* Includes a large number of modifications
and cleanups.
* Add a "currentMode" to the gDisplay to
enable easier checking of intended changes.
(we pass the display_mode around quite a
bit, adding a "currentMode" allows code
to know the intended display mode being set
without passing the mode pointer around as
much)


# a5ccd036 14-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Become Spread Spectrum aware

* Enable Spread Spectrum when requested
* Tested working across several cards, does
have regression potential though.


# 47274433 06-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: pick a PLL based on connector

* was static PLL 1


# d92959ab 06-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: add DisplayPort debugging

* Commented out by default
* Shows DisplayPort status info for each
connector post-mode change (as DP properies
are configured on mode change once we know
the pixel clock)


# 4e7e3e33 04-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: display port improvements

* Remove non-generic radeon dp_get_lane_count
* Set lane count and link rate at set_display_mode
* Pass entire mode to pll_set vs only pixel clock for DP code
* Add helpers for DP config data to common code
* Obtain more correct link rate


# 93aac98d 30-Jul-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: r5xx to Avivo define cleanup

* Reorganize and clean up card defines
* Fix define spaces
* Unify card naming
* No (real) functional change


# f4647825 18-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: display_info struct style cleanup

* No functional change


# bb228d7c 18-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Only assign encoder to crtc after dpms call

* This is the order I received via email long ago and
it makes more sense to me then the drm method


# 0de9d6cd 06-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Move out some DisplayPort common code

* General DisplayPort functions in common dp.cpp
* DP port information struct in common header
* Please don't use this private accelerant common DP
code just yet as it is very early.


# 5e87e395 24-Mar-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Don't pass old pixel clock to encoder

* pll_set can make pixel clock adjustments.
* Anything after pll_set should use encoder pll
to ensure adjustments are picked up.


# 64ff3d18 25-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Pass dpms calls to encoders as well


# 2399d174 25-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Begin improvement on crtc state control

* Try to not blank the crtc when it is alreay disabled
* Clean up wording, active now present on display info
* Don't lock crtc when doing normal dpms calls, crtc
should only be locked during mode set / change


# 4bd6c200 21-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Implement preferred mode

* Add preferredMode display mode to each display.
* If LVDS is detected, set preferredMode based on AtomBIOS
* Fixes blocker #8329 ?


# d2a69507 29-Jan-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: A few style fixes, no functional change


# 7dde214b 10-Jan-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Fix accelerant regression in 4e9e029

* After 4e9e029, radeon_hd functionality became erratic.
* I think failing to lock the encoder bios scratch on
encoder changes was causing it.


# 4e9e0295 19-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Set encoder dpms on dpms, it just feels right


# 45e71a9e 18-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Add function to handle DIG encoder dpms setup

* Add code to control DIG dpms setup
* Reduce information needed by encoder_dpms_set
* DIG dpms setup needs access to pixelClock for DP training


# 09aaa658 15-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

DisplayPort call organization and cleanup

* Add color space to BPP function
* Pass display_mode to DP lane count function
* Get BPP in DP lane count
* Move some DPInfo population out of DP link training
as other things need them sooner.
* Fill out DP code in external encoder setup


# c8677fb1 14-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Working towards DP connector support

* Lots of new DisplayPort functions
* Call DP link training during mode set
* Rename dp_info variables to be less redundant
* Make encoder_pick_dig accept connector ID and
then check parent display
* Encode/Decode DP link speed functions
* Calculate DP lanes
* Rewrite encoder_dig_setup
* Correct bitsPerChannel to bitsPerColor
* My TRAVIS DisplayPort -> LVDS bridge now works


# 802ac635 09-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Style cleanup, space after switch as it is not a function


# 0cd5024d 09-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Pointer style cleanup; Variable consolidation


# 61cf7133 09-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Include file style cleanup, no functional change


# f52ca69c 28-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* attempt to reduce tracing spam a bit


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42932 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 025d4eed 27-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* reorganize register definitions
There were a large number if incorrect, duplicated, misplaced
registers that were leading to bugs in the code. This is my first
shot at cleaning them up. Luckly as we are using AtomBIOS the number
of registers we need to know about is shrinking.
* remove registers left over from register banging days
* r770 is less then r710, r720 in the drm sources. Fix in code.
* enable newer radeons for testing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42930 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 46af8165 25-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* redesign pretty much everything frame buffer related
* don't resize the frame buffer after mapping it.. doesn't make sense
* add memory controller code and program the memory controller for r600
* remove unneeded frame_buffer_int
* don't malloc mc_info, waste of time
* fix scaler setting
* vramStart in mc should be 0... get vertical colored lines however when this
this is set properly (everything in mc_info is the MC view of FB BAR)
When vramStart is the FB physical address... i get proper video on some cards
... thoughts?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42924 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6c80b06b 25-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* same blanking value, correct define.
* set blanking color to full red for debugging
to know when blanking is enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42920 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 07a90a63 25-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add better tracing
* add encoder quirks


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42917 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f089aa52 21-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* stub out dig encoder setup
* adjust pll post divider calculation
* fix digital encoder setup action
* don't run memreq on DCE < 3, should solve
some AtomBIOS failure loops


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42892 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afbd52f1 17-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* improve framebuffer programming on newer cards
* correct? color mode setting bug
* fix var naming to match style guidelines
* add a few missing register defines


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42879 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f66a1a8d 16-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* fix TODO style due to ML
* rename bpc to bitsPerChannel
* remove un-needed / unused PCI BAR reference
* no functional change


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42861 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 245fe001 14-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* first shot at fixing pll calculations
AtomBIOS wants number of 10Khz Units
* better debugging after modeset on current
CRTC status


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42853 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e774cb4b 12-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* style fixes
move quite a bit of code away from var_var format
* #if 0 some not-yet-ready r500 code
* no real functional change


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42835 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6b0b621b 12-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* style fixes, no functional change...
automatic crtc_id -> crtcID
automatic pll_id -> pllID
automatic encoder_id -> encoderID
automatic connector_index -> connectorIndex
automatic encoder_flags -> encoderFlags


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7934da0f 12-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add *very* preliminary dpms support
we will need to query the card dpms state
for each monitor at a later date


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42829 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e7d0abae 11-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* move pll info into pll_info struct.
* reduce the number of unique storage uint32's


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42826 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1fca5eaf 10-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* detect hdmi and tv and set as such
* set encoder flags the same as connector flags
* add curly comments to make troubleshooting clearer
* program encoder dpms scratch registers


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42818 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 936aec74 09-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* remove some legacy code
* don't init asic unless needed
* do dpms by hand on mode set
* detect tv and skip during detection for now


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42817 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0509b7e 09-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* move encoder info into own struct
* rename some connector / encoder struct members
* improve debugging in connector / encoder
AtomBIOS walking


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 17b66d82 09-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add digital encoder setup code
* make encoder setup functions return status_t
* really need a struct to hold encoder info


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42814 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ffb494ca 04-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add encoder DPMS code
* flip encoders on during modeset.
* crt0 status keeps getting higher and higher which is a good sign.
the more bits that are set, the closer to a successful lock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42802 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b54c8119 04-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add encoder code to handle setting up and adjusting encoders
* reorganize mode set code to match layout of linux DRM driver
* add initial DPMS code
* add lots of TODOs


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42801 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7c91a33c 02-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* RIP Radeon register banging
Remove old non-atombios code
* add encoder.c and encoder.h to handle
encoder management
* fix pll code to use encoder object id
vs crtcid


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42797 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f35af704 02-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* use bit-banged edid for monitor ranges
* add function to set encoder to crtc
* clean up some comments


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42796 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e53d6375 01-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* reformulate display and connector storage to match AtomBIOS requirements
* each active gDisplay references a gConnector index
* add atombios DAC sense.. this really won't be the main call used...
AtomBIOS expects you to attempt an EDID read to detect connected displays
* remove old manual DACSense
* next we attempt to add ddc / edid


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42705 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3e8b642 19-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* introduce mc control calls
* malloc storage for mc state info
* redo pll range struct
* change to ATOM_ENCODER_MODE for connector info
* redo pll calculations to match AtomBIOS requirements
* some structure changes
* no longer init already posted AtomBIOS as it
causes an infinite loop of AtomBIOS calls


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42644 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6da3f7d4 05-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* lots of changes
* add missing header for some radeon registers
* begin removing now un-needed direct register calls
* move and refactor crtc functions
* fix function naming to be clearer
* create more AtomBIOS style calls
* this will eat your cat at the moment, don't bother testing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42582 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d77ff85e 04-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add required atombios.h from drm driver from linux 3.0 with a few tweaks
(we aren't taking ownership of this one.. yikes)
* add first AtomBIOS call to test the waters


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42578 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b375e9cd 01-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Program DATA_FORMAT to non-interlaced


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42536 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef3a7658 31-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

bug fix, POWER_SHUTDOWN vs POWER_ON

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42522 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ab8261b 30-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Pass device name into shared info
* Refactor MCFBsetup to be a little simpler for now
* Implement radeon accelerant_device_info for screen preflet
* Re-add CRT Power calls to display code.
* Disable blanking setting for now... just can't figure out
what AMD wants for this.
* Remove some un-needed locking in the scaling code
* Be sure to disable VGA when set_display_mode is called
* Refactor mode setting code to loop over all possible displays
and set the provided mode on the attached ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42515 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3b1fd327 29-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Remove return from testing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42510 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb027537 29-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Little cleanup
* Add missing Idle call for connectors
* Reformulate blanking.. this should match what the
register is after the GTF vesa call
* Set FrameBuffer to card internal address


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42509 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1b9d6e6 28-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Add LVDS handling for TMDSB
* Fix crash situation if no monitors detected
* Assume TMDSB if no monitors sensed (temporary)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42508 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 422a49d2 23-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Add TMDS Set and Power controls
* Call TMDS controls if the monitor is TMDS connected


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42467 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 95e1d7e8 21-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Large refactoring of display detection and storage
* Create new display.c/h for display management
* Rename global gCRT to gDisplay
* Add CRT connection type into gDisplay
* Add CRT connection index into gDisplay
* Refactor registers for each display into gDisplay via regs
* We now shouldn't freak out too badly on multi-monitors


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42462 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 84bcfa3d 12-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Add mc.cpp for memory controller functions
* Remove read32MC as it doesn't apply to radeon cards >= r600
* Add tmds.cpp for tmds connected monitor management (current radeons
only have TMDSA for the moment) still needs TDMSPower, etc.
* Add some MC calls to mode.cpp, causes KDL so commented out atm.
* Add command to idle all DACs (although POWER_RESET doesn't do
anything on DACs, we should be consistent)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42416 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3fe78837 11-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* remove superfluous parentheses as per Axel

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42411 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2fe29a0 08-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Final (hopefully?) calculation for blank start/end
* Lets actually call PLLPower after PLLSet
* Improve screen blanking function
* Detect DAC/PLL to use separately from CRT id
* Add DACSense that senses displays on DACA/DACB
* Grab CRT in PLL code via gRegister crtid
* Set overscan to 0 for now
* Setting extended video modes now kinda works sometimes :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42397 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb5c4b07 07-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Style Cleanup
* Remove some un-needed test stuff
* Perform a little re-ordering
* Make scale corrections


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42390 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6c5f468 04-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Add D2 GRPH update lock register to priv headers
* Add crtControl global register
* Add grphUpdate storage
* Do some logical reordering of register writes
* Correct crt final power-on checks
* Enhance tracing
* Disable PLL, it is needed but seems to completely break
the modesetting resulting in black-screen-of-doom.
(fixing PLL set/calibration is now priority one)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42380 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6604b1b6 16-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Break DAC code into sperate source file
* Implement assigning DAC A/B to crt
* Clean up mode change code
* Still some pixel clock wierdness


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42205 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1d65a79 15-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* malloc an array of pointers to hold active crt info, mode, limits, etc.
Plan to move gRegister into the crt struct at some point.
* Few style fixes
* Added function to probe edid of attached monitors and populate CRT info
* Disable VGA control modifications temporarly while I hammer out some issues.
* Fix radeon card model checks (bitwise & is not |)
* Finally fix? blanking start / end calculations using porch
* Use mask for setting sync polarity
* Add overscan (8 pixels is default?)
* Disable PLLSet/Power for the moment as it seems to muck things up.
* is_mode_supported now validates if a mode line is with the monitors
h/v sync frequencies (how does is_mode_supported know what crt the os wants?)
* PLL Write/Read don't actually use the PLL Write/Read functions (thanks AMD!)
* Added better PLL legacy (r600-r610) support
* Consistantly give no DCCG on legacy cards.
* Tracing!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42191 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aa2a6e33 13-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Move to common MMIO function set to make card subsystem access easier

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42159 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d9e412b3 13-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Repair style issue using uintNN_t vs uintNN
* Make index numbering consistant (0-n vs 1-n)
* Add a little more tracing to PLLCalibrate because
we were missing a failure situation


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42158 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e7e76b29 12-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Define default PLL ranges
* Add crtid to register struct
* Disable VGA mode on FrameBuffer set (enables extended mode setting)
* Disable blanking calculations and setting more gracefully via if 0
* Add a *large* amount of code to Set/Calculate/Calibrate PLL
* Disable PLL on removal of accel.
* Remove junk comments on overscan
* Enable pixel clock limit pulling
* write32AtMask style cleanup
* Rename ReadMC to be more consistant
(I need to adjust naming for these MMIO calls)
* Implement read/write MC. (so many hardcoded oneoffs AMD)
* Implement write32PLLAtMask MMIO call


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42146 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1dac4469 02-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

added scale update locking register; remove leftover intel hack thats not needed on Radeon; fix gcc4 warning on card model comparison

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41872 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 057f5d1d 01-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

GCC2 build fixes on radeon_hd driver

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41858 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 27dde8e9 26-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

small style fix; no functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41770 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 217c0b1d 26-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Add surface address high handling; set primary and secondary surface frame buffer offset

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41769 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f6744a8 25-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* move all register calculation into init_registers to
keep things simple to troubleshoot
* use crt offset only on evergreen, else use AMD provided
register locations
* init_registers(crtid) is called before making register calls
to a monitor.
* init_registers supports 1-2 displays on r600-r700
* init_registers supports 1-6 displays on r800+ (AMD eyefinity)
* restore CardBlankSet function in a more simple form
(still needs init_registers addition)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41757 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2cc7e38c 25-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

temporarly disable screen blanking; setting V/H blank start/end is what was causing empty display, disabled for now; Hardware video mode setting is close!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41753 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3be5e036 24-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* rename graphics_memory to frame_buffer. lets keep consistant
* pass mapped frame buffer area id to accelerant
* remove my temporary hacked together frame buffer memory mapping
* completely rely on PCI BAR for now for aperture size / location instead of
R6XX_CONFIG_FB_BASE reg.
* Remove my temporary AllocateFB function.
* set grphPrimarySurfaceAddr to physical memory frame buffer location (offset 0)
* fix P/N sync setting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41722 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 51a43d0f 19-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

ensure framebuffer doesn't exceed PCI bar; add basic monitoring of frame buffer memory allocation; fix return of framebuffer to OS to be the correct area

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 90af9543 18-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* actually set device_chipset before reading it.
* make shared memory info naming clearer.
* move frame buffer internal offset read to driver
* remove check of > 512MB as we really should always use frame_buffer_size


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41569 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 56e6d991 17-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

make math easier to read; fix chipset int length; additions to CardScale

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41561 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c41d9ce6 17-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

add viewport registers; correct chipset dependent scale code; rename virtualheight to make it more consistant; spell check

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41557 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc7b5653 17-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

now CRT is 0-1 vs 1-2

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41556 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd34b2f7 17-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* enhance tracing of accelerant
* introduce a global struct to hold register locations for
Radeon HD chipset model this accelerant was spawned for.
* add Radeon 5430 PCIID


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41555 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6c43ea63 16-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

read and store aperture size (will be used in fblocation calculations)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41543 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2be925fd 15-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* turns out r800 has different register locations :(
* remove device_type and replace with device_chipset
* change MEMSIZE to >> 10 as r600-r700 store this in bytes (r800 uses MB and will be fixed soon)
* add if statement to select what register locations to use based on chipset
** Maybe use a struct or something to store these in a standardized way?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41525 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19935655 14-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

add Radeon 5470, thanks RISC!; simplification in Blanking call, thanks Axel!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41507 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf546fa0 14-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

move framebuffer setting code into its own function; reorder mode setting operations to match Xorg driver; make mode functions CRT1/2 register aware

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41496 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9331e9bb 12-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

fix bitwise check for mode timing polarity

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41466 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 88bfef92 12-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

add hook to pass EDID back if requested by userspace (screen applet); fix calculation of H blankStart; correct typo on H_SYNC vs V_SYNC register; set +/- V_SYNC to 0x01 vs 0x02.. this prob still needs work; style corrections

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41463 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dfd1e588 11-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

remove (now) un-needed modeline examples; no functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41443 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2613175e 09-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add commented out radeon_hd driver/accel to HaikuImage
* add boot item support to radeon hd driver
* add edid storage to shared info
* add pull of active monitor VESA EDID to radeon hd driver (until AtomBios complete)
* EDID pulled in driver now passed to create_display_modes
* move registers to external stock xorg radeon hd register headers (lic. allows it)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41411 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 192781dd 07-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* use common accelerant code
* remove manual sDisplayMode and make use of mode_list_area via Axel's common accelerant code using vesa as example
* move mask enabled write32 function to accelerant with write32 calls
* move register offsets into mode.h headers
* rename DxMode* to CardMode*
* make adjustments and implement radeon hd mode setting further
* remove previously defined kStdModeTimings
* hardware mode setting still needs work


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41374 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 91235829 06-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

start a const list of common mode timings (mostly vesa); verify refresh rate is sane by calculating it using pixel clock and horizontal/vertical totals

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41354 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 45aa6cb6 06-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

revert _currentMode back to the way it should be

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41352 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 333bd770 06-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

fix naming of static display mode var; make mode sanity check ensure timing settings are sane instead of less-then-useful positive int check; fix silly bug in tracing output (%d vs %s)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41346 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b95e491d 05-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

undid some of r41334, gDisplayMode didn't make sense as
a pointer (also as written would prob crash); use new mode sanity check on the provided static mode

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41341 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 089bcdea 05-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

move mode related registers into header file

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41336 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d5c3acac 05-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

added header file for mode.cpp; change gDisplayMode to pointer for now; add function to quickly perform sanity check on mode lines; enhance tracing

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41334 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 47ad511f 19-Mar-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

pre-work style cleanup; no functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41028 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d5009951 15-Apr-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Scale the output to the correct resolution. Finally got the correct resolution on my laptop :-)
Possibly fixed the monitor timming.

TODO:
- Very big code cleanup.
- At the moment there is only one hardcoded dislplay_mode (1366 x 768).




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36282 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a90ebd77 13-Apr-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Work in progress of a Radeon HD 3200 driver to change the display mode (status when I leave the coding spring). At least it shows a picture but with a wrong scaling.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36243 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3de924d06c8e6c3ff264bd638457bf4f8086b3ac 10-Nov-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Implement initial DP encoder service

* Used on older chipsets. Untested.


# 339a01811283149b14aa5ecd793f934a476b6f86 03-Feb-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Rework dp aux functions to take connector index

* This is less pretty, but we need access to the connector
to find the HPD gpio pin mask on the card.
* dp_aux communications seem to work again.
* If you have a DisplayPort item attached to your card you
may want to just unplug it at this point. We attempt DP
link training and it fails. This failure will also cause
other monitors to not function as app_server still isn't
multi-head aware (#10486)


# 4d449fccfe111bd51d782da3fc7a6eb58146d69a 02-Feb-2014 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Fix superfluous DPMS hook calls

* The DPMS hook would be called on all
possible displays causing lots of link
training on incomplete connector structures
that may be not attached / connected.


# 142345a54fdc45759ff147825b9a95b2a13be12f 29-Dec-2013 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Disable mode line syslog spam

* Useful when driver was first developed, now it is
mostly spam however.


# 878a8d3fdd615281c5d74cba6cc798469f1c3c6a 28-Sep-2013 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Move to using the first found monitor's EDID

* This has positive and negitive effects. Using the
first monitor's EDID vs the VESA EDID means DisplayPort
monitors and adaptors function. I think the benefits
outweigh the risks at this point.
* Haiku will use the native display mode of the first
monitor and set it across all attached displays.
* Please open bug reports if you notice and regressions.


# 00bc40ad588f4bd59cd7574788b5dc111b62198a 28-Jan-2013 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Fix DisplayPort link training

* Original changes by Bill Randle
* Includes a large number of modifications
and cleanups.
* Add a "currentMode" to the gDisplay to
enable easier checking of intended changes.
(we pass the display_mode around quite a
bit, adding a "currentMode" allows code
to know the intended display mode being set
without passing the mode pointer around as
much)


# a5ccd036b4a540462abe4d1347381344695b7fcf 14-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Become Spread Spectrum aware

* Enable Spread Spectrum when requested
* Tested working across several cards, does
have regression potential though.


# 472744339b0b8190a4028a76bc8a940c178d6dad 06-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: pick a PLL based on connector

* was static PLL 1


# d92959ab8b825c30ed46d42fcd9dbd9b531332ad 06-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: add DisplayPort debugging

* Commented out by default
* Shows DisplayPort status info for each
connector post-mode change (as DP properies
are configured on mode change once we know
the pixel clock)


# 4e7e3e331d4b0d1edfb94f52507b04163dc001f8 04-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: display port improvements

* Remove non-generic radeon dp_get_lane_count
* Set lane count and link rate at set_display_mode
* Pass entire mode to pll_set vs only pixel clock for DP code
* Add helpers for DP config data to common code
* Obtain more correct link rate


# 93aac98d0a9b8ce27f94eb449cfc742446a50274 30-Jul-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: r5xx to Avivo define cleanup

* Reorganize and clean up card defines
* Fix define spaces
* Unify card naming
* No (real) functional change


# f4647825e79d9d619cff3eb26882fce1b5afea59 18-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: display_info struct style cleanup

* No functional change


# bb228d7ca60ae5922385b703df72831ee32b073d 18-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Only assign encoder to crtc after dpms call

* This is the order I received via email long ago and
it makes more sense to me then the drm method


# 0de9d6cdeffaa5525911a1ecf1bcb3afb1862efb 06-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Move out some DisplayPort common code

* General DisplayPort functions in common dp.cpp
* DP port information struct in common header
* Please don't use this private accelerant common DP
code just yet as it is very early.


# 5e87e39562345d1e654b92540a63cb50a0e59c0b 24-Mar-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Don't pass old pixel clock to encoder

* pll_set can make pixel clock adjustments.
* Anything after pll_set should use encoder pll
to ensure adjustments are picked up.


# 64ff3d1891832945057c0c7d33dc8e32d7a78020 25-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Pass dpms calls to encoders as well


# 2399d174dc90c63e800c9a7218422a8533d85cae 25-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Begin improvement on crtc state control

* Try to not blank the crtc when it is alreay disabled
* Clean up wording, active now present on display info
* Don't lock crtc when doing normal dpms calls, crtc
should only be locked during mode set / change


# 4bd6c200c1a30b78827a0f2852b8ab0995027d1a 21-Feb-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Implement preferred mode

* Add preferredMode display mode to each display.
* If LVDS is detected, set preferredMode based on AtomBIOS
* Fixes blocker #8329 ?


# d2a69507d07969763a817447be9259b102e716ce 29-Jan-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: A few style fixes, no functional change


# 7dde214bc0f1f3ec2417b8e1ae6e07733d79829e 10-Jan-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Fix accelerant regression in 4e9e029

* After 4e9e029, radeon_hd functionality became erratic.
* I think failing to lock the encoder bios scratch on
encoder changes was causing it.


# 4e9e029551cb5459078b3097e8e2073b814f5e5f 19-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Set encoder dpms on dpms, it just feels right


# 45e71a9ea629ff969b8e91855e270dffc7e43b2c 18-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Add function to handle DIG encoder dpms setup

* Add code to control DIG dpms setup
* Reduce information needed by encoder_dpms_set
* DIG dpms setup needs access to pixelClock for DP training


# 09aaa658b0fa53eff3ad4cd5a44cf488bdfc1e3c 15-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

DisplayPort call organization and cleanup

* Add color space to BPP function
* Pass display_mode to DP lane count function
* Get BPP in DP lane count
* Move some DPInfo population out of DP link training
as other things need them sooner.
* Fill out DP code in external encoder setup


# c8677fb1384051cb147d53ff8e5d9f1f41a35201 14-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Working towards DP connector support

* Lots of new DisplayPort functions
* Call DP link training during mode set
* Rename dp_info variables to be less redundant
* Make encoder_pick_dig accept connector ID and
then check parent display
* Encode/Decode DP link speed functions
* Calculate DP lanes
* Rewrite encoder_dig_setup
* Correct bitsPerChannel to bitsPerColor
* My TRAVIS DisplayPort -> LVDS bridge now works


# 802ac6355d9d2300ad64f798e6431d7b87de5656 09-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Style cleanup, space after switch as it is not a function


# 0cd5024dbb8c0b979798d10528cb8140470f129d 09-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Pointer style cleanup; Variable consolidation


# 61cf713381b5ef727d0b1d78306dacde4887b8f5 09-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Include file style cleanup, no functional change


# f52ca69c7998ff0cc464e0654de92194d24ddad3 28-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* attempt to reduce tracing spam a bit


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42932 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 025d4eed52f31e0047268227cde722164e52e2d8 27-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* reorganize register definitions
There were a large number if incorrect, duplicated, misplaced
registers that were leading to bugs in the code. This is my first
shot at cleaning them up. Luckly as we are using AtomBIOS the number
of registers we need to know about is shrinking.
* remove registers left over from register banging days
* r770 is less then r710, r720 in the drm sources. Fix in code.
* enable newer radeons for testing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42930 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 46af81655d98616bb2c30a2b76563a3d440ded16 25-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* redesign pretty much everything frame buffer related
* don't resize the frame buffer after mapping it.. doesn't make sense
* add memory controller code and program the memory controller for r600
* remove unneeded frame_buffer_int
* don't malloc mc_info, waste of time
* fix scaler setting
* vramStart in mc should be 0... get vertical colored lines however when this
this is set properly (everything in mc_info is the MC view of FB BAR)
When vramStart is the FB physical address... i get proper video on some cards
... thoughts?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42924 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6c80b06bb879fb12a09423f4e3d12189a97575a4 25-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* same blanking value, correct define.
* set blanking color to full red for debugging
to know when blanking is enabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42920 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 07a90a634dcc4f68fed1a426d566b78bdd0a736b 25-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add better tracing
* add encoder quirks


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42917 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f089aa5229020b51c15e2fd294dcc5de269fdb5c 21-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* stub out dig encoder setup
* adjust pll post divider calculation
* fix digital encoder setup action
* don't run memreq on DCE < 3, should solve
some AtomBIOS failure loops


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42892 a95241bf-73f2-0310-859d-f6bbb57e9c96


# afbd52f16acc635e8ba1a0a32e1b4d02b8724ce6 17-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* improve framebuffer programming on newer cards
* correct? color mode setting bug
* fix var naming to match style guidelines
* add a few missing register defines


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42879 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f66a1a8d71e68f2c725fa556af7b9983a85e057e 16-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* fix TODO style due to ML
* rename bpc to bitsPerChannel
* remove un-needed / unused PCI BAR reference
* no functional change


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42861 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 245fe001e7ee6458a7a5cc1a4702e5697574cf5e 14-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* first shot at fixing pll calculations
AtomBIOS wants number of 10Khz Units
* better debugging after modeset on current
CRTC status


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42853 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e774cb4b0aea6ec99b8b9d8878c5ffbe79516ded 12-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* style fixes
move quite a bit of code away from var_var format
* #if 0 some not-yet-ready r500 code
* no real functional change


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42835 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6b0b621be9113080a339054cb3847201e5ed55dd 12-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* style fixes, no functional change...
automatic crtc_id -> crtcID
automatic pll_id -> pllID
automatic encoder_id -> encoderID
automatic connector_index -> connectorIndex
automatic encoder_flags -> encoderFlags


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42831 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7934da0f090bc6970fc259eff3f171e27966eeee 12-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add *very* preliminary dpms support
we will need to query the card dpms state
for each monitor at a later date


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42829 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e7d0abae231f1fcd3fefc6bc963793c5d6756118 11-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* move pll info into pll_info struct.
* reduce the number of unique storage uint32's


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42826 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1fca5eaf116609013ea078eac249e20fe8a87098 10-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* detect hdmi and tv and set as such
* set encoder flags the same as connector flags
* add curly comments to make troubleshooting clearer
* program encoder dpms scratch registers


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42818 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 936aec7461bdc3312c60b4dc86a2d31ed57c8e2b 09-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* remove some legacy code
* don't init asic unless needed
* do dpms by hand on mode set
* detect tv and skip during detection for now


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42817 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0509b7eb93e3cb67b23fa5ccdd2fb789333370b 09-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* move encoder info into own struct
* rename some connector / encoder struct members
* improve debugging in connector / encoder
AtomBIOS walking


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42815 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 17b66d82509ea6b07516b08115cc5765b8a7cb90 09-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add digital encoder setup code
* make encoder setup functions return status_t
* really need a struct to hold encoder info


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42814 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ffb494caeb4ebbdd13612139389b1ca62bcfad20 04-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add encoder DPMS code
* flip encoders on during modeset.
* crt0 status keeps getting higher and higher which is a good sign.
the more bits that are set, the closer to a successful lock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42802 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b54c811990b00b53158247e1daa019a6bda9c278 04-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add encoder code to handle setting up and adjusting encoders
* reorganize mode set code to match layout of linux DRM driver
* add initial DPMS code
* add lots of TODOs


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42801 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7c91a33c84935f6697e246a985730400ec976d61 02-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* RIP Radeon register banging
Remove old non-atombios code
* add encoder.c and encoder.h to handle
encoder management
* fix pll code to use encoder object id
vs crtcid


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42797 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f35af704c84cbdabe7106e6c5b422cb4d6dfa7ba 02-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* use bit-banged edid for monitor ranges
* add function to set encoder to crtc
* clean up some comments


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42796 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e53d637520ce91031ff9ac5ea4a5044156136a27 01-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* reformulate display and connector storage to match AtomBIOS requirements
* each active gDisplay references a gConnector index
* add atombios DAC sense.. this really won't be the main call used...
AtomBIOS expects you to attempt an EDID read to detect connected displays
* remove old manual DACSense
* next we attempt to add ddc / edid


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42705 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d3e8b64208159ab71ca24f58ec7e56f1aa4bb5e6 19-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* introduce mc control calls
* malloc storage for mc state info
* redo pll range struct
* change to ATOM_ENCODER_MODE for connector info
* redo pll calculations to match AtomBIOS requirements
* some structure changes
* no longer init already posted AtomBIOS as it
causes an infinite loop of AtomBIOS calls


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42644 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6da3f7d4c1de302697f5d948057a68dd428277f6 05-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* lots of changes
* add missing header for some radeon registers
* begin removing now un-needed direct register calls
* move and refactor crtc functions
* fix function naming to be clearer
* create more AtomBIOS style calls
* this will eat your cat at the moment, don't bother testing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42582 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d77ff85e1f6c41e9f46253dc63900dd8fef6f500 04-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add required atombios.h from drm driver from linux 3.0 with a few tweaks
(we aren't taking ownership of this one.. yikes)
* add first AtomBIOS call to test the waters


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42578 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b375e9cd653bcc4a0bb382b38c2339a90fdc303a 01-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Program DATA_FORMAT to non-interlaced


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42536 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef3a7658fa1ad818737228b88a780deb2dcc6dec 31-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

bug fix, POWER_SHUTDOWN vs POWER_ON

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42522 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6ab8261b98f59b9751c7178a4df66bf1ae0fa66e 30-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Pass device name into shared info
* Refactor MCFBsetup to be a little simpler for now
* Implement radeon accelerant_device_info for screen preflet
* Re-add CRT Power calls to display code.
* Disable blanking setting for now... just can't figure out
what AMD wants for this.
* Remove some un-needed locking in the scaling code
* Be sure to disable VGA when set_display_mode is called
* Refactor mode setting code to loop over all possible displays
and set the provided mode on the attached ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42515 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3b1fd3270ebb68188835929d3c5d15a3916d9ffe 29-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Remove return from testing


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42510 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb027537793a9f57d07dc87d86e482e51c8d4b2b 29-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Little cleanup
* Add missing Idle call for connectors
* Reformulate blanking.. this should match what the
register is after the GTF vesa call
* Set FrameBuffer to card internal address


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42509 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e1b9d6e6743b027ba89a78d381ea398d79ec7822 28-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Add LVDS handling for TMDSB
* Fix crash situation if no monitors detected
* Assume TMDSB if no monitors sensed (temporary)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42508 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 422a49d2f8a388b57dd6b372e9f6b94ee2fced8b 23-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Add TMDS Set and Power controls
* Call TMDS controls if the monitor is TMDS connected


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42467 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 95e1d7e8288c9eb390705b0fa6e735ff091a0e65 21-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Large refactoring of display detection and storage
* Create new display.c/h for display management
* Rename global gCRT to gDisplay
* Add CRT connection type into gDisplay
* Add CRT connection index into gDisplay
* Refactor registers for each display into gDisplay via regs
* We now shouldn't freak out too badly on multi-monitors


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42462 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 84bcfa3d4bc3f64b82bb80e0b5e88e284f191627 12-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Add mc.cpp for memory controller functions
* Remove read32MC as it doesn't apply to radeon cards >= r600
* Add tmds.cpp for tmds connected monitor management (current radeons
only have TMDSA for the moment) still needs TDMSPower, etc.
* Add some MC calls to mode.cpp, causes KDL so commented out atm.
* Add command to idle all DACs (although POWER_RESET doesn't do
anything on DACs, we should be consistent)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42416 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3fe788377828eb76c862aa4e58c000086b41d884 11-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* remove superfluous parentheses as per Axel

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42411 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f2fe29a0db13c08df7d88755775246f91c290ebf 08-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Final (hopefully?) calculation for blank start/end
* Lets actually call PLLPower after PLLSet
* Improve screen blanking function
* Detect DAC/PLL to use separately from CRT id
* Add DACSense that senses displays on DACA/DACB
* Grab CRT in PLL code via gRegister crtid
* Set overscan to 0 for now
* Setting extended video modes now kinda works sometimes :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42397 a95241bf-73f2-0310-859d-f6bbb57e9c96


# eb5c4b07451d6c397563ded8b26fe34167ccd332 07-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Style Cleanup
* Remove some un-needed test stuff
* Perform a little re-ordering
* Make scale corrections


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42390 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b6c5f46896776d67f4b48af4584fb989dddda162 04-Jul-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Add D2 GRPH update lock register to priv headers
* Add crtControl global register
* Add grphUpdate storage
* Do some logical reordering of register writes
* Correct crt final power-on checks
* Enhance tracing
* Disable PLL, it is needed but seems to completely break
the modesetting resulting in black-screen-of-doom.
(fixing PLL set/calibration is now priority one)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42380 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6604b1b62325b3f372c8f002a9311a50f2e10faf 16-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Break DAC code into sperate source file
* Implement assigning DAC A/B to crt
* Clean up mode change code
* Still some pixel clock wierdness


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42205 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1d65a79cbba5eb871c2763824839ee56930a557 15-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* malloc an array of pointers to hold active crt info, mode, limits, etc.
Plan to move gRegister into the crt struct at some point.
* Few style fixes
* Added function to probe edid of attached monitors and populate CRT info
* Disable VGA control modifications temporarly while I hammer out some issues.
* Fix radeon card model checks (bitwise & is not |)
* Finally fix? blanking start / end calculations using porch
* Use mask for setting sync polarity
* Add overscan (8 pixels is default?)
* Disable PLLSet/Power for the moment as it seems to muck things up.
* is_mode_supported now validates if a mode line is with the monitors
h/v sync frequencies (how does is_mode_supported know what crt the os wants?)
* PLL Write/Read don't actually use the PLL Write/Read functions (thanks AMD!)
* Added better PLL legacy (r600-r610) support
* Consistantly give no DCCG on legacy cards.
* Tracing!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42191 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aa2a6e33cb7617a18592ef2d97b00b5f5f936ecd 13-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Move to common MMIO function set to make card subsystem access easier

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42159 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d9e412b3394847a98fb7bcf85daa3ee59bb765fc 13-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Repair style issue using uintNN_t vs uintNN
* Make index numbering consistant (0-n vs 1-n)
* Add a little more tracing to PLLCalibrate because
we were missing a failure situation


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42158 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e7e76b29e839204be635b9f10dd52a41837e20bd 12-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* Define default PLL ranges
* Add crtid to register struct
* Disable VGA mode on FrameBuffer set (enables extended mode setting)
* Disable blanking calculations and setting more gracefully via if 0
* Add a *large* amount of code to Set/Calculate/Calibrate PLL
* Disable PLL on removal of accel.
* Remove junk comments on overscan
* Enable pixel clock limit pulling
* write32AtMask style cleanup
* Rename ReadMC to be more consistant
(I need to adjust naming for these MMIO calls)
* Implement read/write MC. (so many hardcoded oneoffs AMD)
* Implement write32PLLAtMask MMIO call


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42146 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1dac446909d2021e9b83beaf3e2181a0cbc05e7d 02-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

added scale update locking register; remove leftover intel hack thats not needed on Radeon; fix gcc4 warning on card model comparison

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41872 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 057f5d1d50a5eb8ccfdfda453af8e9a71d4a8a29 01-Jun-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

GCC2 build fixes on radeon_hd driver

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41858 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 27dde8e9390b6ca2cddb0626393be4451242734c 26-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

small style fix; no functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41770 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 217c0b1d48b152376e738e2d6355854f4b872fa7 26-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Add surface address high handling; set primary and secondary surface frame buffer offset

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41769 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5f6744a8cd01e15c8aa5b35ecd5fe695d970e923 25-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* move all register calculation into init_registers to
keep things simple to troubleshoot
* use crt offset only on evergreen, else use AMD provided
register locations
* init_registers(crtid) is called before making register calls
to a monitor.
* init_registers supports 1-2 displays on r600-r700
* init_registers supports 1-6 displays on r800+ (AMD eyefinity)
* restore CardBlankSet function in a more simple form
(still needs init_registers addition)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41757 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2cc7e38c9304972df9214816683b188883ec3504 25-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

temporarly disable screen blanking; setting V/H blank start/end is what was causing empty display, disabled for now; Hardware video mode setting is close!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41753 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3be5e0365263c13a71e61e3097f93c43bac375cf 24-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* rename graphics_memory to frame_buffer. lets keep consistant
* pass mapped frame buffer area id to accelerant
* remove my temporary hacked together frame buffer memory mapping
* completely rely on PCI BAR for now for aperture size / location instead of
R6XX_CONFIG_FB_BASE reg.
* Remove my temporary AllocateFB function.
* set grphPrimarySurfaceAddr to physical memory frame buffer location (offset 0)
* fix P/N sync setting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41722 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 51a43d0ff44f711768d43462a253e4ff5806a608 19-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

ensure framebuffer doesn't exceed PCI bar; add basic monitoring of frame buffer memory allocation; fix return of framebuffer to OS to be the correct area

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41586 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 90af9543879078a6f9a6de1bbf997917b4fc7501 18-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* actually set device_chipset before reading it.
* make shared memory info naming clearer.
* move frame buffer internal offset read to driver
* remove check of > 512MB as we really should always use frame_buffer_size


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41569 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 56e6d991bb7d55b7dcf3a8c90a7fa2e563064908 17-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

make math easier to read; fix chipset int length; additions to CardScale

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41561 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c41d9ce6948f2ca9eecc8956e811a9b493fcd8a6 17-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

add viewport registers; correct chipset dependent scale code; rename virtualheight to make it more consistant; spell check

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41557 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fc7b5653828f88e25920d78c1e29d9feebf2f13b 17-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

now CRT is 0-1 vs 1-2

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41556 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd34b2f7561f6392d63beded878e77acdc802e4b 17-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* enhance tracing of accelerant
* introduce a global struct to hold register locations for
Radeon HD chipset model this accelerant was spawned for.
* add Radeon 5430 PCIID


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41555 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6c43ea63367b1533c2c9a5b054558ebff385e57a 16-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

read and store aperture size (will be used in fblocation calculations)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41543 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2be925fd04f6cb32b3c4775ffcf75acb4c03d00e 15-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* turns out r800 has different register locations :(
* remove device_type and replace with device_chipset
* change MEMSIZE to >> 10 as r600-r700 store this in bytes (r800 uses MB and will be fixed soon)
* add if statement to select what register locations to use based on chipset
** Maybe use a struct or something to store these in a standardized way?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41525 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 19935655ac7c7c5d300b35e8864f73f57273a073 14-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

add Radeon 5470, thanks RISC!; simplification in Blanking call, thanks Axel!

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41507 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf546fa0c3e6cc2436dc13d8603143bb911397da 14-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

move framebuffer setting code into its own function; reorder mode setting operations to match Xorg driver; make mode functions CRT1/2 register aware

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41496 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9331e9bb0d6dfbd77e2fc25a5c969b7abd999d0a 12-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

fix bitwise check for mode timing polarity

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41466 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 88bfef92b3f44933ddccb1031e72c38181051832 12-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

add hook to pass EDID back if requested by userspace (screen applet); fix calculation of H blankStart; correct typo on H_SYNC vs V_SYNC register; set +/- V_SYNC to 0x01 vs 0x02.. this prob still needs work; style corrections

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41463 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dfd1e5889e3af5d2d6ea8bab6e5dd1d6eb5c78c5 11-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

remove (now) un-needed modeline examples; no functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41443 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2613175e19f6fd2969bd35fce36ba89fc20f88d9 09-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add commented out radeon_hd driver/accel to HaikuImage
* add boot item support to radeon hd driver
* add edid storage to shared info
* add pull of active monitor VESA EDID to radeon hd driver (until AtomBios complete)
* EDID pulled in driver now passed to create_display_modes
* move registers to external stock xorg radeon hd register headers (lic. allows it)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41411 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 192781dd493b0454d85747f2b0d2d75c3752b7e7 07-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* use common accelerant code
* remove manual sDisplayMode and make use of mode_list_area via Axel's common accelerant code using vesa as example
* move mask enabled write32 function to accelerant with write32 calls
* move register offsets into mode.h headers
* rename DxMode* to CardMode*
* make adjustments and implement radeon hd mode setting further
* remove previously defined kStdModeTimings
* hardware mode setting still needs work


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41374 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 91235829b272dd88a0ada67f48a43b3dfc22dab0 06-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

start a const list of common mode timings (mostly vesa); verify refresh rate is sane by calculating it using pixel clock and horizontal/vertical totals

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41354 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 45aa6cb6a2c526e3740217bf7458abf9d61d5e17 06-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

revert _currentMode back to the way it should be

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41352 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 333bd7706215ce81d74fda5de4fe44e6127f0a11 06-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

fix naming of static display mode var; make mode sanity check ensure timing settings are sane instead of less-then-useful positive int check; fix silly bug in tracing output (%d vs %s)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41346 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b95e491de2bff5c473497e82ccc7ae58682f4a58 05-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

undid some of r41334, gDisplayMode didn't make sense as
a pointer (also as written would prob crash); use new mode sanity check on the provided static mode

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41341 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 089bcdeab0fb4bb42df9bcddf42a4d0b7b65c0b9 05-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

move mode related registers into header file

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41336 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d5c3acac3ef9425f21522c24db869047f68fa5bc 05-May-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

added header file for mode.cpp; change gDisplayMode to pointer for now; add function to quickly perform sanity check on mode lines; enhance tracing

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41334 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 47ad511f59522fc3a7025aaf2cfef073204d8312 19-Mar-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

pre-work style cleanup; no functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41028 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d5009951b75dbb6536254738da07e5786caf8e88 15-Apr-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Scale the output to the correct resolution. Finally got the correct resolution on my laptop :-)
Possibly fixed the monitor timming.

TODO:
- Very big code cleanup.
- At the moment there is only one hardcoded dislplay_mode (1366 x 768).




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36282 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a90ebd77eeae5eca9600d039dc1298898e38278a 13-Apr-2010 Clemens Zeidler <clemens.zeidler@googlemail.com>

Work in progress of a Radeon HD 3200 driver to change the display mode (status when I leave the coding spring). At least it shows a picture but with a wrong scaling.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36243 a95241bf-73f2-0310-859d-f6bbb57e9c96