Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4396440ioa; Wed, 27 Apr 2022 02:58:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzezqsEC8vcVCkCb4h9yoXliQ51hT0xuEKpntIw1/O8Q5SaqFmVubfgJyLKB14ATWEPmN0F X-Received: by 2002:a17:903:182:b0:158:d1d8:19b with SMTP id z2-20020a170903018200b00158d1d8019bmr20818379plg.108.1651053533356; Wed, 27 Apr 2022 02:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651053533; cv=none; d=google.com; s=arc-20160816; b=BYEqFhmb0TigwQ5R3DkgOIDmFOIgSM3e0xIGtkiaPr8pyLBbLyK2bYUxHSb9iB2AfE PEFXyAfaYxnCdWUxr2DIhrtqJQmy9FGemXSPr0BZ2ZxClH1/RHNy13y+1GSKKyiu7+V+ CMyLL2OSNRxa1OTrDqrH1lygbsGnKI9oG70pE9PYN6IO1O/feBYK8gUNnCaJ+ap0TBRc 0BGMJ20lEorxCJt/xCAdABkjD04iI40nej4k9eRI/azSOaN6vDkyDd3NzM97DHDavFpu AEyG/cypOqaqLO87Q5Qehcn6vbW3qarx9NLuvLmzEdLGS/lOssOLHqpPkiFb2hFqMIEP y+SQ== 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=C+kLOmvC4MA321ZmXswy3iSWi4eCFHdehyOxGmZzGc4=; b=YxmQMfYpB3cOzWTLuIqakVSiHBcOVqf06APUFAyHj0PkoGY0Dwv5so1wwRxEJ1ax9R LsyWkhuQ2w1JR1LpJKtnwOafiwwSrhxovth9RpbjYshjKaDU5DE1OMO1gO7GugkCZHFp PUmaNlLiIlkULYoiMQ2eob9YjK8bUVmNVsJLIOIVX8i2EnDRdWQPdl9bRuSDrHcfA6T1 5ecPPuDYN4ybn3LNGg9iQKu9iIZV0DBGwZ3qyejR+AQLNXYM+lhtZw0rcrCQWoHIheWz 2AxcFpkSzpBYcMNjYkmebosxejPkr4MwMQAILLE7is9oQ9Hzp0jk0QP1bkRHwAPIYx0j NHqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=X2fqpmht; 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 d34-20020a631d62000000b003ab0b53ab5csi1099883pgm.75.2022.04.27.02.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:58:53 -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=X2fqpmht; 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 87EB824E922; Wed, 27 Apr 2022 02:27:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237488AbiDZJMm (ORCPT + 99 others); Tue, 26 Apr 2022 05:12:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347526AbiDZIvm (ORCPT ); Tue, 26 Apr 2022 04:51:42 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DC23CE646; Tue, 26 Apr 2022 01:40:25 -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 D3F04B81D0A; Tue, 26 Apr 2022 08:40:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FAC7C385A0; Tue, 26 Apr 2022 08:40:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962422; bh=sr+Nk5FxcDLzx6uPd1VgAtnE1P3v/6qsQnnjLwf2oUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X2fqpmhtld7mBvArSWCvBjiuajzNxqmrHY6gojhQHnfBrgH+XeWG5fXAXWzHDEmPN dLtQs20fqzYL1jjqcemHhpJouSp+cbUVBtVqXin4qMvadpYCPKqn4OeyPYeB6qqgnf Y7mnaGdeb33cqnGG5mnLjYDQjwYWawbjMrDPh7+Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Stevenson , Stefan Wahren , Maxime Ripard , Sasha Levin Subject: [PATCH 5.15 092/124] drm/panel/raspberrypi-touchscreen: Initialise the bridge in prepare Date: Tue, 26 Apr 2022 10:21:33 +0200 Message-Id: <20220426081749.914852716@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081747.286685339@linuxfoundation.org> References: <20220426081747.286685339@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=-2.5 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 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: Dave Stevenson [ Upstream commit 5f18c0782b99e26121efa93d20b76c19e17aa1dd ] The panel has a prepare call which is before video starts, and an enable call which is after. The Toshiba bridge should be configured before video, so move the relevant power and initialisation calls to prepare. Fixes: 2f733d6194bd ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.") Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20220415162513.42190-3-stefan.wahren@i2se.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c index 1f805eb8fdb5..145047e19394 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -265,7 +265,7 @@ static int rpi_touchscreen_noop(struct drm_panel *panel) return 0; } -static int rpi_touchscreen_enable(struct drm_panel *panel) +static int rpi_touchscreen_prepare(struct drm_panel *panel) { struct rpi_touchscreen *ts = panel_to_ts(panel); int i; @@ -295,6 +295,13 @@ static int rpi_touchscreen_enable(struct drm_panel *panel) rpi_touchscreen_write(ts, DSI_STARTDSI, 0x01); msleep(100); + return 0; +} + +static int rpi_touchscreen_enable(struct drm_panel *panel) +{ + struct rpi_touchscreen *ts = panel_to_ts(panel); + /* Turn on the backlight. */ rpi_touchscreen_i2c_write(ts, REG_PWM, 255); @@ -349,7 +356,7 @@ static int rpi_touchscreen_get_modes(struct drm_panel *panel, static const struct drm_panel_funcs rpi_touchscreen_funcs = { .disable = rpi_touchscreen_disable, .unprepare = rpi_touchscreen_noop, - .prepare = rpi_touchscreen_noop, + .prepare = rpi_touchscreen_prepare, .enable = rpi_touchscreen_enable, .get_modes = rpi_touchscreen_get_modes, }; -- 2.35.1