aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
AgeCommit message (Collapse)Author
2009-12-02drm/radeon/kms: Disable agp only if we are dealing with an AGP GPUJerome Glisse
On IGP if you pass option agpmode=-1 you would overwrite the set_page function callback with improper function which endup in non functioning hw. This patch will disable agp when giving agpmode=-1 parameter only if we are dealing with an AGP GPU. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: Disable both CRTCs during mode switchPierre Ossman
Reconfiguring one CRTC whilst another is running can cause a hang under some circumstances. Unfortunately we haven't pinpointed exactly what those circumstances are, so disable all CRTCs for every mode switch. Signed-off-by: Pierre Ossman <pierre@ossman.eu> Acked-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: fix LVDS setup on r4xxAlex Deucher
R4xx mobility chips use atombios, which does not store the LVDS_GEN_CNTL parameter setup like combios. Rather, it's configured in LVDSEncoderControl. As such, LVDS_GEN_CNTL is set wrong when on resume. Call LVDSEncoderControl to set it properly. Should fix fdo bug 25336 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: add HDP flushing for all GPUs.Dave Airlie
rendercheck under kms on r600s was failing due to HDP flushing not happening. This adds HDP flushing to the object wait function for r100->r700 families. rendercheck passes basic tests on r600 with this change. Acked-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon: Give userspace more accurate information about available memory.Michel Dänzer
This patch varies from the original and just removes memory for kernel pinned objects. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: pick 8bpp console when 32MB or less VRAMDave Airlie
making the pinned console smaller gives X a bit more room to play with. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: add support for encoder cloning.Dave Airlie
The RN50 really needs this since its a single crtc card, however other gpus may benefit from it as well. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: fix oops when set_base is call with no FBJerome Glisse
Just do nothing if crct_set_base() is called with no FB. The oops happens when the user switches between X & vt or in some case when changing mode. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: add quirk for MSI S270Alex 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-12-02drm/radeon/kms: deal with connectors sourced to the same encoderAlex Deucher
Some systems have multiple connectors connected to the same encoder; e.g., DVI and HDMI connected to the same encoder with the same ddc line. Since we expose connectors as xrandr outputs, randr treats them separately which results in it trying to source the same encoder to different crtcs. If we have an HDMI and DVI-D port on the same encoder, pick the one to be considered connected based on the edid (HDMI if edid indicates HDMI, DVI otherwise). Should fix fdo bug 25150 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: add quirk for Acer laptopAlex Deucher
DVI-I port is actually DVI-D Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: rework scaler handlingAlex Deucher
Keep requested scaler type in radeon_encoder and the actual scaler type used in radeon_crtc. This prevents us from enabling the scaler when it's not required (i.e., the requested mode is the native mode). Also, always set the adjusted mode equal to the native mode for lvds. Should fix: https://bugzilla.redhat.com/show_bug.cgi?id=522271 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Acked-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: fix typo in legacy internal tmds mode fixupAlex Deucher
Call to set active device was missing. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: AGP systems need PCI bus mastering enabledDave Airlie
We might not hit this yet, but when if we do any sort of writeback we really need to enable PCI bus mastering on these systems from what I can see. This enables PCI BM on all radeons that require it. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: add support for external tmds on legacy boardsAlex Deucher
This enables initialization of external tmds chips on pre-atom and mac systems. Macs are untested. Also, some macs have single link tmds chips while others have dual link tmds chips. We need to figure out which ones have which. This gets external TMDS working on my RS485 and RV380. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: clean up i2cAlex Deucher
- Change reg/mask names to match what we use internally and in the bios - Clarify how i2c over gpio on radeon actually works Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: dont't pass a radeon_connector to radeon_i2c_do_lock()Alex Deucher
We need this for supporting things other than ddc on i2c. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-30Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: drm/i915: Select CONFIG_SHMEM drm/i915: Fix CRT hotplug detect by checking really no channels attached agp/intel: new host bridge support drm/i915: Add more registers save/restore for Ironlake suspend drm/i915: Fix IRQ stall issue on Ironlake drm/i915: HDMI hardware workaround for Ironlake drm/i915: Fix and cleanup DPLL calculation for Ironlake drm/i915: Avoid potential sleep whilst holding spinlock
2009-11-25drm/i915: Select CONFIG_SHMEMChris Wilson
The driver requires shmfs as the backing filesystem to handle the buffer objects, so ensure it is selected if the user chooses to build our driver. Fixes: Bug 14662 - Dell E5500 kernel panic with KMS http://bugzilla.kernel.org/show_bug.cgi?id=14662 The revealing nature of the panic is the NULL function pointer dereference in read_cache_page_async(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reported-and-tested-by: Mateusz Kaduk <mateusz.kaduk@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net> Cc: stable@kernel.org
2009-11-25drm/i915: Fix CRT hotplug detect by checking really no channels attachedZhenyu Wang
For CRT hotplug detect status, we have four test results as blue channel only, green channel only, both blue and green channel, and no channel attached. Origin code only marks both blue and green channel case as connected, but ignore other possible connected states. This one trys to detect CRT by checking no channel attached case instead. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-11-24drm/fb: fix FBIOGET/PUT_VSCREENINFO pixel clock handlingClemens Ladisch
When the framebuffer driver does not publish detailed timing information for the current video mode, the correct value for the pixclock field is zero, not -1. Since pixclock is actually unsigned, the value -1 would be interpreted as 4294967295 picoseconds (i.e., about 4 milliseconds) by register_framebuffer() and userspace programs. This patch allows X.org's fbdev driver to work. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-24drm: make sure page protections are updated after changing vm_flagsJeremy Fitzhardinge
Some architectures compute ->vm_page_prot depending on ->vm_flags, so we need to update the protections after adjusting the flags. AFAIK this only affects running X under Xen; without this patch you get lots of coloured blobs on the screen, or maybe a complete lockup. Or anything really. But that still depends on lots of out-of-tree stuff, so I don't think there are any consequences for anyone else. But it is wrong in principle. Reported-by: Jan Beulich <JBeulich@novell.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
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: mm always protect change to unused_nodes with unused_lock spinlockJerome Glisse
unused_nodes modification needs to be protected by unused_lock spinlock. Here is an example of an usage where there is no such protection without this patch. Process 1: 1-drm_mm_pre_get(this function modify unused_nodes list) 2-spin_lock(spinlock protecting mm struct) 3-drm_mm_put_block(this function might modify unused_nodes list but doesn't protect modification with unused_lock) 4-spin_unlock(spinlock protecting mm struct) Process2: 1-drm_mm_pre_get(this function modify unused_nodes list) At this point Process1 & Process2 might both be doing modification to unused_nodes list. This patch add unused_lock protection into drm_mm_put_block to avoid such issue. 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: work around EDIDs with bad htotal/vtotal valuesJesse Barnes
We did this on the userspace side, but we need a similar fix for the kernel. Fixes LP #460664. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: stable@kernel.org 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-12drm/i915: Add more registers save/restore for Ironlake suspendZhenyu Wang
Add more display registers save/restore to fix unstable issues during S4 testing on Ironlake. And DPLL_B_MD should not be restored on Ironlake. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-11-12drm/i915: Fix IRQ stall issue on IronlakeZou, Nanhai
The master irq control in DE must be disabled before irq handling, and enable after the process. This fixes the irq stall issue on Ironlake. Cc: Stable Team <stable@kernel.org> Signed-off-by: Zou, Nanhai <nanhai.zou@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
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/kms: Init the CRTC info fields for modes forced from the command line.Francisco Jerez
Fixes fdo bug 24710. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
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-05drm/i915: HDMI hardware workaround for IronlakeZhenyu Wang
This brings some hardware workaround for HDMI port on PCH (Ibex Peak), which fixes unstable issues like during rotation. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-11-05drm/i915: Fix and cleanup DPLL calculation for IronlakeZhenyu Wang
When the ideal error range can't be reached, this will safely use a most closed one. Clean up some dumb codes in DPLL function too. This fixes DPLL clock issue against one monitor at 1680x1050@60hz. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-11-05drm/i915: Avoid potential sleep whilst holding spinlockChris Wilson
Miles Lane reported the following error: 2 locks held by cat/4179: #0: (&p->lock){+.+.+.}, at: [<c10a3884>] seq_read+0x25/0x315 #1: (&dev_priv->mm.active_list_lock){+.+...}, at: [<c119a854>] i915_batchbuffer_info+0x2b/0x124 Pid: 4179, comm: cat Not tainted 2.6.32-rc5-git1 #2 Call Trace: [<c104874f>] ? __debug_show_held_locks+0x1e/0x20 [<c1023fb0>] __might_sleep+0xf0/0xf7 [<c101c393>] kmap+0x17/0x58 [<c119a8d6>] i915_batchbuffer_info+0xad/0x124 [<c10a39bf>] seq_read+0x160/0x315 [<c108fb8c>] ? rw_verify_area+0x98/0xbb [<c10a385f>] ? seq_read+0x0/0x315 [<c1090331>] vfs_read+0x75/0xa9 [<c10903f9>] sys_read+0x3b/0x5d [<c1002a8f>] sysenter_do_call+0x12/0x36 The fix is relatively simple, use the atomic variants of kmap() that avoid the potential sleep. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Miles Lane <miles.lane@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-11-04Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: drm/i915: Ironlake suspend/resume support drm/i915: kill warning in intel_find_pll_g4x_dp drm/i915: update watermarks before enabling PLLs drm/i915: add FIFO watermark support for G4x drm/i915: quiet DP i2c init drm/i915: fix panel fitting filter coefficient select for Ironlake drm/i915: fix to setup display reference clock control on Ironlake drm/i915: Install a fence register for fbc on g4x drm/i915: save/restore BLC histogram control reg across suspend/resume drm/i915: Fix FDI M/N setting according with correct color depth drm/i915: disable powersave feature for Ironlake currently drm/i915: Fix render reclock availability detection. drm/i915: Save and restore the GM45 FBC regs on suspend and resume. drm/i915: Set the LVDS_BORDER when using LVDS scaling mode drm/i915: disable FBC for Pineview, fixing a boot hang.
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>