Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp764269imc; Sat, 16 Mar 2019 15:26:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfVWKiGKOLvWLEImR9oXLq6FihzLgFOMDrUTwFObNzNe5xaRDd8ElPufNqoBj5UQqydSlX X-Received: by 2002:a62:1c94:: with SMTP id c142mr11741554pfc.54.1552775187609; Sat, 16 Mar 2019 15:26:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552775187; cv=none; d=google.com; s=arc-20160816; b=aKPkVznrCU3vK9Rqg7f8iyjIUZqT0xGQJImBIS5DNM1OjogfiVAwbvSgeWSKW7jUwm wQLLuT2GAXUkKRPW7N03LN4DBwbj1Nu+TFG/4cyQpG61OnwzPnoK2yC0ByjcYjRdTWqv IvoHcQeJAZ4LIr0gFWjwPAThdmvIiO6J03dt29oNujikWaCCj9DR45cYnns6xqa37ROl tNLpiLHaF5hyeTG/8kB9JRiIL7aLbsAN2Bv66+/mOw1ZGSkoiGllUdAPxZtziuz6dMyM PQCwN8RMg/RoIEevbMiT9tGCNqYkKk4g32GbLz2WYIkMKJPEud4TNgkuAff3Cb584PnZ ZcRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=V9sLUH1DlWf8oH4GNsFevVnna2a2M4wkRozB7yBqcJM=; b=QIsam0Ef3SMua717PlIwL3hqSBzrOA3aM5+gULXH5oSkeNzxYUBjbaXJco8T7Ic1zp B4cqpAgOuLvvU8UuIathgzZ//bbcJ08pvpx70Crlu/v3mJE2Z/VpzGPo/GNhBHNmGWFq jUassSzFjWyCWSgKARZ9BOrpwrYXiag+mQ6BvZq8y55BuxiC1Ky6JompDJSKEkBe67hh l4vfsl8Zw26X5EDn0UIMZkonzIxxNNylHkLAwAdggkBmyWkJDaVsA3+NsL2PBVp3dY9D tR1N3xUMzE4uloH7vvy59BnZPxlfXsmATbPCEebvnj2vYnIHR9dscrm1JsLWb8qEZO1e SILw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tomli.me header.s=1490979754 header.b=kFdLQ9pC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tomli.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13si5085859pgv.157.2019.03.16.15.26.12; Sat, 16 Mar 2019 15:26:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@tomli.me header.s=1490979754 header.b=kFdLQ9pC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tomli.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727141AbfCPWZ3 (ORCPT + 99 others); Sat, 16 Mar 2019 18:25:29 -0400 Received: from tomli.me ([153.92.126.73]:56126 "EHLO tomli.me" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbfCPWZ2 (ORCPT ); Sat, 16 Mar 2019 18:25:28 -0400 Received: from tomli.me (localhost [127.0.0.1]) by tomli.me (OpenSMTPD) with ESMTP id 5a6ff48d; Sat, 16 Mar 2019 22:25:25 +0000 (UTC) X-HELO: localhost.lan Authentication-Results: tomli.me; auth=pass (login) smtp.auth=tomli Received: from Unknown (HELO localhost.lan) (2402:f000:1:1501:200:5efe:6fc7:8b2c) by tomli.me (qpsmtpd/0.95) with ESMTPSA (DHE-RSA-CHACHA20-POLY1305 encrypted); Sat, 16 Mar 2019 22:25:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tomli.me; h=from:to:cc:subject:date:message-id:in-reply-to:references:mime-version:content-transfer-encoding; s=1490979754; bh=J3Zu68lei65LuVr4EvjuobGl91PV3ls+f1YA92lZbMs=; b=kFdLQ9pChcJkummX5GBbjYrO8y6dStSzfSNvFKjsToqLUV05PYfvimcDkm5ZcEWh5r2qoL7L5yUZvznLlxzIf21C3VMKxNRNw6L8vVGCQhXV2XAp9j19TRliIMbti1HiXLqYV/qZHE+7tZnBZP9ecREDHgKb3Bk32eORtguYonDNBMgdb8EMllBRQ8TWmbfUtxa4DKZOUPSYr6x13xfcfnZAB5hBRWeQpjWCTOOeL/O53lpKPM0Dw/t3vUP88ojoB+1D4ZMKaqqta1QynUmarl3ujJijODjLMd2ME4PswySN7GvPNvNXUHhPtppWWGO5A6hipGHl5pwx579yYPFNtA== From: Yifeng Li To: Sudip Mukherjee , Teddy Wang Cc: Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Yifeng Li , stable@vger.kernel.org Subject: [PATCH 2/8] fbdev: sm712fb: fix brightness control on reboot, don't set SR30. Date: Sun, 17 Mar 2019 06:24:58 +0800 Message-Id: <20190316222504.27170-3-tomli@tomli.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190316222504.27170-1-tomli@tomli.me> References: <20190316222504.27170-1-tomli@tomli.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), rebooting with sm712fb framebuffer driver would cause the role of brightness up/down button to swap. Experiments showed the FPR30 register caused this behavior. Moreover, even if this register don't have side-effect on other systems, over- writing it is also highly questionable, since it was originally configurated by the motherboard manufacturer by hardwiring pull-down resistors to indicate the type of LCD panel. We should not mess with it. Stop writing to the SR30 (a.k.a FPR30) register. Signed-off-by: Yifeng Li Cc: stable@vger.kernel.org # v4.4+ --- drivers/video/fbdev/sm712fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c index d05379affa32..a19655babf67 100644 --- a/drivers/video/fbdev/sm712fb.c +++ b/drivers/video/fbdev/sm712fb.c @@ -1145,8 +1145,8 @@ static void sm7xx_set_timing(struct smtcfb_info *sfb) /* init SEQ register SR30 - SR75 */ for (i = 0; i < SIZE_SR30_SR75; i++) - if ((i + 0x30) != 0x62 && (i + 0x30) != 0x6a && - (i + 0x30) != 0x6b) + if ((i + 0x30) != 0x30 && (i + 0x30) != 0x62 && + (i + 0x30) != 0x6a && (i + 0x30) != 0x6b) smtc_seqw(i + 0x30, vgamode[j].init_sr30_sr75[i]); -- 2.20.1