summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAgeFilesLines
* Revert "drm/i915: Don't enable pipe/plane/VCO early (wait for DPMS on)."Linus Torvalds2010-06-081-0/+5
| | | | | | | | | | | | | | | This reverts commit cfecde435dda78248d6fcdc424bed68d5db6be0b, since it seems to cause some systems to not come up with any video output at all (or video that only comes on when X starts up). Fixes bugzilla: http://bugzilla.kernel.org/show_bug.cgi?id=16163 Reported-and-tested-by: David John <davidjon@xenontk.org> Tested-by: Nick Bowler <nbowler@elliptictech.com> Acked-by: Carl Worth <cworth@cworth.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drm/radeon: don't poll tv dac if crtc2 is in use.Dave Airlie2010-06-081-0/+11
| | | | | | | | | So when we added output polling, we'd suddenly use this code more often, and the fact that it always takes over crtc2 and messes with it during probing isn't what we really want to be happening. A more complete fix would to change it to use whatever crtc was free at the time, but for now lets stay simple and just don't poll if crtc2 is already in use. Although a more correct fix was found I suspect we should do this as well, until we get a chance to readdres the tv out polling issues. Reported-by: Torsten Kaiser <just.for.lkml@googlemail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: reset i2c valid to avoid incorrect tv-out polling.Dave Airlie2010-06-081-0/+2
| | | | | | | | | | | | We really don't want to be polling tv-out but since we weren't forcing the i2c lines to invalid (tv-out has no DDC), we were adding tv connectors to the polling setup and this was causing blinking on secondary displays. This fixes the regression Torsten reported. Reported-by: Torsten Kaiser <just.for.lkml@googlemail.com> Tested-by: Torsten Kaiser <just.for.lkml@googlemail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nv50: fix iommu errors caused by device reading from address 0Ben Skeggs2010-06-081-2/+8
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: off by one in init_i2c_device_find()Dan Carpenter2010-06-081-1/+1
| | | | | | | | dcb->i2c[] has DCB_MAX_NUM_I2C_ENTRIES entries. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* nouveau: off by one in nv50_gpio_location()Dan Carpenter2010-06-081-1/+1
| | | | | | | | | If "gpio->line" is 32 then "nv50_gpio_reg[gpio->line >> 3]" reads past the end of the array. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: completely fail init if we fail to map the PRAMIN BARBen Skeggs2010-06-081-12/+7
| | | | | | | | | | | On cards where there's a specific BAR for PRAMIN, we used to try and fall back to the "legacy" aperture within the mmio BAR. This is doomed to cause problems, so lets just fail completely as there's obviously something else very wrong anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: match U/DP script against SOR linkBen Skeggs2010-06-081-3/+20
| | | | | | | | It appears version 0x21 'U' and 'd' tables require us to take the SOR link into account when selecting the appropriate table for a particular output. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/pm: resurrect printing power statesRafał Miłecki2010-06-081-0/+45
| | | | | | | | | | debug only agd5f: rebased Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add trivial debugging for voltageRafał Miłecki2010-06-084-0/+5
| | | | | | | | agd5f: rebased Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/r600+: use voltage from requested clock mode (v3)Rafał Miłecki2010-06-083-10/+12
| | | | | | | | | | | | | | | | This fixes FDO bug #28375, it's kind of regression, so quite important to have it for .35. V2: Fix on RV770+ as well. All other chipsets have only one clock mode per state. V3: I'm out of luck today. Grepped for voltage in r*.c and missed evergreen. agd5f: rebased Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/pm: track current voltage (v2)Alex Deucher2010-06-086-7/+22
| | | | | | | | | | track the current voltage level and avoid setting it if the requested voltage is already set. v2: check voltage type before checking current voltage Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/pm: Disable voltage adjust on RS780/RS880Alex Deucher2010-06-081-4/+1
| | | | | | | | | | | | | | | The vddc value in the power tables is not an actual voltage like on discrete r6xx/r7xx/evergreen systems, but instead has a symbolic meaning (e.g., NONE, LOW, HIGH, etc.). See atombios.h Most RS780/RS880 vbioses don't have a SetVoltage table anyway, so it shouldn't be doing anything to the hardware at the moment. I need to figure out how voltage is supposed to work on the newer IGPs; until then, disable it. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix typo in printing the HPD infoAlex Deucher2010-06-081-2/+1
| | | | | | | I forgot to fix this in 8e36ed00842668a39a6ed1b0a00b8ac92b7c4cd5 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/pm: add mid profileAlex Deucher2010-06-085-13/+126
| | | | | | | | | | | | | This adds an additional profile, mid, to the pm profile code which takes the place of the old low profile. The default behavior remains the same, e.g., auto profile now selects between mid and high profiles based on power source, however, you can now manually force the low profile which was previously only available as a dpms off state. Enabling the low profile when the displays are on has been known to cause display corruption in some cases. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/pm: Misc fixesAlex Deucher2010-06-081-16/+10
| | | | | | | | | | | | | | - don't rest the power state in pm_init() We already boot up to the default power state. Note this patch relies on: drm/radeon/kms/pm: patch default power state with default clocks/voltages on r6xx+ To make sure the default power state matches the boot up state. - In the pm resume path asic init will have set the power state back to the default so reset the tracking state values. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/combios: fix typo in voltage fixAlex Deucher2010-06-081-1/+1
| | | | | | | Noticed by Rafał Miłecki. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/evergreen: set accel_enabledAlex Deucher2010-06-083-3/+11
| | | | | | | | | | | | | | This is needed to enable accel in the ddx. However, due to a bug in older versions of the ddx, it relies on accel being disabled in order to load properly on evergreen chips. To maintain compatility, we add a new get accel param and call that from the ddx. The old one always returns false for evergreen cards. [this fixes a regression with older userspaces on newer kernels]. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/vmwgfx: return -EFAULT for copy_to_user errorsDan Carpenter2010-06-082-2/+7
| | | | | | | | | copy_to/from_user() returns the number of bytes remaining to be copied but we want to return a negative error code here. This gets returned to userspace. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/drm_crtc: return -EFAULT on copy_to_user errorsDan Carpenter2010-06-081-1/+3
| | | | | | | | | copy_from_user() returns the number of bytes left to be copied but we want to return a negative error code here. This is in the ioctl handler so the error code get returned to userspace. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/fb: use printk to print out the switching to text mode error.Dave Airlie2010-06-081-1/+1
| | | | | | | | | using DRM_ERROR, results in people blaming the drm code for the oops, and not looking at the oops. (sadly yes I've gotten reports). Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: fix PM on non-vram cards.Dave Airlie2010-06-081-9/+0
| | | | | | | | | | | | | PM attemps to unmap objects that aren't actually mapped into userspace ever, so just don't bother unmapping them at this point, since all you are doing is nothing. We should be making sure all access to these objects are locked in kernel space instead. In theory the VRAM gart table is already done, and both the shaders and stolen vga memory blocks are never accessed at runtime. fixes: https://bugzilla.kernel.org/show_bug.cgi?id=16127 Reported-by: Jure Repnic <jlp.bugs@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Propagate error from drm_fb_helper_init().Chris Wilson2010-06-084-11/+38
| | | | | | | | | | The previous commit fixes the problem, these commits make sure we actually fail properly if it happens again. I've squashed the commits from Chris since they are all fixing one issue. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/i915: fix oops on single crtc devices.Dave Airlie2010-06-083-6/+6
| | | | | | | | | | (regression fix since fbdev/kms rework). My fb rework didn't remember about the 84/65s. Reported-by: Ondrej Zary <linux@rainbow-software.org> Tested-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/i915: Move non-phys cursors into the GTTChris Wilson2010-06-051-0/+9
| | | | | | | | | | | | | | | | | | | | | Cursors need to be in the GTT domain when being accessed by the GPU. Previously this was a fortuitous byproduct of userspace using pwrite() to upload the image data into the cursor. The redundant clflush was removed in commit 9b8c4a and so the image was no longer being flushed out of the caches into main memory. One could also devise a scenario where the cursor was rendered by the GPU, prior to being attached as the cursor, resulting in similar corruption due to the missing MI_FLUSH. Fixes: Bug 28335 - Cursor corruption caused by commit 9b8c4a0b21 https://bugs.freedesktop.org/show_bug.cgi?id=28335 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com> Tested-by: Linus Torvalds <torvalds@linux-foundation.org> Reported-by: Andy Isaacson <adi@hexapodia.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'drm-linus' of ↵Linus Torvalds2010-06-0343-315/+3481
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (41 commits) drm/radeon/kms: make sure display hw is disabled when suspending drm/vmwgfx: Allow userspace to change default layout. Bump minor. drm/vmwgfx: Fix framebuffer modesetting drm/vmwgfx: Fix vga save / restore with display topology. vgaarb: use MIT license vgaarb: convert pr_devel() to pr_debug() drm: fix typos in Linux DRM Developer's Guide drm/radeon/kms/pm: voltage fixes drm/radeon/kms/pm: radeon_set_power_state fixes drm/radeon/kms/pm: patch default power state with default clocks/voltages on r6xx+ drm/radeon/kms/pm: enable SetVoltage on r7xx/evergreen drm/radeon/kms/pm: add support for SetVoltage cmd table (V2) drm/radeon/kms/evergreen: add initial CS parser drm/kms: disable/enable poll around switcheroo on/off drm/nouveau: fixup confusion over which handle the DSM is hanging off. drm/nouveau: attempt to get bios from ACPI v3 drm/nv50: cast IGP memory location to u64 before shifting drm/ttm: Fix ttm_page_alloc.c drm/ttm: Fix cached TTM page allocation. drm/vmwgfx: Remove some leftover debug messages. ...
| * drm/radeon/kms: make sure display hw is disabled when suspendingAlex Deucher2010-06-031-0/+7
| | | | | | | | | | | | | | | | | | Disable the display hw when suspending. Should fix bug: https://bugzilla.redhat.com/show_bug.cgi?id=522393 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/vmwgfx: Allow userspace to change default layout. Bump minor.Jakob Bornecrantz2010-06-035-9/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | The host may change the layout and, since the change is communicated to the master, the master needs a way to communicate the change to the kernel driver. The minor version number is bumped to advertize the availability of this feature. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/vmwgfx: Fix framebuffer modesettingJakob Bornecrantz2010-06-031-18/+4
| | | | | | | | | | | | | | | | Must set SVGA_NUM_REG_GUEST_DISPLAY before setting up the display information. Signed-off-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/vmwgfx: Fix vga save / restore with display topology.Thomas Hellstrom2010-06-032-7/+56
| | | | | | | | | | | | | | vga save / restore previously didn't handle the display topology case. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * vgaarb: use MIT licenseTiago Vignatti2010-06-031-3/+23
| | | | | | | | | | | | Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Cc: Henry Zhao <Henry.Zhao@Sun.COM> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * vgaarb: convert pr_devel() to pr_debug()Tiago Vignatti2010-06-031-17/+18
| | | | | | | | | | | | | | | | | | | | We want to be able to use CONFIG_DYNAMIC_DEBUG in arbiter code, switch the few existing pr_devel() calls to pr_debug(). Also, add one more debug information regarding decoding count. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms/pm: voltage fixesAlex Deucher2010-06-032-4/+12
| | | | | | | | | | | | | | | | - Enable GPIO voltage for non pm modes as well so resetting the default voltage works. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms/pm: radeon_set_power_state fixesAlex Deucher2010-06-031-41/+34
| | | | | | | | | | | | | | | | | | | | - wait for vbl for both profile and dynpm - unify profile and dynpm code paths more - call pm_misc before of after clocks to make sure voltage is changed in the proper order. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms/pm: patch default power state with default clocks/voltages on ↵Alex Deucher2010-06-031-1/+24
| | | | | | | | | | | | | | | | | | | | | | r6xx+ The default power state does not always match the default clocks and voltage for a particular card. The information in the firmware info table is correct and should be used in preference to the info the default power state. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms/pm: enable SetVoltage on r7xx/evergreenAlex Deucher2010-06-032-0/+10
| | | | | | | | | | | | | | I missed these in the r6xx commit. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms/pm: add support for SetVoltage cmd table (V2)Alex Deucher2010-06-034-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | - This enables voltage adjustment on r6xx+ and certain r5xx asics. - Voltage drop support is already available for most r1xx-r5xx asics. V2: endian fix for voltage table. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms/evergreen: add initial CS parserAlex Deucher2010-06-017-3/+2443
| | | | | | | | | | | | | | | | Advanced validation is not implemented yet. The mesa code that uses this will be released soon. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * Merge remote branch 'nouveau/for-airlied' of ../drm-nouveau-next into ↵Dave Airlie2010-06-019-34/+97
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-testing * 'nouveau/for-airlied' of ../drm-nouveau-next: drm/nv50: cast IGP memory location to u64 before shifting drm/nv50: use alternate source of SOR_MODE_CTRL for DP hack drm/nouveau: fix dual-link displays when plugged into single-link outputs drm/nv50: obey dcb->duallink_possible drm/nv50: fix duallink_possible calculation for DCB 4.0 cards drm/nouveau: don't execute INIT_GPIO unless we're really running the table drm/nv40: allow cold-booting of nv4x chipsets drm/nouveau: fix POST detection for certain chipsets drm/nouveau: Add getparam for current PTIMER time. drm/nouveau: allow cursor image and position to survive suspend
| | * drm/nv50: cast IGP memory location to u64 before shiftingBen Skeggs2010-06-011-1/+2
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nv50: use alternate source of SOR_MODE_CTRL for DP hackBen Skeggs2010-05-281-6/+1
| | | | | | | | | | | | | | | | | | | | | Fixes module unload+reload on Dell M4500, where the "normal" registers get reset to 0. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: fix dual-link displays when plugged into single-link outputsBen Skeggs2010-05-281-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When selecting the native mode for a display we weren't taking into account whether or not it was actually supported on that particular output. This patch modifies our native mode selection to run all modes through mode_valid() first. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nv50: obey dcb->duallink_possibleBen Skeggs2010-05-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | It was once assumed that all G8x had dual-link TMDS everywhere, this isn't actually the case - especially considering passive DP->DVI converters and some HDMI connectors only support single-link. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nv50: fix duallink_possible calculation for DCB 4.0 cardsBen Skeggs2010-05-281-6/+10
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: don't execute INIT_GPIO unless we're really running the tableBen Skeggs2010-05-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This resulted in accidently switching off the eDP panel on certain laptops since the default state in the GPIO table was off. Fixes rh#582621 Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nv40: allow cold-booting of nv4x chipsetsBen Skeggs2010-05-281-1/+1
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: fix POST detection for certain chipsetsBen Skeggs2010-05-281-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We totally fail at detecting un-POSTed chipsets prior to G80. This commit changes the pre-G80 POST detection to read the programmed horizontal total from CRTC 0, and assume the card isn't POSTed if it's 0. NVIDIA use some other heuristics more similar to what we do on G80, but I wasted quite a long time trying to figure out the exact specifics of what they do so we can try this for a bit instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: Add getparam for current PTIMER time.Marcin Kościelnicki2010-05-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This will be useful for computing GPU-CPU latency, including GL_ARB_timer_query extension. Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| | * drm/nouveau: allow cursor image and position to survive suspendMaarten Maathuis2010-05-284-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | - This isn't triggered yet on a normal kernel, because it still does a VT switch, but it seemed like a good idea to fix this now. Tested-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | Merge branch 'drm-switcheroo-fixes' into drm-testingDave Airlie2010-06-017-15/+118
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * drm-switcheroo-fixes: drm/kms: disable/enable poll around switcheroo on/off drm/nouveau: fixup confusion over which handle the DSM is hanging off. drm/nouveau: attempt to get bios from ACPI v3