From patchwork Tue Feb 18 09:02:47 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: 13979372 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 33D12C021AD for ; Tue, 18 Feb 2025 09:17:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4AF7410E641; Tue, 18 Feb 2025 09:17:46 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="epzE2i57"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2206710E63D; Tue, 18 Feb 2025 09:17:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739870265; x=1771406265; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=u5bjDgqW+g6qffOrSLcIjtm75P8AAaC3vftEkokJv3s=; b=epzE2i57Rch6tNKqvgjZ9wNNDUoDMA1ELAOxpgg4SuQqrMCrjcnwCR9y ppZ28AoSXG00UpUqp1thztg2SC2FXwyTJXQkUc8EY6LMBwgcCOXRISOir 2W7tnVdW8voYWjRT5aIICNhPyYx/tFQU0Zi3yfiSQDqMKPG70FqBdmZuo B2ivkcPQVqhsA/KR1Vz0veWf0E/qEwf16rhrSjGNFZ+sblR/xm5GhgqnW 8csWeI+NfXtB/A6WS4wbBI3llsYL4CPQeXgKr6chjPWEfuRy752bjPJTd 1T9PEsnG5m5E0x65whryU7gQzLQ/7KP1P5N4hdMu5QcKq/Btr32A+XU2F A==; X-CSE-ConnectionGUID: iQOYefiDTx63zTR92vAtRg== X-CSE-MsgGUID: UjGwu1TgRXmn/31e58Nm5A== X-IronPort-AV: E=McAfee;i="6700,10204,11348"; a="51198273" X-IronPort-AV: E=Sophos;i="6.13,295,1732608000"; d="scan'208";a="51198273" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2025 01:17:45 -0800 X-CSE-ConnectionGUID: T4Ni+bQSSFizCKsq5fEUDg== X-CSE-MsgGUID: pn9RoHZKRCi1hkKurU7dhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="151534690" Received: from srr4-3-linux-106-armuthy.iind.intel.com ([10.190.238.56]) by orviesa001.jf.intel.com with ESMTP; 18 Feb 2025 01:17:42 -0800 From: Arun R Murthy Date: Tue, 18 Feb 2025 14:32:47 +0530 Subject: [PATCH v5 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC MIME-Version: 1.0 Message-Id: <20250218-asyn-v5-1-7ac5ac4abd4a@intel.com> References: <20250218-asyn-v5-0-7ac5ac4abd4a@intel.com> In-Reply-To: <20250218-asyn-v5-0-7ac5ac4abd4a@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: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 Tue Feb 18 09:02:48 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: 13979374 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 16193C02198 for ; Tue, 18 Feb 2025 09:17:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AC86310E64A; Tue, 18 Feb 2025 09:17:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="XJrV/qdg"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C0E910E643; Tue, 18 Feb 2025 09:17:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739870267; x=1771406267; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=A2zS+yfR5avl/+r6Dk9rX25feUyDYRcNJsojQIdcsUY=; b=XJrV/qdg4G8LISpsxc4ka0/Zr7Z6Yx1e+0N1bswe77ZTLfJfK5LeB3ID MD7VPO0l3sT4jjenHm2omWH+wk1niKncFRGPo8V00MmVUypx7WPGDMW+W sBCWBV5QN3AB8plESdK6CWYUSEH/XTt8X2NFbu9W+ZSywF1utbZctfKHp LW9FNJUZ1iLz4HOjmqbhDfFWpOY02WDT/RML+SuBzh+zSUS3MxjB0j5Ba 0DmzbSB8nkIZy5pe26WB4YTet9x3JU4tUsAflcDYiVHgTnQ4PezJMGlzB 1p06vxLOduCD8HE/vouhuMXAibZRoc2FFyXnSW7DQ6y6p9qUDYsETPATx Q==; X-CSE-ConnectionGUID: fvwN+3jwQfeDBkmaAjz9DQ== X-CSE-MsgGUID: 8uabLjCwTv67aZE8WtardQ== X-IronPort-AV: E=McAfee;i="6700,10204,11348"; a="51198274" X-IronPort-AV: E=Sophos;i="6.13,295,1732608000"; d="scan'208";a="51198274" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2025 01:17:47 -0800 X-CSE-ConnectionGUID: wInGtYlkQO6ODXxKRZE7uA== X-CSE-MsgGUID: 3Ldi3qOHShqP577F43ttKA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="151534697" Received: from srr4-3-linux-106-armuthy.iind.intel.com ([10.190.238.56]) by orviesa001.jf.intel.com with ESMTP; 18 Feb 2025 01:17:45 -0800 From: Arun R Murthy Date: Tue, 18 Feb 2025 14:32:48 +0530 Subject: [PATCH v5 2/3] drm/plane: modify create_in_formats to accommodate async MIME-Version: 1.0 Message-Id: <20250218-asyn-v5-2-7ac5ac4abd4a@intel.com> References: <20250218-asyn-v5-0-7ac5ac4abd4a@intel.com> In-Reply-To: <20250218-asyn-v5-0-7ac5ac4abd4a@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: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index fe181c1002171acc68d3054c2d178f9b9f501fe2..a27ea45f3c12f5c3ff9532e9c0e3ae0897a02501 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,10 +240,10 @@ 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; } } @@ -251,10 +254,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 +371,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 +478,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 Tue Feb 18 09:02:49 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: 13979373 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 61338C021AE for ; Tue, 18 Feb 2025 09:17:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F321610E648; Tue, 18 Feb 2025 09:17:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="g2tQEukZ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id D625F10E646; Tue, 18 Feb 2025 09:17:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739870270; x=1771406270; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=6e661Nj2Xcl2iNYd9HEhy4RV7e/8JfMfX7phYG2OOn4=; b=g2tQEukZukoUeA0kAflQPy9b6aKJEK6nnsI5zU3h5gKre2I73u6hoy3j x2lXMnHavkjmrM2PiTvp1Xftlz5p3JzD94WBmpVh5cKUmPnPrXDO+220g k4w525f7YlU0CIdPVB4HI1PUoZlerI+ScnRkdjKV2IGNTdZONP8InVACN BQsDB71SStNa4o+5h0qCU7DgVqPzeFsUE5mpVa0agj25LtBJSFKjVGEBh SD2g3IXlRofp6mUc9mTBn43M/GDBnbUEN3deXseKYr/3mYPza8D8vdHue h0xeQW0zk1Z9tJzLsGZeO57hbqF5LF83UAYcaaxgJtdMF633hE9+2UvsC g==; X-CSE-ConnectionGUID: WRgczDnPRheuz3vXn/Lg3A== X-CSE-MsgGUID: GdlkJtthQzeZNwN5zVFJUQ== X-IronPort-AV: E=McAfee;i="6700,10204,11348"; a="51198275" X-IronPort-AV: E=Sophos;i="6.13,295,1732608000"; d="scan'208";a="51198275" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Feb 2025 01:17:49 -0800 X-CSE-ConnectionGUID: P20oZ3GfR2WjBfWwa4dcKA== X-CSE-MsgGUID: sfFaeAEzSheVI5+PB+52SA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="151534704" Received: from srr4-3-linux-106-armuthy.iind.intel.com ([10.190.238.56]) by orviesa001.jf.intel.com with ESMTP; 18 Feb 2025 01:17:47 -0800 From: Arun R Murthy Date: Tue, 18 Feb 2025 14:32:49 +0530 Subject: [PATCH v5 3/3] drm/i915/display: Add i915 hook for format_mod_supported_async MIME-Version: 1.0 Message-Id: <20250218-asyn-v5-3-7ac5ac4abd4a@intel.com> References: <20250218-asyn-v5-0-7ac5ac4abd4a@intel.com> In-Reply-To: <20250218-asyn-v5-0-7ac5ac4abd4a@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: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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) Signed-off-by: Arun R Murthy Reviewed-by: Chaitanya Kumar Borah Tested-by: Naveen Kumar Reviewed-by: Sebastian Brzezinka --- 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..e303ae6b1c6208755ea0454ba36efcff0c06cda6 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, uint32_t 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, + uint32_t format, + uint64_t 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, };