summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv04_display.c
diff options
context:
space:
mode:
authorFrancisco Jerez2010-07-24 17:42:20 +0200
committerBen Skeggs2010-07-26 03:43:48 +0200
commitc04c5b1da18ec73eaabc7b8a8757545865426fc2 (patch)
tree74b6e83bb5a39155b94a65e3753266a63368457e /drivers/gpu/drm/nouveau/nv04_display.c
parentdrm/nouveau: Get rid of the remaining VGA CRTC locking. (diff)
downloadkernel-qcow2-linux-c04c5b1da18ec73eaabc7b8a8757545865426fc2.tar.gz
kernel-qcow2-linux-c04c5b1da18ec73eaabc7b8a8757545865426fc2.tar.xz
kernel-qcow2-linux-c04c5b1da18ec73eaabc7b8a8757545865426fc2.zip
drm/nouveau: Fix TV-out detection on unposted cards lacking a usable DCB table.
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv04_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv04_display.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_display.c b/drivers/gpu/drm/nouveau/nv04_display.c
index cd70bd827614..9e28cf772e3c 100644
--- a/drivers/gpu/drm/nouveau/nv04_display.c
+++ b/drivers/gpu/drm/nouveau/nv04_display.c
@@ -78,6 +78,14 @@ nv04_display_store_initial_head_owner(struct drm_device *dev)
int
nv04_display_early_init(struct drm_device *dev)
{
+ /* Make the I2C buses accessible. */
+ if (!nv_gf4_disp_arch(dev)) {
+ uint32_t pmc_enable = nv_rd32(dev, NV03_PMC_ENABLE);
+
+ if (!(pmc_enable & 1))
+ nv_wr32(dev, NV03_PMC_ENABLE, pmc_enable | 1);
+ }
+
/* Unlock the VGA CRTCs. */
NVLockVgaCrtcs(dev, false);