aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon/kms: add r600 KMS supportJerome Glisse2009-09-0833-606/+8289
| | | | | | | | | | | | | | | | | | | | This adds the r600 KMS + CS support to the Linux kernel. The r600 TTM support is quite basic and still needs more work esp around using interrupts, but the polled fencing should work okay for now. Also currently TTM is using memcpy to do VRAM moves, the code is here to use a 3D blit to do this, but isn't fully debugged yet. Authors: Alex Deucher <alexdeucher@gmail.com> Dave Airlie <airlied@redhat.com> Jerome Glisse <jglisse@redhat.com> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add initial radeon tv-out support.Dave Airlie2009-09-0815-388/+1941
| | | | | | | | This ports the tv-out code from the DDX to KMS. adds a radeon.tv module option, radeon.tv=0 to disable tv Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add rn50/r100/r200 CS tracker.Dave Airlie2009-09-0811-440/+1712
| | | | | | | | | | This adds the command stream checker for the RN50, R100 and R200 cards. It stops any access to 3D registers on RN50, and does checks on buffer sizes on the r100/r200 cards. It also fixes some texture sizing checks on r300. Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge intel drm-intel-next branchDave Airlie2009-09-0733-321/+1474
|\ | | | | | | | | | | | | | | | | Merge remote branch 'anholt/drm-intel-next' of ../anholt-2.6 into drm-next Conflicts: drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/i915/intel_drv.h drivers/gpu/drm/i915/intel_sdvo.c
| * drm/i915: Put the idle reclocking work on our private workqueue as well.Eric Anholt2009-09-061-2/+2
| | | | | | | | | | | | Fixes (again) whole-system lockups due to GPU lockups. Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Pad ringbuffer with NOOPs before wrappingChris Wilson2009-09-064-27/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the docs, the ringbuffer is not allowed to wrap in the middle of an instruction. G45 PRM, Vol 1b, p101: While the “free space” wrap may allow commands to be wrapped around the end of the Ring Buffer, the wrap should only occur between commands. Padding (with NOP) may be required to follow this restriction. Do as commanded. [Having seen bug reports where there is evidence of split commands, but apparently the GPU has continued on merrily before a bizarre and untimely death, this may or may not fix a few random hangs.] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> CC: Eric Anholt <eric@anholt.net> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: do dynamic clock freq control only in kernel modesettingZhenyu Wang2009-09-041-0/+3
| | | | | | | | | | Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/I915: Use the CRT DDC to get the EDID for DVI-connector on MacKeith Packard2009-09-041-22/+74
| | | | | | | | | | | | | | | | | | | | | | mac Mini's have a single DDC line on the DVI connector, shared between the analog link and the digital link. So, if DDC isn't detected on GPIOE (the usual SDVO DDC link), try GPIOA (the usual VGA DDC link) when there isn't a VGA monitor connected. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: fix tiling on IGDNGZhenyu Wang2009-09-043-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | It seems that on IGDNG the same swizzling setup always applys. And front buffer tiling needs to set address swizzle in display arb control too. Fix plane tricle feed setting in v1 which should be disable bit, and always setup address swizzle to let hardware care for buffer tiling in all cases. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: modeset: always set intel_crtc->dpms_mode by moving the assignment up.Daniel Vetter2009-09-041-2/+2
| | | | | | | | | | Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: remove open-coded drm_mode_object_findDaniel Vetter2009-09-041-12/+8
| | | | | | | | | | | | | | | | And clean up a small whitespace goof-up in the same function, while I was looking at it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Make the downclocking debug code be under DRM_DEBUG not DRM_ERROR.Eric Anholt2009-09-041-2/+2
| | | | | | | | | | Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| * drm/i915: i915_modeset is signedKyle McMartin2009-09-041-1/+1
| | | | | | | | | | Signed-off-by: Kyle McMartin <kyle@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: add dynamic clock frequency controlJesse Barnes2009-09-049-45/+704
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several sources of unnecessary power consumption on Intel graphics systems. The first is the LVDS clock. TFTs don't suffer from persistence issues like CRTs, and so we can reduce the LVDS refresh rate when the screen is idle. It will be automatically upclocked when userspace triggers graphical activity. Beyond that, we can enable memory self refresh. This allows the memory to go into a lower power state when the graphics are idle. Finally, we can drop some clocks on the gpu itself. All of these things can be reenabled between frames when GPU activity is triggered, and so there should be no user visible graphical changes. Signed-off-by: Jesse Barnes <jesse.barnes@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Support IGD EOSShaohua Li2009-09-043-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the event that any one of the DAC analog outputs (R,G,B) were driven at full-scale (white video) or some analog level close to full-scale voltage, and if the video cable were then disconnected, the analog video voltage level would exceed the maximum electrical overstress limit of the native (thin-oxide) transistors thus causing a long-term reliability concern. The electrical overstress condition occurs in this particular case. This patch address the IGD EOS (electrical overstress condition) issue. When the EOS interrupt occurs, OS should disable DAC and then disable EOS, then the normal hotplug operation follows. TODO: it appears the normal unplug interrupt is missed as reported by Li Peng, need more checks here. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Enable PAL and SECAM format and add the propery for SDVO-TVZhao Yakui2009-09-041-48/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently SDVO TV only support NTSC-M format. In this patch we introduce PAL and SECAM formats available and create seting-format property at init time. When user dynamically chose preferred format by xrandr command, it will refine all modelines provided by SDVO device, then instruct SDVO device to execute. At the same time the property is added for SDVO-TV so that the SDVO-TV mode can be changed by using xrandr. https://bugs.freedesktop.org/show_bug.cgi?id=22891 Signed-off-by: Ma Ling <ling.ma@intel.com> review-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: select TV format according to connector typeMa Ling2009-09-041-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | For integrated TV there are 3 connector types: S-VIDEO, Composite and Component(YprPb). Those tv formats whose component flag is true should be assigned to Component connector, others are for S-VIDEO and Composite. The patch intends to find appropriate tv format for each connector. In such case it will return the correct modeline to user space. Otherwise it will return the incorrect modeline when S-video/composite is connected. Signed-off-by: Ma Ling <ling.ma@intel.com> reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: update debugfs interrupt info on IGDNGZhenyu Wang2009-09-041-10/+31
| | | | | | | | | | Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Add i915 register dumping debugfs fileBen Gamari2009-09-041-0/+30
| | | | | | | | | | | | | | | | | | Add a debugfs file to dump the entire register range. Here we assume that reading write-only/reserved registers won't make the chip angry. Seems to hold true, thankfully. Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Move i915_gem_debugfs.c to i915_debugfs.cBen Gamari2009-09-044-13/+13
| | | | | | | | | | | | Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> [anholt: hand-applied for conflicts] Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Unref old_obj on get_fence_reg() error pathChris Wilson2009-09-021-4/+9
| | | | | | | | | | | | | | | | | | | | | | Remember to release the local reference if we fail to wait on the rendering. (Also whilst in the vicinity add some whitespace so that the phasing of the operations is clearer.) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: increase default latency constant (v2 w/comment)Jesse Barnes2009-09-021-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some i915/i945 platforms have a fairly high memory latency in certain situations, so increase our constant a bit to avoid FIFO underruns. The effect should be positive on other platforms as well; we'll have a bit more insurance against a busy memory subsystem due to the extra FIFO entries. Fixes fdo bug #23368. Needed for 2.6.31. Tested-by: Sven Arvidsson <sa@whiz.se> Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
| * Merge branch 'for-linus' of ↵Linus Torvalds2009-08-3112-105/+194
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Improve CRTDDC mapping by using VBT info drm/i915: Fix CPU-spinning hangs related to fence usage by using an LRU. drm/i915: Set crtc/clone mask in different output devices drm/i915: Always use SDVO_B detect bit for SDVO output detection. drm/i915: Fix typo that broke SVID1 in intel_sdvo_multifunc_encoder() drm/i915: Check if BIOS enabled dual-channel LVDS on 8xx, not only on 9xx drm/i915: Set the multiplier for SDVO on G33 platform
| | * drm/i915: Improve CRTDDC mapping by using VBT infoDavid Müller (ELSOFT AG)2009-08-293-4/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use VBT information to determine which DDC bus to use for CRTDCC. Fall back to GPIOA if VBT info is not available. Signed-off-by: David Müller <d.mueller@elsoft.ch> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net> Tested on: 855 (David), and 945GM, 965GM, GM45, and G45 (anholt)
| | * drm/i915: Fix CPU-spinning hangs related to fence usage by using an LRU.Eric Anholt2009-08-292-38/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The lack of a proper LRU was partially worked around by taking the fence from the object containing the oldest seqno. But if there are multiple objects inactive, then they don't have seqnos and the first fence reg among them would be chosen. If you were trying to copy data between two mappings, this could result in each page fault stealing the fence from the other argument, and your application hanging. https://bugs.freedesktop.org/show_bug.cgi?id=23566 https://bugs.freedesktop.org/show_bug.cgi?id=23220 https://bugs.freedesktop.org/show_bug.cgi?id=23253 https://bugs.freedesktop.org/show_bug.cgi?id=23366 Cc: Stable Team <stable@kernel.org> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
| | * drm/i915: Set crtc/clone mask in different output devicesMa Ling2009-08-249-51/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Bspec each encoder has different sharing pipe property, i.e. Integrated or SDVO TV both will occupy one pipe exclusively, and sdvo-non-tv and crt are allowed to share one. The patch moves sharing judgment into differnet output functions, and sets the right clone bit. This fixes both HDMI outputs choosing the same pipe. https://bugs.freedesktop.org/show_bug.cgi?id=22247 Signed-off-by: Ma Ling <ling.ma@intel.com> Reviewed-by : Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Always use SDVO_B detect bit for SDVO output detection.Ma Ling2009-08-241-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the following commit is shipped, the SDVO C detection will depend on the SDVO_C/DP detion bit. commit 13520b051e8888dd3af9bda639d83e7df76613d1 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Mar 13 15:42:14 2009 -0400 drm/i915: Read the right SDVO register when detecting SVDO/HDMI. According to the spec we should continue to detect the SDVO_B/C based on the SDVO_B detection bit. The new detection bit on G4X platform is for the HDMI_C detection rather than SDVO_C detection. https://bugs.freedesktop.org/show_bug.cgi?id=20639 Signed-off-by: Ma Ling <ling.ma@intel.com> Acked-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Fix typo that broke SVID1 in intel_sdvo_multifunc_encoder()Roel Kluin2009-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | Bit SDVO_OUTPUT_SVID0 was tested twice Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Check if BIOS enabled dual-channel LVDS on 8xx, not only on 9xxBruno Prémont2009-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0c2e39525b3b53a97a0202c5f35058147e53977e is not sufficient to get fd.o bug #20115 fixed. In addition intel_find_best_PLL() must not only rely on BIOS settings for i9xx chips but also for i8xx, so drop the IS_I9XX() check. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Eric Anholt <eric@anholt.net>
| | * drm/i915: Set the multiplier for SDVO on G33 platformSean Young2009-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | http://bugs.freedesktop.org/show_bug.cgi?id=21417 Signed-off-by: Sean Young <sean@mess.org> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * | drm/radeon/kms: Fix radeon_gem_busy_ioctl harder.Michel Dänzer2009-08-231-3/+9
| |/ | | | | | | | | | | | | It was mixing up TTM placement values and flags. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon: add GET_PARAM/INFO support for Z pipesAlex Deucher2009-08-219-4/+37
| | | | | | | | | | | | | | Needed for occlusion queries on rv530 chips. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: add r100/r200 OQ support.Dave Airlie2009-08-212-0/+13
| | | | | | | | | | | | | | This adds the relocation necessary for OQ support on the r100/r200 chipsets. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Fix sysfs device confusion.Thomas Hellstrom2009-08-211-22/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | The drm sysfs class suspend / resume methods could not distinguish between different device types wich could lead to illegal type casts. Use struct device_type and make sure the class suspend / resume callbacks are aware of those. There is no per device-type suspend / resume. Only new-style PM. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: implement the bo busy ioctl properly.Dave Airlie2009-08-212-1/+2
| | | | | | | | | | | | | | | | | | The previous patch assumes the ioctl already existed, when it actually didn't. It also didn't return the correct error code. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/kms: remove old std mode fallback code.Dave Airlie2009-09-071-54/+2
| | | | | | | | | | | | | | The new code adds modes in the helper, which makes more sense I disliked the non-driver code adding modes. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/kms/i915: Add the default mode for CRT output without EDIDykzhao2009-09-071-2/+5
| | | | | | | | | | | | | | | | Add the default mode for every output device when there is no mode for it. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/kms: add a function that can add the mode for the output device without EDIDZhao Yakui2009-09-071-0/+46
| | | | | | | | | | | | | | | | | | | | Add a function that can be used to add the default mode for the output device without EDID. It will add the default mode that meets with the requirements of given hdisplay/vdisplay limit. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/kms: try to find the std mode in DMT tableZhao Yakui2009-09-072-12/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we need to add the standard timing mode, we will firstly check whether it can be found in DMT table by comparing the hdisplay/vdisplay/vfresh_rate. If it can't be found, then we will use the cvt/gtf to add the required mode. If it can be found, it will be returned. At the same time the function of drm_mode_vrefresh is also fixed. It will return the result of actual refresh_rate plus 0.5. For example: When the calculated value is 84.9, then the fresh_rate is 85. When the calculated value is 70.02, then the fresh_rate is 70. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/kms: Add the default mode tableZhao Yakui2009-09-071-0/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we add a standard timing mode in UMS, we will first check whether it can be found in default mode table. If it can't be found, then we will use cvt/gtf to add the standard timing mode. Add the default mode table so that we can check whether the given mode can be found in the default mode table as what we have done in UMS mode. If the status of one output device is connected but there is no EDID, it will have no correct mode. In such case we can add some default modes for it. Of course we only add the modes in the default modes list that visible part is not greater than 1024x768. The default mode is autogenerated from the DMT spec. And it is copied from xserver/hw/xfree86/modes/xf86EdidModes.c. But the mode with reduced blank feature is removed. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: split crtc/fb helpers into a separate moduleDave Airlie2009-09-074-5/+16
| | | | | | | | | | | | | | I really don't want to have core drm module rely on CONFIG_FB, so this is the easiest answer. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon/kms: add updated registers from drm-fixes.Dave Airlie2009-09-073-0/+5
| | | | | | | | | | | | Fixes up the DISCARD + 2 sided stencil in the new generator scripts. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/radeon/kms: block depthxy offset from use from userspace.Dave Airlie2009-09-073-3/+0
| | | | | | | | | | | | This could be used to bypass CS checks. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/crtc_helper: avoid NULL-pointer dereference when encoder is NULLMaarten Maathuis2009-09-021-1/+2
| | | | | | | | | | Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
* | drm/crtc: fix mismerge of last patch.Dave Airlie2009-09-021-2/+2
| | | | | | | | | | | | We only want to NULL encoder->crtc when it is off. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/kms: add explicit encoder disable function and detach harder.Dave Airlie2009-09-021-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | For shared tv-out and VGA encoders, we really need to know if the encoder is just being switched off temporarily in blanking or if we are really disabling it hard. Also we need to try harder to disconnect encoders from unused connectors so we can share more efficently. (shared encoders stuff is coming in radeon tv-out support) Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: fix drm_cache.c for arch with no support.Dave Airlie2009-09-021-6/+3
| | | | | | | | | | | | | | This produces a warn on for architectures where this gets called but we don't have a cache flushing implementation suitable. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/mm: add ability to dump mm lists via debugfsDave Airlie2009-09-022-0/+77
| | | | | | | | | | | | | | | | | | This adds code to the drm_mm to talk to debugfs, and adds support to radeon to add the VRAM and GTT mm lists to debugfs. I tested with spinlock debugging and it doesn't give out. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: fix two issues with fb consolidation.Dave Airlie2009-08-312-2/+2
| | | | | | | | | | | | | | | | Set accel to none, we really don't want anyone thinking fb is an accel interface. Pass pitch not depth to function for intel. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm: use proc_create_data()Alexey Dobriyan2009-08-311-6/+7
| | | | | | | | | | | | | | | | airlied: fixup race against drm info by filling out tmp before adding it to proc. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>