aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)Author
2009-05-05Merge 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: drm/r128: fix r128 ioremaps to use ioremap_wc. drm: cleanup properly in drm_get_dev() failure paths drm: clean the map list before destroying the hash table drm: remove unreachable code in drm_sysfs.c drm: add control node checks missing from kms merge drm/kms: don't try to shortcut drm mode set function drm/radeon: bump minor version for occlusion queries support
2009-05-06drm/r128: fix r128 ioremaps to use ioremap_wc.Dave Airlie
This should allow r128 to start working again since PAT changes. taken from F-11 kernel. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-28Merge branch 'drm-intel-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: drm/i915: fix up error path leak in i915_cmdbuffer drm/i915: fix unpaired i915 device mutex on entervt failure. drm/i915: add support for G41 chipset drm/i915: Enable ASLE if present drm/i915: Unregister ACPI video driver when exiting drm/i915: Register ACPI video even when not modesetting drm/i915: fix transition to I915_TILING_NONE drm/i915: Don't let an oops get triggered from irq_emit without dma init. drm/i915: allow tiled front buffers on 965+
2009-04-24drm: cleanup properly in drm_get_dev() failure pathsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-24drm: clean the map list before destroying the hash tableBen Skeggs
The hash tables contains some of the mapping so its really nice to have it for the deletion phase. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-24drm: remove unreachable code in drm_sysfs.cJonas Bonn
This code was never going to get called in there. Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-24drm: add control node checks missing from kms mergeJonas Bonn
This line that checks the DRM_CONTROL_ALLOW flag was missed from the KMS merge. Re-add the check on the IOCTL, as this is currently the only use of this flag. Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-24drm/kms: don't try to shortcut drm mode set functionDave Airlie
We have a drm_set_config which takes a crtc/encoder/mode setup, and checks it to see if it can shortcut and just do a base setup, or whether a complete mode setting is required. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-24drm/radeon: bump minor version for occlusion queries supportMaciej Cencora
We already added support, just need to let userspace know when it can use them. Signed-off-by: Maciej Cencora <m.cencora@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-24ACPI, i915: Register ACPI video even when not modesettingMatthew Garrett
The ACPI video driver defers registration to the i915 driver if the system supports opregion-mediated backlight control. This registration was only being performed in the KMS case. Ensure it's done even if we don't have modesetting enabled. http://bugzilla.kernel.org/show_bug.cgi?id=13048 Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-21drm/i915: fix up error path leak in i915_cmdbufferChris Wright
Commit 201361a5 introduces a leak when unwinding on error. Reorder unwind, and eliminate leak. Cc: Eric Anholt <eric@anholt.net> Cc: Keith Packard <keithp@keithp.com> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Chris Wright <chrisw@sous-sol.org> [anholt: fixed uninit variable use introduced in original patch] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-21drm/i915: fix unpaired i915 device mutex on entervt failure.Wu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-21drm/i915: add support for G41 chipsetZhenyu Wang
This had been delayed for some time due to failure to work on the one piece of G41 hardware we had, and lack of success reports from anybody else. Current hardware appears to be OK. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> [anholt: hand-applied due to conflicts with IGD patches] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-20Merge 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: agp: zero pages before sending to userspace drm: check for minor master before allowing drop master. drm: set/clear is_master when master changed drm: clean dirty memory after device release drm: count reaches -1
2009-04-20drm: check for minor master before allowing drop master.Dave Airlie
When fast user switching a lot eventually we get to the point, where we were checking for the wrong thing in this function. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-20drm: set/clear is_master when master changedJonas Bonn
The variable is_master is being used to track the drm_file that is currently master, so its value needs to be updated accordingly when the master is changed. Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-20drm: clean dirty memory after device releaseMa Ling
In current code we register/unregister connector object by drm_sysfs_connector_add/remove function. However under some cases, we need to dynamically register or unregister device multiple times, so we have to go through register -> unregister ->register routine. Because after device_unregister function our memory is dirty, we need to do clean operation in order to re-register the device, otherwise the system will crash. The patch intends to clean device after device release. Signed-off-by: Ma Ling <ling.ma@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-20drm: count reaches -1Roel Kluin
With a postfix decrement in the test count will reach -1 rather than 0, subsequent tests fail. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-17drm/i915: Enable ASLE if presentMatthew Garrett
The changes to opregion initialisation order meant that the ASLE setup code might not be run at the correct time. Ensure that the interrupts are set up. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-17drm/i915: Unregister ACPI video driver when exitingMatthew Garrett
The i915 DRM triggers registration of the ACPI video driver on load. It should unregister it at unload in order to avoid generating backtraces on being reloaded. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-17drm/i915: Register ACPI video even when not modesettingMatthew Garrett
The ACPI video driver defers registration to the i915 driver if the system supports opregion-mediated backlight control. This registration was only being performed in the KMS case. Ensure it's done even if we don't have modesetting enabled. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-17drm/i915: fix transition to I915_TILING_NONEKeith Packard
Transitions to TILING_NONE skipped the call to unbind the object, which left the fence register set and caused future CPU access through the GTT to access the object in tiled mode. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-17drm/i915: Don't let an oops get triggered from irq_emit without dma init.Eric Anholt
Userland is broken if it's trying this, but we also shouldn't allow oopses. Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-16drm/i915: allow tiled front buffers on 965+Jesse Barnes
This patch corrects a pretty big oversight in the KMS code for 965+ chips. The current code is missing tiled surface register programming, so userland can allocate a tiled surface and use it for mode setting, resulting in corruption. This patch fixes that, allowing for tiled front buffers on 965+. Cc: stable@kernel.org Tested-by: Arkadiusz Miskiewicz <arekm@maven.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-14Merge branch 'drm-intel-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: drm/i915: fix scheduling while holding the new active list spinlock drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU. drm/i915: Correctly set the write flag for get_user_pages in pread. drm/i915: Fix use of uninitialized var in 40a5f0de drm/i915: indicate framebuffer restore key in SysRq help message drm/i915: sync hdmi detection by hdmi identifier with 2D drm/i915: Fix a mismerge of the IGD patch (new .find_pll hooks missed) drm/i915: Implement batch and ring buffer dumping
2009-04-14drm/i915: fix scheduling while holding the new active list spinlockShaohua Li
regression caused by commit 5e118f4139feafe97e913df67b1f7c1e5083e535: i915_gem_object_move_to_inactive() should be called in task context, as it calls fput(); Signed-off-by: Shaohua Li<shaohua.li@intel.com> [anholt: Add more detail to the comment about the lock break that's added] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-08drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.Eric Anholt
Save the bit 17 state of the pages when freeing the page list, and reswizzle them if necessary when rebinding the pages (in case they were swapped out). Since we have userland with expectations that the swizzle enums let it pread and pwrite contents accurately, we can't expose a new swizzle enum for bit 17 (which it would have to GTT map to handle), so we handle it down in pread and pwrite by swizzling the copy when bit 17 of the page address is set. Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-08drm/i915: Correctly set the write flag for get_user_pages in pread.Eric Anholt
Otherwise, the results of our read didn't show up when we were faulting in the page being read into (as happened with a testcase reading into a big stack area). Likely accounts for some conformance test failures. Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-08drm/i915: Fix use of uninitialized var in 40a5f0deFlorian Mickler
i915_gem_put_relocs_to_user returned an uninitialized value which got returned to userspace. This caused libdrm in my setup to never get out of a do{}while() loop retrying i915_gem_execbuffer. result was hanging X, overheating of cpu and 2-3gb of logfile-spam. This patch adresses the issue by 1. initializing vars in this file where necessary 2. correcting wrongly interpreted return values of copy_[from/to]_user Signed-off-by: Florian Mickler <florian@mickler.org> [anholt: cleanups of unnecessary changes, consistency in APIs] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-08drm/i915: indicate framebuffer restore key in SysRq help messageFerenc Wagner
At the same time, bring the action message closer to the usual format. Signed-off-by: Ferenc Wagner <wferi@niif.hu> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-08drm/i915: sync hdmi detection by hdmi identifier with 2DMa Ling
Currently we detect HDMI monitor by hardware detection, but if an HDMI-DVI adapter is used to connect a DVI monitor, hardware detection will incorrectly take monitor as HDMI. HDMI spec says any device containing IEEE registration identifier will be treated as HDMI device. The patch intends to detect HDMI monitor by drm_detect_hdmi_monitor function which follows that rule. Signed-off-by: Ma Ling <ling.ma@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-08drm/i915: Fix a mismerge of the IGD patch (new .find_pll hooks missed)Shaohua Li
Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-08drm/i915: Implement batch and ring buffer dumpingBen Gamari
We create a debugfs node (i915_ringbuffer_data) to expose a hex dump of the ring buffer itself. We also expose another debugfs node (i915_ringbuffer_info) with information on the state (i.e. head, tail addresses) of the ringbuffer. For batchbuffer dumping, we look at the device's active_list, dumping each object which has I915_GEM_DOMAIN_COMMAND in its read domains. This is all exposed through the dri/i915_batchbuffers debugfs file with a header for each object (giving the objects gtt_offset so that it can be matched against the offset given in the BATCH_BUFFER_START command. Signed-off-by: Ben Gamari <bgamari@gmail.com> Signed-off-by: Carl Worth <cworth@cworth.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-05Merge branch 'linus' into releaseLen Brown
Conflicts: arch/x86/kernel/cpu/cpufreq/longhaul.c Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-03drm/radeon: load the right microcode on rs780Alex Deucher
Copy/paste error. The RV670 microcode should work ok, so it's not a show stopper. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-03Merge branch 'drm-intel-next' of ../anholt-2.6 into drm-linusDave Airlie
2009-04-03drm: remove unused "can_grow" parameter from drm_crtc_helper_initial_configJesse Barnes
Cleanup some leftovers from the X port. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-03drm: fix EDID backward compat checkJesse Barnes
EDIDs should be backward compatible, so don't bail if we see a version of 3 (which is out there now) and print a message if we see something newer, but allow it to be parsed. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-03drm: sync the mode validation for INTERLACE/DBLSCANyakui_zhao
Check whether the INTERLACE/DBLSCAN is supported by output device. If not, the mode containing the flag of INTERLACE/DBLSCAN will be marked as unsupported. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-03drm: fix typo in edid vendor parsing.Dave Airlie
Should be, edid_vendor[2] = (edid->mfg_id[1] & 0x1f) + '@'; Since vendor ID has only two bytes only, I am somewhat surprised why gcc doesn't complain this. Reported-by: Guo, Chaohong <chaohong.guo@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-04-02drm: Use pgprot_writecombine in GEM GTT mapping to get the right bits for !PAT.Jesse Barnes
Otherwise, the PAGE_CACHE_WC would end up getting us a UC-only mapping, and the write performance of GTT maps dropped 10x. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [anholt: cleaned up unused var] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-01drm/i915: Add a spinlock to protect the active_listCarl Worth
This is a baby-step in the direction of having finer-grained locking than the struct_mutex. Specifically, this will enable new debugging code to read the active list for printing out GPU state when the GPU is wedged, (while the struct_mutex is held, of course). Signed-off-by: Carl Worth <cworth@cworth.org> [anholt: indentation fix] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-01drm/i915: Fix SDVO TV supportZhenyu Wang
This brings SDVO TV support from 2D driver, including origin fix f1ca56e17d0 and later fix 2fcf4fcccfe. Also fix wrong modeline definitions for SDVO TV. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-01drm/i915: Fix SDVO CREATE_PREFERRED_INPUT_TIMING commandZhenyu Wang
This brings fix commit acde0ef683 from 2D driver. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-01drm/i915: Fix error in SDVO DTD and modeline convertZhenyu Wang
This brings fix commit 62c0c2f5549a from 2D driver. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-01drm/i915: Fix SDVO command debug functionZhenyu Wang
Fix compile error of intel_sdvo_debug_response(), and explicit use KERN_DEBUG for printk. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-01drm/i915: fix TV mode setting in property changeZhenyu Wang
Only set TV DAC in property change seems doesn't work, we have to setup whole crtc pipe which assigned to TV alone. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> [anholt: Note that this should also fix the oops at startup with new 2D] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-01drm/i915: only set TV mode when any property changedZhenyu Wang
If there's no real property change, don't need to set TV mode again. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> [anholt: checkpatch.pl fix] Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-01drm/i915: clean up udelay usageArjan van de Ven
udelay() of 20 milliseconds really ought to just use mdelay(), that avoids the various wrap scenarios and also is more readable Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-01drm/i915: add VGA hotplug support for 945+Jesse Barnes
Add VGA port hotplug detection to the i915 driver. When KMS is enabled, plugging in or removing a VGA cable from the VGA connector will generate a uevent, which indicates to userspace that it should re-probe outputs on this device (to determine modes, etc.). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [anholt: dropped extra PORT_HOTPLUG_STAT clear with ack from jbarnes] Signed-off-by: Eric Anholt <eric@anholt.net>