aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_connectors.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-05-19Merge remote branch 'anholt/drm-intel-next' into drm-nextDave Airlie1-0/+2
* anholt/drm-intel-next: (515 commits) drm/i915: Fix out of tree builds drm/i915: move fence lru to struct drm_i915_fence_reg drm/i915: don't allow tiling changes on pinned buffers v2 drm/i915: Be extra careful about A/D matching for multifunction SDVO drm/i915: Fix DDC bus selection for multifunction SDVO drm/i915: cleanup mode setting before unmapping registers drm/i915: Make fbc control wrapper functions drm/i915: Wait for the GPU whilst shrinking, if truly desperate. drm/i915: Use spatio-temporal dithering on PCH [MTD] Remove zero-length files mtdbdi.c and internal.ho pata_pcmcia / ide-cs: Fix bad hashes for Transcend and kingston IDs libata: Fix several inaccuracies in developer's guide slub: Fix bad boundary check in init_kmem_cache_nodes() raid6: fix recovery performance regression KEYS: call_sbin_request_key() must write lock keyrings before modifying them KEYS: Use RCU dereference wrappers in keyring key type code KEYS: find_keyring_by_name() can gain access to a freed keyring ALSA: hda: Fix 0 dB for Packard Bell models using Conexant CX20549 (Venice) ALSA: hda - Add quirk for Dell Inspiron 19T using a Conexant CX20582 ALSA: take tu->qlock with irqs disabled ...
2010-05-18drm/fbdev: rework output polling to be back in the core. (v4)Dave Airlie1-0/+13
After thinking it over a lot it made more sense for the core to deal with the output polling especially so it can notify X. v2: drop plans for fake connector - per Michel's comments - fix X patch sent to xorg-devel, add intel polled/hpd setting, add initial nouveau polled/hpd settings. v3: add config lock take inside polling, add intel/nouveau poll init/fini calls v4: config lock was a bit agressive, only needed around connector list reading. otherwise it could re-enter. glisse: discard drm_helper_hpd_irq_event v3: Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-05-10Merge remote branch 'origin/master' into drm-intel-nextEric Anholt1-0/+2
Conflicts: drivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/radeon/r300.c The BSD ringbuffer support that is landing in this branch significantly conflicts with the Ironlake PIPE_CONTROL fix on master, and requires it to be tested successfully anyway.
2010-05-05drm/radeon/kms/legacy: only enable load detection property on DVI-IAlex Deucher1-0/+2
DVI-D doesn't have analog. This matches the avivo behavior. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-20Merge branch 'drm-fbdev-cleanup' into drm-core-nextDave Airlie1-38/+12
* drm-fbdev-cleanup: drm/fb: remove drm_fb_helper_setcolreg drm/kms/fb: use slow work mechanism for normal hotplug also. drm/kms/fb: add polling support for when nothing is connected. drm/kms/fb: provide a 1024x768 fbcon if no outputs found. drm/kms/fb: separate fbdev connector list from core drm connectors drm/kms/fb: move to using fb helper crtc grouping instead of core crtc list drm/fb: fix fbdev object model + cleanup properly. Conflicts: drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/nouveau/nouveau_drv.h
2010-04-19drm/radeon/kms: fix tv dac conflict resolverAlex Deucher1-0/+5
On systems with the tv dac shared between DVI and TV, we can only use the dac for one of the connectors. However, when using a digital monitor on the DVI port, you can use the dac for the TV connector just fine. Check the use_digital status when resolving the conflict. Fixes fdo bug 27649, possibly others. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-12drm/radeon/kms: only change mode when coherent value changes.Dave Airlie1-2/+6
On X startup we were getting a flicker where there shouldn't have been one. the X DDX calls the kernel to set the properties to the same values (yes it could be smarter), however the kernel was doing a pointless modeset then, making my nice smooth boot ugly. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-07drm/kms/fb: separate fbdev connector list from core drm connectorsDave Airlie1-38/+12
This breaks the connection between the core drm connector list and the fbdev connector usage, and allows them to become disjoint in the future. It also removes the untype void* that was in the connector struct to support this. All connectors are added to the fbdev now but this could be changed in the future. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-04-06drm/radeon/kms: fix washed out image on legacy tv dacAlex Deucher1-1/+1
bad cast was overwriting the tvdac adj values Fixes fdo bug 27478 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-03-31drm/radeon/kms: use new pre/post_xfer i2c bit algo hooksAlex Deucher1-1/+1
This allows us to remove the internal bit algo bus used by the radeon i2c algo. We now register a radeon algo adapter if the gpio line is hw capable and the hw inplementation is available, otherwise we register a bit algo adapter. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-26Merge remote branch 'korg/drm-radeon-testing' into drm-next-stageDave Airlie1-17/+3
* korg/drm-radeon-testing: (62 commits) drm/radeon/kms: update new pll algo drm/radeon/kms: add support for square microtiles on r3xx-r5xx drm/radeon/kms: force pinning buffer into visible VRAM drm/radeon/kms/evergreen: fix typo in cursor code drm/radeon/kms: implement reading active PCIE lanes on R600+ drm/radeon/kms: for downclocking non-mobility check PERFORMANCE state drm/radeon/kms: simplify storing current and requested PM mode drm/radeon: fixes for r6xx/r7xx gfx init drm/radeon/rv740: fix backend setup drm/radeon/kms: fix R3XX/R4XX memory controller initialization [rfc] drm/radeon/kms: pm debugging check for vbl. drm/radeon: Fix memory allocation failures in the preKMS command stream checking. drm: Add generic multipart buffer. drm/radeon/kms: simplify memory controller setup V2 drm/radeon: Add asic hook for dma copy to r200 cards. drm/radeon/kms: Create asic structure for r300 pcie cards. drm/radeon/kms: remove unused r600_gart_clear_page drm/radeon/kms: remove HDP flushes from fence emit (v2) drm/radeon/kms: add LVDS pll quirk for Dell Studio 15 drm/radeon/kms: simplify picking power state ... Conflicts: drivers/gpu/drm/radeon/atom.c drivers/gpu/drm/radeon/atombios.h drivers/gpu/drm/radeon/atombios_dp.c drivers/gpu/drm/radeon/r600.c drivers/gpu/drm/radeon/r600_audio.c drivers/gpu/drm/radeon/r600_cp.c drivers/gpu/drm/radeon/radeon.h drivers/gpu/drm/radeon/radeon_connectors.c drivers/gpu/drm/radeon/radeon_ring.c drivers/gpu/drm/radeon/rv770.c
2010-02-20drm/radeon/kms: fix shared ddc detectionAlex Deucher1-3/+2
Just compare the i2c id since the i2c structs may be slighly different. Fixes fdo bug 26616. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-09drm/radeon/kms: don't crash if no DDC bus on VGA/DVI connector.Dave Airlie1-8/+12
This is strange - like really really strange, twilight zone of strange. VGA ports have DDC buses, but sometimes for some reasons the BIOS says we don't and we oops - AMD mentioned bios bugs so we'll have to add quirks. reported on irc by nirbheek and https://bugzilla.redhat.com/show_bug.cgi?id=554323 Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-05drm/radeon/kms: add radeon i2c algoAlex Deucher1-13/+1
Currently just a wrapper around bit algo Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-02-05drm/radeon/kms: make initial state of load detect property correct.Dave Airlie1-1/+1
this was incorrect on my rs480. Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-13drm/radeon/kms/rv100: reject modes > 135 Mhz on DVI (v2)Alex Deucher1-0/+8
Due to heat issues. Fixes fdo bug 25992 v2: fix typo noticed by Maarten Maathuis Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-08drm/radeon/kms: add support for eDP (embedded DisplayPort)Alex Deucher1-6/+17
This is displayport used for internal connections such as laptop panels and systems with integrated monitors. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-07drm/radeon/radeon_connectors.c: add a NULL test before dereferenceDarren Jenkins1-1/+1
The encoder variable can be NULL in this function so I believe it should be checked before dereference. Coverity CID: 13253 [airlied: extremely unlikely to happen] Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-23drm/radeon/kms: add cvt mode if we only have lvds w/h and no edid (v4)Alex Deucher1-0/+12
This fixes LVDS on some mac laptops without a panel edid. v2 - Set proper mode type flags v3 - Note that this is not neceesarily the exact panel mode, but an approximation based on the cvt formula. For these systems we should ideally read the mode info out of the registers or add a mode table, but this works and is much simpler. v4 - Update comments and debug message. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-23drm/radeon/kms: set proper default tv standardAlex Deucher1-2/+2
we were just using 1 before. reported on irc by soreau Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-09drm/radeon/kms: connector fixesAlex Deucher1-7/+13
- Don't add dac load detection property to DVI-D - Make sure i2c info is valid before adding DP aux chan bus - Don't create scaling_mode_property twice - fix typo that prevented coherent and load detection from working - add coherent prop to DP (for dp->dvi adapters) Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: enable hpd supportAlex Deucher1-0/+20
This enabled interrupt driven hpd support for all radeon chips. Assuming the hpd pin is wired up correctly, the driver will generate uevents on digital monitor connect and disconnect and retrain DP monitors automatically. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: get HPD info for connectorsAlex Deucher1-2/+6
This populates the connectors with HPD (Hot Plug Detect) information. This will be used in subsequent patches for automatic digital monitor connect/disconnect handling. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: fix DP detectAlex Deucher1-3/+4
only return connected if there is actually a monitor connected. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: free aux channel i2c adapter on destroyAlex Deucher1-1/+18
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: add support for DP modesettingAlex Deucher1-1/+15
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: store sink type in atom dig connectorAlex Deucher1-6/+11
This will be used laster when the encoder and transmitters are set up. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: i2c reorgAlex Deucher1-3/+2
- keep the atom i2c id in the i2c rec - fix gpio regs for GPIO and MDGPIO on pre-avivo chips - track whether the i2c line is hw capable - track whether the i2c line uses the multimedia i2c block Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: DP fixes and cleanup from the ddxAlex Deucher1-1/+1
- dpcp -> dpcd - fix up dig encoder routing - aux transaction table takes delay in 10 usec units Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-08drm/radeon/kms: initial radeon displayport portingDave Airlie1-3/+54
This is enough to retrieve EDID and DPCP. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: add tv standard property to tv connectorsAlex Deucher1-0/+6
Lets user select tv-standard. The property was there, just not hooked up. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: deal with connectors sourced to the same encoderAlex Deucher1-0/+33
Some systems have multiple connectors connected to the same encoder; e.g., DVI and HDMI connected to the same encoder with the same ddc line. Since we expose connectors as xrandr outputs, randr treats them separately which results in it trying to source the same encoder to different crtcs. If we have an HDMI and DVI-D port on the same encoder, pick the one to be considered connected based on the edid (HDMI if edid indicates HDMI, DVI otherwise). Should fix fdo bug 25150 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-02drm/radeon/kms: dont't pass a radeon_connector to radeon_i2c_do_lock()Alex Deucher1-10/+10
We need this for supporting things other than ddc on i2c. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-24drm/radeon/kms: Report vga connector is connected according to ddc_probeJerome Glisse1-4/+5
On broken EDID we were reporting vga connector to be disconnected even if ddc probe did found a monitor. This patch report that the connector is connected on such case. This allow drm to add a fail safe mode (800x600 at the time of this patch) thus user can boot and later add a mode which match its monitor capabilities. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-24drm/radeon/kms: Disable TV load detect on RS400,RC410,RS480Jerome Glisse1-0/+7
RS400,RC410,RS480 chipset seems to report a lot of false positive with load detect on TV output. We haven't yet found a way to make load detect reliable on those chipset, thus just disable it for TV output. Would avoid user to experience phantom screen because X believe there is a monitor connected to the TV output. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-06drm/radeon/kms: initial mode validation supportAlex Deucher1-1/+47
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-11-06drm/radeon/kms: store detailed connector infoAlex Deucher1-2/+6
This will be useful for mode validation and certain atom tables. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-16drm/radeon/kms: limit default tv modes to <= 1024x768Alex Deucher1-0/+5
fixes fdo bug 24496 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-16drm/radeon/kms: fix connector edid handlingAlex Deucher1-14/+61
Based partly on a patch from Christian Koenig <deathsimple@vodafone.de> - fix several memory leaks in radeon_connector->edid handling - store edid in radeon_connector->edid in detect() or get_modes() - switch hdmi detect code to use radeon_connector->edid - add support for oem boards multiple connectors that share a ddc line. - short circuit lvds_detect() if have a stored edid Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-13drm/radeon/kms: properly handle mode id with native mode changesAlex Deucher1-2/+1
drm modes are objects with indentifiers. Make sure to preserve the mode id when copying mode params. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-12drm/radeon/kms: also check for edid in lvds detectAlex Deucher1-1/+12
In case the system has bad native mode info but valid edid. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-12drm/radeon/kms: use drm_mode directly for panel modesAlex Deucher1-36/+19
This reduces the number of mode format conversions needed and makes native panel mode support cleaner. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-12drm/radeon/kms: make sure LVDS panel is valid in detect()Alex Deucher1-1/+13
If the panel data is bogus this can lead to problems later when the hardware trys to set the mode. If the data is invalid, report LVDS as disconnected. Should fix fdo bug 24247. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-28drm/kms: make fb helper work for all drivers.Dave Airlie1-24/+40
This initialises the fb helper with the connector helper, so that the fb cmdline code works for intel as well. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-25drm/kms: start adding command line interface using fb.Dave Airlie1-2/+23
[note this requires an fb patch posted to linux-fbdev-devel already] This uses the normal video= command line option to control the kms output setup at boot time. It is used to override the autodetection done by kms. video= normally takes a framebuffer as the first parameter, in kms it will take a connector name, DVI-I-1, or LVDS-1 etc. If no output connector is specified the mode string will apply to all connectors. The mode specification used will match down the probed modes, and if no mode is found it will add a CVT mode that matches. video=1024x768 - all connectors match a 1024x768 mode or add a CVT on video=VGA-1:1024x768, VGA-1 connector gets mode only. The same strings as used in current fb modedb.c are used, except I've added three more letters, e, D, d, e = enable, D = enable Digital, d = disable, which allow a connector to be forced into a certain state. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-25drm/radeon/kms: enable dac load detection by default.Dave Airlie1-0/+8
when I added the property I forgot to enable it. Thanks to soreau on #radeon for tracking it down. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-18drm/radeon/kms: add initial connector propertiesDave Airlie1-21/+216
This adds: coherent mode: TMDS coherent mode for atom cards. scaling mode: LVDS scaler mode load detect: DAC load detection, DVI-I, VGA, TV tmds pll: legacy TMDS pll selection tv standard: TV standard selection. for later: other TV ones? dvi subconnector selection using std prop [contains fixes pointed out on dri-devel for atom bios mixups by Michel] Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-09-16drm/radeon/kms: Get LVDS native mode details from EDID if necessary.Michel Dänzer1-1/+33
Fixes RMX problems on older Apple laptops which don't have an x86 BIOS ROM. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-16drm/radeon/kms: Only add common modes which fit in both panel dimensions.Michel Dänzer1-2/+4
Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-09-12drm/radeon/kms: add common lvds modes in the ddc caseAlex Deucher1-3/+6
previous patch only handled the non-ddc case. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>