Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp558051ybv; Thu, 13 Feb 2020 05:38:38 -0800 (PST) X-Google-Smtp-Source: APXvYqwxnRcjJki1mQr2PSTKyNXYhpI9iaVqomaRERhFDZ4aYveglANdM+7Rx271jvJ/KuVS+36M X-Received: by 2002:aca:2b04:: with SMTP id i4mr2918319oik.21.1581601118444; Thu, 13 Feb 2020 05:38:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581601118; cv=none; d=google.com; s=arc-20160816; b=ypPT6KkjCXm0msssJ56IIbdX3Bfe4niw3AnkRFty/74RDFl8ue03BR0nJEw/jebcP1 tS85iCUGMCrItpYYrkBGRfjv+gXvfU+l0R+gli6tKfr1/jXxl21uwCTRj32xSR7dJuDT TfbdsxJyXgraJlktxmAg3B2BPRM7mTqQU57VmOofDGPQ8sDmi8uRpIBSGZKFkqISkYjw GlrJ46LNaSAV8p0+V23lWvjdBz/Hpr7fUuPOll12u6xulTFCjJDIdbSZHeRusaHOTh3C brvP/UJzqiPpdwM8qhpB1cy0JqYyODxlyt+3v8/VXH2OSHo7z6/hV6+ZFRx+lSJJVCwZ v55g== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject; bh=jOCZ8DrpZNi2YZD/2omOA3U5b24yVNAULRyGjbUDFnM=; b=o6NwGp1A+qqFgYYn2QoPR9FKFOJOsei6zqC6c+5C5y9Ikr+w5dwnZywrtAkl0zigJm p4ARRWE1MkE0ftaWKRyJSRGMbB+lxWEfq670MDr5thHHPszg4ZvGvU9zkPsBHRlz56QE /I8kCK1ZDoIHkyTxO7unmF9tHTL1Baod3wwF0H4M3aTs3Dhviq+fgmderBCMdjhni8tA uzv7VBriJkR1jKVkqiT2yKqHn1VGuP8zoMA3LmwKt2Yq9NbxzGF8sqydD0voJlT/YAOi LJWDxgjbjY1LGiUYiQe013wIusOVjLfBbTKYDpeTWaeVa6mySxjWI0KkoB+o1zsc0Sxv Tl9Q== 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 l23si1128981otj.302.2020.02.13.05.38.25; Thu, 13 Feb 2020 05:38:38 -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 S1730040AbgBMNiU (ORCPT + 99 others); Thu, 13 Feb 2020 08:38:20 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:32992 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729559AbgBMNiU (ORCPT ); Thu, 13 Feb 2020 08:38:20 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id AEB7029520D Subject: Re: [PATCH] drm/mediatek: Update the fb property mtk_plane_atomic_async_update 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 References: <20200213120103.823501-1-enric.balletbo@collabora.com> Message-ID: <7cd36a53-30d9-7efb-4864-78f994268f1b@collabora.com> Date: Thu, 13 Feb 2020 14:38:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200213120103.823501-1-enric.balletbo@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 13/2/20 13:01, Enric Balletbo i Serra wrote: > 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 > --- I just noticed this, which should fix the problem too, so you can ignore this patch. https://patchwork.kernel.org/patch/11379571/ > > 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); > } >