From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C96DC433F5 for ; Thu, 30 Sep 2021 02:47:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4DEBF61440 for ; Thu, 30 Sep 2021 02:47:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4DEBF61440 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 802C66EB37; Thu, 30 Sep 2021 02:47:17 +0000 (UTC) Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8846F6E2D7 for ; Thu, 30 Sep 2021 02:47:11 +0000 (UTC) X-UUID: 35cd5127613d42c08c25bfdd9d48f863-20210930 X-UUID: 35cd5127613d42c08c25bfdd9d48f863-20210930 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1515925022; Thu, 30 Sep 2021 10:47:07 +0800 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Thu, 30 Sep 2021 10:47:06 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 30 Sep 2021 10:47:06 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 30 Sep 2021 10:47:06 +0800 From: jason-jh.lin To: Chun-Kuang Hu , Philipp Zabel CC: David Airlie , Daniel Vetter , "Matthias Brugger" , Yongqiang Niu , , , , , , , , , Subject: [v2 PATCH 3/3] drm/mediatek: Fix cursor plane is not config when primary is updating Date: Thu, 30 Sep 2021 10:47:04 +0800 Message-ID: <20210930024704.6966-4-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210930024704.6966-1-jason-jh.lin@mediatek.com> References: <20210930024704.6966-1-jason-jh.lin@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 is 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/mediatek/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 = to_mtk_crtc_state(mtk_crtc->base.state); state->pending_config = false; -- 2.18.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B40B6C433F5 for ; Thu, 30 Sep 2021 02:47:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C67761880 for ; Thu, 30 Sep 2021 02:47:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7C67761880 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RtD2yXECzMxbiSNxqhFJunMXU1ErAWEFq9fR+VtHzu0=; b=M+rjesl2/wfAn6 DH2+ghh9A5OwVlplLdL7H8yD8T1ks8gQofXMTc/GX/BlSI9+f/B6rIn5+umtrC2WIQl4/cdJcJ/Vm jzB3ta+QpYDWhKFPwNibeihTkhp+vsLXoOGNiTeQnt4nuY/g96eN6iT2Vw86nl011Iq5Gn5cNtG2d vllazLZeEwXMi76gIfCKfSRr0C99cunr+yMMQPedTYODA3KL0Y9bD3xFgk6yzTIf1ptFfEesMJRym PtlRtxlGQaM8h1VgL60/QKmDYkcsAjBwcCMhhwqJ5ZM+VxAt4aLLpYyeiKNuX+9y7K+BEuthdra9P h8Qbvfa8dErGpPGkhRvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVm6m-00Co8v-1n; Thu, 30 Sep 2021 02:47:40 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVm6K-00Co1q-Oe; Thu, 30 Sep 2021 02:47:15 +0000 X-UUID: 3ca6389f44f543d8b69dde6d936802fd-20210929 X-UUID: 3ca6389f44f543d8b69dde6d936802fd-20210929 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 622150006; Wed, 29 Sep 2021 19:47:09 -0700 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 29 Sep 2021 19:47:07 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 30 Sep 2021 10:47:06 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 30 Sep 2021 10:47:06 +0800 From: jason-jh.lin To: Chun-Kuang Hu , Philipp Zabel CC: David Airlie , Daniel Vetter , "Matthias Brugger" , Yongqiang Niu , , , , , , , , , Subject: [v2 PATCH 3/3] drm/mediatek: Fix cursor plane is not config when primary is updating Date: Thu, 30 Sep 2021 10:47:04 +0800 Message-ID: <20210930024704.6966-4-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210930024704.6966-1-jason-jh.lin@mediatek.com> References: <20210930024704.6966-1-jason-jh.lin@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210929_194712_836280_98739F42 X-CRM114-Status: GOOD ( 11.04 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org 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 is 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/mediatek/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 = to_mtk_crtc_state(mtk_crtc->base.state); state->pending_config = false; -- 2.18.0 _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E041C433F5 for ; Thu, 30 Sep 2021 02:50:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55ED5617E6 for ; Thu, 30 Sep 2021 02:50:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 55ED5617E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/bARQLATH6nBMCo6dUgDsVurir5bE2oOpmoFhMBaemQ=; b=fnCLk/UxqMHh9x jZxvG6x42IkSSyDW6wsqDUsilN9k5+LyF3IgAIhItnsUQOFTG0QHenf4VVuUyb4TYDOamoJDJ1dTa FNP8e37mBpOzL72j7Z/CiY/qTDsuLYAl0rT9IBZweEktRKGcbbunKYwvSKXm9eQjwoyYbAD+7mXiq UcDQbsL2KwnmfA+9eJUgRKPgzvVZzGxWmgL0wdR0lzSq+m3Njxtvf1wyKHx/vy95yo03QZbsLNTiU z4r9nW6EDz8/uOpbFfm0L+z7qvHdWu7I1PKScCGy08Xh7cIujK618rDJ2i2tjxVlzXq4Mr5Ji9ydX PpnosVCT0f9ivx+Wl6kA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVm6b-00Co7S-VS; Thu, 30 Sep 2021 02:47:30 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVm6K-00Co1q-Oe; Thu, 30 Sep 2021 02:47:15 +0000 X-UUID: 3ca6389f44f543d8b69dde6d936802fd-20210929 X-UUID: 3ca6389f44f543d8b69dde6d936802fd-20210929 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 622150006; Wed, 29 Sep 2021 19:47:09 -0700 Received: from mtkexhb01.mediatek.inc (172.21.101.102) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 29 Sep 2021 19:47:07 -0700 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 30 Sep 2021 10:47:06 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 30 Sep 2021 10:47:06 +0800 From: jason-jh.lin To: Chun-Kuang Hu , Philipp Zabel CC: David Airlie , Daniel Vetter , "Matthias Brugger" , Yongqiang Niu , , , , , , , , , Subject: [v2 PATCH 3/3] drm/mediatek: Fix cursor plane is not config when primary is updating Date: Thu, 30 Sep 2021 10:47:04 +0800 Message-ID: <20210930024704.6966-4-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210930024704.6966-1-jason-jh.lin@mediatek.com> References: <20210930024704.6966-1-jason-jh.lin@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210929_194712_836280_98739F42 X-CRM114-Status: GOOD ( 11.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 is 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/mediatek/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 = to_mtk_crtc_state(mtk_crtc->base.state); state->pending_config = false; -- 2.18.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel