From patchwork Sun Jul 31 10:04:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stanley X-Patchwork-Id: 1023772 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6VA4sUV013757 for ; Sun, 31 Jul 2011 10:04:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752811Ab1GaKEy (ORCPT ); Sun, 31 Jul 2011 06:04:54 -0400 Received: from nm2-vm0.access.bullet.mail.mud.yahoo.com ([66.94.237.66]:41921 "HELO nm2-vm0.access.bullet.mail.mud.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752775Ab1GaKEx (ORCPT ); Sun, 31 Jul 2011 06:04:53 -0400 Received: from [66.94.237.198] by nm2.access.bullet.mail.mud.yahoo.com with NNFMP; 31 Jul 2011 10:04:52 -0000 Received: from [66.94.237.120] by tm9.access.bullet.mail.mud.yahoo.com with NNFMP; 31 Jul 2011 10:04:52 -0000 Received: from [127.0.0.1] by omp1025.access.mail.mud.yahoo.com with NNFMP; 31 Jul 2011 10:04:52 -0000 X-Yahoo-Newman-Id: 823666.57194.bm@omp1025.access.mail.mud.yahoo.com Received: (qmail 14028 invoked from network); 31 Jul 2011 10:04:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1312106692; bh=sVQs7nAp1Dj1vsHNQsoAkzs8NM+FAl7f1TBD9kiAjUU=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:Content-Type; b=i/JNObNLBKRTWh+6LRJTl1wrvX5orHNCmZX4On0acYi18xJv1fWd0I5QQCDrFgMhFNIAktU8Svk2CFCrZuY0zagF6nuT29yE0Fy0sqs8JbkunDqiKEiT5lkz44Unpa8AiogkCelpwpYikcAfAFmqU26dCdkVDhl6MO9AGXwyWck= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: IsCi6.4VM1mK3y4AK76BUVbDleGAdKDZhUm9AaGgWd6MRJl Lh15B9h09eqdc0E4Hx1TPXswfYFMzpI0QreflNjdxmw6P5N6I30jyGAjqOJD ZdhXSPJqpYaNjqs1Qe0lq6.ZwEWlAQU60a1CGtvxA6_37a8Px.SIO0d1dKcq 9PLqJo548RK.pLvzjfTKPAM0uvlf0rgljkf.blA5nrO4BS04GgANbA56XAUh qaA.uhFiHvbl7w4ex_wrSnC30XRufd66FLFp7WI7DHPPD5Egwl.2XGQQEAAl 9SawGGr3XKUCDYoEyMkuc6VOpdIXqHM37yD9NxyLBzY9kO_Hk3wc- X-Yahoo-SMTP: vMdlIiuswBDCrJd.52t_ytI_iaWTSggVja27tjT2P0U0lhW1 Received: from [192.168.2.9] (jpsinthemix@68.239.107.235 with plain) by smtp101.vzn.mail.bf1.yahoo.com with SMTP; 31 Jul 2011 03:04:52 -0700 PDT Message-ID: <4E3528BF.2020601@verizon.net> Date: Sun, 31 Jul 2011 06:04:47 -0400 From: John Stanley User-Agent: Mozilla/5.0 (X11; Linux i686; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Andrew Morton CC: bugme-daemon@bugzilla.kernel.org, linux-fbdev@vger.kernel.org, adaplas@gmail.com Subject: Patch fixing savagefb driver typo/regression in linux-3.0.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 31 Jul 2011 10:04:55 +0000 (UTC) I have an old T22 Thinkpad with integrated Savage/IX-MV video. As of linux-3.0, the video is non-functional; the PC either hard hangs immediately or has totally garbled video, and then hard hangs, as soon as I attempt to edit a file or cat a file with more than a screen-full of text. The foregoing details are actually not important any more as in looking at the code changes I discovered a typo in linux-3.0.0/drivers/video/savage/savagefb.h and have applied the attached patch to fix the issue. PLEASE NOTE: I realize that the patch does not quite adhere to linux kernel patch coding-style conventions (in particular, spaces around logical operators, and lines not exceeding 80 chars), but I have simply changed an '||' to an '&&' -- and NOT attempted to resolve pre-existing coding-style violations. thanks much, John P.S. Many, many thanks for lifting the 800x600 resolution limit! I've been using a patch/hack to bump the limit to 1024x768 for an very long time... This patch corrects a typo/regression in the savage driver code occurring in going from linux-2.6.39.3 to linux-3.0.0. In linux-2.6.39.3, there were two savage4 variants (S3_SAVAGE4 and S3_PROSAVAGE). Hence, S3_SAVAGE4_SERIES was defined as S3_SAVAGE4 or S3_PROSAVAGE In linux-3.0.0, two additional savage4 variants (S3_TWISTER and S3_PROSAVAGEDDR) have been added. Hence S3_SAVAGE4_SERIES should be defined as S3_SAVAGE4, S3_PROSAVAGE, S3_TWISTER, or S3_PROSAVAGEDDR In going from linux-2.6.39.3 to linux-3.0.0, the define statement for S3_SAVAGE4_SERIES was incompletely modified: the '||' should have been changed to an '&&'; for an '||' will set S3_SAVAGE4_SERIES true for any card. Signed-off-by: John P. Stanley --- linux-3.0.0/drivers/video/savage/savagefb.h.orig 2011-07-21 22:17:23.000000000 -0400 +++ linux-3.0.0/drivers/video/savage/savagefb.h 2011-07-31 05:27:47.314798215 -0400 @@ -55,7 +55,7 @@ #define S3_SAVAGE3D_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE_MX)) -#define S3_SAVAGE4_SERIES(chip) ((chip>=S3_SAVAGE4) || (chip<=S3_PROSAVAGEDDR)) +#define S3_SAVAGE4_SERIES(chip) ((chip>=S3_SAVAGE4) && (chip<=S3_PROSAVAGEDDR)) #define S3_SAVAGE_MOBILE_SERIES(chip) ((chip==S3_SAVAGE_MX) || (chip==S3_SUPERSAVAGE))