Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2185462ybm; Thu, 23 May 2019 12:46:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBZepk4NXbdmnj9nD1EEv7PQhtfipBBstsDq+VfLk9l46Zsb/6+HGI9V3/74QSTA40Sgye X-Received: by 2002:a62:62c1:: with SMTP id w184mr105047204pfb.95.1558640773941; Thu, 23 May 2019 12:46:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558640773; cv=none; d=google.com; s=arc-20160816; b=OLiN2TMJIP6SMI/WsaJnycXwzkVVRBKX0kZqm4MeS0+Cr09sKnKm8vW0QvK7RX5iwr jrLhT0NVZwuaf05MzHmtLZM1Xc2BsITra4vEsQHDlagtUu2t9xcpoTEVAxikSX7iR5mG pBkY+r5h1B2tUaQSvOa3u71Xbd9m6HCF8fQLRXa53F0/JUaLKUcSLLRlf9yQ+TWhVJWi ekJCzPy217C3115XfEKMybVckl0jVK9x1gYvg9xffoTDeSM+sLbOekS3JNzGiRnjm/YV DHKCx4auIoRyVOKgUpEBA+WlPuLxny5hymqPM0LpoElzoQmIVOWqtpVUb/M6vCkbFCht f8iA== 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=XDdMAoxaFoBr2GV0kQlETYpnbaXDRWAPGMOxCpcQ4x4=; b=Q8e5HuTSe99r2hb5JqxImJSWaqNVHKdUXlAvQY2otuBgvX+isdZ581QEJDaRrwx47T ITk60oS2mafBDw7enVW4ADC9J8tpYd5DCrLkGygJljROKyhfS0W7P/CxMfffpCz9DvuK HL1h+uK43Memb4NZN8AVUNhadO+oJYdGTN1eOARQ9h3FID/mZlMUbu0QMQiKzQqm1dKe u3C6qpGbPSGXf3Nm4uDoMwSGfZMClM724tPPQ4CMXVwm19tSfYxeK9xQv2eoKxMnqNRt hXtT92uAFs73Vd8WDngpM0MKZ5VxAee2egn/eISBiyZzdp6hf5X8PuYTblfqXeUuxbI0 GA2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JbkGZCx4; 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 s8si548147pfe.22.2019.05.23.12.45.59; Thu, 23 May 2019 12:46:13 -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=JbkGZCx4; 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 S2389602AbfEWToK (ORCPT + 99 others); Thu, 23 May 2019 15:44:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:51712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389268AbfEWTQv (ORCPT ); Thu, 23 May 2019 15:16:51 -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 827B82184E; Thu, 23 May 2019 19:16:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558639011; bh=3rxfAX4mLHvVaXl+hX9hwHnq3HJQHQSfrnr68pxQPQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JbkGZCx4GKZwj5mfdZz7T3vKPsoIQrXDTP71rnlkKzayoiDwvh+5NFHHvtUT3LHBv /G4bjZgS2nsvErfXrCesqO0AkGSK93BnyB2FSESDqE1wMIsEZD7wr56gTpeoD4nv6e PDaYYiJYM9CJNho4EsvDq7ZhGJpYPTn+QocNObUQ= 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.19 063/114] fbdev: sm712fb: fix VRAM detection, dont set SR70/71/74/75 Date: Thu, 23 May 2019 21:06:02 +0200 Message-Id: <20190523181737.301482231@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181731.372074275@linuxfoundation.org> References: <20190523181731.372074275@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 dcf9070595e100942c539e229dde4770aaeaa4e9 upstream. On a Thinkpad s30 (Pentium III / i440MX, Lynx3DM), the amount of Video RAM is not detected correctly by the xf86-video-siliconmotion driver. This is because sm712fb overwrites the GPR71 Scratch Pad Register, which is set by BIOS on x86 and used to indicate amount of VRAM. Other Scratch Pad Registers, including GPR70/74/75, don't have the same side-effect, but overwriting to them is still questionable, as they are not related to modesetting. Stop writing to SR70/71/74/75 (a.k.a GPR70/71/74/75). 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, 3 insertions(+), 1 deletion(-) --- a/drivers/video/fbdev/sm712fb.c +++ b/drivers/video/fbdev/sm712fb.c @@ -1146,7 +1146,9 @@ static void sm7xx_set_timing(struct smtc /* init SEQ register SR30 - SR75 */ for (i = 0; i < SIZE_SR30_SR75; i++) if ((i + 0x30) != 0x30 && (i + 0x30) != 0x62 && - (i + 0x30) != 0x6a && (i + 0x30) != 0x6b) + (i + 0x30) != 0x6a && (i + 0x30) != 0x6b && + (i + 0x30) != 0x70 && (i + 0x30) != 0x71 && + (i + 0x30) != 0x74 && (i + 0x30) != 0x75) smtc_seqw(i + 0x30, vgamode[j].init_sr30_sr75[i]);