Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3032578iog; Mon, 27 Jun 2022 07:51:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1twukXaDZ15SirR0DQRCkZRicIZ2TdrL4Xpik+jjBY6gYUKLSI6vmpQmTVMbt82EHafZIuD X-Received: by 2002:a17:90a:6809:b0:1ec:c213:56c8 with SMTP id p9-20020a17090a680900b001ecc21356c8mr21301584pjj.82.1656341489770; Mon, 27 Jun 2022 07:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656341489; cv=none; d=google.com; s=arc-20160816; b=w7VcWcWLWs9AKxaseFSEc/r4wmLjgjG6m/fob4rblNZhvDBz6kn0f2z36bgornW0iP 1B5ePF9wpHnQsQUHC25RZTfdNcW4W4VdcLKi8VpyVZCXjUXd7om+mmxNe+UCVbOiVQdk AO/n4eMw9gqxSCYA9zpX89IYDhhOwkJ4riD5zV7VimI1Nug7/iYKNK9aMniEqjUNYl8x pQzSn9nWsohaT+ZGFgkkBSoTnzVBCHqG8rm9CO2u+fKkcZu38xD8+h3cj1608sLqkf89 Dk1j8TUUubOdall2PnK9oisE0v0m/B+wq2Rylw7zDxiS+bFSRmnSez4+364+B4yyaC3o NOKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=KA93Yrp+xPz518APBCgPzL+batU4MawOKzjpozAPkos=; b=UVhUOdp0zcsvbcMRC/eETXBzEzcrO5g8fdADJ32CpVFKUHsqwFfeW8AL7BDvvmmq1p +zG8JO6LP9+LpeEVtkzKY0FAdJ8tq5etLMR7hhacJaYUoeFCAte+N2LjoRbT+cNgEk4g jf3wzKgR0ZwZL8T9TOcpZSiYDlfActK+Nz/6R8RmHjgT5YPuUiLxPqMBPJWF4Sqaby54 R14Xz+btO5KIEwjq9lHswQBSLQgl65592PtVTquEAvdtxeFLptDH7VrM0lvid3BZyO1f rhozzTvGCPzKbEEyxKNXf8p3bNKAZIk5WC5Tgov3xQ/aS49t7Iwb0jHabSNLel7myQ/j gK2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=RpX71VXo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a170902654400b001617784ea88si12137713pln.356.2022.06.27.07.51.16; Mon, 27 Jun 2022 07:51:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=RpX71VXo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236806AbiF0OLS (ORCPT + 99 others); Mon, 27 Jun 2022 10:11:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236782AbiF0OLR (ORCPT ); Mon, 27 Jun 2022 10:11:17 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C81FE13E3C for ; Mon, 27 Jun 2022 07:11:14 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25RDaXfB019798; Mon, 27 Jun 2022 16:11:01 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=KA93Yrp+xPz518APBCgPzL+batU4MawOKzjpozAPkos=; b=RpX71VXo/1vChdwxOyzJRNqLy51suo4m9XStA9Ppxo1Z4Qnq/nFoUU7iaJLZuHV/AUKw IRtVnEJGpcQVuQCPtpgNonVEYJgYtX/QRryTWafcAHunszudRyOiiBeN65QujjPj0X3Z x2CiB3A5kR1dX4ADz7U7FsL0baUeZ2PQ5zRWTyXmSPzJmiuPRx4v6tplZilDPOlxpga0 1xK0DkPuFKsb6xW6Vu2hir3edDQQE9+hV3HTr7Nb4iNkiVxfqGzECaq2WsMvybWPp2hu RDTM48yjZEqfrWKD/iyFy8SKNOivjHXDC9QpOsY6OyGUe6P7y1RPDsywSxBEKtk/HVcV oQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3gy9mr1qqf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 Jun 2022 16:11:01 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9A89A10002A; Mon, 27 Jun 2022 16:10:59 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 50BD022176B; Mon, 27 Jun 2022 16:10:59 +0200 (CEST) Received: from [10.48.1.86] (10.75.127.51) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Mon, 27 Jun 2022 16:10:58 +0200 Message-ID: <51843c58-82ac-6b81-99b6-75c267ff1a59@foss.st.com> Date: Mon, 27 Jun 2022 16:10:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] drm/stm: ltdc: disable all layers before crtc shutdown Content-Language: en-US To: Yannick Fertre , Raphael Gallais-Pou , David Airlie , Daniel Vetter , Maxime Coquelin , Alexandre Torgue , , , , References: <20220603134151.591997-1-yannick.fertre@foss.st.com> From: Philippe CORNU In-Reply-To: <20220603134151.591997-1-yannick.fertre@foss.st.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-27_06,2022-06-24_01,2022-06-22_01 X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 6/3/22 15:41, Yannick Fertre wrote: > All plans must be disabled before the CRTC shutdown helping > the crtc to restart from a clean situation (without unwanted > planes already enable). > > Signed-off-by: Yannick Fertre > --- > drivers/gpu/drm/stm/ltdc.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c > index 6bd45df8f5a7..eeefc3260c07 100644 > --- a/drivers/gpu/drm/stm/ltdc.c > +++ b/drivers/gpu/drm/stm/ltdc.c > @@ -787,11 +787,17 @@ static void ltdc_crtc_atomic_disable(struct drm_crtc *crtc, > { > struct ltdc_device *ldev = crtc_to_ltdc(crtc); > struct drm_device *ddev = crtc->dev; > + int layer_index = 0; > > DRM_DEBUG_DRIVER("\n"); > > drm_crtc_vblank_off(crtc); > > + /* Disable all layers */ > + for (layer_index = 0; layer_index < ldev->caps.nb_layers; layer_index++) > + regmap_write_bits(ldev->regmap, LTDC_L1CR + layer_index * LAY_OFS, > + LXCR_CLUTEN | LXCR_LEN, 0); > + > /* disable IRQ */ > regmap_clear_bits(ldev->regmap, LTDC_IER, IER_RRIE | IER_FUIE | IER_TERRIE); > Dear Yannick, Many thanks for your patch, Applied on drm-misc-next. Have a good day Philippe :-)