Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp469155ybv; Thu, 13 Feb 2020 04:02:40 -0800 (PST) X-Google-Smtp-Source: APXvYqxP9Rxjv0b9D/2hUUVKaCEKP3kqEibk5g8xHqCm9tXNkKWgKZeuIEc0QWzDKEUjZB/oE5hd X-Received: by 2002:a9d:2184:: with SMTP id s4mr12343539otb.121.1581595359906; Thu, 13 Feb 2020 04:02:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581595359; cv=none; d=google.com; s=arc-20160816; b=XVoVqpXUcVBQ+8rUQ3zDe9xaZC2wm0D6HsxoCWSsfNk4+ors39OC2iEfmYz8jHIvSv 2e/NNXcFwHGxaIN6Ey0tEOkYlQOP8INb4mbljHVLhBxwIbgSpch1BsOPQcwLkytfEvhy T4Gk414iSS9+B/7qCGDEECYImQ+FuwG9o+k4PmzIw15V6tk3/X5FqKwMFGawpe7FOVIi 6auTRdM1tWBEC+ATOygnaEXy1HRsvvTyi+XdWIzxeAnTvJdPYwoJceqnuRYbsZQwlZED yEQDuSHMxQhsGs2bE/78kYkTusuhHmoV9DeO4cZyg6rHt9sU9nSdZybfOVWdDkWUQp35 Y09g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=F658+oW9G0KrJu3qbBN/lfyyfiyqo3OpLxQ6poBZQvA=; b=r5KHNTepq7yLmQgQZlNav+q0EwkdiSQi/jJLwBcUcjXMsjRepCzfuApxccYVJtleV1 EdN+AoD4N/UFfXsGIJsn3KtfEX/h0N2RaOb95KwTnZz7SJ9i4ps7O1h76z63m2qxk00B QFpC/QHQpXeIsU98zO2dUhNGXryLx5ypSSpy9zhf3mMZuYQcOe//HSN4A3JIsNG9/Ehp gQagxJ8vEhP2WtNfH3aaLsyNbyN3cR937UvO1ExewC8ydubsG2GSW+/TLtGI4EwsTzST jEAjiQ820i8xsIH7kudF1GfDjcVNyAY/ZNux2Jq/sjg0I2LHXNStKalhBx8ENqA+VC0B JvxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d3si951879oia.236.2020.02.13.04.02.26; Thu, 13 Feb 2020 04:02:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729852AbgBMMBS (ORCPT + 99 others); Thu, 13 Feb 2020 07:01:18 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:59660 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729531AbgBMMBR (ORCPT ); Thu, 13 Feb 2020 07:01:17 -0500 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 Cc: Collabora Kernel ML , Bibby Hsieh , matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, linux-arm-kernel@lists.infradead.org, CK Hu , Philipp Zabel , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, David Airlie , Daniel Vetter 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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); } -- 2.25.0