From patchwork Tue Aug 14 11:32:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lowry Li (Arm Technology China)" X-Patchwork-Id: 10565373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D84DF15A6 for ; Tue, 14 Aug 2018 11:33:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB4BF28D6C for ; Tue, 14 Aug 2018 11:33:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AEECB28DBA; Tue, 14 Aug 2018 11:33:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.6 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, FUZZY_AMBIEN,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4F12628D6C for ; Tue, 14 Aug 2018 11:33:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B7471899BE; Tue, 14 Aug 2018 11:33:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60087.outbound.protection.outlook.com [40.107.6.87]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFBEC8989E for ; Tue, 14 Aug 2018 11:33:23 +0000 (UTC) Received: from lowry-ThinkStation-P300.shanghai.arm.com (113.29.88.7) by VI1PR08MB3533.eurprd08.prod.outlook.com (2603:10a6:803:84::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.22; Tue, 14 Aug 2018 11:33:16 +0000 From: Lowry Li To: liviu.dudau@arm.com Subject: [PATCH v4 0/2] drm/blend: Add per-plane pixel blend mode property Date: Tue, 14 Aug 2018 19:32:55 +0800 Message-Id: <1534246377-31346-1-git-send-email-lowry.li@arm.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [113.29.88.7] X-ClientProxiedBy: SG2PR0302CA0016.apcprd03.prod.outlook.com (2603:1096:3:2::26) To VI1PR08MB3533.eurprd08.prod.outlook.com (2603:10a6:803:84::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 31ded68a-3109-48e2-6963-08d601d9bcb3 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR08MB3533; X-Microsoft-Exchange-Diagnostics: 1; VI1PR08MB3533; 3:7/7scCY+KdbJv4UMebdljm9eDS7g/p0qlvNaAMzThIaBxe5lb+U3hF/x6DImy5yEEPuVlAiTtaPs6D1vU3NOTYistYIWvycR8qLKSeyKS/JSFQQro+VMRhUXGXPos2Vvt1VCuQNGOuP2lYNEPXswAPQU0olcpyrNBZyYfWhgzEwqcJBTY98wCzeVtHawiboaO1pqz5+3WyJ84psBhetLTjLR7KSfyniwYXOmF+X/cDBjZz9KLQVV/9vjLA5D5k98; 25:2UK/3yV2Lc+EP4AaUnK9LPblRPT9FVO2L+xfE2aJD2WFI6S63I/saSyNRkDbS3qEuC8KjWV9FFSXlBK+5P1qdA2YWGX0A46xx+PmcC9c8u5TS/eU7d90zGGEIAWV1tmjA37e35K5zCEyVS06Z0M/MTTROU3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i6U/zL/8DxSJ+/deqGe5m50suQ019Vr42FqwI0UsiQ38yEqSXK9da/WKLGIytXEA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:VI1PR08MB3533; BCL:0; PCL:0; RULEID:; SRVR:VI1PR08MB3533; X-Forefront-PRVS: 0764C4A8CD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(136003)(346002)(376002)(366004)(189003)(199004)(8676002)(6486002)(25786009)(386003)(68736007)(2351001)(2361001)(2906002)(36756003)(316002)(53936002)(34206002)(39060400002)(50226002)(8936002)(44832011)(16526019)(81156014)(6636002)(81166006)(4326008)(6666003)(105586002)(106356001)(26005)(7696005)(51416003)(5660300001)(52116002)(305945005)(7736002)(476003)(66066001)(3846002)(37006003)(956004)(16586007)(486006)(14444005)(478600001)(72206003)(6116002)(97736004)(50466002)(47776003)(2616005)(86362001)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3533; H:lowry-ThinkStation-P300.shanghai.arm.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR08MB3533; 23:Mfxi+qnqGFIMui+NjNeiAqaK5OmmGUQL9jIyGOt+M?= 8L6UTKaZIw2qv3+zfpRW3QSXuHOW/TUUwQsZunHma1HZCvpy5cr2yRR+hQHiMkTXde7ymbj0gEgIhdvp07YJ5Haxj1XwHFkFXOgQmj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h8HV2SNg/KrJlH8=; 7:7EzOgCSLIby7xQPPwjI2nmvPOPA0gnBl2DjP2lR+sTAB5nuUomKYlbWwFWf3S/mbzrGe80iLBbEi9d60o5bBqR8lvbAeVc2IrFJtbri6hoU9VT0jLRBwD0Ks42GzoZWcJ1rl4ZbuhhixL2O3L63cCJUbt5P4JFvxz8nLUfOUr9E8Nx/gTAgVUKzF2eWqtvJVawWS477P29sHqCmcSfMDhJ/NoyDAz8jyLmPr9PPoc6pe4NyV9ZABk87S2vdF94lo SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2018 11:33:16.2877 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 31ded68a-3109-48e2-6963-08d601d9bcb3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3533 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, emil.l.velikov@gmail.com, malidp@foss.arm.com, daniel.vetter@intel.com, nd@arm.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi, This serie aims at adding the support for pixel blend modes represent the alpha blending equation selection in the driver. It also introduces to use it in the malidp driver. Let me know what you think, Lowry Changes for v4: - Refines drm_plane_create_blend_mode_property(). drm_property_add_enum() can calculate the index itself just fine, so no point in having the caller pass it in. - Since the current DRM assumption is that alpha is premultiplied as default, define DRM_MODE_BLEND_PREMULTI as 0 will be better. - Refines some comments. - Updates on drm/malidp, hardware limitation check only when the format has alpha pixel. - Rebases on drm-misc-next and fixed the confilcts Changes for v3: - Refines the comments of drm_plane_create_blend_mode_property: 1) Puts the descriptions (after the ":") on a new line 2) Adds explaining why @supported_modes need PREMUL as default - Refines the comments of drm/mali-dp patchset - Rebased on drm-misc-next and fixed the confilcts with plane alpha patch Changes for v2: - Moves the blending equation into the DOC comment - Refines the comments of drm_plane_create_blend_mode_property to not enumerate the #defines, but instead the string values - Uses fg.* instead of pixel.* and plane_alpha instead of plane.alpha - Introduces to use it in the malidp driver, which depends on the plane alpha patch Changes from v1: - v1 is just the core changes to request for commments - Adds a pixel_blend_mode to drm_plane_state and a blend_mode_property to drm_plane, and related support functions - Defines three blend modes in drm_blend.h - Rebased on current drm-next Lowry Li (2): drm: Add per-plane pixel blend mode property drm/mali-dp: Implement plane alpha and pixel blend on malidp drivers/gpu/drm/arm/malidp_planes.c | 74 ++++++++++++--------- drivers/gpu/drm/drm_atomic.c | 4 ++ drivers/gpu/drm/drm_atomic_helper.c | 1 + drivers/gpu/drm/drm_blend.c | 126 ++++++++++++++++++++++++++++++++++++ include/drm/drm_blend.h | 6 ++ include/drm/drm_plane.h | 2 + 6 files changed, 182 insertions(+), 31 deletions(-)