Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp5851732ybn; Sun, 29 Sep 2019 07:05:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrj7oCUMudu5SJbKoiTILAk5n3px4VXwdO4BOc4hzsT2/Y2px6cLerpXQdqd+X3ZeMGPQi X-Received: by 2002:a50:f60d:: with SMTP id c13mr14830822edn.279.1569765917966; Sun, 29 Sep 2019 07:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569765917; cv=none; d=google.com; s=arc-20160816; b=yFk+bc2M8cSRuKIe40sNWSKMNRVFX+elIC4FAp+BXO465TPkFzGeKAStyKLVgQtkKi H66Q7ud5Cq+ChZeLXCODB3YiGIu4P66FhMCVfZNEp5rwnlGMGaeT9fJtqWYttbV08yFW YZm7KYA3Q4JeJhxzW4jGLTUez29iYN4n7hkhbj02bdf7sPCOY9ds8eCCmF1lSbh8uCJK /H8tQbZQpE5utQZIOyyPuu5ZsdS8ML5xpXjQ+a+mkvlSmCBXmv07hu4cl/7o84IyPeyc pFSF6GXxn5Z4pP4CkYATX90BkUYLLcu6d1CmH4eDQxNKAFbkQJx343sVN4CPGAGiptmL 1EkA== 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=7FAcckdDDHEG1NgCol9J3B+wF3jy9emqIn3w+YPCZYo=; b=UYRJWkYzTkR6shTc9/hUAnPkiEwV4zxKoHl/n9N/7WaOCy+8pu2yfFfKMHFH0gYSVc ddWjGrL3+ylU6jjSOOgxqdTNuMMEP2gzTroGki4+TPm8HQtHadaOQnPG2Liwf5hXSUcY eYvsKrG++J44rjgMb1oa3ygDpxSRe+7GXqC6euwLpuY4QByj+E4bZzMIpZlW6A61IJPv 2FF/mHHZ0oVOvDto52dU1j+8ssuzZsFicH9RWDkb54+F9evUh7Yh3L/80fx+q8sgN0SQ HZP1H2TCjL8LPLf+9hlXBtqJfHkc+kd4dMyjF4ePiA3sxU2MNR72cgSwlOcLKHbVeIV+ OP9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="lRwU8/M7"; 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 p9si5451830edc.96.2019.09.29.07.04.53; Sun, 29 Sep 2019 07:05:17 -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="lRwU8/M7"; 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 S1729313AbfI2ODc (ORCPT + 99 others); Sun, 29 Sep 2019 10:03:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:46648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728809AbfI2ODb (ORCPT ); Sun, 29 Sep 2019 10:03:31 -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 9B2592082F; Sun, 29 Sep 2019 14:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569765810; bh=bj76BUU3zGruNkD2UrUM4J6IyIrJxprftoOAKp+ZfhQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lRwU8/M7I7jxtusiyXWdKpFQND0RTQST09J2AoYkiGEWjNuk3UQY0hNMH5y6JaI1V O5ntLuFjK11J+HG5mp7h9jCUZ801yY7Pia0U5GhodYHUCoSwU4Wtq+h7pTSDyvGNG4 aVTgpN7e5jm1zD+Xd02LCbCDhC+pcibwlMNyitbU= 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.3 04/25] drm/amd/display: Allow cursor async updates for framebuffer swaps Date: Sun, 29 Sep 2019 15:56:07 +0200 Message-Id: <20190929135009.846777225@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190929135006.127269625@linuxfoundation.org> References: <20190929135006.127269625@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 @@ -4548,20 +4548,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; }