Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2195932pxb; Fri, 25 Mar 2022 12:49:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFuDhBlRNV22nsKXTBIWOZpYorlEiUgZE36mJY8rzF4/jYNRgjVtESZ3Et99t5Eh/KZ8jW X-Received: by 2002:a05:6a00:890:b0:4f6:686e:a8a9 with SMTP id q16-20020a056a00089000b004f6686ea8a9mr11654877pfj.83.1648237798078; Fri, 25 Mar 2022 12:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648237798; cv=none; d=google.com; s=arc-20160816; b=DUCgN8ZinvXNhg6mqs3mBfl7qz1tRo0FqOFGLhmqnxG2ESoQRSjNnoEVcT1BSgn/DI K+GEGwE2syAU1+YyxBehZf52dJUDUM02/Ej7zQ7iMyNKOuM4YvWm6jDhlbjYhhqdKwv4 TX2mcygtrlUi+txWJn3Mq8o++u0MoYqFAdT6DNwBnbz2ZduqhMJNuUq48JlNibLq/6KV U8mCiKblw/FZJ/R6W1mZXADzZbyU6YBZpsBvFHHs1xQy0/nWsEMhAE7uKBdwcC5xawts 3YV64Nv2uA7PdRC7C2sVFYbo1XyyJr0tGpv+SOoyrk7oQ3E/mwVZOnPRG/FE9cWyvTYN q8eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4FXvXsTd5A6oO4IG0CK5/qRS4NhfxrhZoDYFnafU8XU=; b=EJEAtnz50rdBBjxgwE5KdftBd7tlg+tHFJeXzRNnZXzjRHlYdBXxHlOrY/x0RJdhJ2 VO7PreqzcInfpSe8rh2m2mq8XzKpbrjbcFrl9nUx6DJtic7R4JqwPk2Ftgs104FEkdro o/FclSVJD/tBrdqwvhuNqB8ZEhAYmA0pz75PSQsM873Iw0J3nnKmmSJWR0tqMgKChJCl 2p9thesnl5Gyg0GT5kU7xtV+ewwMa+dCfV5GBHxvwvbDicH/6Ype0g05hc3kcIHdFRTc aE24LTBvuFcnM0/vRdSyZPCz5nhwTGm1p4FM+qRSJz/wk1MURx+QZATOtgb0fEBShcAf SWSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pozYbgTm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x8-20020aa78f08000000b004fa3a8dff4fsi3689211pfr.6.2022.03.25.12.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:49:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pozYbgTm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C9E52C5EEA; Fri, 25 Mar 2022 11:39:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359561AbiCYPHI (ORCPT + 99 others); Fri, 25 Mar 2022 11:07:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359547AbiCYPG6 (ORCPT ); Fri, 25 Mar 2022 11:06:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DED14D95E6; Fri, 25 Mar 2022 08:05:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 765D2B828FA; Fri, 25 Mar 2022 15:05:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7741C340E9; Fri, 25 Mar 2022 15:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648220711; bh=2xc4CFqQ1/hCUcNxCRGZh7F9DmYxr9AnKUEZOP7Ashc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pozYbgTm0rU1uckdeaEnQWk40DpiW1zJY/2bPZrACR0OCeilrVvUJOGaUjic1yi+v fvevoNR58aY8wnO7nk9w9stNNlG8LdK6+kMzK8KvFY7foZ3KXLH5NmHtW+xLZpizpN cbAu5+T3ObeDoDaDRJjhaTJ9BoQ4wghHxE3aznf4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oliver Graute , Sudip Mukherjee Subject: [PATCH 4.9 03/14] staging: fbtft: fb_st7789v: reset display before initialization Date: Fri, 25 Mar 2022 16:04:31 +0100 Message-Id: <20220325150415.797537014@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325150415.694544076@linuxfoundation.org> References: <20220325150415.694544076@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oliver Graute commit b6821b0d9b56386d2bf14806f90ec401468c799f upstream. In rare cases the display is flipped or mirrored. This was observed more often in a low temperature environment. A clean reset on init_display() should help to get registers in a sane state. Fixes: ef8f317795da (staging: fbtft: use init function instead of init sequence) Cc: stable@vger.kernel.org Signed-off-by: Oliver Graute Link: https://lore.kernel.org/r/20220210085322.15676-1-oliver.graute@kococonnector.com [sudip: adjust context] Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/staging/fbtft/fb_st7789v.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/staging/fbtft/fb_st7789v.c +++ b/drivers/staging/fbtft/fb_st7789v.c @@ -85,6 +85,8 @@ enum st7789v_command { */ static int init_display(struct fbtft_par *par) { + par->fbtftops.reset(par); + /* turn off sleep mode */ write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE); mdelay(120);