From 98aa8fa7364ee67a7627ccd0c27b24601a67230e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 1 Jun 2012 17:04:49 +0800 Subject: [PATCH] 3.0-stable patches added patches: drm-i915-properly-handle-interlaced-bit-for-sdvo-dtd-conversion.patch drm-i915-wait-for-a-vblank-to-pass-after-tv-detect.patch drm-radeon-fix-xfx-quirk.patch --- ...terlaced-bit-for-sdvo-dtd-conversion.patch | 73 +++++++++++++++++++ ...for-a-vblank-to-pass-after-tv-detect.patch | 64 ++++++++++++++++ queue-3.0/drm-radeon-fix-xfx-quirk.patch | 38 ++++++++++ queue-3.0/series | 3 + 4 files changed, 178 insertions(+) create mode 100644 queue-3.0/drm-i915-properly-handle-interlaced-bit-for-sdvo-dtd-conversion.patch create mode 100644 queue-3.0/drm-i915-wait-for-a-vblank-to-pass-after-tv-detect.patch create mode 100644 queue-3.0/drm-radeon-fix-xfx-quirk.patch diff --git a/queue-3.0/drm-i915-properly-handle-interlaced-bit-for-sdvo-dtd-conversion.patch b/queue-3.0/drm-i915-properly-handle-interlaced-bit-for-sdvo-dtd-conversion.patch new file mode 100644 index 00000000000..ccb5138c71b --- /dev/null +++ b/queue-3.0/drm-i915-properly-handle-interlaced-bit-for-sdvo-dtd-conversion.patch @@ -0,0 +1,73 @@ +From 59d92bfa5f0cdf57f82f5181b0ad6af75c3fdf41 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Sat, 12 May 2012 22:22:58 +0200 +Subject: drm/i915: properly handle interlaced bit for sdvo dtd conversion + +From: Daniel Vetter + +commit 59d92bfa5f0cdf57f82f5181b0ad6af75c3fdf41 upstream. + +We've simply ignored this, which isn't too great. With this, interlaced +1080i works on my HDMI screen connected through sdvo. For no apparent +reason anything else still doesn't work as it should. + +While at it, give these magic numbers in the dtd proper names and +add a comment that they match with EDID detailed timings. + +v2: Actually use the right bit for interlaced. + +Tested-by: Peter Ross +Reviewed-by: Paulo Zanoni +Signed-Off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_sdvo.c | 12 ++++++++---- + drivers/gpu/drm/i915/intel_sdvo_regs.h | 5 +++++ + 2 files changed, 13 insertions(+), 4 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_sdvo.c ++++ b/drivers/gpu/drm/i915/intel_sdvo.c +@@ -762,10 +762,12 @@ static void intel_sdvo_get_dtd_from_mode + ((v_sync_len & 0x30) >> 4); + + dtd->part2.dtd_flags = 0x18; ++ if (mode->flags & DRM_MODE_FLAG_INTERLACE) ++ dtd->part2.dtd_flags |= DTD_FLAG_INTERLACE; + if (mode->flags & DRM_MODE_FLAG_PHSYNC) +- dtd->part2.dtd_flags |= 0x2; ++ dtd->part2.dtd_flags |= DTD_FLAG_HSYNC_POSITIVE; + if (mode->flags & DRM_MODE_FLAG_PVSYNC) +- dtd->part2.dtd_flags |= 0x4; ++ dtd->part2.dtd_flags |= DTD_FLAG_VSYNC_POSITIVE; + + dtd->part2.sdvo_flags = 0; + dtd->part2.v_sync_off_high = v_sync_offset & 0xc0; +@@ -799,9 +801,11 @@ static void intel_sdvo_get_mode_from_dtd + mode->clock = dtd->part1.clock * 10; + + mode->flags &= ~(DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC); +- if (dtd->part2.dtd_flags & 0x2) ++ if (dtd->part2.dtd_flags & DTD_FLAG_INTERLACE) ++ mode->flags |= DRM_MODE_FLAG_INTERLACE; ++ if (dtd->part2.dtd_flags & DTD_FLAG_HSYNC_POSITIVE) + mode->flags |= DRM_MODE_FLAG_PHSYNC; +- if (dtd->part2.dtd_flags & 0x4) ++ if (dtd->part2.dtd_flags & DTD_FLAG_VSYNC_POSITIVE) + mode->flags |= DRM_MODE_FLAG_PVSYNC; + } + +--- a/drivers/gpu/drm/i915/intel_sdvo_regs.h ++++ b/drivers/gpu/drm/i915/intel_sdvo_regs.h +@@ -61,6 +61,11 @@ struct intel_sdvo_caps { + u16 output_flags; + } __attribute__((packed)); + ++/* Note: SDVO detailed timing flags match EDID misc flags. */ ++#define DTD_FLAG_HSYNC_POSITIVE (1 << 1) ++#define DTD_FLAG_VSYNC_POSITIVE (1 << 2) ++#define DTD_FLAG_INTERLACE (1 << 7) ++ + /** This matches the EDID DTD structure, more or less */ + struct intel_sdvo_dtd { + struct { diff --git a/queue-3.0/drm-i915-wait-for-a-vblank-to-pass-after-tv-detect.patch b/queue-3.0/drm-i915-wait-for-a-vblank-to-pass-after-tv-detect.patch new file mode 100644 index 00000000000..d2dd770e19b --- /dev/null +++ b/queue-3.0/drm-i915-wait-for-a-vblank-to-pass-after-tv-detect.patch @@ -0,0 +1,64 @@ +From bf2125e2f7e931b50a6c76ba0435ba001409ccbf Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Tue, 22 May 2012 21:41:25 +0200 +Subject: drm/i915: wait for a vblank to pass after tv detect + +From: Daniel Vetter + +commit bf2125e2f7e931b50a6c76ba0435ba001409ccbf upstream. + +Otherwise the hw will get confused and result in a black screen. + +This regression has been most likely introduce in + +commit 974b93315b2213b74a42a87e8a9d4fc8c0dbe90c +Author: Chris Wilson +Date: Sun Sep 5 00:44:20 2010 +0100 + + drm/i915/tv: Poll for DAC state change + +That commit replace the first msleep(20) with a busy-loop, but failed +to keep the 2nd msleep around. Later on we've replaced all these +msleep(20) by proper vblanks. + +For reference also see the commit in xf86-video-intel: + +commit 1142be53eb8d2ee8a9b60ace5d49f0ba27332275 +Author: Jesse Barnes +Date: Mon Jun 9 08:52:59 2008 -0700 + + Fix TV programming: add vblank wait after TV_CTL writes + + Fxies FDO bug #14000; we need to wait for vblank after + writing TV_CTL or following "DPMS on" calls may not actually enable the output. + +v2: As suggested by Chris Wilson, add a small comment to ensure that +no one accidentally removes this vblank wait again - there really +seems to be no sane explanation for why we need it, but it is +required. + +Launchpad: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/763688 +Reported-and-Tested-by: Robert Lowery +Cc: Rodrigo Vivi +Acked-by: Chris Wilson +Signed-Off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_tv.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_tv.c ++++ b/drivers/gpu/drm/i915/intel_tv.c +@@ -1301,6 +1301,11 @@ intel_tv_detect_type (struct intel_tv *i + + I915_WRITE(TV_DAC, save_tv_dac & ~TVDAC_STATE_CHG_EN); + I915_WRITE(TV_CTL, save_tv_ctl); ++ POSTING_READ(TV_CTL); ++ ++ /* For unknown reasons the hw barfs if we don't do this vblank wait. */ ++ intel_wait_for_vblank(intel_tv->base.base.dev, ++ to_intel_crtc(intel_tv->base.base.crtc)->pipe); + + /* Restore interrupt config */ + if (connector->polled & DRM_CONNECTOR_POLL_HPD) { diff --git a/queue-3.0/drm-radeon-fix-xfx-quirk.patch b/queue-3.0/drm-radeon-fix-xfx-quirk.patch new file mode 100644 index 00000000000..f339dc3254a --- /dev/null +++ b/queue-3.0/drm-radeon-fix-xfx-quirk.patch @@ -0,0 +1,38 @@ +From 1ebf169ad4dc68f18cc0dab35163b0f324fc6c41 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 23 May 2012 11:48:59 -0400 +Subject: drm/radeon: fix XFX quirk + +From: Alex Deucher + +commit 1ebf169ad4dc68f18cc0dab35163b0f324fc6c41 upstream. + +Only override the ddc bus if the connector doesn't have +a valid one. The existing code overrode the ddc bus for +all connectors even if it had ddc bus. + +Fixes ddc on another XFX card with the same pci ids that +was broken by the quirk overwriting the correct ddc bus. + +Reported-by: Mehdi Aqadjani Memar +Signed-off-by: Alex Deucher +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_atombios.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/radeon_atombios.c ++++ b/drivers/gpu/drm/radeon/radeon_atombios.c +@@ -480,7 +480,9 @@ static bool radeon_atom_apply_quirks(str + */ + if ((dev->pdev->device == 0x9498) && + (dev->pdev->subsystem_vendor == 0x1682) && +- (dev->pdev->subsystem_device == 0x2452)) { ++ (dev->pdev->subsystem_device == 0x2452) && ++ (i2c_bus->valid == false) && ++ !(supported_device & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT))) { + struct radeon_device *rdev = dev->dev_private; + *i2c_bus = radeon_lookup_i2c_gpio(rdev, 0x93); + } diff --git a/queue-3.0/series b/queue-3.0/series index 6deebfb7fee..07cbd2557df 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -11,3 +11,6 @@ parisc-fix-tlb-fault-path-on-pa2.0-narrow-systems.patch solos-pci-fix-dma-support.patch mac80211-fix-addba-declined-after-suspend-with-wowlan.patch nfsv4-map-nfs4err_share_denied-into-an-eacces-error-instead-of-eio.patch +drm-radeon-fix-xfx-quirk.patch +drm-i915-properly-handle-interlaced-bit-for-sdvo-dtd-conversion.patch +drm-i915-wait-for-a-vblank-to-pass-after-tv-detect.patch -- 2.47.3