History log of /haiku/src/add-ons/accelerants/radeon_hd/gpu.cpp
Revision Date Author Comments
# 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>


# 3853f362 14-Jun-2020 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Cram in a bunch of new PCIID's

Change-Id: Ifbd82ef7bfc2c39b2aeb5c25be177421cd22d246
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2920
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 38f17b01 28-Sep-2016 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Polaris10 power distribution fix

* Helps prevent mainboard explosions and other bad stuff.
* ...maybe not explosions, but bad things.
* The RX 480 reference design can pull as much as 90W
from its PCIe slot at load. PCIe is rated for 75W.
* This change overloads the PCIe power cables vs the PCIe
slot. The PCIe power cables can handle going over spec.
* Untested since we really can't come close to loading a
RX 480 without hardware OpenGL ^_^
* Should be able to test on real hardware within a week.


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

radeon_hd: Implement initial DP encoder service

* Used on older chipsets. Untested.


# 224b875b 30-Dec-2013 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: clean up clock units

* Ensure we store all clock units as khz or
n * 10 off from AtomBIOS unit expected
* Perform DDC setup of external encoder


# 817c114d 07-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: rework some pll code

* Force fractional feedback divider on APU's
* Spread Spectrum is now probed more correctly
across multiple encoders and cards
* SS still disabled however.


# 63624e40 07-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: reorganize some pll code

* Move DisplayPort external pixel clock out of pll
as this frequency is card-wide.
* Add new function to pull display clock frequency
and other card-wide settings.
* Set displayDefault frequency card-wide
* My DisplayPort LVDS bridge laptop now kind of works
(a clock somewhere seems a little off though)


# 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


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

radeon_hd: Card define cleanup

* Trying to do cleanup on the layout of these headers


# 9e195872 17-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Begin work on radeon_hd command processor

* First steps at getting card command processor wired
up to the ring buffers.
* Code doesn't run yet as I have *no* idea what happens
when these rings are in an invalid state.


# 325089f1 14-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Stub out gfx ring boot.

* Tab fix as well


# 745450ad 11-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: More initial ring queue work

* Rename RenderQueue to RingQueue to be more generic
* We will need two Ring Buffer types, one for
host -> gpu (render/cp data) and one gpu -> host (irq)
* Add header guard to ringqueue.h
* Things still may change as I work up to a bigger picture.


# 7c89d968 02-Mar-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Ensure vramBase is at 0.

* This value is card internal framebuffer offset
* 0 is the proper value, however it was causing issues for me
* The mode setting issues I saw before are now gone, and this
seems to make mode setting more stable now.


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

radeon_hd: Better implement GPU idle function

* Function only checked for idle and didn't
wait for the gpu memory controler to idle.
* May resolve mode setting issues on some
newer hardware.


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

radeon_hd: Disable spread spectrum

* SS requires complex pll adjustments that we don't do atm


# 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


# 4540f5e9 08-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Create connector source file, move connector bus calls into it

* this will help break apart some of the sources
* display bus communications really don't belong with GPU operations
* rename functions to better describe their actions


# 30207c6c 27-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Move thermal query into new driver sensor source file

* thermal query still works pre-atombios init


# 54fda1c6 26-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Enhance lvds laptop panel support

* if an edid request for LVDS panel is detected, we now
return true and the VESA edid info.
* add #if 0'ed function to pull prefered timing info from atombios
on LVDS panels, still need to generate a fake EDID with this.
* not sure which method above is better... maybe a combination of both


# cb050a33 24-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Add support for thermal status queries on newer chipsets

* add temperature query support for Juniper, Sumo, Evergreen, and North Islands
* add missing thermal defines for evergreen cards
* northern island cards use the evergreen thermal calculations


# 0cd97231 21-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Add first hints of thermal monitoring on radeon cards

* add a few missing/needed header defines
* show GPU temp in millidegrees C on r600/r700
* evergreen+ support soon
* function may be moved to driver long term once testing done


# 97b846e8 21-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Style fix gpu_state naming, cleanup

* correct naming on gpu registers that effect MC idle state
* cleanup MC idle failure situation, we are stuck and
need to try the changes anyway.


# 3383e564 20-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Improve GPU memory controller idle check

* style fix
* add better tracing for non-idle memory controller conditions


# 021332df 20-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Improve GPU memory controller setup on later chips

* Fix bug where we setup MC twice on Evergreen+
* Northern Island chipsets use the Evergreen MC setup (just cosmetic)


# 681be5be 13-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Add one-off gpio corrections on dce 3 and dce 4 chipsets


# 359b926f 08-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* style cleanup of shared storage names
* return better data on card
* display chipset flags in screen preflet


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


