Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp548820pxb; Thu, 30 Sep 2021 11:34:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ1g/6LwGO5l2IIChqz2eQD3gS4YZHPT9Lf+tLZZOS3KPuNJJdCY8YqmD5L5xLBcDeK80X X-Received: by 2002:a17:90a:9289:: with SMTP id n9mr14613868pjo.27.1633026853221; Thu, 30 Sep 2021 11:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633026853; cv=none; d=google.com; s=arc-20160816; b=HWMYIv2jqn8hpMMiW8xgp/HibnUkea/TBVAYzYoKIc44T2FO0c8wFD/dHaAnYOI7gv vjviOuvkxW9WHGZGY5ly60geUD+VSH9XRhQKqoQCpqIkPJALSqMA/D496HDRUfbkAOpE LK6i4k7TPNxt3E8gIEIcfs0P2IuQrruCZmv40+46Q5vZ0Lb5Tcyg2b92FdVF7mC+uozB EficpM5OTx3AveGATdnyg8B5rh7J+CYMmNvLc6OubK22zYFLORTGhnIbshR666JnRM+K fxREPB2qsTMm/MQrXZdeSo17zO1A/hVfq3NbW1VOdA0Ra2Okonq8aWmIUwUpIPOtBnO/ I+iA== 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=DCAWek8Of0BVYaqoGjbwHSm/27dhhY9qBq4WB/a9Jdw=; b=fkScy1cwz2o2qMpO83wg0FtWYBgEN3+2FhQ0nmjyKgA8bAXDtGTRtGAzr3N9xHHikW JZvatvZ2hBYPoV2ld2YPM2X17uqkC1xVqMJ1NGusJXFKjiZv9vrlHsSkHgbUWpnegZqg ybAgd/gv1pz61CRFYB9SetgmDanr+hNV71X/YOrdyIjgxzvvPd8meUlpY2D26TbW608P hHFNxa4UvXyxgO8fJTv6iuOLTmZfz69owaWq9Kw0QjQQ285M336vKVXMcODy7R2EDinQ qmq0UpvN9GsJ0ajhqEvrOgx9c/H05MqQJ7R6XyGDhYCgJ2zjTEdl5R6V/MhEcrIa1xXk Oejg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DOz6l0JP; 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 h10si4336320pfr.339.2021.09.30.11.33.58; Thu, 30 Sep 2021 11:34: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=DOz6l0JP; 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 S1350006AbhI3NN6 (ORCPT + 99 others); Thu, 30 Sep 2021 09:13:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:36364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349938AbhI3NN6 (ORCPT ); Thu, 30 Sep 2021 09:13:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BC2A161278 for ; Thu, 30 Sep 2021 13:12:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633007535; bh=tmn4BbXKbxNZ0EBee9Cj9y0DfwstE28MZfJScaAzQBA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DOz6l0JPvlnGCx7pxlN5fyg2rBnOza4mMZ7wnNOLToA8VBDrSQGV98gty+VnvyCpP fWz/Ak8Tti/m/DnySmUqobkj2xAtFPmelwvfIEy0MSwe85lNuG73RpImLZop8PRBse BgbetPqy4D6EU33reOBSbKGccsuXe/p6RfTLQPjj0jfyNC3O94N0B7WK+dOLW7VOuX Db1PkWtVPYdRjFQHSXhrPJ4+LRW3TUmFHODgXj6VqJmCW8yuNye+4a3CpOx4Q44rww Td9Gs1X61Deia5H2PPPYg0hz+3dC4f1EKg7bF/4dTw/0czSpZGbxp/INOco0vT8E5I w28LKAifcoyuA== Received: by mail-ed1-f42.google.com with SMTP id y35so21968057ede.3 for ; Thu, 30 Sep 2021 06:12:15 -0700 (PDT) X-Gm-Message-State: AOAM531rk7/VutHdTZ1jREhYGuOw46HQ3U1VD0+gFUGMliKoB31IzoaF dlho787GEagCLzAawK/41xvgJRzuJfN2LexQ1Q== X-Received: by 2002:a17:906:3181:: with SMTP id 1mr6983672ejy.388.1633007533447; Thu, 30 Sep 2021 06:12:13 -0700 (PDT) MIME-Version: 1.0 References: <20210930024704.6966-1-jason-jh.lin@mediatek.com> <20210930024704.6966-4-jason-jh.lin@mediatek.com> In-Reply-To: <20210930024704.6966-4-jason-jh.lin@mediatek.com> From: Chun-Kuang Hu Date: Thu, 30 Sep 2021 21:12:02 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [v2 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=883= 0=E6=97=A5 =E9=80=B1=E5=9B=9B =E4=B8=8A=E5=8D=8810:47=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. Reviewed-by: Chun-Kuang Hu > > 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 274e5c67507d..b96dbc867890 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 < 0) > + return; > + > state =3D to_mtk_crtc_state(mtk_crtc->base.state); > > state->pending_config =3D false; > -- > 2.18.0 >