summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAgeFilesLines
* ACPI, i915: Register ACPI video even when not modesettingMatthew Garrett2009-04-241-4/+5
| | | | | | | | | | | | 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>
* Merge branch 'drm-linus' of ↵Linus Torvalds2009-04-203-6/+18
|\ | | | | | | | | | | | | | | | | | | | | 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
| * drm: check for minor master before allowing drop master.Dave Airlie2009-04-201-0/+3
| | | | | | | | | | | | | | 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>
| * drm: set/clear is_master when master changedJonas Bonn2009-04-201-1/+7
| | | | | | | | | | | | | | | | | | 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>
| * drm: clean dirty memory after device releaseMa Ling2009-04-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * drm: count reaches -1Roel Kluin2009-04-201-5/+7
| | | | | | | | | | | | | | | | 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>
* | Merge branch 'drm-intel-next' of ↵Linus Torvalds2009-04-148-40/+409
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | drm/i915: fix scheduling while holding the new active list spinlockShaohua Li2009-04-141-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.Eric Anholt2009-04-083-14/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/i915: Correctly set the write flag for get_user_pages in pread.Eric Anholt2009-04-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/i915: Fix use of uninitialized var in 40a5f0deFlorian Mickler2009-04-081-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/i915: indicate framebuffer restore key in SysRq help messageFerenc Wagner2009-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/i915: sync hdmi detection by hdmi identifier with 2DMa Ling2009-04-082-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/i915: Fix a mismerge of the IGD patch (new .find_pll hooks missed)Shaohua Li2009-04-081-0/+2
| | | | | | | | | | | | | | | Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * | drm/i915: Implement batch and ring buffer dumpingBen Gamari2009-04-083-5/+98
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'linus' into releaseLen Brown2009-04-0553-1833/+29784
|\ \ | |/ | | | | | | | | | | Conflicts: arch/x86/kernel/cpu/cpufreq/longhaul.c Signed-off-by: Len Brown <len.brown@intel.com>
| * drm/radeon: load the right microcode on rs780Alex Deucher2009-04-031-4/+4
| | | | | | | | | | | | | | | | 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>
| * Merge branch 'drm-intel-next' of ../anholt-2.6 into drm-linusDave Airlie2009-04-0316-123/+292
| |\
| | * drm: Use pgprot_writecombine in GEM GTT mapping to get the right bits for !PAT.Jesse Barnes2009-04-021-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * drm/i915: Add a spinlock to protect the active_listCarl Worth2009-04-014-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-012-52/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-012-0/+6
| | | | | | | | | | | | | | | | | | | | | 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-011-21/+4
| | | | | | | | | | | | | | | | | | | | | 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-011-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | 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-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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-016-14/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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-013-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-032-3/+2
| | | | | | | | | | | | | | | | | | | | | Cleanup some leftovers from the X port. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm: fix EDID backward compat checkJesse Barnes2009-04-031-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm: sync the mode validation for INTERLACE/DBLSCANyakui_zhao2009-04-031-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm: fix typo in edid vendor parsing.Dave Airlie2009-04-031-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | 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>
| * drm: detect hdmi monitor by hdmi identifier (v3)Ma Ling2009-03-291-0/+62
| | | | | | | | | | | | | | | | Sometime we need to communicate with HDMI monitor by sending audio or video info frame, so we have to know monitor type. However if user utilize HDMI-DVI adapter to connect DVI monitor, hardware detection will incorrectly show the monitor is HDMI. HDMI spec tell us that any device containing IEEE registration Identifier will be treated as HDMI device. The patch intends to detect HDMI monitor by this rule. Signed-off-by: Ma Ling <ling.ma@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: drm_fops.c unlock missing on error pathDan Carpenter2009-03-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | drm_open_helper() from drm_fops.c had a missing mutex_unlock in a error path. This was caught by smatch (http://repo.or.cz/w/smatch.git/). Compile tested. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: read EDID extensions from monitorMa Ling2009-03-291-28/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | Usually drm read basic EDID, that is enough for us, but since igital display were introduced i.e. HDMI monitor, sometime we need to interact with monitor by EDID extension information, EDID extensions include audio/video data block, speaker allocation and vendor specific data blocks. This patch intends to read EDID extensions from digital monitor for users. Signed-off-by: Ma Ling <ling.ma@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Use a little stash on the stack to avoid kmalloc in most DRM ioctls.Eric Anholt2009-03-291-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kmalloc was taking up about 1.5% of the CPU on an ioctl-heavy workload (x11perf -aa10text on 965). Initial results look like they have a corresponding improvement in performance for aa10text, but more numbers might not hurt. Thanks to ajax for pointing out this performance regression I'd introduced back in 2007. [airlied: well I introduced it sneakily inside Eric's patch] Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon: add regs required for occlusion queries supportMaciej Cencora2009-03-294-2/+11
| | | | | | | | | | | | | | [airlied: cleaned up slightly for drm-next] Signed-off-by: Maciej Cencora <m.cencora@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/i915: check the return value from the copy from userDave Airlie2009-03-281-1/+4
| | | | | | | | | | | | | | 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-2814-353/+1375
| |\ | | | | | | | | | | | | | | | | | | Conflicts: drivers/gpu/drm/drm_info.c drivers/gpu/drm/drm_proc.c drivers/gpu/drm/i915/i915_gem_debugfs.c
| | * Merge branch 'linus' into percpu-cpumask-x86-for-linus-2Ingo Molnar2009-03-2820-1300/+2335
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/sparc/kernel/time_64.c drivers/gpu/drm/drm_proc.c Manual merge to resolve build warning due to phys_addr_t type change on x86: drivers/gpu/drm/drm_info.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
| | | * i915: fix wrong 'size_t' format stringLinus Torvalds2009-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-272-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-272-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud