Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2553172rwb; Mon, 19 Sep 2022 06:48:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM77/QNBbfQ3tdCT9TkcvBPqp69O7Ni+taeJGBXV2U1a6G+KeYyi9zY0Oll7+EkMo8H26MrK X-Received: by 2002:a17:902:d503:b0:178:2663:dc8e with SMTP id b3-20020a170902d50300b001782663dc8emr13326463plg.52.1663595322805; Mon, 19 Sep 2022 06:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663595322; cv=none; d=google.com; s=arc-20160816; b=wkTsMnRnnQSFQF+ImvpXGXOaygYwjwrctZfjwue115yAV60ZmRXjD8Y02FQtcj74iA EL30tSTc2+zhj2PzZNGmD0EDvEiIzy9cSaSET84twFskMxHb+9bsAzf9jRyNjuvoeKMY F90stsQx9yQqtOOdiDFLHOnA62n3zO1S2Nj4ZtlWzwIElgfGMFrYfKE0/jzIiBMhBkob XQLCo4Gv4Ioh/MEooQlF4z81rPLV5ghgf5zQIOM5FND+l5SS/b6EwfTI+JShuiXBgPME DfIaZsi0hLnfV67XptK64cTc5JCUlgHTRZCNvqpf8S3ySdlRTU+mx7xBosMIXEI45xEc azmQ== 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=HSgfXRkcdEKK7glSkNub9kl48m36BhjY9Gmv+2s96Qk=; b=DihEecWpC6uaSt0y8FBBWyXj5Ibp78HJjCp35Y9lkUR0BCZYWZsUbGSj0OWEb1suVv XmCzH7sjTbsDFN8Pj2xQ6GFaj5srkZLkxRU+CAqc8Zy9OLdWq44Mzi/uhlhRWchQH6gc yAPykHx6ylmvwtwmC/bixRFi9tjmQMiHXWDYlFfm7l5H5rPGmeB1j0F0q87ldKrmqP02 sGT2aJI8miM/5/O0eYtTLUGHnjUkrtE57nZLuHFXl543VnHm24D6pT6/xtU6DdAQZyZo jaCuXdR05jHJJHAFCWWOGX6QfI4zV0FZGp4g1BDxd5PHJCWFJbMY/ZWbMXCoU/TRkAmA e74Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=OaJ8GPRj; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e20-20020a656794000000b00435b2509951si31928863pgr.439.2022.09.19.06.48.30; Mon, 19 Sep 2022 06:48:42 -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=@collabora.com header.s=mail header.b=OaJ8GPRj; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230051AbiISNdG (ORCPT + 99 others); Mon, 19 Sep 2022 09:33:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229964AbiISNc6 (ORCPT ); Mon, 19 Sep 2022 09:32:58 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35E1B21835 for ; Mon, 19 Sep 2022 06:32:57 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id B8264660159F; Mon, 19 Sep 2022 14:32:54 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1663594375; bh=TBhtk3gr4d0sylPaOG83cBfrnCWZRMcFZEocaCMqSfs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=OaJ8GPRjLhVosM1A/PUElwHNEgeWvltDbM6oZu8+WuZmcnch01XPp21pn/ewA7V70 P45LJ1m110d2xmCzDAh517/7Pta90saLbYE0c+urvKeMONCZvH8BgM3pJbJARQ7SVM FZBFIfgtevaC0qCGU4ahm5D7/R+0SAMv28D8MJ6NCD8U1s/pB0dZZpLOPhDw7WqDNX QoN8TyOsZsIxjD662CnOZcP5ezoNbJJFsgyVApfT7v8TfJ66vITMJg8/p7RHdLLRZ6 rtI/adJF5CH4FxV/TH9+q6CZHYb9R8AZ6E6Jb5o7qNNklC5cyXo58Xp1tPX+RJVhgl 9E4Ee//hum6kA== Message-ID: <227bce07-37cc-da1d-fc99-065a12cdf3f5@collabora.com> Date: Mon, 19 Sep 2022 15:32:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH] drm/mediatek: dsi: Move mtk_dsi_stop() call back to mtk_dsi_poweroff() Content-Language: en-US To: Hsin-Yi Wang , =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Cc: Chun-Kuang Hu , kernel@collabora.com, Daniel Vetter , David Airlie , Jitao Shi , Matthias Brugger , Philipp Zabel , Rex-BC Chen , Xinlei Lee , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org References: <20220804194325.1596554-1-nfraprado@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS 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 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