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; }