Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2189878pxb; Fri, 25 Mar 2022 12:42:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIuDglks4tmfjWLAUoqmKwRy4eK0wzhOWjbqRvOKF71jmUpSgKXWDS+HVPYZkjiR5KbeVR X-Received: by 2002:a17:90a:4890:b0:1bf:654e:e1a0 with SMTP id b16-20020a17090a489000b001bf654ee1a0mr26741036pjh.113.1648237325355; Fri, 25 Mar 2022 12:42:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648237325; cv=none; d=google.com; s=arc-20160816; b=vDGyScxFyA+IYEUjKP7t2lPmVLL5FrJF04VlZ+7KfN+ARXS+10mW7w2mzqxkE3r1GL vxzyuirKN23ilsLmCe5/CSKU16pLaoPhp0cS2Ysa9vlr8fN/sAeXyzB+zMyHKCc+Do2t em9t1lMdwYEPS5d3Fg+TqlOnCwqPXszOwE5jlyYn7qCtG3Na2Iv1BQFB/Fcv3enfZ69Q oe1qJ+QwzJxg1SnzZ8aGyCtsQTchncDdVj+/plcQZadEPQVSUO477/ILipfFN8XztAFH vz6Q2A/X/tRurkytCdDh8NHJTR7HRbqAwJlmTK7l38fw61qEelTNkcMvYmQ4WKoo5ein o3lQ== 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=LmApoCDx3R03JJl85WZeyylkjKXcRdOJiX70w0tkl65jr6k/JahmW2s+QrMbCZ/v6P u52vWfnLlJpQSYEJJ1kKAQ6omDCdZgiUFQWfJBlr3llITxJaGGnMWTE28X/29utlk7+6 XLZGMG9yn9RwLAqnxNpfWQQ8GbwBUIhqIT+ohiE40pK6pNNbN7Uf0Yi3caq4MLBXNwIK r6P7EtjdsrJo69au2ol2DrtfqkSVCgMerIsq/NUUkLZp0un1nD18hz54NhKH0ySfca8D pUds2+PGYXCrllp13A3HdUnXFseZx/X1hLvZzk2hDlLgiwQR4YrwXYYGkktF2wW+8Mil UY3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oe7HcpDk; 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 ca17-20020a17090af31100b001c6a67af0e4si6369898pjb.96.2022.03.25.12.42.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:42:05 -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=oe7HcpDk; 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3EFB938BFA; Fri, 25 Mar 2022 11:32:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359662AbiCYPJU (ORCPT + 99 others); Fri, 25 Mar 2022 11:09:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359737AbiCYPHy (ORCPT ); Fri, 25 Mar 2022 11:07:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63325DAFCE; Fri, 25 Mar 2022 08:06:07 -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 dfw.source.kernel.org (Postfix) with ESMTPS id F263361BE3; Fri, 25 Mar 2022 15:06:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E451C340F3; Fri, 25 Mar 2022 15:06:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648220766; bh=2xc4CFqQ1/hCUcNxCRGZh7F9DmYxr9AnKUEZOP7Ashc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oe7HcpDkxZ/NlQMsglLXgW6sLF5E/Stmsjcp+ouXvfkeP/hh2RvJCKOpL8Z0VbREB 7szSCK4ntm8Q6ZIK3qLhf5RO1G4TUZqN45F/0gKhqI3X2WV9yw7EuzZRtADYYkwje5 qaoOZfGqh4lFSlEOvIB1pI5RIvYWcsk7HYk2o9Eg= 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.14 04/17] staging: fbtft: fb_st7789v: reset display before initialization Date: Fri, 25 Mar 2022 16:04:38 +0100 Message-Id: <20220325150416.889761289@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220325150416.756136126@linuxfoundation.org> References: <20220325150416.756136126@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);