diff mbox

[1/1] drm/nv40: add LVDS table quirk for Dell Latitude D620

Message ID 1270728578-25645-2-git-send-email-apw@canonical.com
State Accepted
Delegated to: Andy Whitcroft
Headers show

Commit Message

Andy Whitcroft April 8, 2010, 12:09 p.m. UTC
From: Ben Skeggs <bskeggs@redhat.com>

Should fix:
 https://bugzilla.redhat.com/show_bug.cgi?id=505132
 https://bugzilla.redhat.com/show_bug.cgi?id=543091
 https://bugzilla.redhat.com/show_bug.cgi?id=530425
 https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-nouveau/
 +bug/539730

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
(cherry picked from commit 8af36117e23bc36c34d0d25484f7b9de021b51bc git://cgit.freedesktop.org/nouveau/linux-2.6)

BugLink: http://bugs.launchpad.net/bugs/539730
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 drivers/gpu/drm/nouveau/nouveau_bios.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

Comments

Stefan Bader April 12, 2010, 2:17 p.m. UTC | #1
Not sure from later discussion what the preferred way to proceed is. But from
the point of view of the patch, it looks ok and restricts itself to a certain
subvendor. If it is tested ok, I would tend to ack it.

Andy Whitcroft wrote:
> From: Ben Skeggs <bskeggs@redhat.com>
> 
> Should fix:
>  https://bugzilla.redhat.com/show_bug.cgi?id=505132
>  https://bugzilla.redhat.com/show_bug.cgi?id=543091
>  https://bugzilla.redhat.com/show_bug.cgi?id=530425
>  https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-nouveau/
>  +bug/539730
> 
> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
> (cherry picked from commit 8af36117e23bc36c34d0d25484f7b9de021b51bc git://cgit.freedesktop.org/nouveau/linux-2.6)
> 
> BugLink: http://bugs.launchpad.net/bugs/539730
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  drivers/gpu/drm/nouveau/nouveau_bios.c |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
> index 0e9cd1d..5480c14 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bios.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
> @@ -3668,6 +3668,21 @@ int nouveau_bios_parse_lvds_table(struct drm_device *dev, int pxclk, bool *dl, b
>  		break;
>  	}
>  
> +	/* Dell Latitude D620 reports a too-high value for the dual-link
> +	 * transition freq, causing us to program the panel incorrectly.
> +	 *
> +	 * It doesn't appear the VBIOS actually uses its transition freq
> +	 * (90000kHz), instead it uses the "Number of LVDS channels" field
> +	 * out of the panel ID structure (http://www.spwg.org/).
> +	 *
> +	 * For the moment, a quirk will do :)
> +	 */
> +	if ((dev->pdev->device == 0x01d7) &&
> +	    (dev->pdev->subsystem_vendor == 0x1028) &&
> +	    (dev->pdev->subsystem_device == 0x01c2)) {
> +		bios->fp.duallink_transition_clk = 80000;
> +	}
> +
>  	/* set dual_link flag for EDID case */
>  	if (pxclk && (chip_version < 0x25 || chip_version > 0x28))
>  		bios->fp.dual_link = (pxclk >= bios->fp.duallink_transition_clk);
diff mbox

Patch

diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index 0e9cd1d..5480c14 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -3668,6 +3668,21 @@  int nouveau_bios_parse_lvds_table(struct drm_device *dev, int pxclk, bool *dl, b
 		break;
 	}
 
+	/* Dell Latitude D620 reports a too-high value for the dual-link
+	 * transition freq, causing us to program the panel incorrectly.
+	 *
+	 * It doesn't appear the VBIOS actually uses its transition freq
+	 * (90000kHz), instead it uses the "Number of LVDS channels" field
+	 * out of the panel ID structure (http://www.spwg.org/).
+	 *
+	 * For the moment, a quirk will do :)
+	 */
+	if ((dev->pdev->device == 0x01d7) &&
+	    (dev->pdev->subsystem_vendor == 0x1028) &&
+	    (dev->pdev->subsystem_device == 0x01c2)) {
+		bios->fp.duallink_transition_clk = 80000;
+	}
+
 	/* set dual_link flag for EDID case */
 	if (pxclk && (chip_version < 0x25 || chip_version > 0x28))
 		bios->fp.dual_link = (pxclk >= bios->fp.duallink_transition_clk);