From patchwork Fri Mar 24 16:42:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ma=C3=ADra_Canal?= X-Patchwork-Id: 13186997 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6F91C6FD20 for ; Fri, 24 Mar 2023 16:44:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F92B10E04E; Fri, 24 Mar 2023 16:44:47 +0000 (UTC) Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0744D10E04E for ; Fri, 24 Mar 2023 16:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=GDg67yEfpstotWBfsfXoe1HKLG/VZOesRn1KPXxexts=; b=gKGSuSb/5saC3AYs1kZQJMGq6o herz400UetMpsPDJIFvpWtlsg6Bo8Cic7sfrJwsu5f5ydyb3Ezms10cAIadlnwZ06Y8Klto4APpKq wvHUfxDvnUaYyYNusLv59fi91qXUbJNyeY4teGJ0k/erNs3pZ1WcrReBwERcEMI72JPC3TB/WId8H a9EIe2J+tn7Fs6yMvxYzco2ajfpOuB+eatvEpR67fR5vdVyj8t+K51/QgN3r9Hj9yLQONyaCNfi1s IUiuqnoCtUB8ahuEv5AJVLR2ztyvcdV/zW5hk0P6h7m/PWyK/CPtmGgNOfFYUkc6FDBxQU1fGmtc0 /kISUUaw==; Received: from [177.34.168.16] (helo=bowie..) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1pfkWt-005bt9-Qq; Fri, 24 Mar 2023 17:44:40 +0100 From: =?utf-8?q?Ma=C3=ADra_Canal?= To: David Airlie , Daniel Vetter , Rodrigo Siqueira , Melissa Wen , Haneen Mohammed Subject: [PATCH v2 1/2] drm/vkms: remove the need for the primary plane to be visible Date: Fri, 24 Mar 2023 13:42:25 -0300 Message-Id: <20230324164226.256084-2-mcanal@igalia.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230324164226.256084-1-mcanal@igalia.com> References: <20230324164226.256084-1-mcanal@igalia.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Ma=C3=ADra_Canal?= , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Before commit bc0d7fdefec6 ("drm: vkms: Supports to the case where primary plane doesn't match the CRTC"), the composition was executed on top of the primary plane. Therefore, the primary plane needed to be visible and full screen. After commit bc0d7fdefec6, this is no longer necessary, as the composition is now executed on top of the CRTC. Then, remove the conditional expression that forced the primary plane to be visible and full screen. This allows vkms to accept non-null framebuffers when the CRTC is disabled. This patch was tested with the vkms IGT testlist and all tests passed successfully. Moreover, the tests igt@kms_universal_plane@universal-plane-pipe-a-functional and igt@kms_universal_plane@disable-primary-vs-flip-pipe-a used to fail and now are passing. Signed-off-by: Maíra Canal --- drivers/gpu/drm/vkms/vkms_plane.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index b3f8a115cc23..458d16865c97 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -153,10 +153,6 @@ static int vkms_plane_atomic_check(struct drm_plane *plane, if (ret != 0) return ret; - /* for now primary plane must be visible and full screen */ - if (!new_plane_state->visible && !can_position) - return -EINVAL; - return 0; } From patchwork Fri Mar 24 16:42:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ma=C3=ADra_Canal?= X-Patchwork-Id: 13186998 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3F97CC6FD1C for ; Fri, 24 Mar 2023 16:44:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3543810E0BF; Fri, 24 Mar 2023 16:44:48 +0000 (UTC) Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 24E3910E04E for ; Fri, 24 Mar 2023 16:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=GdSIGsEfy7jdegMgyGDMNe0GexXKg6Jk+s3hWq7mXp0=; b=qyfqtoSPZF+NZm0INRmbMAVDfK mlbAtqvm6LkkkuACNvfN2MirfJUj82rjhQXRMHxqqBi4gb81iy/3KZcEOhd2mn6NEEzpdPuUjrphW aysEMX47mL+5RmY4rAdyDc3NMCBnSeP/rf5XqHzAw5+b1+CJ/l+Q9RPSjDu5+pzZi6x1gori1xzAk YcSFCvpMNi1Fgvtpf+tEyjf7ETqu68/ZIMOKgkV2TcOEbV9YrwdIA9gslAyeYZpzAQvkrZ4hUB0zZ n8cwNkC9EPDz87h6gIrkuKBwyUDRaSgaplqm+g+6qcpghZrbxGVjKagBJ7znbvaxFZ6huCYjHEfyS +dx5BrIQ==; Received: from [177.34.168.16] (helo=bowie..) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1pfkWw-005bt9-Up; Fri, 24 Mar 2023 17:44:43 +0100 From: =?utf-8?q?Ma=C3=ADra_Canal?= To: David Airlie , Daniel Vetter , Rodrigo Siqueira , Melissa Wen , Haneen Mohammed Subject: [PATCH v2 2/2] drm/vkms: allow the primary plane to be positioned Date: Fri, 24 Mar 2023 13:42:26 -0300 Message-Id: <20230324164226.256084-3-mcanal@igalia.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230324164226.256084-1-mcanal@igalia.com> References: <20230324164226.256084-1-mcanal@igalia.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Ma=C3=ADra_Canal?= , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Before commit bc0d7fdefec6 ("drm: vkms: Supports to the case where primary plane doesn't match the CRTC"), the composition was executed on top of the primary plane. Therefore, the primary plane needed to cover the entire CRTC. After commit bc0d7fdefec6, this is no longer necessary, as the composition is now executed on top of the CRTC. Then, allow the primary plane to be positioned in such a way that it doesn't cover the entire CRTC. This patch was tested with the vkms IGT testlist and all tests passed successfully. Moreover, the test igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-A used to fail and now is passing. Signed-off-by: Maíra Canal --- drivers/gpu/drm/vkms/vkms_plane.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index 458d16865c97..c41cec7dcb70 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -132,7 +132,6 @@ static int vkms_plane_atomic_check(struct drm_plane *plane, struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); struct drm_crtc_state *crtc_state; - bool can_position = false; int ret; if (!new_plane_state->fb || WARN_ON(!new_plane_state->crtc)) @@ -143,13 +142,10 @@ static int vkms_plane_atomic_check(struct drm_plane *plane, if (IS_ERR(crtc_state)) return PTR_ERR(crtc_state); - if (plane->type != DRM_PLANE_TYPE_PRIMARY) - can_position = true; - ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state, DRM_PLANE_NO_SCALING, DRM_PLANE_NO_SCALING, - can_position, true); + true, true); if (ret != 0) return ret;