# 76a3e009 08-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add lots of missing evergreen defines
* evergreen headers are split due to different
header copyrights
* detect and set up evergreen memory controler
* change the way we manage radeon chipsets to
more closely match drm driver as the chipset
model numbers aren't in order and change from
numbers to names.
* check for evergreen when populating frame buffer
information.
* style cleanup


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


# e9e9c194 07-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* change the way we store GPU MC state information
on halt / resume as it doesn't need to persist.
* rename mc_info -> fb_info to better communicate
it's contents
* add some gart (gtt) storage and prep AGP VM code


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


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

* better use Radeon HD 4xxx (r7xx) VM FB registers


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42931 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


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

* bailing when we can't idle the MC is the correct
behaviour... but while things are incomplete
it may be better to try and push on.


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


# bbcc2a8c 26-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* lets idle the memory controller before checking if it's idle


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42925 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


# 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


# 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


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

* style fixes, no functional change...
frev / crev to tableMajor / tableMinor
size to tableSize
offset to tableOffset


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


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

* style fix
ensure bitwise ands are compared to 0 or non 0 as per Axel


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42830 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


# ae347a6c 30-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* squash a *silly* bug
don't set up a pointer and not malloc it.
* small cleanups to radeon_hd i2c bit-banging code
* i2c bit banging is now functioning


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


# dd295058 27-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* remap GPIO pin storage to global struct as they really aren't tied to
a connector. (thus allowing for future non-ddc gpio devices like fan speed)
* map all i2c gpio pins on accelerant init
* use a smaller sub function to attach gpio info to connector i2c info


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


# 4a0f028c 27-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* perform some i2c cleanup from xorg ati driver
* read gpio pins back after setting them to improve reliability


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


# 2ce1337c 26-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* fix several i2c communication bugs
dealing with i2c register addresses.
* cleanup i2c hacks
* now receive the following message in SimNow:
"No device present at I2C slave address 0x66"


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


# e40c0068 21-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* correct some naming after deeper investigation of
linux drm driver. Seems radeon_hd isn't limited to the
standard 0xa0 i2c slave address.


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


# 54c0390b 14-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* remove un-needed i2c_bus on each connector... we simply set this up each time
it's needed using the gpio information
* rename gpio information struct to be cleaner and shorter
* add function to debug found connectors
* set gpio mask to 1 vs the defined mask... this seems to get us closer
to working ddc / edid per connector
* change gpio_info u16's to u32's to ensure we aren't overflowing anything
* fix bug always setting hw_capable true
* change TRACE to ERROR to always show debug data when called


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


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

* i2c locking should happen just before reading the edid
locking and unlocked on every bit read sounds excessive
* set vdif and vdif size to NULL... they really aren't needed


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


# f6be39e0 11-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* correct naming error. (a shift is a shift until you use it.. then its a mask)


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


# b053beab 11-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* refactor GPU i2c bit-banging code to be correct using drm as reference
* add i2c locking code that represents common things we need to do before
and after access


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


# f6766f29 09-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* rework i2c read / write to make sense using values provided


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


# f3ccbf71 09-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* document GPIO values better based on AMD docs
* no functional change


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


# a9d08e5e 09-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* adjust error to make more sense


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


# a8b357c7 08-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* run edid check on all connectors regardless of encoder
* correction to output check (B_OK != true)
* check for invalid gpio (prevents seg violation)
* tab cleanup


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


# b5fc0237 06-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add i2c/ddc info storage to connector
* add edid info storage to display
* pass i2c/ddc information to common i2c code
* add code to read/write i2c/ddc
* i2c/ddc read/write code works 'in theory', needs tested
* detect monitors based on presence of edid on connector


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


# cfda569d 02-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add function to set up i2c bus for connector
* few tab fixes
* add Axel as author as the base i2c stuff is from intel_extreme


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42709 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


# 93d4d552 10-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* a few small style fixes to last commit
* no functional change


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


# d356bf50 10-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* consolidate and remove unneeded Xorg headers
* move mc code to more generic gpu source/header
* add gpu reset functions (with r600 documented)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42616 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.


# 224b875b3ad6ea9d7324377deb63d9087882092c 30-Dec-2013 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: clean up clock units

* Ensure we store all clock units as khz or
n * 10 off from AtomBIOS unit expected
* Perform DDC setup of external encoder


# 817c114de7e2e71d98adccb66358e94244a1486a 07-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: rework some pll code

* Force fractional feedback divider on APU's
* Spread Spectrum is now probed more correctly
across multiple encoders and cards
* SS still disabled however.


# 63624e404b5eb6fc11a503331e67ce29af074021 07-Aug-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: reorganize some pll code

* Move DisplayPort external pixel clock out of pll
as this frequency is card-wide.
* Add new function to pull display clock frequency
and other card-wide settings.
* Set displayDefault frequency card-wide
* My DisplayPort LVDS bridge laptop now kind of works
(a clock somewhere seems a little off though)


# 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


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

radeon_hd: Card define cleanup

* Trying to do cleanup on the layout of these headers


# 9e195872df77517e2b21e12e3e2da77e2497533c 17-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Begin work on radeon_hd command processor

* First steps at getting card command processor wired
up to the ring buffers.
* Code doesn't run yet as I have *no* idea what happens
when these rings are in an invalid state.


# 325089f1fcf20eb45c83e834e23f810f0533aa57 14-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Stub out gfx ring boot.

* Tab fix as well


# 745450ade8a43afb540bae9fd1e17fb3ba0e0842 11-Apr-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: More initial ring queue work

* Rename RenderQueue to RingQueue to be more generic
* We will need two Ring Buffer types, one for
host -> gpu (render/cp data) and one gpu -> host (irq)
* Add header guard to ringqueue.h
* Things still may change as I work up to a bigger picture.


# 7c89d968b5eeab98a9f4246d451954eda17081b0 02-Mar-2012 Alexander von Gluck IV <kallisti5@unixzen.com>

radeon_hd: Ensure vramBase is at 0.

* This value is card internal framebuffer offset
* 0 is the proper value, however it was causing issues for me
* The mode setting issues I saw before are now gone, and this
seems to make mode setting more stable now.


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

radeon_hd: Better implement GPU idle function

* Function only checked for idle and didn't
wait for the gpu memory controler to idle.
* May resolve mode setting issues on some
newer hardware.


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

radeon_hd: Disable spread spectrum

* SS requires complex pll adjustments that we don't do atm


# 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


# 4540f5e929448b82266a16ad5c2ea9d5f6ed5ed3 08-Dec-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Create connector source file, move connector bus calls into it

* this will help break apart some of the sources
* display bus communications really don't belong with GPU operations
* rename functions to better describe their actions


# 30207c6c8c18cafcc5451a7d5e4cb9c6b7c2c4e2 27-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Move thermal query into new driver sensor source file

* thermal query still works pre-atombios init


# 54fda1c6dfe5f9b76df5c0da2dbffbe591699a67 26-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Enhance lvds laptop panel support

* if an edid request for LVDS panel is detected, we now
return true and the VESA edid info.
* add #if 0'ed function to pull prefered timing info from atombios
on LVDS panels, still need to generate a fake EDID with this.
* not sure which method above is better... maybe a combination of both


# cb050a33beef2d4e477b4d100d6bce55943b1881 24-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Add support for thermal status queries on newer chipsets

* add temperature query support for Juniper, Sumo, Evergreen, and North Islands
* add missing thermal defines for evergreen cards
* northern island cards use the evergreen thermal calculations


# 0cd972316db9c56329f5f4e414826c3a01237f33 21-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Add first hints of thermal monitoring on radeon cards

* add a few missing/needed header defines
* show GPU temp in millidegrees C on r600/r700
* evergreen+ support soon
* function may be moved to driver long term once testing done


# 97b846e8744cbee43c68e9dbec4c3027c89c7197 21-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Style fix gpu_state naming, cleanup

* correct naming on gpu registers that effect MC idle state
* cleanup MC idle failure situation, we are stuck and
need to try the changes anyway.


# 3383e56426351ecd8da51033ae84f28eeffe4bbb 20-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Improve GPU memory controller idle check

* style fix
* add better tracing for non-idle memory controller conditions


# 021332df5dcdfa8f8a1584a53328e303ae5beec8 20-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Improve GPU memory controller setup on later chips

* Fix bug where we setup MC twice on Evergreen+
* Northern Island chipsets use the Evergreen MC setup (just cosmetic)


# 681be5be601a5c37cf10e7ef7f2e80a6fba90e5c 13-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

Add one-off gpio corrections on dce 3 and dce 4 chipsets


# 359b926f79d7e7ac697d6aaf28f704b5d5f1283f 08-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* style cleanup of shared storage names
* return better data on card
* display chipset flags in screen preflet


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


# 76a3e009ddb1b0c649bca1f84376ec2eb6c096c9 08-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add lots of missing evergreen defines
* evergreen headers are split due to different
header copyrights
* detect and set up evergreen memory controler
* change the way we manage radeon chipsets to
more closely match drm driver as the chipset
model numbers aren't in order and change from
numbers to names.
* check for evergreen when populating frame buffer
information.
* style cleanup


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


# e9e9c194f9ca6cf30f8baeb15a89278541d5123d 07-Nov-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* change the way we store GPU MC state information
on halt / resume as it doesn't need to persist.
* rename mc_info -> fb_info to better communicate
it's contents
* add some gart (gtt) storage and prep AGP VM code


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


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

* better use Radeon HD 4xxx (r7xx) VM FB registers


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42931 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


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

* bailing when we can't idle the MC is the correct
behaviour... but while things are incomplete
it may be better to try and push on.


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


# bbcc2a8c03a61740b3d4e600e228028e545ce324 26-Oct-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* lets idle the memory controller before checking if it's idle


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42925 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


# 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


# 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


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

* style fixes, no functional change...
frev / crev to tableMajor / tableMinor
size to tableSize
offset to tableOffset


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


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

* style fix
ensure bitwise ands are compared to 0 or non 0 as per Axel


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42830 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


# ae347a6ce03d5b6b6fab6b955a847db5ec4a6d53 30-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* squash a *silly* bug
don't set up a pointer and not malloc it.
* small cleanups to radeon_hd i2c bit-banging code
* i2c bit banging is now functioning


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


# dd295058932cfb721aff7b714256dd9e5c334952 27-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* remap GPIO pin storage to global struct as they really aren't tied to
a connector. (thus allowing for future non-ddc gpio devices like fan speed)
* map all i2c gpio pins on accelerant init
* use a smaller sub function to attach gpio info to connector i2c info


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


# 4a0f028c4dd88fa01600e5f6b8c4788db559bf96 27-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* perform some i2c cleanup from xorg ati driver
* read gpio pins back after setting them to improve reliability


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


# 2ce1337c71bf6de87632ce1ef94305ad479efa2a 26-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* fix several i2c communication bugs
dealing with i2c register addresses.
* cleanup i2c hacks
* now receive the following message in SimNow:
"No device present at I2C slave address 0x66"


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


# e40c00685cbbfc348064e71f4c38c551232f8f40 21-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* correct some naming after deeper investigation of
linux drm driver. Seems radeon_hd isn't limited to the
standard 0xa0 i2c slave address.


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


# 54c0390b901eb0606bc6c0b46fb0e0c6530f4eda 14-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* remove un-needed i2c_bus on each connector... we simply set this up each time
it's needed using the gpio information
* rename gpio information struct to be cleaner and shorter
* add function to debug found connectors
* set gpio mask to 1 vs the defined mask... this seems to get us closer
to working ddc / edid per connector
* change gpio_info u16's to u32's to ensure we aren't overflowing anything
* fix bug always setting hw_capable true
* change TRACE to ERROR to always show debug data when called


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


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

* i2c locking should happen just before reading the edid
locking and unlocked on every bit read sounds excessive
* set vdif and vdif size to NULL... they really aren't needed


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


# f6be39e0aed303ffafb9dd30665f5d9f7ebd2913 11-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* correct naming error. (a shift is a shift until you use it.. then its a mask)


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


# b053beab99d4f9dbf7f84b0f9867c2cfbcb55fd4 11-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* refactor GPU i2c bit-banging code to be correct using drm as reference
* add i2c locking code that represents common things we need to do before
and after access


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


# f6766f291e49e3399b9037b885d0c970c2f2fae9 09-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* rework i2c read / write to make sense using values provided


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


# f3ccbf7121f034987da4dcea52f7b277c9a33b47 09-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* document GPIO values better based on AMD docs
* no functional change


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


# a9d08e5e27d95bc78bfb4869210db30fc27e4516 09-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* adjust error to make more sense


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


# a8b357c7477d541c2c6d39fcba245b64cd9107a4 08-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* run edid check on all connectors regardless of encoder
* correction to output check (B_OK != true)
* check for invalid gpio (prevents seg violation)
* tab cleanup


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


# b5fc0237e14b93deac33523f327c7e36f1bca57f 06-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add i2c/ddc info storage to connector
* add edid info storage to display
* pass i2c/ddc information to common i2c code
* add code to read/write i2c/ddc
* i2c/ddc read/write code works 'in theory', needs tested
* detect monitors based on presence of edid on connector


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


# cfda569d7f1b3c08a0f74240666341d5b147f66e 02-Sep-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* add function to set up i2c bus for connector
* few tab fixes
* add Axel as author as the base i2c stuff is from intel_extreme


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42709 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


# 93d4d55295f5122d099c396ef99b5e11c0bc2ee7 10-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* a few small style fixes to last commit
* no functional change


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


# d356bf503359f7581ac6c596588e70eff1f55117 10-Aug-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

* consolidate and remove unneeded Xorg headers
* move mc code to more generic gpu source/header
* add gpu reset functions (with r600 documented)


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