From patchwork Wed Feb 19 09:17:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun R Murthy X-Patchwork-Id: 13981830 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 9DE5DC021B5 for ; Wed, 19 Feb 2025 09:32:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C07910E7D4; Wed, 19 Feb 2025 09:32:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="CMaLYvPz"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id E3BC310E79B; Wed, 19 Feb 2025 09:32:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739957523; x=1771493523; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=u5bjDgqW+g6qffOrSLcIjtm75P8AAaC3vftEkokJv3s=; b=CMaLYvPz0HKse0W/yyxdCt85autIvGHUmZNNtSPffTg2Jrb1GtwwSwii i5v/zq+OrMWwS4fpuwI5nYYVVanYVyBNw8UwjHnKo7IDKRcyrKpgBriAh dN46hTZPeIslUd+jqvMXDf77Aizgj/vurp7196gjnZXl1TzGKyYq7tsc+ xBHGKWjEbzfdeIabLGz6OV5qgPaHXTwuRgNJB5kpHQTAy5LmVJaE1JbmW BVJ4IreLv77KU3Qyq9a7APbk4o/9mgAZR2GdVx53r2fZNvpKSwrMIh83w b660TUZNePeZwniesLycRIG0wK2w01iUiPX+6JoLPMw6ZS87CnmmgC0yt w==; X-CSE-ConnectionGUID: vPxoT0RBTpuYKT5DeJ87sA== X-CSE-MsgGUID: hylR/QWwT5KWwlAXkxGLnw== X-IronPort-AV: E=McAfee;i="6700,10204,11348"; a="40551471" X-IronPort-AV: E=Sophos;i="6.13,298,1732608000"; d="scan'208";a="40551471" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2025 01:32:02 -0800 X-CSE-ConnectionGUID: RfVp7FUUQMyDjaRE9Z9p3A== X-CSE-MsgGUID: DuZc18bkTganPk3qqUId5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="137910324" Received: from srr4-3-linux-106-armuthy.iind.intel.com ([10.190.238.56]) by fmviesa002.fm.intel.com with ESMTP; 19 Feb 2025 01:32:00 -0800 From: Arun R Murthy Date: Wed, 19 Feb 2025 14:47:23 +0530 Subject: [PATCH v6 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC MIME-Version: 1.0 Message-Id: <20250219-asyn-v6-1-b959e6becb3c@intel.com> References: <20250219-asyn-v6-0-b959e6becb3c@intel.com> In-Reply-To: <20250219-asyn-v6-0-b959e6becb3c@intel.com> To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: chaitanya.kumar.borah@intel.com, Arun R Murthy , Naveen Kumar X-Mailer: b4 0.15-dev 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" There exists a property IN_FORMATS which exposes the plane supported modifiers/formats to the user. In some platforms when asynchronous flip are used all of modifiers/formats mentioned in IN_FORMATS are not supported. This patch adds a new plane property IN_FORMATS_ASYNC to expose the async flip supported modifiers/formats so that user can use this information ahead and do flip with unsupported formats/modifiers. This will save flip failures. Add a new function pointer similar to format_mod_supported specifically for asynchronous flip. v2: Remove async variable from drm_plane (Ville) v3: Add new function pointer for async (Ville) v5: Typo corrected in commit message & some correction in the kernel documentation. (Chaitanya) Signed-off-by: Arun R Murthy Reviewed-by: Chaitanya Kumar Borah Tested-by: Naveen Kumar --- drivers/gpu/drm/drm_mode_config.c | 7 +++++++ drivers/gpu/drm/drm_plane.c | 8 ++++++++ include/drm/drm_mode_config.h | 6 ++++++ include/drm/drm_plane.h | 17 +++++++++++++++++ 4 files changed, 38 insertions(+) diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index 8642a2fb25a90116dab975aa0ab6b51deafb4b96..dbbef20753f834a85ae9ded748cff2b3f0e85043 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -388,6 +388,13 @@ static int drm_mode_create_standard_properties(struct drm_device *dev) return -ENOMEM; dev->mode_config.size_hints_property = prop; + prop = drm_property_create(dev, + DRM_MODE_PROP_IMMUTABLE | DRM_MODE_PROP_BLOB, + "IN_FORMATS_ASYNC", 0); + if (!prop) + return -ENOMEM; + dev->mode_config.async_modifiers_property = prop; + return 0; } diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index a28b22fdd7a41aca82d097d42237851da9a0a79b..fe181c1002171acc68d3054c2d178f9b9f501fe2 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -141,6 +141,14 @@ * various bugs in this area with inconsistencies between the capability * flag and per-plane properties. * + * IN_FORMATS_ASYNC: + * Blob property which contains the set of buffer format and modifier + * pairs supported by this plane for asynchronous flips. The blob is a struct + * drm_format_modifier_blob. Userspace cannot change this property. This is an + * optional property and if not present then user should expect a failure in + * atomic ioctl when the modifier/format is not supported by that plane under + * asynchronous flip. + * * SIZE_HINTS: * Blob property which contains the set of recommended plane size * which can used for simple "cursor like" use cases (eg. no scaling). diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h index 271765e2e9f2da62aaf0d258828ef4196e14822e..0c116d6dfd277262b1a4c0f097fce2d719f43844 100644 --- a/include/drm/drm_mode_config.h +++ b/include/drm/drm_mode_config.h @@ -936,6 +936,12 @@ struct drm_mode_config { */ struct drm_property *modifiers_property; + /** + * @async_modifiers_property: Plane property to list support modifier/format + * combination for asynchronous flips. + */ + struct drm_property *async_modifiers_property; + /** * @size_hints_property: Plane SIZE_HINTS property. */ diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h index dd718c62ac31bf16606f3ee9f025a5b171cd1e67..4393a0e9edf91ccfd78ef62b168b9313187c1a81 100644 --- a/include/drm/drm_plane.h +++ b/include/drm/drm_plane.h @@ -549,6 +549,23 @@ struct drm_plane_funcs { */ bool (*format_mod_supported)(struct drm_plane *plane, uint32_t format, uint64_t modifier); + /** + * @format_mod_supported_async: + * + * This optional hook is used for the DRM to determine if for + * asynchronous flip the given format/modifier combination is valid for + * the plane. This allows the DRM to generate the correct format + * bitmask (which formats apply to which modifier), and to validate + * modifiers at atomic_check time. + * + * Returns: + * + * True if the given modifier is valid for that format on the plane. + * False otherwise. + */ + bool (*format_mod_supported_async)(struct drm_plane *plane, + uint32_t format, uint64_t modifier); + }; /** From patchwork Wed Feb 19 09:17:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun R Murthy X-Patchwork-Id: 13981829 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 31763C021B1 for ; Wed, 19 Feb 2025 09:32:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 93C6E10E7DB; Wed, 19 Feb 2025 09:32:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="a6+rV7mi"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3F39510E7A6; Wed, 19 Feb 2025 09:32:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739957525; x=1771493525; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=8BdzuMlUV+mKswensd1LMdC+P9XM764thIJ9/tajpro=; b=a6+rV7mirKhGHEcZJ0GM/6EQ4J/VD9qbsc8m4h9K83j7XPTYnMXtIkhX Yhi3r5hdKtd/HJlUeFTdre1E0NByoHYp+Ccgz1hoRcxUkgoL/oLKPQP50 K9Zjt1DfeA54Y4PL0P55vhDFK63avCq+hembk6o925/76OXBKs6eNqjt5 nfQHNu1sWCVp7kip0xIOYBQjYMDzRUY/b8jCtkgnOp6FGCpHijnD+959B gNAuZqa4dKhmiHFwozTkl7B/8fJbZ67rofColePvL8Vwtsy2NL3D3iWks Z0h3Mwggf1SB7tqNIpqb5naOtabHoVW/0bMRsswTgZ3NoXme4dgjuQwF3 Q==; X-CSE-ConnectionGUID: zghRA94PR9SUuTLH/GeYrg== X-CSE-MsgGUID: 0gOqckGgR3asdn+3htEmag== X-IronPort-AV: E=McAfee;i="6700,10204,11348"; a="40551481" X-IronPort-AV: E=Sophos;i="6.13,298,1732608000"; d="scan'208";a="40551481" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2025 01:32:05 -0800 X-CSE-ConnectionGUID: 09Ivpo3gRCamuACloC5FvQ== X-CSE-MsgGUID: NW5y9mpPSXyGOavZp52+Lg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="137910337" Received: from srr4-3-linux-106-armuthy.iind.intel.com ([10.190.238.56]) by fmviesa002.fm.intel.com with ESMTP; 19 Feb 2025 01:32:03 -0800 From: Arun R Murthy Date: Wed, 19 Feb 2025 14:47:24 +0530 Subject: [PATCH v6 2/3] drm/plane: modify create_in_formats to accommodate async MIME-Version: 1.0 Message-Id: <20250219-asyn-v6-2-b959e6becb3c@intel.com> References: <20250219-asyn-v6-0-b959e6becb3c@intel.com> In-Reply-To: <20250219-asyn-v6-0-b959e6becb3c@intel.com> To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: chaitanya.kumar.borah@intel.com, Arun R Murthy , Naveen Kumar X-Mailer: b4 0.15-dev 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" create_in_formats creates the list of supported format/modifiers for synchronous flips, modify the same function so as to take the format_mod_supported as argument and create list of format/modifier for async as well. v5: create_in_formats can return -ve value in failure case, correct the if condition to check the creation of blob Dont add the modifier for which none of the formats is not supported. v6: Remove the code for masking the unsupported modifiers as UMD can leave with it. (Naveen/Chaitanya) Signed-off-by: Arun R Murthy Tested-by: Naveen Kumar --- drivers/gpu/drm/drm_plane.c | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index fe181c1002171acc68d3054c2d178f9b9f501fe2..fc26ef8a6cab346c9491495b57f88f1eb205d22c 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -193,9 +193,12 @@ modifiers_ptr(struct drm_format_modifier_blob *blob) return (struct drm_format_modifier *)(((char *)blob) + blob->modifiers_offset); } -static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane) +static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane, + bool (*format_mod_supported) + (struct drm_plane *plane, + uint32_t format, + uint64_t modifier)) { - const struct drm_mode_config *config = &dev->mode_config; struct drm_property_blob *blob; struct drm_format_modifier *mod; size_t blob_size, formats_size, modifiers_size; @@ -237,13 +240,17 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane mod = modifiers_ptr(blob_data); for (i = 0; i < plane->modifier_count; i++) { for (j = 0; j < plane->format_count; j++) { - if (!plane->funcs->format_mod_supported || - plane->funcs->format_mod_supported(plane, - plane->format_types[j], - plane->modifiers[i])) { + if (!format_mod_supported || format_mod_supported + (plane, + plane->format_types[j], + plane->modifiers[i])) { mod->formats |= 1ULL << j; } } + if (!mod->formats) { + blob_data->count_modifiers--; + continue; + } mod->modifier = plane->modifiers[i]; mod->offset = 0; @@ -251,10 +258,7 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane mod++; } - drm_object_attach_property(&plane->base, config->modifiers_property, - blob->base.id); - - return 0; + return blob->base.id; } /** @@ -371,6 +375,7 @@ static int __drm_universal_plane_init(struct drm_device *dev, }; unsigned int format_modifier_count = 0; int ret; + int blob_id; /* plane index is used with 32bit bitmasks */ if (WARN_ON(config->num_total_plane >= 32)) @@ -477,8 +482,24 @@ static int __drm_universal_plane_init(struct drm_device *dev, drm_plane_create_hotspot_properties(plane); } - if (format_modifier_count) - create_in_format_blob(dev, plane); + if (format_modifier_count) { + blob_id = create_in_format_blob(dev, plane, + plane->funcs->format_mod_supported); + if (blob_id > 0) + drm_object_attach_property(&plane->base, + config->modifiers_property, + blob_id); + } + + if (plane->funcs->format_mod_supported_async) { + blob_id = create_in_format_blob(dev, plane, + plane->funcs->format_mod_supported_async); + if (blob_id > 0) + drm_object_attach_property(&plane->base, + config->async_modifiers_property, + blob_id); + } + return 0; } From patchwork Wed Feb 19 09:17:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun R Murthy X-Patchwork-Id: 13981828 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 F29B9C021B6 for ; Wed, 19 Feb 2025 09:32:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E85EC10E7D6; Wed, 19 Feb 2025 09:32:08 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="YfEjdtux"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id B0AA610E7D1; Wed, 19 Feb 2025 09:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739957527; x=1771493527; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=NTkaFdqOXt49ggVpaXj+gVSCa/GyDDoh3XBDpGhpmt0=; b=YfEjdtuxenWLVnKMHFMUWTGDsmQGfAm2AMKFbZDBTzAjQq3phiH4Hu5x 0wGxoOIrcdfWx8AMrQtx7W0LvpPPf9EjCMT7bWezZJZyN5ZNKq5l0QPoA ieotD0aHboKNwtyodDHdZSpCKydgrRpbKDapaYkDjayToQpmlNHv+6DEp DMdXreygOuX2WbBPtm0QqfvLyXPhE2ysV47/FGNXbS19FiTWv3dHqEObB dPduo4BrlL3lKXQvVYb1ysFwF0TSqAdBSQaqhwBK3NcWa/U4k7V0t/c/h pxKe0uMWxXW5jXPMmvxLi/70aQd+gjsBk2AO3Kb/ayfIm/hsCWykHkZoK Q==; X-CSE-ConnectionGUID: g21WQ89pThyqOvdLsudECQ== X-CSE-MsgGUID: Xym6QfZBTGmnSfTEKT5/bg== X-IronPort-AV: E=McAfee;i="6700,10204,11348"; a="40551488" X-IronPort-AV: E=Sophos;i="6.13,298,1732608000"; d="scan'208";a="40551488" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2025 01:32:07 -0800 X-CSE-ConnectionGUID: KDm2tZ/dRhCpsqFlI6TXDQ== X-CSE-MsgGUID: eWKPaJ+CQaCNIrUKVSmk7Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="137910344" Received: from srr4-3-linux-106-armuthy.iind.intel.com ([10.190.238.56]) by fmviesa002.fm.intel.com with ESMTP; 19 Feb 2025 01:32:05 -0800 From: Arun R Murthy Date: Wed, 19 Feb 2025 14:47:25 +0530 Subject: [PATCH v6 3/3] drm/i915/display: Add i915 hook for format_mod_supported_async MIME-Version: 1.0 Message-Id: <20250219-asyn-v6-3-b959e6becb3c@intel.com> References: <20250219-asyn-v6-0-b959e6becb3c@intel.com> In-Reply-To: <20250219-asyn-v6-0-b959e6becb3c@intel.com> To: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org Cc: chaitanya.kumar.borah@intel.com, Arun R Murthy , Sebastian Brzezinka , Naveen Kumar X-Mailer: b4 0.15-dev 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hook up the newly added plane function pointer format_mod_supported_async to populate the modifiers/formats supported by asynchronous flips. v5: Correct the if condition for modifier support check (Chaitanya) v6: Replace uint32_t/uint64_t with u32/u64 (Jani) Signed-off-by: Arun R Murthy Reviewed-by: Chaitanya Kumar Borah Reviewed-by: Sebastian Brzezinka Tested-by: Naveen Kumar --- drivers/gpu/drm/i915/display/skl_universal_plane.c | 56 ++++++++++++++++------ 1 file changed, 41 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c index cd9762947f1de227a3abbcd61b7c7b0c9848e439..f8baeb012f5e2423204f3f5ad7ce466666e04def 100644 --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c @@ -509,6 +509,33 @@ skl_plane_max_stride(struct intel_plane *plane, modifier, rotation, max_pixels, max_bytes); } +static bool intel_plane_async_formats(struct intel_plane *plane, u32 format) +{ + switch (format) { + case DRM_FORMAT_RGB565: + case DRM_FORMAT_XRGB8888: + case DRM_FORMAT_XBGR8888: + case DRM_FORMAT_ARGB8888: + case DRM_FORMAT_ABGR8888: + case DRM_FORMAT_XRGB2101010: + case DRM_FORMAT_XBGR2101010: + case DRM_FORMAT_XRGB16161616F: + case DRM_FORMAT_XBGR16161616F: + return true; + default: + return false; + } +} + +static bool intel_plane_format_mod_supported_async(struct drm_plane *plane, + u32 format, + u64 modifier) +{ + if (!intel_plane_can_async_flip(to_intel_plane(plane), modifier)) + return false; + + return intel_plane_async_formats(to_intel_plane(plane), format); +} static bool tgl_plane_can_async_flip(u64 modifier) { @@ -2616,30 +2643,29 @@ static bool tgl_plane_format_mod_supported(struct drm_plane *_plane, } } +#define INTEL_PLANE_FUNCS \ + .update_plane = drm_atomic_helper_update_plane, \ + .disable_plane = drm_atomic_helper_disable_plane, \ + .destroy = intel_plane_destroy, \ + .atomic_duplicate_state = intel_plane_duplicate_state, \ + .atomic_destroy_state = intel_plane_destroy_state, \ + .format_mod_supported_async = intel_plane_format_mod_supported_async + static const struct drm_plane_funcs skl_plane_funcs = { - .update_plane = drm_atomic_helper_update_plane, - .disable_plane = drm_atomic_helper_disable_plane, - .destroy = intel_plane_destroy, - .atomic_duplicate_state = intel_plane_duplicate_state, - .atomic_destroy_state = intel_plane_destroy_state, + INTEL_PLANE_FUNCS, + .format_mod_supported = skl_plane_format_mod_supported, }; static const struct drm_plane_funcs icl_plane_funcs = { - .update_plane = drm_atomic_helper_update_plane, - .disable_plane = drm_atomic_helper_disable_plane, - .destroy = intel_plane_destroy, - .atomic_duplicate_state = intel_plane_duplicate_state, - .atomic_destroy_state = intel_plane_destroy_state, + INTEL_PLANE_FUNCS, + .format_mod_supported = icl_plane_format_mod_supported, }; static const struct drm_plane_funcs tgl_plane_funcs = { - .update_plane = drm_atomic_helper_update_plane, - .disable_plane = drm_atomic_helper_disable_plane, - .destroy = intel_plane_destroy, - .atomic_duplicate_state = intel_plane_duplicate_state, - .atomic_destroy_state = intel_plane_destroy_state, + INTEL_PLANE_FUNCS, + .format_mod_supported = tgl_plane_format_mod_supported, };