aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
Commit message (Collapse)AuthorAge
* Merge branch 'linus' into releaseLen Brown2009-04-05
|\ | | | | | | | | | | | | Conflicts: arch/x86/kernel/cpu/cpufreq/longhaul.c Signed-off-by: Len Brown <len.brown@intel.com>
| * Merge branch 'drm-intel-next' of ../anholt-2.6 into drm-linusDave Airlie2009-04-02
| |\
| | * drm/i915: Add a spinlock to protect the active_listCarl Worth2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * drm/i915: Fix SDVO TV supportZhenyu Wang2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * drm/i915: Fix SDVO CREATE_PREFERRED_INPUT_TIMING commandZhenyu Wang2009-04-01
| | | | | | | | | | | | | | | | | | | | | 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>
| | * drm/i915: Fix error in SDVO DTD and modeline convertZhenyu Wang2009-04-01
| | | | | | | | | | | | | | | | | | | | | 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>
| | * drm/i915: Fix SDVO command debug functionZhenyu Wang2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * drm/i915: fix TV mode setting in property changeZhenyu Wang2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * drm/i915: only set TV mode when any property changedZhenyu Wang2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * drm/i915: clean up udelay usageArjan van de Ven2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * drm/i915: add VGA hotplug support for 945+Jesse Barnes2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * drm/i915: correctly set IGD device's gtt size for KMS.Shaohua Li2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | IGD device only has last 1 page used by GTT. This should match the AGP gart code. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: avoid hanging on to a stale pointer to raw_edid.Ma Ling2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | drm_get_edid will store edid into raw_edid, so when freeing edid memory, at the same time clean raw_edid pointer. Signed-off-by: Ma Ling <ling.ma@intel.com> [anholt: Note that raw_edid is not currently used anywhere] Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: check for -EINVAL from vm_insert_pfnJesse Barnes2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | Indicates something is wrong with the mapping; and apparently triggers in current kernels. Signed-off-by: Jesse Barnes <jbarnes@virtuosugeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: fix up tiling/fence reg setup on i8xx class hwDaniel Vetter2009-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes all the tiling problems with the 2d ddx. glxgears still doesn't work. Changes: - fix a copy&paste error in i8xx fence reg setup. It resulted in an at most a 512KB offset of the fence reg window, so was only visible sometimes. - add tests for stride and object size constrains (also for i915 and 1965 class hw). Userspace seems to have an of-by-one bug there, which changes the fence size by at most 512KB due to an overflow. - because i8xx hw is quite old (and therefore not as well-tested) I left 2 debug WARN_ONs in the i8xx fence reg setup code to hopefully catch any further overflows in the bit-fields. Lastly there's one small change to make the alignment checks more consistent. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=20289 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
| * | drm: remove unused "can_grow" parameter from drm_crtc_helper_initial_configJesse Barnes2009-04-02
| |/ | | | | | | | | | | | | Cleanup some leftovers from the X port. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/i915: check the return value from the copy from userDave Airlie2009-03-28
| | | | | | | | | | | | | | This produced a warning on my build, not sure why super-warning-man didn't notice this one, its much worse than the %z one. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: merge Linux master into HEADDave Airlie2009-03-28
| |\ | | | | | | | | | | | | | | | | | | Conflicts: drivers/gpu/drm/drm_info.c drivers/gpu/drm/drm_proc.c drivers/gpu/drm/i915/i915_gem_debugfs.c
| | * i915: fix wrong 'size_t' format stringLinus Torvalds2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the fifteen bazillionth time. See also commits f06da264cfb0f9444d41ca247213e419f90aa72a and aeb565dfc3ac4c8b47c5049085b4c7bfb2c7d5d7 ("i915: Fix more size_t format string warnings" and "Fix annoying DRM_ERROR() string warning"). Grr-target: Eric Anholt <eric@anholt.net> Grr-target: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| | * drm/i915: Fix LVDS dither settingLi Peng2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Update bdb_lvds_options structure according to its defination in 2D driver. Then we can parse and set 'lvds_dither' bit correctly on non-965 chips. Signed-off-by: Li Peng <peng.li@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Check for dev->primary->master before dereference.Chris Wilson2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | I've hit the occasional oops inside i915_wait_ring() with an indication of a NULL derefence of dev->primary->master. Adding a NULL check is consistent with the other potential users of dev->primary->master. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: TV detection fixZhenyu Wang2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | Check that the encoder has a real enabled crtc for TV detect, and fix missing TV type setting after detect. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: TV mode_set sync up with 2D driverZhenyu Wang2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | Fix TV control save register for untouched bits, and color knobs different definition for 945 and 965 chips. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Fix TV get_modes to return modes countZhenyu Wang2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | The get_modes hook must return the number of modes added. This also fixes TV mode's clock calculation int overflow issue, and use 0.01 precision for mode refresh validation. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Sync crt hotplug detection with intel video driverZhao Yakui2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | This covers: Use long crt hotplug activation time on GM45. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Sync mode_valid/mode_set with intel video driverZhao Yakui2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This covers: Limit CRT DAC speed better. and also clears the border color in case it's set to some garbage, which would fix ugly outlines in the blank regions of the CRT. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> [anholt: replaced *drm_dev with *dev] Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: TV modes' parameters sync up with 2D driverZhenyu Wang2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | This covers at least: TV: subcarrier fix for NTSC and PAL TV: fix timing parameters for PAL, 480p, 1080i Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * agp/intel: Add support for new intel chipset.Shaohua Li2009-03-27
| | | | | | | | | | | | | | | | | | | | | This is a G33-like desktop and mobile chipset. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * i915/drm: Remove two redundant agp_chipset_flushesOwain G. Ainsworth2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | agp_chipset_flush() is for flushing the intel GMCH write cache via the IFP, these two uses are for when we're getting the object into the cpu READ domain, and thus should not be needed. This confused me when I was getting my head around the code. With thanks to airlied for helping me check my mental picture of how the flushes and clflushes are supposed to be used. Signed-off-by: Owain G. Ainsworth <oga@openbsd.org> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Display fence register state in debugfs i915_gem_fence_regs node.Chris Wilson2009-03-27
| | | | | | | | | | | | | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Add information on pinning and fencing to the i915 list debug.Eric Anholt2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | This was inspired by a patch by Chris Wilson, though none of it applied in any way due to the debugfs work and I decided to change the formatting of the new information anyway. Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Consolidate gem object list dumpingBen Gamari2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | Here we eliminate a few functions in favor of using a single function to dump from all of the object lists. Signed-Off-By: Ben Gamari <bgamari@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Convert i915 proc files to seq_file and move to debugfs.Ben Gamari2009-03-27
| | | | | | | | | | | | | | | Signed-off-by: Ben Gamari <bgamari@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Fix lock order reversal in GEM relocation entry copying.Eric Anholt2009-03-27
| | | | | | | | | | | | | | | Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
| | * drm/i915: Fix lock order reversal with cliprects and cmdbuf in non-DRI2 paths.Eric Anholt2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces allocation in the batch submission path that wasn't there previously, but these are compatibility paths so we care about simplicity more than performance. kernel.org bug #12419. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * drm/i915: Fix lock order reversal in shmem pread path.Eric Anholt2009-03-27
| | | | | | | | | | | | | | | Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * drm/i915: Fix lock order reversal in shmem pwrite path.Eric Anholt2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Like the GTT pwrite path fix, this uses an optimistic path and a fallback to get_user_pages. Note that this means we have to stop using vfs_write and roll it ourselves. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * drm/i915: Make GEM object's page lists refcounted instead of get/free.Eric Anholt2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | We've wanted this for a few consumers that touch the pages directly (such as the following commit), which have been doing the refcounting outside of get/put pages. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * drm/i915: Fix lock order reversal in GTT pwrite path.Eric Anholt2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the pagefault path determines that the lock order we use has to be mmap_sem -> struct_mutex, we can't allow page faults to occur while the struct_mutex is held. To fix this in pwrite, we first try optimistically to see if we can copy from user without faulting. If it fails, fall back to using get_user_pages to pin the user's memory, and map those pages atomically when copying it to the GPU. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * drm/i915: Read the right SDVO register when detecting SVDO/HDMI.Kristian Høgsberg2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | This fixes incorrect detection of the second SDVO/HDMI output on G4X, and extra boot time on pre-G4X. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Use a different PLL timing search function on G4X.Ma Ling2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This improves the PLL timings according to the suggestion of the hardware engineers. This results in some outputs being able to sync that weren't able to before. This is part of fixing fd.o bug #17508. Signed-off-by: Ma Ling <ling.ma@intel.com> [anholt: cleaned up a couple of redundant comments] Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Use documented PLL timing limits for G4X platformMa Ling2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The values come from the internal reference spreadsheet on PLL timing limits for the G4X chipsets. Part of fixing fd.o bug #17508 Signed-off-by: Ma Ling <ling.ma@intel.com> [anholt: Cleaned up some whitespace] Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Change DCC tiling detection case to cover only mobile parts.Eric Anholt2009-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Later spec investigation has revealed that every 9xx mobile part has had this register in this format. Also, no non-mobile parts have been shown to have this register. So make all mobile use the same code, and all non-mobile use the hack 965 detection. Signed-off-by: Eric Anholt <eric@anholt.net>
| * | i915/drm: Remove two redundant agp_chipset_flushesOwain G. Ainsworth2009-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | agp_chipset_flush() is for flushing the intel GMCH write cache via the IFP, these two uses are for when we're getting the object into the cpu READ domain, and thus should not be needed. This confused me when I was getting my head around the code. With thanks to airlied for helping me check my mental picture of how the flushes and clflushes are supposed to be used. Signed-off-by: Owain G. Ainsworth <oga@openbsd.org> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/i915: Display fence register state in debugfs i915_gem_fence_regs node.Chris Wilson2009-03-13
| | | | | | | | | | | | | | | | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/i915: Add information on pinning and fencing to the i915 list debug.Eric Anholt2009-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was inspired by a patch by Chris Wilson, though none of it applied in any way due to the debugfs work and I decided to change the formatting of the new information anyway. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/i915: Consolidate gem object list dumpingBen Gamari2009-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Here we eliminate a few functions in favor of using a single function to dump from all of the object lists. Signed-Off-By: Ben Gamari <bgamari@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm: Convert proc files to seq_file and introduce debugfsBen Gamari2009-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old mechanism to formatting proc files is extremely ugly. The seq_file API was designed specifically for cases like this and greatly simplifies the process. Also, most of the files in /proc really don't belong there. This patch introduces the infrastructure for putting these into debugfs and exposes all of the proc files in debugfs as well. This contains the i915 hooks rewrite as well, to make bisectability better. Signed-off-by: Ben Gamari <bgamari@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm: claim PCI device when running in modesetting mode.Kristian Høgsberg2009-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under kernel modesetting, we manage the device at all times, regardless of VT switching and X servers, so the only decent thing to do is to claim the PCI device. In that case, we call the suspend/resume hooks directly from the pci driver hooks instead of the current class device detour. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
| * | drm: Split drm_map and drm_local_mapBenjamin Herrenschmidt2009-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once upon a time, the DRM made the distinction between the drm_map data structure exchanged with user space and the drm_local_map used in the kernel. For some reasons, while the BSD port still has that "feature", the linux part abused drm_map for kernel internal usage as the local map only existed as a typedef of the struct drm_map. This patch fixes it by declaring struct drm_local_map separately (though its content is currently identical to the userspace variant), and changing the kernel code to only use that, except when it's a user<->kernel interface (ie. ioctl). This allows subsequent changes to the in-kernel format I've also replaced the use of drm_local_map_t with struct drm_local_map in a couple of places. Mostly by accident but they are the same (the former is a typedef of the later) and I have some remote plans and half finished patch to completely kill the drm_local_map_t typedef so I left those bits in. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>