Emil Velikov
2010-Sep-26 19:26 UTC
[PATCH] Do not use the default pll found in pll table v2.1 on =
nv50+ cards =20 This fixes issues bug 30370 and prevents another possible divide by zero on the original nv50 cards, by returning -ENOENT =20 Signed-off-by: Emil Velikov <eeydev at nottingham.ac.uk> --- drivers/gpu/drm/nouveau/nouveau_bios.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) =20 diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 0b844ea..9bd7099 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c @@ -4890,6 +4890,12 @@ int get_pll_limits(struct drm_device *dev, uint32_t limit_match, struct pll_lims break; } =20 + if ((dev_priv->card_type >=3D NV_50) && (pllindex =3D=3D 0)) { + NV_ERROR(dev, "Register 0x%08x not found in PLL " + "limits table", pll_lim->reg); + return -ENOENT; + } + pll_rec =3D &bios->data[plloffs + recordlen * pllindex]; =20 BIOSLOG(bios, "Loading PLL limits for reg 0x%08x\n", -- 1.7.2.3 This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.=0D=0A=0D=0AThis message has been checked for viruses but the contents of an attachment=0D=0Amay still contain software viruses which could damage your computer system:=0D=0Ayou are advised to perform your own checks. Email communications with the=0D=0AUniversity of Nottingham may be monitored as permitted by UK legislation. ------_=_NextPart_001_01CB5DDD.FA47BBF0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 6.5.7654.12"> <TITLE>[PATCH] Do not use the default pll found in pll table v2.1 on nv50+ cards</TITLE> </HEAD> <BODY> <!-- Converted from text/plain format --> <P><FONT SIZE=3D2><BR> Hi guys,<BR> <BR> Having looked at bug 30370, I believe that this is probably the best solution considering that on nv50 we set PLLs only if they exist in the pll_limits_table<BR> <BR> Please review and comment. Thanks<BR> <BR> --Emil<BR> <BR> <BR>