Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2188679ybm; Thu, 23 May 2019 12:49:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzO/m81jr57b0Ms9k+n73AdHA1cLQ8IOkOZLwnloO9X+GHGigBb5gCAZ3TT7wbsPI7JC3Mx X-Received: by 2002:a63:eb55:: with SMTP id b21mr71006507pgk.67.1558640993287; Thu, 23 May 2019 12:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558640993; cv=none; d=google.com; s=arc-20160816; b=VfdRKLCkMJ1/Opx29Mx3fwGSjTzRh4u2de+uGKHTNa37iomArUqCQV/+IuNREGSu9g F5kN4z1cAdaJrPets0MtprhPRB1+7Qi6thBT43RjICEKOL3LRE2BviMMTZV4tat/DqkA OtaXU7WI+QqhricEGfjp6+o113JygognLIpZCUMConCS33m+aliU49OAu84JMi4cHPWI pdi9nAUpjNne8VVk+8vw8UQjqW0bp1nagmTm/5yUvzJin4lMb/YhmF8Szp0VVBIMLojk oWIbfq39aQEbyotrCBoAKfBWN7Wl1lkkYhGKm79nVIRhMhEuXazUaSOFSuvFtNLx5Jyq 3NQw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iOewG72n3jdk1Wq6Q6hF24zhS3r46+0DpNRy9Hg/HhA=; b=ob7IRRa9hiOlrGurc4SfEMRGHUW+cmyBk6s+yvU8hziDrlQRczlkg5BzT9VrmvqhS5 P6TScCGsA7I38IWCxfXeTJE4xzlC7mulTCtiinl3B69c49RxpK2hrl/zxhR4+1vSh7WW /uGQZpEisog2r9mRNCVYmPhHiyU0YUMt63JpCCtL2LlBNrKV5O1bEh2iyArw9UHiZ1mQ bn5EYRmQbPtENDoZM4DJOAxPEFgIa/vd8U/cPEZR/r85hw6G6aUZQlLbtqg7jk+JeZqB 6yqcyvTYcIi4MaabHUDXsyMsoLGA1IZTCiMAcv1XCAixCVlItcXSp9Y07SJO9F8mkb6i hSuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z2QFKmtz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si530418pfe.8.2019.05.23.12.49.38; Thu, 23 May 2019 12:49:53 -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=@kernel.org header.s=default header.b=z2QFKmtz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731929AbfEWTMy (ORCPT + 99 others); Thu, 23 May 2019 15:12:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:46668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731801AbfEWTMu (ORCPT ); Thu, 23 May 2019 15:12:50 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2CEC621855; Thu, 23 May 2019 19:12:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558638769; bh=fvZOAFP5AIRVhhIqDeRi4wXWN+GCiBS8EQcBL1t27ak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z2QFKmtzmTWK5M3iCyZ7yBA1UemX6uMAOrJEwABjMWBLZEB+xZ4o9V/npQ2MXB4U/ P2irRN+4J1t1UKN9tvZ8AaeZyoe5cOx7qX7ZjmMI2y4miosKioeH0cmSgW/fQ7lTt8 /UZYi/QDHsUivxUAROMtVkaEusV9q2mXyoUjYjuo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yifeng Li , Sudip Mukherjee , Teddy Wang , Bartlomiej Zolnierkiewicz Subject: [PATCH 4.14 41/77] fbdev: sm712fb: fix brightness control on reboot, dont set SR30 Date: Thu, 23 May 2019 21:05:59 +0200 Message-Id: <20190523181725.844396449@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181719.982121681@linuxfoundation.org> References: <20190523181719.982121681@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yifeng Li commit 5481115e25e42b9215f2619452aa99c95f08492f upstream. 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 Tested-by: Sudip Mukherjee Cc: Teddy Wang Cc: # v4.4+ Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/sm712fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/video/fbdev/sm712fb.c +++ b/drivers/video/fbdev/sm712fb.c @@ -1145,8 +1145,8 @@ static void sm7xx_set_timing(struct smtc /* 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]);