Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp824866pxb; Wed, 29 Sep 2021 10:24:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLvozaTpc7Ck7uFGoxdpleqX6NN1FZG9ZABX6GXgJ0fsBXw8UORFxCFBbZlvc3oG3nAP0x X-Received: by 2002:a17:906:c251:: with SMTP id bl17mr1045365ejb.219.1632936253042; Wed, 29 Sep 2021 10:24:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632936253; cv=none; d=google.com; s=arc-20160816; b=ZZYLFfeM5MT9R76FVb559OQqie4kIQkq+sNzLHA2UWOATwnVNOGmbPCNPYf8jP5tpC 3LstP0OqYFKCcR3pC9l4k7O0bvWcjeTkNaTKeA5Kjq0ftqKAtxmirPKaiumZv7Cx/KPj 5lBoXqrQRb2Oo8Dc8J+YkdZ5ydxrpPniB7E6pCS0YXhVh7RzMSTR+CdGJVcKJxmxwCcS X6+i5w+2yt9cddEO1yoQ1tEjDAEQNH6pWlWFZGRsiUFf7Dq7E4mkz4zNWjCOjO0e+gOQ oCsEjgXhR1tPqgxFL6GhTqyZ7bA/gwJAvYHTwLmHRprQg7XOejtJjzHmu+N2+TYHZ48R zB3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=jXGGw6oxzPL4m7Stz0bh+lNgcQHH7JJ/Fry+FeEq5AA=; b=S40OKLbi0U985AqH6yzv6NLVVDMq1ydf2iDmeyQjWkk7AHOUpDeS2hK8f3fv+pQsqP FfXCXoiBvpt+KCALGuQpLXzEVwKcyrTwOetOV0C6J/3VQ+mdA9XLdbb7TclS3OsoAdZp a74DdI76UbfKyi1aUpohAUQqQr/b5aZCilXAkVa0OCu/S5h+29O0iKFL3rJ2on1KZChk iKU3ug8sUOToGUILX8l1hNYMAhhmpK5SHaY+dU7X53biU7Gx4MTuhwSxFBNuZks7y9pT lYG/c1S27K0MP62d20xzrQhs1lujMIGdt0XI6DnfN8ANQZGF3IWCTpCKWgVMwm63fa5y E2rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="OS8/FZ05"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y15si583663edj.517.2021.09.29.10.23.48; Wed, 29 Sep 2021 10:24:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="OS8/FZ05"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344866AbhI2O7H (ORCPT + 99 others); Wed, 29 Sep 2021 10:59:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:41734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344677AbhI2O7H (ORCPT ); Wed, 29 Sep 2021 10:59:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A52C613A6 for ; Wed, 29 Sep 2021 14:57:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632927446; bh=m2Q3ldX4i8hJz/lYMTrW/Tc7jkjEgA48T0avsrMIFb0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=OS8/FZ05Bwuqc7c8Yy1ebTTrRtR/7Sh9oRAFWvlRbSE+GtdDhVhQbnVJIaynmoVWt m4IAX3oh1iS08p/skrS1lSt6hHe2G6wCncmmwuqGK0ZgxHf+1Ygs72Y7fi/upjuMMa gyZyOtJ2tbN5qyXOJBW7/Rf+T4AgEejImrVVaIrd1dmvdXSR3vxixr1yKFYsy0R2NZ xjzDAevLhcKK0ozr8OsK2+G3i25e3qCEMf5fBPkWeBpjmp02C+mAxVAeMADaSK1fqx 2AzpH1jc2IwTfgbbpdXp84QfYdWhK29rTVjFi+2n6Wf24AFtCS9XdysC1gI5art90I kn9etznjpw1gQ== Received: by mail-ed1-f45.google.com with SMTP id s17so9583808edd.8 for ; Wed, 29 Sep 2021 07:57:26 -0700 (PDT) X-Gm-Message-State: AOAM530mhRTPMOSURKb6SoYwMYLCH+ENln8xSJV2PzqWJonxJOr4OgBp wVERaZBVsEPbHonRbLQhQXpXpIbWYYTESlWUsw== X-Received: by 2002:a17:906:7ac4:: with SMTP id k4mr178848ejo.430.1632927358007; Wed, 29 Sep 2021 07:55:58 -0700 (PDT) MIME-Version: 1.0 References: <20210929070235.4290-1-jason-jh.lin@mediatek.com> <20210929070235.4290-4-jason-jh.lin@mediatek.com> In-Reply-To: <20210929070235.4290-4-jason-jh.lin@mediatek.com> From: Chun-Kuang Hu Date: Wed, 29 Sep 2021 22:55:46 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] drm/mediatek: Fix cursor plane is not config when primary is updating To: "jason-jh.lin" Cc: Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , Yongqiang Niu , DRI Development , "moderated list:ARM/Mediatek SoC support" , Linux ARM , linux-kernel , Hsin-Yi Wang , fshao@chromium.org, Nancy Lin , singo.chang@mediatek.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Jason: jason-jh.lin =E6=96=BC 2021=E5=B9=B49=E6=9C=882= 9=E6=97=A5 =E9=80=B1=E4=B8=89 =E4=B8=8B=E5=8D=883:02=E5=AF=AB=E9=81=93=EF= =BC=9A > > If cursor plane has updated but primary plane config task is not > finished, mtk_drm_crtc_update_config will call mbox_flush() to clear > all task in current GCE thread and let cursor plane re-send a new > GCE task with cursor + primary plane config to replace the unfinished > GCE task. > > So the plane config flag should not be cleared when mailbox callback > with a error status. > > Fixes: 9efb16c2fdd6 ("drm/mediatek: Clear pending flag when cmdq packet i= s done") > Signed-off-by: jason-jh.lin > --- > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/me= diatek/mtk_drm_crtc.c > index 06342df2a0be..fb0d9424acec 100644 > --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c > +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c > @@ -281,6 +281,9 @@ static void ddp_cmdq_cb(struct mbox_client *cl, void = *mssg) > struct mtk_crtc_state *state; > unsigned int i; > > + if (data->sta !=3D 0) data->sta is now the standard error code, so data->sta < 0 is an error. Regards, Chun-Kuang. > + return; > + > state =3D to_mtk_crtc_state(mtk_crtc->base.state); > > state->pending_config =3D false; > -- > 2.18.0 >