aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
Commit message (Collapse)AuthorAge
...
| * drm/kms/radeon: make kms default a runtime optionDave Airlie2009-09-07
| | | | | | | | | | | | | | This makes the kms/enable disable a runtime not a build time option. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/kms: fix kms helper license + KconfigDave Airlie2009-09-07
| | | | | | | | | | | | | | Allow the KMS module to work properly, and also rename it to KMS_HELPER so its clearer what its for. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: add r600 KMS supportJerome Glisse2009-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-07
| | | | | | | | | | | | | | | | 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-07
| | | | | | | | | | | | | | | | | | | | 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-07
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 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-06
| | | | | | | | | | | | | | | | | | 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-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
| | * drm/i915: i915_modeset is signedKyle McMartin2009-09-04
| | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> [anholt: hand-applied for conflicts] Signed-off-by: Eric Anholt <eric@anholt.net>
| * | drm/kms: remove old std mode fallback code.Dave Airlie2009-09-07
| | | | | | | | | | | | | | | | | | | | | 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-07
| | | | | | | | | | | | | | | | | | | | | | | | 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-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-07
| | | | | | | | | | | | | | | | | | | | | 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-06
| | | | | | | | | | | | | | | | | | 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-06
| | | | | | | | | | | | | | | | | | 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-02
| | | | | | | | | | | | | | | 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-02
| | | | | | | | | | | | | | | | | | 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-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-01
| | | | | | | | | | | | | | | | | | | | | 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-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-30
| | | | | | | | | | | | | | | | | | | | | | | | 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-30
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/kms: Parse the detailed time info in CEA-EDIDZhao Yakui2009-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes we can obtain the EDID with multiple blocks from the display device. For example: HDMI monitor. When the CEA-EDID block is detected, we should also parse the detailed timing info from it. Otherwise we will lose some modes for the display device. The first step is check whether the CEA EDID block is found. If it exists, it will skip the CEA-data block and parse the detailed timing info. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/kms: move driver specific fb common code to helper functions (v2)Dave Airlie2009-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initially I always meant this code to be shared, but things ran away from me before I got to it. This refactors the i915 and radeon kms fbdev interaction layers out into generic helpers + driver specific pieces. It moves all the panic/sysrq enhancements to the core file, and stores a linked list of kernel fbs. This could possibly be improved to only store the fb which has fbcon on it for panics etc. radeon retains some specific codes used for a big endian workaround. changes: fix oops in v1 fix freeing path for crtc_info Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/r128: Add test for initialisation to all ioctls that require itBen Hutchings2009-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost all r128's private ioctls require that the CCE state has already been initialised. However, most do not test that this has been done, and will proceed to dereference a null pointer. This may result in a security vulnerability, since some ioctls are unprivileged. This adds a macro for the common initialisation test and changes all ioctl implementations that require prior initialisation to use that macro. Also, r128_do_init_cce() does not test that the CCE state has not been initialised already. Repeated initialisation may lead to a crash or resource leak. This adds that test. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | radeon: Use request_firmware()Ben Hutchings2009-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Loosely based on a patch by Jaswinder Singh Rajput <jaswinderlinux@gmail.com>. KMS support by Dave Airlie <airlied@redhat.com>. For Radeon 100- to 500-series, firmware blobs look like: struct { __be32 datah; __be32 datal; } cp_ucode[256]; For Radeon 600-series, there are two separate firmware blobs: __be32 me_ucode[PM4_UCODE_SIZE * 3]; __be32 pfp_ucode[PFP_UCODE_SIZE]; For Radeon 700-series, likewise: __be32 me_ucode[R700_PM4_UCODE_SIZE]; __be32 pfp_ucode[R700_PFP_UCODE_SIZE]; Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm: dereference of tmp in drm_proc_create_files()Roel Kluin2009-08-30
| | | | | | | | | | | | | | | | | | | | | tmp allocation may fail, prevent a dereference. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/crtc_helper: NULL encoder->crtc when switching encodersMaarten Maathuis2009-08-30
| | | | | | | | | | | | | | | | | | | | | - Previously the old encoder would be called during modeset and without a connector bad things happened. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/crtc_helper: replace modeset fail path with something simplerMaarten Maathuis2009-08-30
| | | | | | | | | | | | | | | | | | | | | | | | - The previous system was not very transparent, nor flexible. - This is needed to be able to fix a few bugs in the mechanism. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/radeon: cleanup mkregtable.cDave Airlie2009-08-30
| | | | | | | | | | | | | | | | | | This cleans up the code in mkregtable.c to be more kernel style. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm: GEM handles are u32, not intPekka Paalanen2009-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several functions in the GEM kernel API used int as handle type, but user API has it __u32 which is also the intended type. Replace int with u32. Signed-off-by: Pekka Paalanen <pq@iki.fi> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/rs600/690: use autogenerated safe register tables.Dave Airlie2009-08-26
| | | | | | | | | | | | | | | | | | | | | This ports rs690 to the safe reg tables and makes rs600 also use the same table. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/r128: Use request_firmware() to load CCE microcodeBen Hutchings2009-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Firmware blob looks like this: __be32 datah __be32 datal Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/mga: Use request_firmware() to load microcodeBen Hutchings2009-08-26
| | | | | | | | | | | | | | | | | | | | | | | | Image format is IHEX, one record for each pipe in order (record addresses are ignored). Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | drm/ttm: consolidate cache flushing code in one place.Dave Airlie2009-08-26
| | | | | | | | | | | | | | | | | | | | | This merges the TTM and drm cache flushing into one file in the drm core. Signed-off-by: Dave Airlie <airlied@redhat.com>