aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon
AgeCommit message (Collapse)Author
2009-11-24drm/radeon/kms: Report vga connector is connected according to ddc_probeJerome Glisse
On broken EDID we were reporting vga connector to be disconnected even if ddc probe did found a monitor. This patch report that the connector is connected on such case. This allow drm to add a fail safe mode (800x600 at the time of this patch) thus user can boot and later add a mode which match its monitor capabilities. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-24drm/radeon/kms: Disable TV load detect on RS400,RC410,RS480Jerome Glisse
RS400,RC410,RS480 chipset seems to report a lot of false positive with load detect on TV output. We haven't yet found a way to make load detect reliable on those chipset, thus just disable it for TV output. Would avoid user to experience phantom screen because X believe there is a monitor connected to the TV output. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-24drm/radeon/kms: read back register before writing in IIO.Dave Airlie
This fixes RH bugzilla #527874. On resume the atom posting wasn't working, however vbe posting was going fine, after 2 weeks over irc, and 8 hrs with the hardware, I tracked it down to the memory device table and it access the MC registers via IIO, it appears the rv515 atom iio table might not be fully functional, so adding a readback before doing a write either provides enough delay to make things resume correctly. Thanks to Peng Huang at Red Hat for coming to Brisbane. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-24drm/radeon/kms: fix handling of d1/d2 vgaDave Airlie
An rv515 laptop I got wouldn't startup with a montior plugged in, found the proper bug hopefully with us not turning off D2VGA here when we should. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-24drm/radeon/kms: resume AGP by calling init.Dave Airlie
AGP resume was broken since we moved to the new init path, because we never re-enabled AGP on these systems at resume time. This patch just calls the AGP resume call which just does the reinit at resume time like the old path did. Since AGP is pretty much gpu independant I did it outside the gpu specific code. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-17Merge branch 'hostprogs-wmissing-prototypes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc * 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc: Makefile: Add -Wmising-prototypes to HOSTCFLAGS oss: Mark loadhex static in hex2hex.c dtc: Mark various internal functions static dtc: Set "noinput" in the lexer to avoid an unused function drm: radeon: Mark several functions static in mkregtable arch/sparc/boot/*.c: Mark various internal functions static arch/powerpc/boot/addRamDisk.c: Mark several internal functions static arch/alpha/boot/tools/objstrip.c: Mark "usage" static Documentation/vm/page-types.c: Declare checked_open static genksyms: Mark is_reserved_word static kconfig: Mark various internal functions static kconfig: Make zconf.y work with current bison
2009-11-15drm: radeon: Mark several functions static in mkregtableJosh Triplett
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-11Merge branch 'drm-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (52 commits) drm/kms: Init the CRTC info fields for modes forced from the command line. drm/radeon/r600: CS parser updates drm/radeon/kms: add debugfs for power management for AtomBIOS devices drm/radeon/kms: initial mode validation support drm/radeon/kms/atom/dce3: call transmitter init on mode set drm/radeon/kms: store detailed connector info drm/radeon/kms/atom/dce3: fix up usPixelClock calculation for Transmitter tables drm/radeon/kms/r600: fix rs880 support v2 drm/radeon/kms/r700: fix some typos in chip init drm/radeon/kms: remove some misleading debugging output drm/radeon/kms: stop putting VRAM at 0 in MC space on r600s. drm/radeon/kms: disable D1VGA and D2VGA if enabled drm/radeon/kms: Don't RMW CP_RB_CNTL drm/radeon/kms: fix coherency issues on AGP cards. drm/radeon/kms: fix rc410 suspend/resume. drm/radeon/kms: add quirk for hp dc5750 drm/radeon/kms/atom: fix potential oops in spread spectrum code drm/kms: typo fix drm/radeon/kms/atom: Make card_info per device drm/radeon/kms/atom: Fix DVO support ...
2009-11-10drm/radeon/r600: CS parser updatesAlex Deucher
Add some additional regs that require relocs. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-06drm/radeon/kms: add debugfs for power management for AtomBIOS devicesRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-06drm/radeon/kms: initial mode validation supportAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-06drm/radeon/kms/atom/dce3: call transmitter init on mode setAlex Deucher
Generally this is done at post, but might not always be done with softboot or for connectors on docking stations. Could probably be done once when the driver loads/resumes rather than on each mode set. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-06drm/radeon/kms: store detailed connector infoAlex Deucher
This will be useful for mode validation and certain atom tables. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-06drm/radeon/kms/atom/dce3: fix up usPixelClock calculation for Transmitter tablesAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-06drm/radeon/kms/r600: fix rs880 support v2Alex Deucher
Lots of cases were wrong or missing. v2: rebased against drm-next Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-04drm/radeon/kms/r700: fix some typos in chip initAlex Deucher
Noticed by Andre on IRC. Also fix up some minor whitespace issues. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-04drm/radeon/kms: remove some misleading debugging outputAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-04drm/radeon/kms: stop putting VRAM at 0 in MC space on r600s.Dave Airlie
The Lenovo W500 laptop hangs inside an SMI on brightness changes, I thought it just needed the VGA disable but it turned out to require slightly more work, setting the MC locations up just like the IGP chip requirements seems to make it all happy again and I can boot and play with brightness. We should probably just do this for all chips and give up the VRAM at 0x0 idea, it never seems to buy us anything but pain. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-04drm/radeon/kms: disable D1VGA and D2VGA if enabledDave Airlie
Once kms is enabled we don't need these, and it causes a problem with the Lenovo W500 ACPI brightness implementation, it hangs in a loop inside an SMI. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-04drm/radeon/kms: Don't RMW CP_RB_CNTLAlex Deucher
Immediate readback seems faulty on some chips. I suspect it takes a while to get through the fifo to the actual register backbone. There's no need to read it back, so, just write the driver's copy of the register's value directly. Should fix bug 24535 and possibly 24218 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-04drm/radeon/kms: fix coherency issues on AGP cards.Dave Airlie
When we are evicting from VRAM->RAM we allocate the ttm object, but we don't set the caching policy on it before blitting into it. This means on AGP we end up blitting into cached pages, and the CPU later flushes out on top of them. This was mostly seen as font corruption. The other question is why we don't evict VRAM->GTT in a lot of cases, this would save us some cache transitions since a lot of objects that are evicted from VRAM will probably end up being pulled back in a few operations later, and evicting them to system memory involves 2 unnecessary cache transitions. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-28drm/radeon/kms: fix rc410 suspend/resume.Dave Airlie
This fixes suspend/resume on my rc410 motherboard, it restores the memory controller setup before posting the GPU, since it seems to need the MC_FB_LOCATION setup correctly. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-28drm/radeon/kms: add quirk for hp dc5750Alex Deucher
Doesn't have a tv-out port Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-28drm/radeon/kms/atom: fix potential oops in spread spectrum codeAlex Deucher
Make sure we have an LVDS encoder before casting enc_priv. [airlied: also fix two missing cpu_to_le16 casts we noticed on irc] Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-28drm/radeon/kms/atom: Make card_info per deviceMathias Fröhlich
Make the struct card_info, which is a per struct radeon_device dataset, a struct member of the radeon device instead of a static per kernel module value. This should avoid potential problems with two radeon cards installed in one system. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-28drm/radeon/kms/atom: Fix DVO supportAlex Deucher
DVO in 12 bit mode (which seems to be the most common config) requires 2x ppll. Fixes fdo bug 21857. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-28drm/radeon/kms/atom: loosen pll min output limitsAlex Deucher
Limiting the pll output range is a good thing generally as it limits the number of possible pll combinations for a given frequency presumably to the ones that work best on each card. That's why the limits are in the bios tables. However, certain duallink DVI monitors seem to like pll combinations that would be limited by this at least on pre-DCE 3.0 r6xx hardware. This might need to be adjusted per family or per clock range in the future. See fdo bug 24727. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-28drm/radeon/kms: ignore vga arbiter return.Dave Airlie
Since we register all radeon devices, and the arbiter only cares about VGA class ones, we will fail to startup on display controller class devices. We don't gain anything by using the return value here. this helps kms on sparc64 get started. Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-26drm/radeon/kms: add support for msiAlex Deucher
Try to enable msi on chips that support it. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-26drm/radeon/kms/atom: add support for spread spectrum (v2)Alex Deucher
Spread spectrum is a periodic disturbance added to the feedback divider to change the pixel clock periodically to reduce interference. Only enabled on LVDS. v2: add support for r4xx and fix DCE 3 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-26drm/radeon/kms/r7xx: add regs for 40 bit CUR/GRPH addressesAlex Deucher
The *_HIGH regs are reversed. The secondary ones are in the primary block and vice versa. We currently only use a 32 bit internal address, so these are 0 for now. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-26drm/radeon/r600: only assign vb after we know space is available.Robert Noland
This patch only changes this is the swap path, where it doesn't loop. Signed-off-by: Robert Noland <rnoland@2hip.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-26drm/radeon/r600: Replace repeated calculations with variable.Robert Noland
- Reduce the chance of error and avoid a bit of overhead. - Use switch to assign color and format Signed-off-by: Robert Noland <rnoland@2hip.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-26drm/radeon/kms/atom: get better min pixel clock infoMathias Fröhlich
Where supported use ulMinPixelClockPLL_Output rather than usMinPixelClockPLL_Output for pll_out_min. This seems to improve pll selection on some boards. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-26drm/radeon/kms: add quirk for acer 5102Alex Deucher
doesn't have a tv-out port Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-26drm/radeon/kms: fix vram_width calculation on r6xx/r7xxAlex Deucher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-26drm/radeon/kms: fix cs parser tex bit 11 checkMathias Fröhlich
The problem boils down to the order when the bit11 of the texture size is or'ed to the original width. In the end each mipmap level has the same width or height because of that 11 bit is ored to the scaled down lod with and thus blows up the size again to the full size or more due to the power of two rounding afterwards. The attached patch changes this order so that the texture sizes are computed correct. Also the on error the yet missing inputs to the size computation are printed which helped me to find out where it really breaks. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-16drm/radeon/kms: fix support for original r100Alex Deucher
Original radeon didn't have a connector table in the bios. Check for the CRT table and if we have one, add a VGA connector. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-10-16drm/radeon/kms: fix legacy quirk handlingAlex Deucher
Need to check the return type for the quirk function to decide whether we add the connectors and encoders. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-10-16drm/radeon/kms: use RADEON_GPU_PAGE_SIZE instead of 4096Matt Turner
Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-16drm/radeon/kms: limit default tv modes to <= 1024x768Alex Deucher
fixes fdo bug 24496 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-16drm/radeon/kms/atom: fix tv-outAlex Deucher
D1MODE_INTERLEAVE_EN was getting set in some cases in the encoder quirks function due to the changes in 5a9bcacc0a56f0d9577494e834519480018a6cc3 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-16drm/radeon/kms: fix connector edid handlingAlex Deucher
Based partly on a patch from Christian Koenig <deathsimple@vodafone.de> - fix several memory leaks in radeon_connector->edid handling - store edid in radeon_connector->edid in detect() or get_modes() - switch hdmi detect code to use radeon_connector->edid - add support for oem boards multiple connectors that share a ddc line. - short circuit lvds_detect() if have a stored edid Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-15drm/radeon/kms: fix internal tmds setup on legacy display engineAlex Deucher
- crtc 0 routing was wrong - need to clear various timing bits in FP_GEN_CNTL - need to set FP_H/V2_SYNC_STRT_WID regs for crtc 1 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-15drm/radeon/kms: move active_device setup into encoder fixup()Alex Deucher
radeon_encoder->active_device defines the active routing between the encoder and connector. The encoder fixup and dpms functions need to know the active_device to function properly. Setting active_device in the prepare hook was too late in some cases. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-13drm/radeon/kms: properly handle mode id with native mode changesAlex Deucher
drm modes are objects with indentifiers. Make sure to preserve the mode id when copying mode params. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-12drm/radeon/kms: fix use of index before proper initialisation.Dave Airlie
With the adjust table introduction, we need to fill out index before getting the table version. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-12drm/radeon: Revert "drm/r600: avoid assigning vb twice in blit code"Dave Airlie
This reverts commit 49c458e544ae14514209ed80ea6829ca1b18ddf0. It seems to have some side effects in the non-kms cases. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-12drm/radeon/kms: also check for edid in lvds detectAlex Deucher
In case the system has bad native mode info but valid edid. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-12drm/radeon/kms: use drm_mode directly for panel modesAlex Deucher
This reduces the number of mode format conversions needed and makes native panel mode support cleaner. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>