From patchwork Fri Apr 14 19:09:12 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: 13211928 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 05BADC77B78 for ; Fri, 14 Apr 2023 19:09:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A15F010EE6A; Fri, 14 Apr 2023 19:09:35 +0000 (UTC) Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3ECC510EE63 for ; Fri, 14 Apr 2023 19:09:29 +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: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: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Hk37BbZh+XlvqLOKMzi+OOzBHa2lZo1gVnXODj6cod8=; b=kWUidaGmuqiE6sTOL9NGDRDgUr AjkvHxOEqAjtIYhYdBFLTh4pPexpyLAFjrsL4NdvwNU+6EP7xK8NzpAmtsPGk7Strn8sP75UzE5k8 wu/+zgGBu83wCOP4h+OcT+HS7TTClIq27ejRYf5P+rrykcsqnm006jLz9QArBngdpGnijMpKSN+7y KlU0Cz1s0CGVf999Ov4Xe2PKOeacOgy86TLr/G4bx3s7llNYavjJPjSAR/RUYl62uFo0W0wTuax6l 7ODfkLebhQVT/ihACBt5wTnJ3vmsy6RIETyz4Tr9XmGOzeY2OXlXaEUAi1JS9v4YJIEHs33T4qS9i BzK9otWQ==; 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 1pnOnR-001FnP-8b; Fri, 14 Apr 2023 21:09:21 +0200 From: =?utf-8?q?Ma=C3=ADra_Canal?= To: David Airlie , Daniel Vetter , Rodrigo Siqueira , Melissa Wen , Haneen Mohammed , Arthur Grillo Subject: [PATCH 1/2] drm/vkms: allow full alpha blending on all planes Date: Fri, 14 Apr 2023 16:09:12 -0300 Message-Id: <20230414190913.106633-1-mcanal@igalia.com> X-Mailer: git-send-email 2.39.2 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 was not able to support the alpha channel. After commit bc0d7fdefec6, this is possible, as the composition is now executed on top of the CRTC. So, allow all planes to support the alpha channel, making full alpha blending possible in vkms. Signed-off-by: Maíra Canal --- drivers/gpu/drm/vkms/vkms_plane.c | 32 ++----------------------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c index c41cec7dcb70..70474c74b681 100644 --- a/drivers/gpu/drm/vkms/vkms_plane.c +++ b/drivers/gpu/drm/vkms/vkms_plane.c @@ -12,12 +12,6 @@ #include "vkms_formats.h" static const u32 vkms_formats[] = { - DRM_FORMAT_XRGB8888, - DRM_FORMAT_XRGB16161616, - DRM_FORMAT_RGB565 -}; - -static const u32 vkms_plane_formats[] = { DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888, DRM_FORMAT_XRGB16161616, @@ -196,38 +190,16 @@ struct vkms_plane *vkms_plane_init(struct vkms_device *vkmsdev, enum drm_plane_type type, int index) { struct drm_device *dev = &vkmsdev->drm; - const struct drm_plane_helper_funcs *funcs; struct vkms_plane *plane; - const u32 *formats; - int nformats; - - switch (type) { - case DRM_PLANE_TYPE_PRIMARY: - formats = vkms_formats; - nformats = ARRAY_SIZE(vkms_formats); - funcs = &vkms_primary_helper_funcs; - break; - case DRM_PLANE_TYPE_CURSOR: - case DRM_PLANE_TYPE_OVERLAY: - formats = vkms_plane_formats; - nformats = ARRAY_SIZE(vkms_plane_formats); - funcs = &vkms_primary_helper_funcs; - break; - default: - formats = vkms_formats; - nformats = ARRAY_SIZE(vkms_formats); - funcs = &vkms_primary_helper_funcs; - break; - } plane = drmm_universal_plane_alloc(dev, struct vkms_plane, base, 1 << index, &vkms_plane_funcs, - formats, nformats, + vkms_formats, ARRAY_SIZE(vkms_formats), NULL, type, NULL); if (IS_ERR(plane)) return plane; - drm_plane_helper_add(&plane->base, funcs); + drm_plane_helper_add(&plane->base, &vkms_primary_helper_funcs); return plane; } From patchwork Fri Apr 14 19:09:13 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: 13211927 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 19DBEC77B72 for ; Fri, 14 Apr 2023 19:09:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A5F9110EE61; Fri, 14 Apr 2023 19:09:33 +0000 (UTC) Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 142D310EE69 for ; Fri, 14 Apr 2023 19:09:30 +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=EdNvHo9u33nfqJjqPsoIwHD8pScLPFMH4XTEGE58Fj0=; b=PrBqXnOFiRmkjDgxzgmgTNy3Wg jG8+zEIOdtuZxSwQ9zHm2VjwzUlVNAkPk+gon+vzRvIOL0ya/Ec6pKoXyhegqdYBQNVYQ11Yuf4SW 0CwDWKghA1aLW93pJ5WPxLqqMZPXmjzjxNyTtBrA7VL/FUknb4NYSzTXTrZpgcns+icFWyGARfB0Q bjGKO5RkgmT9La7zlCJqCMmJb6WPvlzCu5nk1KqLx66jPEXciOBYY2cG6eNhR51ApcTwiwFRUgc5Q RKAHwCdoNPBGYHpBt32tcg1hp8AgBdNjWMK4s7SINAIujI5AkkWASXdFRfUSrfrPi1mKzklHgeRzL tAG+hOiA==; 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 1pnOnU-001FnP-Uk; Fri, 14 Apr 2023 21:09:25 +0200 From: =?utf-8?q?Ma=C3=ADra_Canal?= To: David Airlie , Daniel Vetter , Rodrigo Siqueira , Melissa Wen , Haneen Mohammed , Arthur Grillo Subject: [PATCH 2/2] drm/vkms: Drop full alpha blending TODO Date: Fri, 14 Apr 2023 16:09:13 -0300 Message-Id: <20230414190913.106633-2-mcanal@igalia.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230414190913.106633-1-mcanal@igalia.com> References: <20230414190913.106633-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" Now that VKMS supports full alpha blending on all planes, drop the "ARGB format on primary plane" and "Full alpha blending on all planes" tasks from the TODO list. Signed-off-by: Maíra Canal --- Documentation/gpu/vkms.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu/vkms.rst index 49db221c0f52..0f599c897614 100644 --- a/Documentation/gpu/vkms.rst +++ b/Documentation/gpu/vkms.rst @@ -118,13 +118,8 @@ Add Plane Features There's lots of plane features we could add support for: -- ARGB format on primary plane: blend the primary plane into background with - translucent alpha. - - Add background color KMS property[Good to get started]. -- Full alpha blending on all planes. - - Rotation, scaling. - Additional buffer formats, especially YUV formats for video like NV12.