Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1847816pxb; Thu, 7 Oct 2021 16:54:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQr+zAwlBIu8TRei/lcFcYhct3cBK7+tXQFnNIhjzC434BlnnP8fXk8xv4w1qIl2qeyslh X-Received: by 2002:a63:4f25:: with SMTP id d37mr2044825pgb.61.1633650866901; Thu, 07 Oct 2021 16:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633650866; cv=none; d=google.com; s=arc-20160816; b=rHdayrQorIZDGXoFd/hY9oQVtMcUP1MNkysfoARCDDZaT33fSesZz3d3lox3g9EPBu /s4ZUON8pycHHJbo2+yAEhCEVgvGSabABupBuT/LN0FAW30HXT/Rzfv32pe0nMsL/WrG hSd7cwagvA47iQvpRBBQrgqrUwYNvgFujRwLpJk/j/9xHiSW7UCIxQxKdIZbd3cqyS7B lzDwPH+IbY6SlKZRfZe/5O1S4v0PlZ4kgnVo0CyQAy3aky/YNzHkeTP+lpMxsXr+eq64 nj5Ckz6mIFLqaTKT1JqXk2FA25e4HDHHd3ONpVDJ9g3WdmahX2/kdb4ax0UhyNqi6T30 lVAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T7YMNOjH/24dIobW+e7fk0IrZtXqJv28D2eVNtF7Tzc=; b=SIBTCpNekHtxKrXSeR3C4V40b4sKk8nyac2VUUd3VSC9cMdm9vnNRiFznTwjwS0ZXD iOn80FyK4QOfgz4S8hPDY8AhPg7aENjLWj3tXuk642Y+mMQHwSzvM9l096sYz8IskN6t 3mA+NY977WPZd/4YQ7WDB02erDy+l7jVNvXCYzK/Dc57GuYS4d9XZNbGQqoohx7wl15r D8Lw2JRb25wK9PoTyL4GOL4WxKkB8CXpz5DubRusD+dDLnuQygVh6BgzddNXEeHO3HZb cvJbZWbzWvwyzuasjx+RWrNG0Oh3c+DgawVEjUoiCdaA34BQ6l84f1L5wIllKdLH5I8a 8Q3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oWdNEgt2; 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 k10si969969plt.217.2021.10.07.16.54.13; Thu, 07 Oct 2021 16:54:26 -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=oWdNEgt2; 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 S238790AbhJGXzO (ORCPT + 99 others); Thu, 7 Oct 2021 19:55:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:44788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233133AbhJGXzN (ORCPT ); Thu, 7 Oct 2021 19:55:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CD9DE60F5E; Thu, 7 Oct 2021 23:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633650799; bh=Fn7z7KY4TFXmH1LrpPcQgB8HodPs1YPG9mG6x4O+p3A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oWdNEgt2WReifKUmudLuS8qpQEKFfbH5AJNhKhq2Tw7fY+DRCExcV4MCTaCKflAES 59gq97NsyMm2ck39vDdTxeFdRxMdQqvLP+iOhDViBDTGvqQxxtNNO3dLz8uMPhesGm ktCunW4eEnryQAtrPtwoS/AlnAI0t0izQGKQAlbaz6aVUubF1nh97z51W9yric5G8z NmOlHzu3d/Lhn+R/BcKUKCCjdmN06NkAB20rALI5glMsj1cWQnKhoj/HMPJ9mARqUG byvVld/zIU0DEE1AvVf6yicySvUHkABy8RfJav5bCz3yDAvzZ739dMK6CObTUKFvMA iygPGJBlAwgNw== From: Chun-Kuang Hu To: Philipp Zabel , David Airlie , Daniel Vetter , Enric Balletbo Serra Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, Chun-Kuang Hu Subject: [PATCH 1/5] Revert "drm/mediatek: Clear pending flag when cmdq packet is done" Date: Fri, 8 Oct 2021 07:53:06 +0800 Message-Id: <20211007235310.14626-2-chunkuang.hu@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211007235310.14626-1-chunkuang.hu@kernel.org> References: <20211007235310.14626-1-chunkuang.hu@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 9efb16c2fdd647d3888fd8dae84509f485cd554e. Commit c1ec54b7b5af ("drm/mediatek: Use mailbox rx_callback instead of cmdq_task_cb") would cause numerous mtk cmdq mailbox driver warning: WARNING: CPU: 0 PID: 0 at drivers/mailbox/mtk-cmdq-mailbox.c:198 cmdq_task_exec_done+0xb8/0xe0 So revert that patch and all the patches depend on that patch. Reported-by: Enric Balletbo Serra Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 47 +++---------------------- 1 file changed, 5 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c index 5f81489fc60c..9840b8d035dc 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c @@ -267,36 +267,6 @@ static void ddp_cmdq_cb(struct mbox_client *cl, void *mssg) { struct mtk_drm_crtc *mtk_crtc = container_of(cl, struct mtk_drm_crtc, cmdq_cl); struct cmdq_cb_data *data = mssg; - struct mtk_crtc_state *state; - unsigned int i; - - state = to_mtk_crtc_state(mtk_crtc->base.state); - - state->pending_config = false; - - if (mtk_crtc->pending_planes) { - for (i = 0; i < mtk_crtc->layer_nr; i++) { - struct drm_plane *plane = &mtk_crtc->planes[i]; - struct mtk_plane_state *plane_state; - - plane_state = to_mtk_plane_state(plane->state); - - plane_state->pending.config = false; - } - mtk_crtc->pending_planes = false; - } - - if (mtk_crtc->pending_async_planes) { - for (i = 0; i < mtk_crtc->layer_nr; i++) { - struct drm_plane *plane = &mtk_crtc->planes[i]; - struct mtk_plane_state *plane_state; - - plane_state = to_mtk_plane_state(plane->state); - - plane_state->pending.async_config = false; - } - mtk_crtc->pending_async_planes = false; - } mtk_crtc->cmdq_vblank_cnt = 0; mtk_drm_cmdq_pkt_destroy(mtk_crtc->cmdq_chan, data->pkt); @@ -453,8 +423,7 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc, state->pending_vrefresh, 0, cmdq_handle); - if (!cmdq_handle) - state->pending_config = false; + state->pending_config = false; } if (mtk_crtc->pending_planes) { @@ -474,12 +443,9 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc, mtk_ddp_comp_layer_config(comp, local_layer, plane_state, cmdq_handle); - if (!cmdq_handle) - plane_state->pending.config = false; + plane_state->pending.config = false; } - - if (!cmdq_handle) - mtk_crtc->pending_planes = false; + mtk_crtc->pending_planes = false; } if (mtk_crtc->pending_async_planes) { @@ -499,12 +465,9 @@ static void mtk_crtc_ddp_config(struct drm_crtc *crtc, mtk_ddp_comp_layer_config(comp, local_layer, plane_state, cmdq_handle); - if (!cmdq_handle) - plane_state->pending.async_config = false; + plane_state->pending.async_config = false; } - - if (!cmdq_handle) - mtk_crtc->pending_async_planes = false; + mtk_crtc->pending_async_planes = false; } } -- 2.25.1