summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sdvo.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/i915: Add support for SDVO composite TVZhao Yakui2010-01-291-0/+8
| | | | | Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: try another possible DDC bus for the SDVO device with multiple outputsZhao Yakui2010-01-121-0/+26
| | | | | | | | | | | | There exist multiple DDC buses for the SDVO cards with multiple outputs. When we can't get the EDID by using the select DDC bus, we can try the other possible DDC bus to see whether the EDID can be obtained. https://bugs.freedesktop.org/show_bug.cgi?id=23842 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Tested-by: Sebastien Caty <sebastien.caty@mrnf.gouv.qc.ca> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Read the response after issuing DDC bus switch commandZhao Yakui2010-01-121-4/+53
| | | | | | | | | | | | | | | | | | | | | | For some SDVO cards based on conexant chip, we can't read the EDID if we don't read the response after issuing SDVO DDC bus switch command. From the SDVO spec once when another I2C transaction is finished after completing the I2C transaction of issuing the bus switch command, it will be switched back to the SDVO internal state again. So we can't initiate a new I2C transaction to read the response after issuing the DDC bus switch command. Instead we should issue DDC bus switch command and read the response in the same I2C transaction. https://bugs.freedesktop.org/show_bug.cgi?id=23842 https://bugs.freedesktop.org/show_bug.cgi?id=24458 https://bugs.freedesktop.org/show_bug.cgi?id=24522 https://bugs.freedesktop.org/show_bug.cgi?id=24282 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Tested-by: Sebastien Caty <sebastien.caty@mrnf.gouv.qc.ca> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: only enable hotplug for detected outputsJesse Barnes2009-12-161-0/+3
| | | | | | | | | | | | This patch changes around our hotplug enable code a bit to only enable it for ports we actually detect and initialize. This prevents problems with stuck or spurious interrupts on outputs that aren't actually wired up, and is generally more correct. Fixes FDO bug #23183. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
* Merge branch 'drm-linus' of ↵Linus Torvalds2009-12-101-10/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (189 commits) drm/radeon/kms: fix warning about cur_placement being uninitialised. drm/ttm: Print debug information on memory manager when eviction fails drm: Add memory manager debug function drm/radeon/kms: restore surface registers on resume. drm/radeon/kms/r600/r700: fallback gracefully on ucode failure drm/ttm: Initialize eviction placement in case the driver callback doesn't drm/radeon/kms: cleanup structure and module if initialization fails drm/radeon/kms: actualy set the eviction placements we choose drm/radeon/kms: Fix NULL ptr dereference drm/radeon/kms/avivo: add support for new pll selection algo drm/radeon/kms/avivo: fix some bugs in the display bandwidth setup drm/radeon/kms: fix return value from fence function. drm/radeon: Remove tests for -ERESTART from the TTM code. drm/ttm: Have the TTM code return -ERESTARTSYS instead of -ERESTART. drm/radeon/kms: Convert radeon to new TTM validation API (V2) drm/ttm: Rework validation & memory space allocation (V3) drm: Add search/get functions to get a block in a specific range drm/radeon/kms: fix avivo tiling regression since radeon object rework drm/i915: Remove a debugging printk from hangcheck drm/radeon/kms: make sure i2c id matches ...
| * drm/i915: Add 30ms delay to make SDVO TV detection reliable.Zhao Yakui2009-12-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Without this, on some boots the TV wouldn't be detected. Testing showed 15ms to be insufficient. https://bugs.freedesktop.org/show_bug.cgi?id=24290 https://bugs.freedesktop.org/show_bug.cgi?id=20785 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Tested-by: Yan Seiner <yan@seiner.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Enable the SDVO debug code, which is now under DEBUG_KMS.Eric Anholt2009-11-051-10/+0
| | | | | | | | Signed-off-by: Eric Anholt <eric@anholt.net>
* | tree-wide: fix assorted typos all over the placeAndré Goddard Rosa2009-12-041-1/+1
|/ | | | | | | | | | That is "success", "unknown", "through", "performance", "[re|un]mapping" , "access", "default", "reasonable", "[con]currently", "temperature" , "channel", "[un]used", "application", "example","hierarchy", "therefore" , "[over|under]flow", "contiguous", "threshold", "enough" and others. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* drm/i915: Add the missing clone_mask for SDVO-VGA(RGB1)Zhao Yakui2009-09-101-0/+2
| | | | | | | 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>
* drm/i915: Add the brightness property for SDVO-LVDSZhao Yakui2009-09-101-6/+8
| | | | | | | | | | 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>
* drm/i915: Add the enhancement property for SDVO-TVZhao Yakui2009-09-101-5/+495
| | | | | | | | | | | | | | | | | | 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>
* Merge intel drm-intel-next branchDave Airlie2009-09-071-69/+238
|\ | | | | | | | | | | | | | | | | 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: 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: 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: Set crtc/clone mask in different output devicesMa Ling2009-08-241-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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>
* | Merge Linus master to drm-nextDave Airlie2009-08-201-81/+171
|\ \ | |/ | | | | | | | | | | | | | | | | | | linux-next conflict reported needed resolution. Conflicts: drivers/gpu/drm/drm_crtc.c drivers/gpu/drm/drm_edid.c drivers/gpu/drm/i915/intel_sdvo.c drivers/gpu/drm/radeon/radeon_ttm.c drivers/gpu/drm/ttm/ttm_bo.c
| * drm/i915: Return disconnected for SDVO DVI when there's no digital EDID.ling.ma@intel.com2009-07-301-6/+21
| | | | | | | | | | | | | | | | | | The patch fixed a bug on MP965-D. When VGA is connected to a DVI-I connector, it incorrectly shows sdvo dvi as connected. Signed-off-by: Ma Ling <ling.ma@intel.com> [anholt: hand-resolved against previous commit and fixed up commit message] Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Choose real sdvo output according to result from detectionling.ma@intel.com2009-07-291-78/+153
| | | | | | | | | | | | | | | | | | | | Baed on Eric's idea in order to handle multiple sdvo encoders we implement another approach to dynamically chose real one encoder after detection, which is contrasted with patch - drm/i915:Construct all possible sdvo outputs for sdvo encoder. Signed-off-by: Ma Ling <ling.ma@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* | drm: Remove the unused prefix in DRM_DEBUG_KMS/DRIVER/MODEZhao Yakui2009-08-041-19/+16
|/ | | | | | | | | | | We will have to add a prefix when using the macro defintion of DRM_DEBUG_KMS /DRM_DEBUG_DRIVER/MODE. It is not convenient. We should use the DRM_NAME as default prefix. So remove the prefix in the macro definition of DRM_DEBUG_KMS/DRIVER/MODE. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/i915: enable sdvo lvds scaling function.ling.ma@intel.com2009-07-011-12/+102
| | | | | | | | | | | | | | | Currently we implemented basic sdvo lvds function, But except for sdvo lvds fixed mode, we can not switch to other modes, otherwise display get black. The patch handle three operations to enable sdvo lvds. At first duplicate sdvo fixed mode for adjustment, then according to fixed mode line valid all modes, at last adjust input mode to fit our requirement. Acked by Li Peng <peng.li@linux.intel.com> Signed-off-by: Ma Ling <ling.ma@intel.com> Reviewed-by: Ian Romanick <idr@freedesktop.org> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Clean up SDVO i2c handlingKeith Packard2009-06-181-33/+21
| | | | | | | | Eliminate the copy of i2c_bus in sdvo_priv. Eliminate local copies of i2c_bus and ddcbus. Eliminate unused settings of slave_addr. Signed-off-by: Keith Packard <keithp@keithp.com>
* drm/i915: Change I2C api to pass around i2c_adaptersKeith Packard2009-06-181-26/+26
| | | | | | | | | | | | The existing API passed around intel_i2c_chan pointers, which are dependent on the i2c bit-banging algo. This precluded the driver from using outputs which use a different algo. Switching to the more general i2c_adpater allows the driver to support non bit-banging DDC. This also required moving the slave address into the output private structures. Signed-off-by: Keith Packard <keithp@keithp.com>
* Merge branch 'drm-linus' of ↵Linus Torvalds2009-06-121-35/+75
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: (50 commits) drm: include kernel list header file in hashtab header drm: Export hash table functionality. drm: Split out the mm declarations in a separate header. Add atomic operations. drm/radeon: add support for RV790. drm/radeon: add rv740 drm support. drm_calloc_large: check right size, check integer overflow, use GFP_ZERO drm: Eliminate magic I2C frobbing when reading EDID drm/i915: duplicate desired mode for use by fbcon. drm/via: vfree() no need checking before calling it drm: Replace DRM_DEBUG with DRM_DEBUG_DRIVER in i915 driver drm: Replace DRM_DEBUG with DRM_DEBUG_MODE in drm_mode drm/i915: Replace DRM_DEBUG with DRM_DEBUG_KMS in intel_sdvo drm/i915: replace DRM_DEBUG with DRM_DEBUG_KMS in intel_lvds drm: add separate drm debugging levels radeon: remove _DRM_DRIVER from the preadded sarea map drm: don't associate _DRM_DRIVER maps with a master drm: simplify kcalloc() call to kzalloc(). intelfb: fix spelling of "CLOCK" drm: fix LOCK_TEST_WITH_RETURN macro drm/i915: Hook connector to encoder during load detection (fixes tv/vga detect) ...
| * drm/i915: Replace DRM_DEBUG with DRM_DEBUG_KMS in intel_sdvoyakui_zhao2009-06-111-32/+35
| | | | | | | | | | | | | | | | Use the DRM_DEBUG_KMS/DEBUG_LOG_KMS to print the debug info for SDVO device. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/i915: Initialize the SDVO device based on the sdvo info parsed from VBTyakui_zhao2009-06-051-3/+40
| | | | | | | | | | | | | | | | http://bugs.freedesktop.org/show_bug.cgi?id=20429 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> [anholt: Massive cleanup of the slave addr function] Signed-off-by: Eric Anholt <eric@anholt.net>
* | drm: Hook up DPMS property handling in drm_crtc.c. Add ↵Keith Packard2009-06-041-0/+1
|/ | | | | | | | | | | | | | | | | | | | drm_helper_connector_dpms. Making the drm_crtc.c code recognize the DPMS property and invoke the connector->dpms function doesn't remove any capability from the driver while reducing code duplication. That just highlighted the problem with the existing DPMS functions which could turn off the connector, but failed to turn off any relevant crtcs. The new drm_helper_connector_dpms function manages all of that, using the drm_helper-specific crtc and encoder dpms functions, automatically computing the appropriate DPMS level for each object in the system. This fixes the current troubles in the i915 driver which left PLLs, pipes and planes running while in DPMS_OFF mode or even while they were unused. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/i915: Use an I2C algo to do the flip to SDVO DDC bus.Ma Ling2009-05-221-4/+63
| | | | | | | | | | | | | | | Previously, we would set the control bus switch before calls were made to request EDID information over DDC. But recently the DDC code started doing multiple I2C transfers to get the EDID extensions as well. This tripped up SDVO, because the control bus switch is only in effect until the next STOP after a START. By doing our own algo, we can wrap each i2c transaction on the DDC I2C bus with the control bus switch it requires. freedesktop.org bug #21042 Signed-off-by: Ma Ling <ling.ma@intel.com> [anholt: Hand application for conflict, fixed error path] Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Determine type before initialising connectorJonas Bonn2009-05-221-19/+10
| | | | | | | | | | | | | | | | | drm_connector_init sets both the connector type and the connector type_id on the newly initialised connector. As the connector type_id is coupled to the connector type, the connector type cannot simply be modified on an initialised connector. This patch changes the order of operations on intel_sdvo_init so that the type is determined before the connector is intialised. This fixes a bug whereby the name card0-VGA-1 would be allocted to both a CRT and an SDVO connector since the SDVO connector would be initialised with type 'unknown' and hence have its type_id assigned from the wrong pool. Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: Return SDVO LVDS VBT mode if no EDID modes are detected.Ma Ling2009-05-221-0/+41
| | | | | | | | Some new SDVO LVDS hardware doesn't have DDC available, and this should fix the display on it. Signed-off-by: Ma Ling <ling.ma@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/i915: sync hdmi detection by hdmi identifier with 2DMa Ling2009-04-081-2/+20
| | | | | | | | | | | 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 SDVO TV supportZhenyu Wang2009-04-011-52/+88
| | | | | | | | | 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-011-0/+3
| | | | | | | 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: Storage class should be before const qualifierTobias Klauser2009-02-201-1/+1
| | | | | | | | | | | | The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/i915: sync SDVO code with stable userland modesetting driverJesse Barnes2009-02-081-98/+772
| | | | | | | | | Pull in an update from the 2D driver (hopefully the last one, future work should be done here and pulled back into xf86-video-intel as needed). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/i915: Add support for integrated HDMI on G4X hardware.Eric Anholt2009-01-071-4/+4
| | | | | | | | This is ported directly from the userland 2D driver code. The HDMI audio bits aren't hooked up yet. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
* drm/i915: fix sparse warnings: make symbols staticHannes Eder2008-12-291-4/+5
| | | | | | 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: add mode setting supportJesse Barnes2008-12-291-0/+1127
This commit adds i915 driver support for the DRM mode setting APIs. Currently, VGA, LVDS, SDVO DVI & VGA, TV and DVO LVDS outputs are supported. HDMI, DisplayPort and additional SDVO output support will follow. Support for the mode setting code is controlled by the new 'modeset' module option. A new config option, CONFIG_DRM_I915_KMS controls the default behavior, and whether a PCI ID list is built into the module for use by user level module utilities. Note that if mode setting is enabled, user level drivers that access display registers directly or that don't use the kernel graphics memory manager will likely corrupt kernel graphics memory, disrupt output configuration (possibly leading to hangs and/or blank displays), and prevent panic/oops messages from appearing. So use caution when enabling this code; be sure your user level code supports the new interfaces. A new SysRq key, 'g', provides emergency support for switching back to the kernel's framebuffer console; which is useful for testing. Co-authors: Dave Airlie <airlied@linux.ie>, Hong Liu <hong.liu@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud