From patchwork Wed Aug 15 06:35:31 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: 10566307 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 CC87813B4 for ; Wed, 15 Aug 2018 06:36:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB8152897B for ; Wed, 15 Aug 2018 06:36:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADA9829EAB; Wed, 15 Aug 2018 06:36:03 +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 539AA2897B for ; Wed, 15 Aug 2018 06:36:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 52C6289F55; Wed, 15 Aug 2018 06:36:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70041.outbound.protection.outlook.com [40.107.7.41]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C9E889F55 for ; Wed, 15 Aug 2018 06:35:58 +0000 (UTC) Received: from lowry-ThinkStation-P300.shanghai.arm.com (113.29.88.7) by AM0PR08MB3523.eurprd08.prod.outlook.com (2603:10a6:208:dd::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.19; Wed, 15 Aug 2018 06:35:49 +0000 From: Lowry Li To: liviu.dudau@arm.com Subject: [PATCH v4 0/2] drm/blend: Add per-plane pixel blend mode property Date: Wed, 15 Aug 2018 14:35:31 +0800 Message-Id: <1534314933-23182-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: SG2PR01CA0129.apcprd01.prod.exchangelabs.com (2603:1096:4:40::33) To AM0PR08MB3523.eurprd08.prod.outlook.com (2603:10a6:208:dd::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: db91d3e1-5521-44e4-59dd-08d6027959c1 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR08MB3523; X-Microsoft-Exchange-Diagnostics: 1; AM0PR08MB3523; 3:tFz1F62iJn1bFqhb3eNEbXQflpAGkBoQKoUzo/5eywnWi1d+Ccz84zuNWSJLNHvZuKa6xIsIWCKfPGUg+uFM7xBSSnC90uCV2czjLIG8xFpi69LPyXDREcO08F0ESXNfTHshuOlSZxqUBnQhBcN20wi5FcqDa6sB3ncZpURitX0MD5RfPRUY0ZTN7Dv3baHggZMF/XySEsnsXaODEEirUgkmFtAEbDER4+g+1c/2yHW7jlalU1wYPSNf1RIJpPlB; 25:tLRy5hKKYVzXWjL+gEdVNhWPSd9Ro/QXhXD20D4WFpSb82qP9RXUxvEUuR+4lEmfQb8him6NU00EQCeISpwra2MJkeBES7sY07FAejVHJVRtqU/E3n72UUl1+soZm4Syp0QgIr8h/6q1WOYkstDS5NqeKhpKtSp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VqaBXyB94TNnjcoJh8aLCTkdeUio41bo0CX1vTbUE6x0iC9C+Q== 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)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:AM0PR08MB3523; BCL:0; PCL:0; RULEID:; SRVR:AM0PR08MB3523; X-Forefront-PRVS: 07658B8EA3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(136003)(39860400002)(396003)(366004)(376002)(346002)(199004)(189003)(7736002)(305945005)(16586007)(66066001)(37006003)(3846002)(50466002)(478600001)(72206003)(8936002)(48376002)(68736007)(50226002)(86362001)(39060400002)(316002)(6116002)(14444005)(47776003)(36756003)(97736004)(34206002)(25786009)(2906002)(5660300001)(51416003)(6636002)(2361001)(4326008)(6666003)(44832011)(6486002)(106356001)(81156014)(105586002)(2351001)(53936002)(7696005)(956004)(81166006)(386003)(52116002)(2616005)(486006)(8676002)(26005)(16526019)(476003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR08MB3523; H:lowry-ThinkStation-P300.shanghai.arm.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR08MB3523; 23:jiLoTtQVLfvCp93I1rpjmlHi27YaM0fb8WRJkaYMP?= 6Dva0wp63ce49XhsM3QnLJ5OVXw3OLg6xY7DVBNB1DFmSATvzTKSCDrA93+qWQy8M1RMI0CC92N11UFyPYFDLaRxy3v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gHA0Rp2ShDDwQNchJH5IXc3NuAP0znxFI0BX8tYFryeSuatAoge0aNSb4YtlGpZLIxi8NHTU+hNWxwW8Y12NPYcUGkGDGJHR/xLAB7xqLkIe6UA9pqtx0VQ4=; 7:NN1DMb5CRKg63oi4iTPc2IsDh5TwLCmTGcr/BaAFsgyb+i5n33kbDYHxiAScGTQWkaUZJJxO1R0fNbWwnQQ/xxWJrWH0BT4ii6QOTQeI4tox0bNs37idKCyL4ZNSV4Ts9wZ+Fa7S+i63dw2Fkl7sk192u1/cq00YF5AM8Aehn4r2GdBOA5LK2qUulXCFA/Zz5Br3i0rY3DFs8WMoKyRKJ5uhZ4U+bYifUwL4gb9Jhy8yrO+tx4pToqMnb4hyZW7C SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2018 06:35:49.5270 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: db91d3e1-5521-44e4-59dd-08d6027959c1 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3523 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, seanpaul@chromium.org, 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(-)