From patchwork Thu Feb 13 12:01:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo i Serra X-Patchwork-Id: 11380233 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B13A3924 for ; Thu, 13 Feb 2020 12:01:39 +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 8F1FB2168B for ; Thu, 13 Feb 2020 12:01:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Sx5xTg0Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F1FB2168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=+yKZvPIBtrE6RCdgkorX0Eq6XgLtBUG0PxE9YDSFfXU=; b=Sx5xTg0Q9vIEjn 7Ss3tW8N88Ev7IqKJ3MOYgrtp0z3rfxvJMyQSJaVkF4w7IyJdzQKdDDm6qWSFDoTQ9GYLQzzzVLvE qWk/9SD96pUHd3f/OZXnyu2qYJFoNDdXvMTy+G8hH2DcWRrJItSKoiQh+AYNprh+oEC53VeHQO7Ol yOJpN8uDAZd6PwZjeL/YpRYpzB9ztqy/JD0cXHeZN9SGG4BER/yTvkEFSuaMItWsWjr0EgpBRp5sF KynNG8QboEBAZjQSDA9rE4P+tA+wxfIoXmvGszNMJEhYWfxqyfXAk8hsbi9SZvr2KiALmOH1KYSHj rKcWo4KNsKu/kQQCwbfA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2DBY-0003e7-IM; Thu, 13 Feb 2020 12:01:36 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2DBH-0003Rb-Ij; Thu, 13 Feb 2020 12:01:21 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 8D7602950AB From: Enric Balletbo i Serra To: linux-kernel@vger.kernel.org Subject: [PATCH] drm/mediatek: Update the fb property mtk_plane_atomic_async_update Date: Thu, 13 Feb 2020 13:01:03 +0100 Message-Id: <20200213120103.823501-1-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200213_040119_754565_2536B978 X-CRM114-Status: UNSURE ( 8.19 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [46.235.227.227 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drinkcat@chromium.org, Philipp Zabel , David Airlie , dri-devel@lists.freedesktop.org, CK Hu , linux-mediatek@lists.infradead.org, Bibby Hsieh , hsinyi@chromium.org, matthias.bgg@gmail.com, Daniel Vetter , Collabora Kernel ML , linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Commit 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update") added support to async updates of cursors by using the new atomic interface for that. Unfortunately, introduced two issues. The first one is that since then, the drm_atomic_helper_async_commit triggers a WARNING due current fb is not the new fb. The second one, is that we get a black screen connecting the external display on Elm device and another WARNING due vblank wait timed out. Swap the fb in mtk_plane_atomic_async_update to fix both issues. Fixes: 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update") Signed-off-by: Enric Balletbo i Serra --- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c index 914cc7619cd7..7eb10115e72a 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c @@ -116,6 +116,7 @@ static void mtk_plane_atomic_async_update(struct drm_plane *plane, plane->state->src_h = new_state->src_h; plane->state->src_w = new_state->src_w; state->pending.async_dirty = true; + swap(plane->state->fb, new_state->fb); mtk_drm_crtc_async_update(new_state->crtc, plane, new_state); }