summaryrefslogtreecommitdiff
path: root/src/radeon_driver.c
AgeCommit message (Collapse)Author
2012-06-01radeon: fix compat api for newest planned API.Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-24radeon: update compat-api.h for block handler + enable/disable fb.Dave Airlie
This updates the compat stuff for the latest block handler code, and the enable/disable interface. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-23compat for new server APIDave Airlie
2012-05-23ati: convert to new screen conversion APIsDave Airlie
The compat header takes care of the old server vs new server. this commit was autogenerated from util/modular/x-driver-screen-scrn-conv.sh Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-23radeon/xaa: drop scrnIndex parameter to some functionsDave Airlie
This isn't needed, and makes api changes later easier. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-05DPMS: Split non-modeset CRTC DPMS function.Egbert Eich
RADEONRestore() calls crtc->funcs->dpms() after most of the mode setting subsystems have been restored. This function enables the CRTCs but does more: it calls DRM pre- and post-modeset ioctls and sets up the palettes (LUTs). None of these two things are needed. Accessing the palette registers after restoring the PLLs can even lead to lockups. Thus the CRTC DPMS function is split into two parts: one that just enables /disables the CRTC and one which wraps this function and does the rest. Now the inner function can be called directly from RADEONRestore() as there is no need to go thru the RandR hooks in this function while the RandR hook uses the wrappering function so the full functionality is preserved from an RandR point of view. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2012-01-05UMS: Fix lockups in palette save/restore on pre-AVIVO chips.Egbert Eich
The reintroduction of palette save/restore in 5efdf514 causes some pre-AVIVO chips to lock up. An investigation revealed that accessing palette registers when the associated PLL is not running is causing this. With UMS the PLL setup that is saved has been done by the BIOS typically. A similar issue was observed when VGA palette save/restore had been reinitroduced with 80eee856: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480312 and has been worked around for Linux without further investigation by 87e66ce7. To fix the issue we now a. introduce 'on-demand' palette saving (ie the palette is saved before it is first altered). This guarantees that the palette register are only associated when the associated CRTC is active and thus the PLLs are powered up and running. b. move palette restore before PLL restore. c. eliminate generic VGA palette save/restore which seems to be unneeded when the palette is restored natively. It is believed that this caused the behavior described in https://bugs.freedesktop.org/show_bug.cgi?id=18407#c27 Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
2012-01-02Update for new vgaHW API.Matthieu Herrb
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-11-08UMS: Guard references to PCITAG / pciTag with XSERVER_LIBPCIACCESS (bug #42690)Michel Dänzer
Should fix https://bugs.freedesktop.org/show_bug.cgi?id=42690 . Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2011-08-17Bail if we're trying to start up in UMS mode on KMS.Michel Dänzer
Ideally, the display manager will start the X server again, and everything will be fine and dandy. But in the worst case, at least we won't hit the hardware behind the KMS driver's back. (This change intentionally makes (ab)use of the fact that Bool is defined as int). Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-05-31radeon: add support for llano APUsAlex Deucher
- KMS only - Includes full EXA/Xv support Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-21Properly restore CLOCK_CNTL_INDEX registerMark Kettenis
RADEONRestore() restores the CLOCK_CNTL_INDEX register before calling RADEONRestorePLLRegisters(), which modifies the CLOCK_CNTL_INDEX register to access the PLL registers. As a result we may end up with the wrong clock being selected when exiting X. This happens on platforms where the driver doesn't save and restore the VGA state. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2011-01-06Bail on NI cards with UMSAlex Deucher
NI cards require KMS.
2010-12-03Add missing call to vbeFree (bug 4417)Matt Turner
Also kill unneeded vbe.h include from radeon_bios.c. Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-12-01radeon: make sure EXA is off when EXA is disabled with --disable-exaDave Airlie
2010-11-22ontario: add UMS modesetting supportAlex Deucher
Accel not enabled yet. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-11-15dce4: improve the VT switching code.Dave Airlie
add in lots more blocks of regs to save/restore
2010-11-11evergreen: remove warnings since last commitDave Airlie
2010-11-11evergreen: add UMS VT switch support.Dave Airlie
This isn't perfect, but it brings back text VTs here on the DAC and DVI outputs.
2010-11-11avivo: use arrays to store the crtc/pll info for save/restoreDave Airlie
this is just prep work for evergreen VT save/restore
2010-10-24UMS/radeon: fix typo in restore paletteAlex Deucher
2010-10-24UMS/radeon: fix screen dimming on VT switchAlex Deucher
Save and restore the palettes on VT switch. The restore has to be done after the vga restore to work properly as determined by Jonathan Kollasch. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=18407
2010-10-14Don't allow the config file to override BIOS locationAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-30radeon: fix fbLocation for >32 bit MC addressesAlex Deucher
If the fbLocation was at an address >32 bits, we'd fail. Change fbLocation to uint64_t and properly cast when needed.
2010-09-30r6xx: fix bad mask when setting up HDP_NONSURFACE_BASEAlex Deucher
This fails for MC addresses >32 bits
2010-06-21Convert x(c)alloc/xfree to m/calloc/free.Michel Dänzer
Fixes deprecation warnings with xserver master and should also work with older xservers.
2010-04-21Reference count shared driver mappings.Owain Ainsworth
With MMIO it wasn't *such* a bit deal if we leaked the smallish mapping. with FB it could be a larger deal. So instead of worrying about this, reference count the mappings in the entity structure and unmap them when no one cares anymore. Prompted by a discussion with airlied Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-21Make consistent use of fbOffset and share fb mappings.Owain G. Ainsworth
What we were doing previously was mapping the framebuffer for zaphod for only this driver instances chunk, however, fbOffset was (rightly) set to the offset into the whole framebuffer we were using. Since in some cases we did operations on the FB virtual address + fbOffset (for example zeroing the framebuffer on entervt) we were actually pissing all over ourselves in those cases. Fix this by implementing shared fb mappings like we do for MMIO already, and whenever we wish to refer to our area of FB space we always use fbOffset. Fixes zaphod for some users on r600 chipsets, my 4870 is still behaving strangely on screen 0, but I suspect that is another bug. Once calculation (in PreInitAccel) is now wrong because of this, however dri on zaphod does now happen so this is irrelavent, add a comment to that effect. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-21Remove remnants of the ShowCache option.Owain G. Ainsworth
The rest of it died a long time ago. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-12Xv overlay: set scalerwidth to 1920 on r3xx/r4xx chipsAlex Deucher
reported on phoronix forums.
2010-03-15radeon: remove some leftover debugging outputAlex Deucher
2010-02-26Use RADEON_ALIGN instead of open coding it.Matt Turner
Also fix some RADEON_ALIGN(x, 63), which would return incorrect results for odd x. Though this shouldn't happen, it's still not right. You wouldn't ever write (x + 62) & ~62 which is clearly wrong (and what it expands to). CC: Jerome Glisse <jglisse@redhat.com> CC: Alex Deucher <alexdeucher@gmail.com> CC: Dave Airlie <airlied@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-02-26Use/define RADEON_GPU_PAGE_SIZE instead of sprinkling 4096 everywhere.Matt Turner
Also, define RADEON_BUFFER_ALIGN in terms of it, and replace some RADEON_ALIGN(x, RADEON_BUFFER_ALIGN) with RADEON_ALIGN(x, RADEON_GPU_PAGE_SIZE) since this is really what was intended. CC: Jerome Glisse <jglisse@redhat.com> CC: Alex Deucher <alexdeucher@gmail.com> CC: Dave Airlie <airlied@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-02-26add more triple-head server IDCooper Yuan
2010-02-25update ZaphodHeads optionAlex Deucher
Now that the screen section mapping is fixed, Make the option per-instance and allow multiple outputs to be specified; e.g., DVI-0 and HDMI-0 associated with instance 0 and LVDS and VGA-0 associated with instance 1.
2010-02-23radeon: fixes for zaphodheads optionAlex Deucher
Needed for systems with more than two outputs. Both KMS and non-KMS zaphod work on systems with more than two outputs now.
2010-02-17radeon: add ZaphodHeads optionAlex Deucher
Allows users that want to use zaphod mode to select which xrandr outputs are assigned to which head. E.g., Option "ZaphodHeads" "LVDS,VGA-0" will assign LVDS to the first zaphod driver instance and VGA-0 to the second instance.
2010-02-05rs400/rs480: mc idle bit is bit 2 like original radeonDave Airlie
backport from a KMS fix, the rs400/480 mc idle is bit 2 not bit 4. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-01evergreen: add base asic supportAlex Deucher
2009-12-09AVIVO: add new PLL codeAlex Deucher
This should hopefully help the problems with flickering and blinking monitors reported on some systems. If there are problems, the old PLL algorithm can be selected with: Option "NewPLL" "FALSE" in the device section of your X config. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-12-02radeon: only read RADEON_PPLL_REF_DIV for ref div on pre-avivoAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-11-09IGP: some IGP chips report as AGPAlex Deucher
Set bus type appropriately. fixes bug 25002 Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-10-23radeon: clamp the internal FB map to the aperture size v2Alex Deucher
We don't use the invisible memory yet and on cards with large amounts of vram this can cause the top of GART calculation to overflow. Fixes bug fdo bug 24301: http://bugs.freedesktop.org/show_bug.cgi?id=24301 v2: only clamp cards with more than 512 MB. This seems to cause problems on some older cards due to the way the drm and ddx set up the internal memory map.
2009-10-09Revert "radeon: clamp the internal FB map to the aperture size"Dave Airlie
This reverts commit 5f846360c46f5a989f5d0fde6d251cdbd61d4968. Numerous reports of system hangs since this, I'm guessing some sort of conflict with the drm memory setup. This code has always been fragile between kernel/userspace drivers.
2009-10-07radeon: clamp the internal FB map to the aperture sizeAlex Deucher
We don't use the invisible memory yet and on cards with large amounts of vram this can cause the top of GART calculation to overflow. Fixes bug fdo bug 24301: http://bugs.freedesktop.org/show_bug.cgi?id=24301
2009-10-04radeon: add support for Custom EDIDCsillag Kristof
Allows you to specify an edid per output from a file to override what is detected by DDC. Useful for problematic monitors or KVM switches that block DDC. Specifying an EDID that is not compatible with your monitor could damage your monitor so use with caution. agd5f: cache the custom edid at startup so we don't have to read it from file every time the output is queried.
2009-10-02radeon: Remove gatos message from driver startupKenneth Graunke
Remove a message on driver startup which directs people to the old GATOS website; said site contains highly out of date software which is no longer necessary.
2009-09-26radeon: fix zaphodDave Airlie
2009-09-24radeon: remove old pre-randr rotation cruftAlex Deucher
leftover from the randr 1.2 conversion. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-09-18avivo: disable VGA rendering core when starting X.Dave Airlie
this thing can be rendering to VRAM when we don't expect it. turn it off. Signed-off-by: Dave Airlie <airlied@redhat.com>