aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2010-05-11Merge branch 'drm-linus' of ↵Linus Torvalds1-9/+10
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: drm/radeon: Fix 3 regressions - since buffer rework
2010-05-11drm/radeon/kms: fix copy pasto in disable encoders patchAlex Deucher1-1/+1
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-05-11drm/radeon: Fix 3 regressions - since buffer reworkJean Delvare1-9/+10
Commit b4fe945405e477cded91772b4fec854705443dd5 introduced 3 bugs, fix them: * Use the right command dword for second packet offset in RADEON_CNTL_PAINT/BITBLT_MULTI. * Don't leak memory if drm_buffer_copy_from_user() fails. * Don't call drm_buffer_unprocessed() unless drm_buffer_alloc() and drm_buffer_copy_from_user() have been called successfully first. Signed-off-by: Jean Delvare <[email protected]> Cc: Pauli Nieminen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-05-10drm/i915: Fix out of tree buildsPeter Clifton2-1/+3
Fixes up include paths for i915_trace.h by setting additional CFLAGS for i915_trace_points.c to include the $src directory. The required TRACE_INCLUDE_PATH is then "." Signed-off-by: Peter Clifton <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-05-10drm/i915: move fence lru to struct drm_i915_fence_regDaniel Vetter2-15/+22
This lru tracks fences, not objects, so move it to where it belongs. As a side effect, this nicely shrinks drm_i915_gem_object by two pointers. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-05-10drm/i915: don't allow tiling changes on pinned buffers v2Daniel Vetter1-0/+5
Makes no sense and complicates matters for pipelined tiling changes. So don't allow it and return -EBUSY. v2: Fix reference leak. Thanks to Owain Ainsworth for spotting this. Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-05-10drm/i915: Be extra careful about A/D matching for multifunction SDVOAdam Jackson1-24/+21
If we're both RGB and TMDS capable, we'll have set up one connector for each. When determining connectivity, require analog/digital state in the EDID block to match analog/digital support in the connector. Otherwise, both DVI and VGA will appear to be connected. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-05-10drm/i915: Fix DDC bus selection for multifunction SDVOAdam Jackson3-32/+11
Multifunction SDVO cards stopped working after 14571b4, and would report something that looked remarkably like an ADD2 SPD ROM instead of EDID. This appears to be because DDC bus selection was utterly horked by that commit; controlled_output was no longer always a single bit, so intel_sdvo_select_ddc_bus would pick bus 0, which is (unsurprisingly) the SPD ROM bus, not a DDC bus. So, instead of that, let's just use the DDC bus the child device table tells us to use. I'm guessing at the bitmask and shifting from VBIOS dumps, but it can't possibly be worse. cf. https://bugzilla.redhat.com/584229 Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-05-10Merge remote branch 'origin/master' into drm-intel-nextEric Anholt30-105/+356
Conflicts: drivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/radeon/r300.c The BSD ringbuffer support that is landing in this branch significantly conflicts with the Ironlake PIPE_CONTROL fix on master, and requires it to be tested successfully anyway.
2010-05-08drm/radeon/kms/atom: disable the encoders in encoder_disableAlex Deucher1-0/+39
Previously we just set them to dpms off. This should save additional power. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-05-07Merge branch 'drm-linus' of ↵Linus Torvalds3-33/+4
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: drm/ttm: Remove the ttm_bo_block_reservation() function. drm/ttm: Remove some leftover debug messages. drm/radeon: async event synchronization for drmWaitVblank
2010-05-07drm/i915: cleanup mode setting before unmapping registersJesse Barnes1-2/+2
We'll turn off outputs etc at unload time, so don't unmap the registers before doing it. Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-05-07drm/i915: Make fbc control wrapper functionsAdam Jackson4-36/+51
Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-05-07drm/i915: Wait for the GPU whilst shrinking, if truly desperate.Chris Wilson1-0/+45
By idling the GPU and discarding everything we can when under extreme memory pressure, the number of OOM-killer events is dramatically reduced. For instance, this makes it possible to run firefox-planet-gnome.trace again on my swapless 512MiB i915. Signed-off-by: Chris Wilson <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-05-07drm/i915: Use spatio-temporal dithering on PCHAdam Jackson2-5/+10
Spatial dither is better than nothing, but ST is even better. (from ajax's followup message:) I noticed this with: http://ajax.fedorapeople.org/YellowFlower.jpg set as my desktop background in Gnome on a 1280x800 machine (in particular, a Sony Vaio VPCB1 with 6-bit panel and a rather bright black level). Easiest way to test this is by poking at PIPEACONF with intel_reg_write directly: % sudo intel_reg_write 0x70008 0xc0000040 # no dither % sudo intel_reg_write 0x70008 0xc0000050 # spatial % sudo intel_reg_write 0x70008 0xc0000054 # ST I notice it especially strongly in the relatively flat dark area in the top left. Closer than about 18" I can see a noticeable checkerboard pattern with plain spatial dithering. ST smooths that out; I can still tell that it's lacking color precision, but it's not offensive. Signed-off-by: Adam Jackson <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-05-07drm/ttm: Remove the ttm_bo_block_reservation() function.Thomas Hellstrom1-29/+1
It's unused and buggy in its current form, since it can place a bo in the reserved state without removing it from lru lists. Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-05-07drm/ttm: Remove some leftover debug messages.Thomas Hellstrom1-4/+1
Signed-off-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-05-07drm/radeon: async event synchronization for drmWaitVblankJerome Glisse1-0/+2
Bring radeon up to speed with the async event synchronization for drmWaitVblank. See c9a9c5e02aedc1a2815877b0268f886d2640b771 for more information. Without this patch event never get delivered to userspace client. Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-05-07drm/ttm: fix, avoid iomapping system memoryJerome Glisse1-1/+1
If the memory is not iomem we should not try to ioremap it. Should fix : https://bugs.freedesktop.org/show_bug.cgi?id=27822 Signed-off-by: Jerome Glisse <[email protected]> Tested-by: Rafał Miłecki <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-05-04Merge branch 'drm-linus' of ↵Linus Torvalds14-47/+83
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: drm/radeon/kms/legacy: only enable load detection property on DVI-I drm/radeon/kms: fix panel scaling adjusted mode setup drivers/gpu/drm/drm_sysfs.c: sysfs files error handling drivers/gpu/drm/radeon/radeon_atombios.c: range check issues gpu: vga_switcheroo, fix lock imbalance drivers/gpu/drm/drm_memory.c: fix check for end of loop drivers/gpu/drm/via/via_video.c: fix off by one issue drm/radeon/kms/agp The wrong AGP chipset can cause a NULL pointer dereference drm/radeon/kms: r300 fix CS checker to allow zbuffer-only fastfill
2010-05-05drm/radeon/kms/legacy: only enable load detection property on DVI-IAlex Deucher1-0/+2
DVI-D doesn't have analog. This matches the avivo behavior. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-05-05drm/radeon/kms: fix panel scaling adjusted mode setupAlex Deucher3-22/+53
This should duplicate exactly what the ddx does for both legacy and avivo. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-28drivers/gpu/drm/drm_sysfs.c: sysfs files error handlingDan Carpenter1-9/+12
In the original code we used "j" as an iterator but we used "i" as an index. - for (j = 0; j < i; j++) - device_remove_file(&connector->kdev, - &connector_attrs[i]); Smatch complained about that because "i" was potentially passed the end of the array. Which makes sense if we should be using "j" there. I also thought that we should remove the files for &connector_attrs_opt1 but to do that I had to add separate iterators for &connector_attrs and &connector_attrs_opt1. Signed-off-by: Dan Carpenter <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-28drivers/gpu/drm/radeon/radeon_atombios.c: range check issuesDan Carpenter2-3/+3
This change makes the array larger, "MAX_SUPPORTED_TV_TIMING_V1_2" is 3 and the original size "MAX_SUPPORTED_TV_TIMING" is 2. Also there were checks that were off by one. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-28gpu: vga_switcheroo, fix lock imbalanceJiri Slaby1-2/+4
Stanse found that one error path in vga_switcheroo_debugfs_write omits to unlock vgasr_mutex. Fix that. Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-28drivers/gpu/drm/drm_memory.c: fix check for end of loopDan Carpenter1-1/+1
"agpmem" is never NULL here. Signed-off-by: Dan Carpenter <[email protected]> Cc: Eric Anholt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-28drivers/gpu/drm/via/via_video.c: fix off by one issueDan Carpenter1-1/+1
"fx->lock" is used as the index in "dev_priv->decoder_queue[fx->lock]" which is an array of "VIA_NR_XVMC_LOCKS" elements. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Thomas Hellstrom <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-28drm/radeon/kms/agp The wrong AGP chipset can cause a NULL pointer dereferenceRobert Fitzsimons1-6/+4
Selecting the wrong or no CONFIG_AGP_* chipset can cause a NULL pointer dereference when combined with CONFIG_DRM_RADEON_KMS and an old system with a R100 AGP card (should effect other cards too). The agp field will be set to NULL if no suitable AGP chipset driver is loaded, drm_agp_acquire already preforms a suitable NULL check so it can be used directly. Signed-off-by: Robert Fitzsimons <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-28drm/radeon/kms: r300 fix CS checker to allow zbuffer-only fastfillMarek Olšák3-3/+3
Signed-off-by: Marek Olšák <[email protected]>
2010-04-27Merge branch 'drm-linus' of ↵Linus Torvalds8-14/+25
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: drm/radeon: Fix sparc regression in r300_scratch() drm: make sure vblank interrupts are disabled at DPMS time drm/radeon/kms/evergreen: No EnableYUV table drm/radeon: 9800 SE has only one quadpipe drm/radeon/kms: don't print error for legal crtcs. drm/radeon/kms/evergreen: fix LUT setup
2010-04-27drm/radeon/kms: R3XX-R4XX fix GPU reset codeJerome Glisse2-9/+1
Previous reset code leaded to computer hard lockup (need to unplug the power too reboot the computer) on various configuration. This patch change the reset code to avoid hard lockup. The GPU reset is failing most of the time but at least user can log in remotely or properly shutdown the computer. Two issues were leading to hard lockup : - Writting to the scratch register lead to hard lockup most likely because the write back mecanism is in fuzy state after GPU lockup. - Resetting the GPU memory controller and not reinitializing it after leaded to hard lockup. We did only reinitialize in case of successfull reset thus unsuccessfull reset quickly leaded to hard lockup. Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-27drm/radeon: Fix sparc regression in r300_scratch()David Miller1-1/+1
Commit b4fe945405e477cded91772b4fec854705443dd5 ("drm/radeon: Fix memory allocation failures in the preKMS command stream checking.") added a regression in that it completely tossed the get_unaligned() done by r300_scratch() which we added in commit 958a6f8ccb1964adc3eec84cf401c5baeb4fbca0 ("drm: radeon: Fix unaligned access in r300_scratch()."). Put it back. Signed-off-by: David S. Miller <[email protected]> Acked-by: Matt Turner <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-27drm: make sure vblank interrupts are disabled at DPMS timeJesse Barnes1-0/+1
When we call drm_vblank_off() at DPMS off time (to wake any clients so they don't hang) we need to make sure interrupts are actually disabled. If drm_vblank_off() gets called before the vblank usage timer expires, it'll prevent the timer from disabling interrupts since it also clears the vblank_enabled flag for the pipe. Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-23drm/i915: fix non-Ironlake 965 class crashesJesse Barnes1-1/+1
My PIPE_CONTROL fix (just sent via Eric's tree) was buggy; I was testing a whole set of patches together and missed a conversion to the new HAS_PIPE_CONTROL macro, which will cause breakage on non-Ironlake 965 class chips. Fortunately, the fix is trivial and has been tested. Be sure to use the HAS_PIPE_CONTROL macro in i915_get_gem_seqno, or we'll end up reading the wrong graphics memory, likely causing hangs, crashes, or worse. Reported-by: Zdenek Kabelac <[email protected]> Reported-by: Toralf Förster <[email protected]> Tested-by: Toralf Förster <[email protected]> Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-04-23drm/radeon/kms/evergreen: No EnableYUV tableAlex Deucher1-1/+1
DCE4 cards don't have an EnableYUV table. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-23drm/radeon/kms: HDMI irq supportChristian Koenig5-56/+112
Implements irq support for HDMI audio output. Now the polling timer is only enabled if irq support isn't available. Signed-off-by: Christian König <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-23drm/radeon/kms: rework audio polling timerChristian König4-26/+61
Rework HDMI audio polling timer, only enable it when at least one HDMI encoder needs it. Preparation for replacing it with irq support. Signed-off-by: Christian König <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-23drm/radeon: 9800 SE has only one quadpipeTormod Volden3-5/+15
Although these cards have 2 pipelines on the silicon only the first passed the QA and the other should be disabled. http://www.digital-daily.com/video/ati-radeon9800se/ http://www.rojakpot.com/showarticle.aspx?artno=101&pgno=1 agd5f: add some other SE cards as well; fix up kms Signed-off-by: Tormod Volden <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-23drm/radeon/kms: don't print error for legal crtcs.Dave Airlie1-3/+3
With evergreen this is bounded by num_crtc not by 0,1. Signed-off-by: Dave Airlie <[email protected]>
2010-04-23drm/radeon/kms/evergreen: fix LUT setupAlex Deucher1-4/+4
Must have gotten broken during an earlier rebase. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-22Merge branch 'for-linus' of ↵Linus Torvalds9-42/+246
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: use PIPE_CONTROL instruction on Ironlake and Sandy Bridge drm/i915: cleanup FBC buffers at unload time drm/i915: fix tiling limits for i915 class hw v2 drm/i915: set DIDL using the ACPI video output device _ADR method return. drm/i915: Fix 82854 PCI ID, and treat it like other 85X drm/i915: Attempt to fix watermark setup on 85x (v2)
2010-04-23Merge branch 'master' into for-nextJiri Kosina148-2915/+4505
2010-04-22drm/i915: use PIPE_CONTROL instruction on Ironlake and Sandy BridgeJesse Barnes4-16/+152
Since 965, the hardware has supported the PIPE_CONTROL command, which provides fine grained GPU cache flushing control. On recent chipsets, this instruction is required for reliable interrupt and sequence number reporting in the driver. So add support for this instruction, including workarounds, on Ironlake and Sandy Bridge hardware. https://bugs.freedesktop.org/show_bug.cgi?id=27108 Signed-off-by: Jesse Barnes <[email protected]> Tested-by: Chris Wilson <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-04-22drm/i915: cleanup FBC buffers at unload timeJesse Barnes2-0/+17
This keeps the memory manager from complaining when we take it down. Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2010-04-20Merge branch 'drm-linus' of ↵Linus Torvalds1-2/+2
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: drm: delay vblank cleanup until after driver unload
2010-04-20Revert "drm/i915: Configure the TV sense state correctly on GM45 to make TV ↵Dave Airlie1-9/+0
detection reliable" Eric mentioned on irc this patch was bad, so revert it. This reverts commit fb8b5a39b6310379d7b54c0c7113703a8eaf4a57. Acked-by: Eric Anholt <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-20drm: delay vblank cleanup until after driver unloadJesse Barnes1-2/+2
Drivers may use vblank calls now (e.g. drm_vblank_off) in their unload paths, so don't clean up the vblank related structures until after driver unload. Signed-off-by: Jesse Barnes <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-20Merge branch 'drm-ttm-unmappable' into drm-core-nextDave Airlie16-243/+337
* drm-ttm-unmappable: drm/radeon/kms: enable use of unmappable VRAM V2 drm/ttm: remove io_ field from TTM V6 drm/vmwgfx: add support for new TTM fault callback V5 drm/nouveau/kms: add support for new TTM fault callback V5 drm/radeon/kms: add support for new fault callback V7 drm/ttm: ttm_fault callback to allow driver to handle bo placement V6 drm/ttm: split no_wait argument in 2 GPU or reserve wait Conflicts: drivers/gpu/drm/nouveau/nouveau_bo.c
2010-04-20drm/radeon/kms: enable use of unmappable VRAM V2Jerome Glisse4-20/+0
This patch enable the use of unmappable VRAM thanks to previous TTM infrastructure change. V2 update after io_mem_reserve/io_mem_free callback balancing Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2010-04-20drm/ttm: remove io_ field from TTM V6Jerome Glisse5-66/+5
All TTM driver have been converted to new io_mem_reserve/free interface which allow driver to choose and return proper io base, offset to core TTM for ioremapping if necessary. This patch remove what is now deadcode. V2 adapt to match with change in first patch of the patchset V3 update after io_mem_reserve/io_mem_free callback balancing V4 adjust to minor cleanup V5 remove the needs ioremap flag V6 keep the ioremapping facility in TTM [airlied- squashed driver removals in here also] Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Dave Airlie <[email protected]>