summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_opregion.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/i915: set DIDL using the ACPI video output device _ADR method return.Zhang Rui2010-04-191-4/+50
| | | | | | | | | | | | | | we used to set the DIDL in the output device detected order. But some BIOSes requires it to be initialized in the ACPI device order. e.g. the value of the first field in DIDL stands for the first ACPI video output device in ACPI namespace. Now we initialize the DIDL using the device id, i.e. _ADR return value, of each ACPI video device, if it is not 0. https://bugzilla.kernel.org/show_bug.cgi?id=15054 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Fix product names and #definesAdam Jackson2009-12-071-1/+1
| | | | | | | | | IGD* isn't a useful name. Replace with the codenames, as sourced from pci.ids. Signed-off-by: Adam Jackson <ajax@redhat.com> [anholt: Fixed up for merge with pineview/ironlake changes] Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Add ACPI OpRegion support for IronlakeZhao Yakui2009-11-051-2/+72
| | | | | | | | | | | | | Add the support of ACPI opregion on Ironlake so that the backlight brightness can be adjusted by using ACPI interface >/sys/class/backlight/acpi_video0/brightness Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Tested-by: Zhao Yakui <yakui.zhao@intel.com> [zhenyuw: cleanups, fix typo for checking GSE irq and convert to current irq handling logic.] Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Replace DRM_DEBUG with DRM_DEBUG_DRIVERZhao Yakui2009-11-051-8/+8
| | | | | | | | | | | | Replace the DRM_DEBUG with DRM_DEBUG_DRIVER in generic i915 driver. Then the debug info can be obtained by adding the boot option of "drm.debug=0x02". At the same time the debug info in increase/decrease clock is also printed by using DRM_DEBUG_DRIVER instead of DRM_DEBUG_KMS. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: fix opregion backlight chip detect and rangeLi Peng2009-09-171-5/+17
| | | | | | | | | | | | | | 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>
* ACPI: Add the reference count to avoid unloading ACPI video bus twiceZhao Yakui2009-06-241-1/+1
| | | | | | | | | | | | | | | | | | | Sometimes both acpi video and i915 driver are compiled as modules. And there exists the strict dependency between the two drivers. The acpi video bus will be unloaded in course of unloading the i915 driver. If we unload the acpi video driver, then the kernel oops will be triggered. Add the reference count to avoid unloading the ACPI video bus twice. The reference count should be checked before unregistering the acpi video bus. If the reference count is already zero, it won't unregister it again. And after the acpi video bus is already unregistered, the reference count will be set to zero. http://bugzilla.kernel.org/show_bug.cgi?id=13396 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* drm/i915: Enable ASLE if presentMatthew Garrett2009-04-171-0/+1
| | | | | | | | | The changes to opregion initialisation order meant that the ASLE setup code might not be run at the correct time. Ensure that the interrupts are set up. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Unregister ACPI video driver when exitingMatthew Garrett2009-04-171-1/+4
| | | | | | | | | The i915 DRM triggers registration of the ACPI video driver on load. It should unregister it at unload in order to avoid generating backtraces on being reloaded. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Register ACPI video even when not modesettingMatthew Garrett2009-04-171-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. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* ACPI: Populate DIDL before registering ACPI video device on IntelMatthew Garrett2009-03-281-1/+64
| | | | | | | | | | | | | | Intel graphics hardware that implements the ACPI IGD OpRegion spec requires that the list of display devices be populated before any ACPI video methods are called. Detect when this is the case and defer registration until the opregion code calls it. Fixes crashes on HP laptops. http://bugzilla.kernel.org/show_bug.cgi?id=11259 Signed-off-by: Matthew Garrett <mjg@redhat.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Len Brown <len.brown@intel.com>
* drm/i915: fix sparse warnings: make symbols staticHannes Eder2008-12-291-2/+2
| | | | | | Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/i915: Manage PIPESTAT to control vblank interrupts instead of IMR.Keith Packard2008-11-251-10/+8Star
| | | | | | | | | | | | | | The pipestat fields affect reporting of all vblank-related interrupts, so we have to reset them during the irq_handler, and while enabling vblank interrupts. Otherwise, if a pipe status field had been set to non-zero before enabling reporting, we would never see an interrupt again. This patch adds i915_enable_pipestat and i915_disable_pipestat to abstract out the steps needed to change the reported interrupts. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Add Intel ACPI IGD OpRegion supportMatthew Garrett2008-10-171-0/+371
This adds the support necessary for allowing ACPI backlight control to work on some newer Intel-based graphics systems. Tested on Thinkpad T61 and HP 2510p hardware. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>