summaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2011-03-02drm/i915: Don't save/restore hardware status page address registerZhenyu Wang2-7/+0
It's cleaned before saving and re-initialized after restoring. So don't need to save/restore it. And also new chip has new address for hardware status page register, don't write to old address. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-02drm/i915: don't store the reg value for HWS_PGAChris Wilson2-7/+13
It is trivially computable from the real physical address so no need to store both. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-01Merge branch 'drm-intel-fixes' into drm-intel-nextChris Wilson8-21/+53
2011-03-01drm/i915: fix memory corruption with GM965 and >4GB RAMJan Niehusmann1-0/+11
On a Thinkpad x61s, I noticed some memory corruption when plugging/unplugging the external VGA connection. The symptoms are that 4 bytes at the beginning of a page get overwritten by zeroes. The address of the corruption varies when rebooting the machine, but stays constant while it's running (so it's possible to repeatedly write some data and then corrupt it again by plugging the cable). Further investigation revealed that the corrupted address is (dev_priv->status_page_dmah->busaddr & 0xffffffff), ie. the beginning of the hardware status page of the i965 graphics card, cut to 32 bits. So it seems that for some memory access, the hardware uses only 32 bit addressing. If the hardware status page is located >4GB, this corrupts unrelated memory. Signed-off-by: Jan Niehusmann <jan@gondor.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
2011-03-01drm/i915: Re-enable GPU semaphores for SandyBridge mobileChris Wilson1-2/+1
This seems to be running stably on my test laptop, so hopefully the reported hangs where just symptoms of other bugs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-01drm/i915: Replace vblank PM QoS with "Interrupt-Based AGPBUSY#"Chris Wilson2-1/+13
I stumbled over this magic bit in the gen3 INSTPM: Bit11 Interrupt-Based AGPBUSY# Enable: ‘0’ = Pending GMCH interrupts will not cause AGPBUSY# assertion. ‘1’ = Pending GMCH interrupts will cause AGPBUSY# assertion and hence can cause the CPU to exit C3. There is no suppression of cacheable writes. Note that in either case in C3 the interrupts are not lost. They will be forwarded to the ICH when the GMCH is out of C3. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@kernel.org
2011-03-01Revert "drm/i915: Use PM QoS to prevent C-State starvation of gen3 GPU"Chris Wilson2-38/+0
Using PM latency request turns out to be very fragile and only works for some systems, depending upon the ACPI implementation. However, I've stumbled across a promising bit in INSTPM: "Interrupt-Based AGPBUSY#". This reverts commit b0b544cd37c060e261afb2cf486296983fcb56da. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-01drm/i915: Allow relocation deltas outside of target boChris Wilson2-10/+3
Userspace has a legitimate requirement to use a delta that points to outside of the target bo, and so we need to enable this. (As this is an abi break, albeit a relaxation of the current restrictions, mark the change with a new flag.) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-01drm/i915: Silence an innocuous compiler warning for an unused variableChris Wilson1-1/+0
drivers/gpu/drm/i915/i915_irq.c: In function ‘ironlake_irq_postinstall’: drivers/gpu/drm/i915/i915_irq.c:1618: warning: unused variable ‘pipe’ Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-01drm/radeon: add new getparam for number of backends.Dave Airlie2-1/+12
This allows userspace to work out how many DBs there are for conditional rendering to work. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-01drm/radeon: fix up dereferencing of busy objects.Dave Airlie1-1/+1
This could free things twice, just deref the GEM object and hope its enough. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-01drm/radeon: bump version to 2.9Dave Airlie1-1/+2
This lets r600g enable texture formats and some more extensions. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-01drm/r600: parse the set predication command. (v2)Dave Airlie2-0/+63
This is required for NV_conditional_render and EXT_transform_feedback. v2: add evergreen support. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-28Merge remote branch 'nouveau/drm-nouveau-fixes' of /ssd/git/drm-nouveau-next ↵Dave Airlie1-1/+4
into drm-fixes * 'nouveau/drm-nouveau-fixes' of /ssd/git/drm-nouveau-next: drm/nv50-nvc0: make sure vma is definitely unmapped when destroying bo
2011-02-28drm: fix unsigned vs signed comparison issue in modeset ctl ioctl.Dave Airlie1-1/+2
This fixes CVE-2011-1013. Reported-by: Matthiew Herrb (OpenBSD X.org team) Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-28drm/nv50-nvc0: make sure vma is definitely unmapped when destroying boBen Skeggs1-1/+4
Somehow fixes a misrendering + hang at GDM startup on my NVA8... My first guess would have been stale TLB entries laying around that a new bo then accidentally inherits. That doesn't make a great deal of sense however, as when we mapped the pages for the new bo the TLBs would've gotten flushed anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-28drm/radeon: make sure ib reads are in-order.Dave Airlie1-7/+9
have to read values from the IB in order as we could cross a page boundary at any time and won't be able to go backwards. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-28drm/radeon/r600_cs: off by one errorsDan Carpenter1-6/+9
There are a bunch of off by one errors in the sanity checks here. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-25Merge branch 'drm-intel-fixes' of ↵Dave Airlie1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel into drm-fixes * 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel: drm/i915: Fix unintended recursion in ironlake_disable_rc6
2011-02-25drm/nv50: flesh out ZCULL init and match nvidia on later chipsetsBen Skeggs1-5/+34
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50: support for compressionBen Skeggs9-27/+78
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: delay GART binding until move_notify timeBen Skeggs9-87/+184
The immediate benefit of doing this is that on NV50 and up, the GPU virtual address of any buffer is now constant, regardless of what memtype they're placed in. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: rename nouveau_vram to nouveau_memBen Skeggs11-70/+70
This structure will also be used for GART in the near future. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nvc0: allow creation of buffers with any non-compressed memtypeBen Skeggs1-11/+25
This adds a table of known nvc0 memtypes, and modifies the validity check to allow any non-compressed type. Support for Z compression will come at a later point. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: unmap buffers from the vm when they're evictedBen Skeggs3-7/+36
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: move vm bind/unbind to move_notify hookBen Skeggs1-22/+37
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: restrict memtype to those specified at creation timeBen Skeggs3-5/+16
Upcoming patches are going to enable full support for buffers that keep a constant GPU virtual address whenever they're validated for use by the GPU. In order for this to work properly while keeping support for large pages, we need to know if it's ever going to be possible for a buffer to end up in GART, and if so, disable large pages for the buffer's VMA. This is a new restriction that's not present in earlier kernel's, but should not break userspace as the current code never attempts to validate buffers into a memtype other than it was created with. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: pass domain rather than ttm flags to gem_new()Ben Skeggs4-16/+17
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50: simplify bo moves now that they're all through the vmBen Skeggs2-21/+15
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: remove no_vm/mappable flags from nouveau_boBen Skeggs14-109/+56
'mappable' isn't really used at all, nor is it necessary anymore as the bo code is capable of moving buffers to mappable vram as required. 'no_vm' isn't necessary anymore either, any places that don't want to be mapped into a GPU address space should allocate the VRAM directly instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: Fix pageflip eventBenjamin Franzke1-1/+1
Assign correct event when initializing nouveau_page_flip_state. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau/vbios: parse more gpio tag bits from connector tableBen Skeggs1-17/+8
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: decode PFIFO DMA_PUSHER error codesMarcin Slusarz1-3/+14
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50: fix typos in CCACHE error reportingMarcin Slusarz1-4/+4
The code was supposed to print registers around 0x405018 (which is read earlier), not 0x405818. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nvc0: support for sw methods + enable page flippingBen Skeggs3-7/+23
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50: enable page flippingBen Skeggs3-8/+12
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: activate/update ds channel's framebuffer on modesetsBen Skeggs1-1/+9
The hw doesn't really appear to be designed to be used the way we have to use it due to DRI2's design. This leads us to having to keep the flipped fb support active at all times. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: initialise display sync channelsBen Skeggs6-6/+246
Also imports a couple of helper functions that'll be used to implement page flipping in the following commits.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: precalculate some fb state when creating themBen Skeggs3-55/+61
Just a cleanup, to avoid duplicating parts of nv50_crtc.c's code in the page flipping routines. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: tidy evo object creation some moreBen Skeggs3-59/+62
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: request and wait on notification of modeset completionBen Skeggs5-26/+77
This should prevent a number of races from occuring, the most obvious of which will be exposed when we start making use of the "display sync" evo channel for page flipping. The DS channel will reject any command stream that doesn't completely agree with the current "master" state. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: switch to tasklet for display isr bhBen Skeggs3-13/+8
We need to be able to have the bh run while possibly spinning waiting for the EVO notifier to signal. This apparently happens in some circumstances with preempt disabled, so our workqueue was never being run. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: make vbios parser runnable from an atomic contextBen Skeggs2-9/+9
The nv50 display isr bh needs to be converted to a tasklet, which means we can't sleep anymore. The places we execute vbios init tables are rare, and not in any way performance critical, so this isn't a huge problem. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: include nv50_display in evo debuggingBen Skeggs1-0/+1
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: tidy evo init failure pathsBen Skeggs1-42/+33
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: fix ramht entries for multiple evo channelsBen Skeggs1-1/+3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: disp channels have fixed purposes, don't "allocate" themBen Skeggs2-20/+4
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: rename disp->evo to disp->masterBen Skeggs7-36/+36
More appropriate, and we're about to be using more than just the master EVO channel. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nv50-nvc0: move non-sharable display state into private structureBen Skeggs9-79/+96
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-02-25drm/nouveau: use system_wq instead of dev_priv->wqTejun Heo4-14/+13
With cmwq, there's no reason for nouveau to use a dedicated workqueue. Drop dev_priv->wq and use system_wq instead. Each work item is sync flushed when the containing structure is unregistered/destroyed. Note that this change also makes sure that nv50_gpio_handler is not freed while the contained work item is still running. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Ben Skeggs <bskeggs@redhat.com>