Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp5853737ybn; Sun, 29 Sep 2019 07:07:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaaMFlK+JVvNyzd9Ged107vgXKw7lGn4qzzJ30vE59nvGiG3NJ2Ymu64O0ew0lHcQ9EeUi X-Received: by 2002:a17:906:7d0:: with SMTP id m16mr15769543ejc.95.1569766027032; Sun, 29 Sep 2019 07:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569766027; cv=none; d=google.com; s=arc-20160816; b=ZBgAYBzgPUldKzv8iQvXE5K+1AwDAg/dnebBk1DXZibeXSQpXNwGTUOri9BGCF6r9J lejvIc4GJWJW8JGLSNEbWZ4B48cagv47XmVBr9ai6GnGH2BO1DC3MiKvJgUvSZ003ViE 0PDnavr/xDx8wXP0/BjJJbi4LiPUW969MiavWwRNi3y2sfF4+n1KDKIAgMomifvbLpKM uaCBfBBGjO6jWpF5g9+Ou0ou8XOrjnoaS/58Anmc1TJvgCYNUkM6nRZKl3LQLhahCAlG miS4OvESINtrrVHLFGs1lWtT3YRbqg6PHDF1sM9UDiqhuFglBnBQC5bMeEnDd/JxYHTk epkA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WQVTEEbTzmHksAfc2Rqg7jNkVbVhnZj07UaLlukSyUs=; b=VgXkQYrg5G/fazSTsk46jJzG23xp2y2Gtyh9ixGMqNeEFY2j0VAK/lt4ApmpeJ1BmO 4EpU0TJFUP0MBo4c8UWMZ8H3iFfLGMMelB/bwDFbOBhGBMauuM/jpwuX9swb2nbKNXYj 1SdJAJ7WTUSsKj6FTbyzevbpKd1U4FshSoSQq/+PMQiAqhAxxIruXBKY5E9haxXlMPFA rv4uvWzkBFRAO6Rsg/fyQgmgjaq8en1XSVLzTBCOMUyEmP/y0qts9vdA3b694qcrwmSh vNjDYQx/TxXtAF4owD4sAkpVudfANAFy+09nCTUQHVb8g7ZtrrJTO5NJGmjkoRURA7eW b0YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="s3GlVV/f"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j52si5463601eda.338.2019.09.29.07.06.42; Sun, 29 Sep 2019 07:07:07 -0700 (PDT) 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; dkim=pass header.i=@kernel.org header.s=default header.b="s3GlVV/f"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729326AbfI2OA4 (ORCPT + 99 others); Sun, 29 Sep 2019 10:00:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:42916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729244AbfI2OAy (ORCPT ); Sun, 29 Sep 2019 10:00:54 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5CCED2082F; Sun, 29 Sep 2019 14:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569765653; bh=GvRHzuZ9n5ZclAM+ZZmd5DVPZsbXsaErbdvLbC5k65U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s3GlVV/fp0LBCAZeRU3z6Cbn6yrKYbWmRlLO6hKHZ4EvpCgbXl8A1KJ16TTK+YQGx 4yK0yoqVX2QBp7z/EyRWA4uSIBjSpKGFQE1uxa0E3b1emh8Iznd/N1HLbbvEMpyKKS vGrpjrSk5eF0OG9xgbH91jV2O12c9tGzRJ5xYdWk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Kazlauskas , Alex Deucher , David Francis Subject: [PATCH 5.2 06/45] drm/amd/display: Allow cursor async updates for framebuffer swaps Date: Sun, 29 Sep 2019 15:55:34 +0200 Message-Id: <20190929135026.613359381@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190929135024.387033930@linuxfoundation.org> References: <20190929135024.387033930@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Kazlauskas commit e16e37efb4c9eb7bcb9dab756c975040c5257e98 upstream. [Why] We previously allowed framebuffer swaps as async updates for cursor planes but had to disable them due to a bug in DRM with async update handling and incorrect ref counting. The check to block framebuffer swaps has been added to DRM for a while now, so this check is redundant. The real fix that allows this to properly in DRM has also finally been merged and is getting backported into stable branches, so dropping this now seems to be the right time to do so. [How] Drop the redundant check for old_fb != new_fb. With the proper fix in DRM, this should also fix some cursor stuttering issues with xf86-video-amdgpu since it double buffers the cursor. IGT tests that swap framebuffers (-varying-size for example) should also pass again. Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: David Francis Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 10 ---------- 1 file changed, 10 deletions(-) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -4209,20 +4209,10 @@ static int dm_plane_atomic_check(struct static int dm_plane_atomic_async_check(struct drm_plane *plane, struct drm_plane_state *new_plane_state) { - struct drm_plane_state *old_plane_state = - drm_atomic_get_old_plane_state(new_plane_state->state, plane); - /* Only support async updates on cursor planes. */ if (plane->type != DRM_PLANE_TYPE_CURSOR) return -EINVAL; - /* - * DRM calls prepare_fb and cleanup_fb on new_plane_state for - * async commits so don't allow fb changes. - */ - if (old_plane_state->fb != new_plane_state->fb) - return -EINVAL; - return 0; }