aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2009-09-17drm/i915: Check whether chip is wedged in i915_wait_request()Ben Gamari
i915_wait_request() only checks mm.wedged after it interacts with the hardware, generally causing the driver to lock up waiting for a wedged chip. Make sure we check mm.wedged as the first thing we do. Reported-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-17drm/i915: fix opregion backlight chip detect and rangeLi Peng
BLC_PWM_CTL2 is for 965+ only, so add device model check for legacy backlight control. For native backlight control, it maps the backlight value (0~255) in opregion ASLE[BCLP] to backlight duty cycle (0~max_backlight) and set into control register. It also add support for IGD device, which follows opregion spec. Signed-off-by: Li Peng <peng.li@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-17drm/i915: Fix LVDS panel fitting on ArrandaleZhenyu Wang
Arrandale has new window based method for panel fitting. This one enables full screen aspect scaling on LVDS. It fixes standard mode display failure on LVDS for Arrandale. Cc: Stable Team <stable@kernel.org> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-17drm/i915: Remove DAC disable in CRT force detect on IGDNGZhenyu Wang
This is not required on newer stepping hardware to get reliable force detect status. Removing this fixes screen blank flicker in CRT detect on IGDNG. Cc: Stable Team <stable@kernel.org> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-17drm/i915: Fix SSC frequence for IGDNGZhenyu Wang
IGDNG LVDS SSC uses 120Mhz freq. This fixes one 1600x900 LVDS panel black issue on IGDNG with SSC enabled. Cc: Stable Team <stable@kernel.org> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-17drm/i915: Fix typo for wrong LVDS clock setting on IGDNGZhenyu Wang
New register for PCH LVDS on IGDNG should be used. This is a copy-n-paste typo. This fixes possible dual channel LVDS panel failure on IGDNG. Cc: Stable Team <stable@kernel.org> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-17drm/i915: fix typo in compressed buffer setupJesse Barnes
We want the compressed line length buffer address, not the framebuffer address. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-09-11drm/i915: Only destroy a constructed mmap offsetChris Wilson
drm_ht_remove_item() does not handle removing an absent item and the hlist in particular is incorrectly initialised. The easy remedy is simply skip calling i915_gem_free_mmap_offset() unless we have actually created the offset and associated ht entry. This also fixes the mishandling of a partially constructed offset which leaves pointers initialized after freeing them along the i915_gem_create_mmap_offset() error paths. In particular this should fix the oops found here: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/415357/comments/8 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net> Cc: stable@kernel.org
2009-09-11agp/intel: Fix the pre-9xx chipset flush.Eric Anholt
Ever since we enabled GEM, the pre-9xx chipsets (particularly 865) have had serious stability issues. Back in May a wbinvd was added to the DRM to work around much of the problem. Some failure remained -- easily visible by dragging a window around on an X -retro desktop, or by looking at bugzilla. The chipset flush was on the right track -- hitting the right amount of memory, and it appears to be the only way to flush on these chipsets, but the flush page was mapped uncached. As a result, the writes trying to clear the writeback cache ended up bypassing the cache, and not flushing anything! The wbinvd would flush out other writeback data and often cause the data we wanted to get flushed, but not always. By removing the setting of the page to UC and instead just clflushing the data we write to try to flush it, we get the desired behavior with no wbinvd. This exports clflush_cache_range(), which was laying around and happened to basically match the code I was otherwise going to copy from the DRM. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org> Cc: stable@kernel.org
2009-09-10drm/i915: framebuffer compression for pre-GM45Jesse Barnes
This patch adds framebuffer compression (good for about ~0.5W power savings in the best case) support for pre-GM45 chips. GM45+ have a new, more flexible FBC scheme that will be added in a separate patch. FBC can't always be enabled: the compressed buffer must be physically contiguous and reside in stolen space. So if you have a large display and a small amount of stolen memory, you may not be able to take advantage of FBC. In some cases, a BIOS setting controls how much stolen space is available. Increasing this to 8 or 16M can help. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-10drm/i915: generate a KMS uevent at lid open/close timeJesse Barnes
With all the other lid pieces in place, it's easy to generate a uevent for the LVDS connector just like we do for other outputs. Should make lid open/close fit in with the rest of a userland based output reconfiguration scheme. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-10drm/i915: use ACPI LID status for LVDS ->detect hookJesse Barnes
We can't load or hotplug detect LVDS like we can other outputs, but if there's a lid device present we can use it as a proxy. This allows the LFP state to be determined at ->detect time, making configurations requiring manual intervention today "just work" assuming the lid device status is correct. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-10drm/i915: force mode set at lid open timeJesse Barnes
Some laptop platforms will disable pipes and/or planes at lid close time and not restore them when the lid is opened again. So catch the lid event, and if the lid was opened, force a mode restore. Fixes fdo bug #21230. Acked-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-10ACPI button: provide lid status functionsJesse Barnes
Some drivers need to know when a lid event occurs and get the current status. This can be useful for when a platform firmware clobbers some hardware state at lid time, and a driver needs to restore things when the lid is opened again. Acked-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-10Add G33 series in VGA hotplug support categoryLi Peng
Test on the IGD chip, which is a G33-like graphic device. Signed-off-by: Li Peng <peng.li@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-10drm/i915: Write zero to DPLL_MD Reg for non-SDVO outputZhao Yakui
When the output device is LVDS, maybe the pixel clock of adjusted_mode will be less than that in mode. In such case it will set the incorrect multipler factor in DPLL_MD register. So the dpll_md_reg will be reset when the output type is non-SDVO https://bugs.freedesktop.org/show_bug.cgi?id=22761 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Reviewd-by: Eric Anholt <eric@anholt.net> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-10drm/i915: Add the missing clone_mask for SDVO-VGA(RGB1)Zhao Yakui
Add the missing clone_mask for SDVO-VGA(RGB1) Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-10drm/i915: Add the brightness property for SDVO-LVDSZhao Yakui
When the sdvo device is detected as SDVO-LVDS, we will check whether the brightness is supported by issue SDVO enhancement command. If it is supported, we will add the brightness property and then brightness can be adjusted. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-10drm/i915: Add the enhancement property for SDVO-TVZhao Yakui
When the sdvo device is detected as SDVO-TV, we will check whether the sepecific picture enhancement is supported. If it is supported, we will add the corresponnding property for SDVO-TV. We will add the following property for the SDVO-TV enhancements if they are supported: * Contrast/Brightness/Saturation/Hue. * left/right/top/bottom margin: This is implemented by using the horizontal/vertical overscan enhancements. When the overscan enhancements are supported, the above properties will be added. This is to be compatible with what we have done in integrated-TV. * horizontal pos/vertical pos. http://bugs.freedesktop.org/show_bug.cgi?id=22891 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-09drm/i915: Zap mmaps of objects before unbinding them from the GTT.Eric Anholt
Otherwise, some other userland writing into its buffer may race to land writes either after the CPU thinks it's got a coherent view, or after its GTT entries have been redirected to point at the scratch page. Either result is unpleasant. Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-08drm/i915: add B43 chipset supportFabian Henze
Signed-off-by: Fabian Henze <hoacha@quantentunnel.de> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-08agp/intel: Add B43 chipset supportFabian Henze
Signed-off-by: Fabian Henze <hoacha@quantentunnel.de> [Fix reversed HB & IG ids for B43] Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-09drm/radeon/r600: use fence->timeout directlyAlex Deucher
Fixes fence timeouts on r6xx/r7xx. Noticed by taiu on IRC. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2009-09-09drm/radeon/kms: re-apply 2007d633d639c896396e4c4b53b38068f3831307Alex Deucher
Got accidently reverted by c93bb85b5cba3e3a06f2cad8e9bc5c23d3d10aac Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-08Merge remote branch 'origin/master' of ../linux-2.6 into drm-nextDave Airlie
This was a non-trivial merge with some patches sent to Linus in drm-fixes. Conflicts: drivers/gpu/drm/radeon/r300.c drivers/gpu/drm/radeon/radeon_asic.h drivers/gpu/drm/radeon/rs600.c drivers/gpu/drm/radeon/rs690.c drivers/gpu/drm/radeon/rv515.c
2009-09-08drm/radeon/kms: don't allow ERESTART to hit userspace.Dave Airlie
the pre-r600 fence code returns ebusy if we get hit by a signal so we should continue to do that. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-08drm: prune modes when output is disconnected.Adam Jackson
When an output was disconnected, its mode list would remain. If you later plugged into a sink with no EDID (projector, etc), you'd inherit the mode list from the old sink, which is not what you want. taken from Fedora kernel Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-08drm: shut the EDID warnings up.Adam Jackson
These really aren't all that useful. taken from Fedora kernel. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-08drm/i915: get the bridge device once.Dave Airlie
The driver gets the bridge device in a number of places, upcoming vga arb code paths need the bridge device, however they need it in under a lock, and the pci lookup can allocate memory. So clean this code up before then and get the bridge once for the driver lifetime. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-08drm/radeon/kms: lower debugging on dpms events.Dave Airlie
Lower the debugging on encoders when getting DPMS events. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-08drm/kms/radeon: make kms default a runtime optionDave Airlie
This makes the kms/enable disable a runtime not a build time option. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-08drm/kms: fix kms helper license + KconfigDave Airlie
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>
2009-09-08drm/radeon/kms: add r600 KMS supportJerome Glisse
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>
2009-09-08drm/radeon/kms: add initial radeon tv-out support.Dave Airlie
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>
2009-09-08drm/radeon/kms: add rn50/r100/r200 CS tracker.Dave Airlie
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>
2009-09-07Merge branch 'drm-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm/radeon/kms: add LTE/GTE discard + rv515 two sided stencil register.
2009-09-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: gianfar: Fix build.
2009-09-07Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6: pcmcia: add CNF-CDROM-ID for ide
2009-09-07Merge branch 'for-linus' of ↵Linus Torvalds
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: agp/intel: support for new chip variant of IGDNG mobile drm/i915: Unref old_obj on get_fence_reg() error path drm/i915: increase default latency constant (v2 w/comment)
2009-09-07Merge intel drm-intel-next branchDave Airlie
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
2009-09-07drm/kms: remove old std mode fallback code.Dave Airlie
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>
2009-09-07drm/kms/i915: Add the default mode for CRT output without EDIDykzhao
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>
2009-09-07drm/kms: add a function that can add the mode for the output device without EDIDZhao Yakui
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>
2009-09-07drm/kms: try to find the std mode in DMT tableZhao Yakui
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>
2009-09-07drm/kms: Add the default mode tableZhao Yakui
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>
2009-09-07drm: split crtc/fb helpers into a separate moduleDave Airlie
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>
2009-09-07drm/radeon/kms: add LTE/GTE discard + rv515 two sided stencil register.Dave Airlie
This adds some rv350+ register for LTE/GTE discard, and enables the rv515 two sided stencil register. It also disables the DEPTHXY_OFFSET register which can be used to workaround the CS checker. Moves rs690 to proper place in rs600 and uses correct table on rs600. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-07drm/radeon/kms: add updated registers from drm-fixes.Dave Airlie
Fixes up the DISCARD + 2 sided stencil in the new generator scripts. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-07drm/radeon/kms: block depthxy offset from use from userspace.Dave Airlie
This could be used to bypass CS checks. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-06drm/i915: Put the idle reclocking work on our private workqueue as well.Eric Anholt
Fixes (again) whole-system lockups due to GPU lockups. Signed-off-by: Eric Anholt <eric@anholt.net>