Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5023432rwb; Wed, 21 Sep 2022 01:59:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM65k+WinZk1DcEw4dyVTqawRa9PuGnrp3xLF1fOt/d7S35fDAkEzFnASvzDoRBRpB5JfVwO X-Received: by 2002:a17:907:31ca:b0:780:2170:e08c with SMTP id xf10-20020a17090731ca00b007802170e08cmr19872792ejb.145.1663750768858; Wed, 21 Sep 2022 01:59:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663750768; cv=none; d=google.com; s=arc-20160816; b=og2DR7xyR1QPWQDDff+o34IZZ4yU5tP6Rc15as/oODMV+FCGgkQ2ZIw51JpizXU1pM yiNbUqL6iu0mYjID6zsAspv/VnDg33vwj7j0sVqpfbzrHzRBBr++bOWxFMtIawuuke+D YAULU7MTixYQR16XpF7qaiO1bToBmR6QyskdEZey3r0XlMxlHG5xkV8vhtpQ66Vg6Vbp sjBLGkq65VK3knRtZ6ovYSiu2SpHyfPUAMoK2g1l1oE+61OEb5ZLGM6HXZOoaYT24qJw knIFMbnYFTWo9wwSkVZV+5+4QNOB3IpFchtUqT7wbTdT6Ps6FFGff+j8d6ues37UVqWr TbnA== 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:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Sd+Fxwzp7bxeXD28OoMGK9mSgc3f6o0UFW/iNLtc8BI=; b=pb4Jx+L8ZIQVKM7K/vULPwi0gKXSDX1lPJsGxDsOLU4gkFq3carv5T9rLTPv3/mtlJ r2ELjcmpWxKYAKtsyCL7n93P22zml+PXNsqT2DkSCQOUJGedFzKPzb7OsmtWKIq0TLAJ ZzKjPhmS/idQ+49lEgloBQuj39ZgWkHPr0ZRkT+KpAnt+fEWc+2CM+jgsgd+1FVnvE1b gjNSWcKaoHu37kncgVo3QJ+hxXHqFatTXVg1U5yEMufluqRnV8V2Z830l6yneE5q4LFc jNZVx7S6QNh17pzt0VE3PjceFnDCOujEtwyMk+Sr0uPaIcaEBLZPeXO33hGIetSZHKMX QgIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=CSJ0NDh6; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k21-20020aa7d8d5000000b0044f020a2df0si1719096eds.290.2022.09.21.01.59.03; Wed, 21 Sep 2022 01:59:28 -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=@mediatek.com header.s=dk header.b=CSJ0NDh6; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231375AbiIUIur (ORCPT + 99 others); Wed, 21 Sep 2022 04:50:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229891AbiIUItu (ORCPT ); Wed, 21 Sep 2022 04:49:50 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4667642B for ; Wed, 21 Sep 2022 01:49:34 -0700 (PDT) X-UUID: 20cf9df1efb941bb978f518168bb9188-20220921 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:CC:To:Subject:MIME-Version:Date:Message-ID; bh=Sd+Fxwzp7bxeXD28OoMGK9mSgc3f6o0UFW/iNLtc8BI=; b=CSJ0NDh69Lvh5yBCzzowyzfIFyXDnRZHZRNlIM+MBi9VBvaGWgcYKzQBH+RFCya/JoFfCqcqM7i9sK3h48j/OUKz34g0rK4RBuQleK/FOJJcFPGDHRazq8DUVjZqDnG1iXUsT7mVzadY2A0aQ8i0tHiXwpA6gaGA1iEnJ7H4hds=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:41914426-8510-42a7-a32e-10054c44b235,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:39a5ff1,CLOUDID:a0a226f7-6e85-48d9-afd8-0504bbfe04cb,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 20cf9df1efb941bb978f518168bb9188-20220921 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2011992881; Wed, 21 Sep 2022 16:49:27 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Wed, 21 Sep 2022 16:49:26 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 21 Sep 2022 16:49:26 +0800 Message-ID: <0bf7b7d5-087b-912e-412e-2b3b742448bd@mediatek.com> Date: Wed, 21 Sep 2022 16:49:24 +0800 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/mediatek: dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff() Content-Language: en-US To: AngeloGioacchino Del Regno , Hsin-Yi Wang , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= CC: Chun-Kuang Hu , , Daniel Vetter , David Airlie , Jitao Shi , Matthias Brugger , Philipp Zabel , Rex-BC Chen , Xinlei Lee , , , , References: <20220804194325.1596554-1-nfraprado@collabora.com> <227bce07-37cc-da1d-fc99-065a12cdf3f5@collabora.com> From: Allen-KH Cheng In-Reply-To: <227bce07-37cc-da1d-fc99-065a12cdf3f5@collabora.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY,URIBL_CSS 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 9/19/22 21:32, AngeloGioacchino Del Regno wrote: > Il 19/09/22 10:40, Hsin-Yi Wang ha scritto: >> On Mon, Sep 19, 2022 at 4:39 PM NĂ­colas F. R. A. Prado >> wrote: >>> >>> As the comment right before the mtk_dsi_stop() call advises, >>> mtk_dsi_stop() should only be called after >>> mtk_drm_crtc_atomic_disable(). That's because that function calls >>> drm_crtc_wait_one_vblank(), which requires the vblank irq to be enabled. >>> >>> Previously mtk_dsi_stop(), being in mtk_dsi_poweroff() and guarded by a >>> refcount, would only be called at the end of >>> mtk_drm_crtc_atomic_disable(), through the call to >>> mtk_crtc_ddp_hw_fini(). >>> Commit cde7e2e35c28 ("drm/mediatek: Separate poweron/poweroff from >>> enable/disable and define new funcs") moved the mtk_dsi_stop() call to >>> mtk_output_dsi_disable(), causing it to be called before >>> mtk_drm_crtc_atomic_disable(), and consequently generating vblank >>> timeout warnings during suspend. >>> >>> Move the mtk_dsi_stop() call back to mtk_dsi_poweroff() so that we have >>> a working vblank irq during mtk_drm_crtc_atomic_disable() and stop >>> getting vblank timeout warnings. >>> >>> Fixes: cde7e2e35c28 ("drm/mediatek: Separate poweron/poweroff from >>> enable/disable and define new funcs") >>> Signed-off-by: NĂ­colas F. R. A. Prado >>> >> Tested-by: Hsin-Yi Wang >> > > Reviewed-by: AngeloGioacchino Del Regno > > > Tested suspend/resume work properly on mt8188 and mt8186 . Tested-by: Allen-KH Cheng