* [PATCH v5 0/3] Expose modifiers/formats supported by async flips
@ 2025-02-12 16:18 Arun R Murthy
2025-02-12 16:18 ` [PATCH v5 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC Arun R Murthy
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Arun R Murthy @ 2025-02-12 16:18 UTC (permalink / raw)
To: dri-devel, intel-gfx, intel-xe
Cc: chaitanya.kumar.borah, ville.syrjala, Arun R Murthy
All of the formats/modifiers supported by the plane during synchronous
flips are nor supported by asynchronous flips. The formats/modifiers
exposed to user by IN_FORMATS exposes all formats/modifiers supported by
plane and this list varies for async flips. If the async flip supported
formats/modifiers are exposed to the user, user based on this list can
take decision to proceed or not and avoid flip failures during async
flips.
Discussion around this can be located @
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29618#note_2487123
Userspace implementation for IN_FORMARTS_ASYNC under review @
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4063
TODO: Upon merge of the patch related to async flip
https://patchwork.freedesktop.org/patch/626849/?series=139807&rev=6
the patch 5 in this series will have to make use of the new function
pointer can_async_flip().
v3: Add new plane->funcs format_mod_supported_async (Ville)
v4: reuse the existing can_async_flip in i915 (Ville)
pass format_mod_supported/async as parameter to create_in_formats
function & leave the modifiers/formats in drm_format_modifer_blob
untouched (Ville)
Arun R Murthy (3):
drm/plane: Add new plane property IN_FORMATS_ASYNC
drm/plane: Expose function to create format/modifier blob
drm/i915/display: Populate list of async supported formats/modifiers
drivers/gpu/drm/drm_mode_config.c | 7 +++
drivers/gpu/drm/drm_plane.c | 50 ++++++++++++------
.../drm/i915/display/skl_universal_plane.c | 51 +++++++++++++++++++
include/drm/drm_mode_config.h | 6 +++
include/drm/drm_plane.h | 4 ++
5 files changed, 103 insertions(+), 15 deletions(-)
--
2.25.1
---
Arun R Murthy (5):
drm/plane: Add new plane property IN_FORMATS_ASYNC
drm/plane: Expose function to create format/modifier blob
drm/plane: Function to check async supported modifier/format
drm/i915/display: Populate list of async supported formats/modifiers
drm/i915/display: Add function for format_mod_supported_async
drivers/gpu/drm/drm_mode_config.c | 7 ++
drivers/gpu/drm/drm_plane.c | 72 +++++++++----
drivers/gpu/drm/i915/display/skl_universal_plane.c | 113 ++++++++++++++++++---
include/drm/drm_mode_config.h | 6 ++
include/drm/drm_plane.h | 24 +++++
5 files changed, 188 insertions(+), 34 deletions(-)
---
base-commit: 08bd590935a5258ffd79355c59adffd72fb2c642
change-id: 20250102-asyn-bf76730501cc
Best regards,
--
Arun R Murthy <arun.r.murthy@intel.com>
---
Changes in v5:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and terse descriptions.
- Link to v4: https://lore.kernel.org/r/20250205-asyn-v4-0-9a5b018e359b@intel.com
---
Arun R Murthy (3):
drm/plane: Add new plane property IN_FORMATS_ASYNC
drm/plane: modify create_in_formats to accommodate async
drm/i915/display: Add i915 hook for format_mod_supported_async
drivers/gpu/drm/drm_mode_config.c | 7 +++
drivers/gpu/drm/drm_plane.c | 51 +++++++++++++++-----
drivers/gpu/drm/i915/display/skl_universal_plane.c | 56 ++++++++++++++++------
include/drm/drm_mode_config.h | 6 +++
include/drm/drm_plane.h | 17 +++++++
5 files changed, 110 insertions(+), 27 deletions(-)
---
base-commit: a19d8731db07e41101ed00b9d86ac8868df2a763
change-id: 20250102-asyn-bf76730501cc
Best regards,
--
Arun R Murthy <arun.r.murthy@intel.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v5 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC
2025-02-12 16:18 [PATCH v5 0/3] Expose modifiers/formats supported by async flips Arun R Murthy
@ 2025-02-12 16:18 ` Arun R Murthy
2025-02-14 8:26 ` Borah, Chaitanya Kumar
2025-02-12 16:18 ` [PATCH v5 2/3] drm/plane: modify create_in_formats to accommodate async Arun R Murthy
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Arun R Murthy @ 2025-02-12 16:18 UTC (permalink / raw)
To: dri-devel, intel-gfx, intel-xe
Cc: chaitanya.kumar.borah, ville.syrjala, Arun R Murthy
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 <arun.r.murthy@intel.com>
---
drivers/gpu/drm/drm_mode_config.c | 7 +++++++
drivers/gpu/drm/drm_plane.c | 5 +++++
include/drm/drm_mode_config.h | 6 ++++++
include/drm/drm_plane.h | 17 +++++++++++++++++
4 files changed, 35 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..c9d8871417722186d2b6f87197c9e15a70924b4f 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -141,6 +141,11 @@
* 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.
+ *
* 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);
+
};
/**
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v5 2/3] drm/plane: modify create_in_formats to accommodate async
2025-02-12 16:18 [PATCH v5 0/3] Expose modifiers/formats supported by async flips Arun R Murthy
2025-02-12 16:18 ` [PATCH v5 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC Arun R Murthy
@ 2025-02-12 16:18 ` Arun R Murthy
2025-02-13 9:55 ` Borah, Chaitanya Kumar
2025-02-12 16:18 ` [PATCH v5 3/3] drm/i915/display: Add i915 hook for format_mod_supported_async Arun R Murthy
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Arun R Murthy @ 2025-02-12 16:18 UTC (permalink / raw)
To: dri-devel, intel-gfx, intel-xe
Cc: chaitanya.kumar.borah, ville.syrjala, Arun R Murthy
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 <Chaitanya>
Dont add the modifier for which none of the formats is not supported.
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
drivers/gpu/drm/drm_plane.c | 46 +++++++++++++++++++++++++++++++++------------
1 file changed, 34 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index c9d8871417722186d2b6f87197c9e15a70924b4f..01f67f1f5f29e37b8d0e0793c58bbe1bba337eb2 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -190,9 +190,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;
@@ -234,24 +237,26 @@ 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) {
+ mod->modifier = 0;
+ blob_data->count_modifiers--;
+ continue;
+ }
mod->modifier = plane->modifiers[i];
mod->offset = 0;
mod->pad = 0;
mod++;
}
- drm_object_attach_property(&plane->base, config->modifiers_property,
- blob->base.id);
-
- return 0;
+ return blob->base.id;
}
/**
@@ -368,6 +373,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))
@@ -474,8 +480,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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v5 3/3] drm/i915/display: Add i915 hook for format_mod_supported_async
2025-02-12 16:18 [PATCH v5 0/3] Expose modifiers/formats supported by async flips Arun R Murthy
2025-02-12 16:18 ` [PATCH v5 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC Arun R Murthy
2025-02-12 16:18 ` [PATCH v5 2/3] drm/plane: modify create_in_formats to accommodate async Arun R Murthy
@ 2025-02-12 16:18 ` Arun R Murthy
2025-02-17 5:28 ` Borah, Chaitanya Kumar
2025-02-12 20:18 ` ✗ Fi.CI.CHECKPATCH: warning for Expose modifiers/formats supported by async flips (rev4) Patchwork
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Arun R Murthy @ 2025-02-12 16:18 UTC (permalink / raw)
To: dri-devel, intel-gfx, intel-xe
Cc: chaitanya.kumar.borah, ville.syrjala, Arun R Murthy
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 <arun.r.murthy@intel.com>
---
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 ba5db553c374259f8f3246c1408b55d32c8794e5..2743b031d1092ccc74b4144bd06dba8790f722e7 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -511,6 +511,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)
{
@@ -2559,30 +2586,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,
};
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for Expose modifiers/formats supported by async flips (rev4)
2025-02-12 16:18 [PATCH v5 0/3] Expose modifiers/formats supported by async flips Arun R Murthy
` (2 preceding siblings ...)
2025-02-12 16:18 ` [PATCH v5 3/3] drm/i915/display: Add i915 hook for format_mod_supported_async Arun R Murthy
@ 2025-02-12 20:18 ` Patchwork
2025-02-12 20:18 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-12 20:34 ` ✗ i915.CI.BAT: failure " Patchwork
5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2025-02-12 20:18 UTC (permalink / raw)
To: Arun R Murthy; +Cc: intel-gfx
== Series Details ==
Series: Expose modifiers/formats supported by async flips (rev4)
URL : https://patchwork.freedesktop.org/series/140935/
State : warning
== Summary ==
Error: dim checkpatch failed
a71acc24b890 drm/plane: Add new plane property IN_FORMATS_ASYNC
-:97: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u32' over 'uint32_t'
#97: FILE: include/drm/drm_plane.h:567:
+ uint32_t format, uint64_t modifier);
total: 0 errors, 0 warnings, 1 checks, 59 lines checked
d21b8f063aeb drm/plane: modify create_in_formats to accommodate async
-:29: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u32' over 'uint32_t'
#29: FILE: drivers/gpu/drm/drm_plane.c:196:
+ uint32_t format,
total: 0 errors, 0 warnings, 1 checks, 81 lines checked
7d3cb850b9c5 drm/i915/display: Add i915 hook for format_mod_supported_async
-:23: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations
#23: FILE: drivers/gpu/drm/i915/display/skl_universal_plane.c:512:
}
+static bool intel_plane_async_formats(struct intel_plane *plane, uint32_t format)
-:42: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u32' over 'uint32_t'
#42: FILE: drivers/gpu/drm/i915/display/skl_universal_plane.c:531:
+ uint32_t format,
total: 0 errors, 0 warnings, 2 checks, 77 lines checked
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✗ Fi.CI.SPARSE: warning for Expose modifiers/formats supported by async flips (rev4)
2025-02-12 16:18 [PATCH v5 0/3] Expose modifiers/formats supported by async flips Arun R Murthy
` (3 preceding siblings ...)
2025-02-12 20:18 ` ✗ Fi.CI.CHECKPATCH: warning for Expose modifiers/formats supported by async flips (rev4) Patchwork
@ 2025-02-12 20:18 ` Patchwork
2025-02-12 20:34 ` ✗ i915.CI.BAT: failure " Patchwork
5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2025-02-12 20:18 UTC (permalink / raw)
To: Arun R Murthy; +Cc: intel-gfx
== Series Details ==
Series: Expose modifiers/formats supported by async flips (rev4)
URL : https://patchwork.freedesktop.org/series/140935/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✗ i915.CI.BAT: failure for Expose modifiers/formats supported by async flips (rev4)
2025-02-12 16:18 [PATCH v5 0/3] Expose modifiers/formats supported by async flips Arun R Murthy
` (4 preceding siblings ...)
2025-02-12 20:18 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2025-02-12 20:34 ` Patchwork
5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2025-02-12 20:34 UTC (permalink / raw)
To: Arun R Murthy; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 4990 bytes --]
== Series Details ==
Series: Expose modifiers/formats supported by async flips (rev4)
URL : https://patchwork.freedesktop.org/series/140935/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_16121 -> Patchwork_140935v4
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_140935v4 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_140935v4, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/index.html
Participating hosts (43 -> 42)
------------------------------
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_140935v4:
### IGT changes ###
#### Possible regressions ####
* igt@kms_hdmi_inject@inject-audio:
- fi-kbl-7567u: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16121/fi-kbl-7567u/igt@kms_hdmi_inject@inject-audio.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/fi-kbl-7567u/igt@kms_hdmi_inject@inject-audio.html
Known issues
------------
Here are the changes found in Patchwork_140935v4 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_pm_rpm@module-reload:
- bat-rpls-4: [PASS][3] -> [FAIL][4] ([i915#13633])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16121/bat-rpls-4/igt@i915_pm_rpm@module-reload.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/bat-rpls-4/igt@i915_pm_rpm@module-reload.html
* igt@i915_selftest@live:
- bat-adlp-6: [PASS][5] -> [ABORT][6] ([i915#9413]) +1 other test abort
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16121/bat-adlp-6/igt@i915_selftest@live.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/bat-adlp-6/igt@i915_selftest@live.html
- bat-twl-2: NOTRUN -> [ABORT][7] ([i915#12435])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/bat-twl-2/igt@i915_selftest@live.html
* igt@i915_selftest@live@reset:
- bat-twl-2: NOTRUN -> [ABORT][8] ([i915#13399])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/bat-twl-2/igt@i915_selftest@live@reset.html
* igt@i915_selftest@live@workarounds:
- bat-mtlp-6: [PASS][9] -> [DMESG-FAIL][10] ([i915#12061]) +1 other test dmesg-fail
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16121/bat-mtlp-6/igt@i915_selftest@live@workarounds.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/bat-mtlp-6/igt@i915_selftest@live@workarounds.html
- bat-mtlp-9: [PASS][11] -> [DMESG-FAIL][12] ([i915#12061])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16121/bat-mtlp-9/igt@i915_selftest@live@workarounds.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/bat-mtlp-9/igt@i915_selftest@live@workarounds.html
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: [PASS][13] -> [SKIP][14] ([i915#9197]) +3 other tests skip
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16121/bat-dg2-11/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/bat-dg2-11/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html
#### Possible fixes ####
* igt@i915_selftest@live:
- bat-adlp-11: [DMESG-WARN][15] ([i915#13570]) -> [PASS][16] +1 other test pass
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16121/bat-adlp-11/igt@i915_selftest@live.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/bat-adlp-11/igt@i915_selftest@live.html
[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#12435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12435
[i915#13399]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13399
[i915#13570]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13570
[i915#13633]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13633
[i915#9197]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9197
[i915#9413]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9413
Build changes
-------------
* Linux: CI_DRM_16121 -> Patchwork_140935v4
CI-20190529: 20190529
CI_DRM_16121: b9696aa14a67620661572e94f4141df2a4b6b5cd @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8228: 8228
Patchwork_140935v4: b9696aa14a67620661572e94f4141df2a4b6b5cd @ git://anongit.freedesktop.org/gfx-ci/linux
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_140935v4/index.html
[-- Attachment #2: Type: text/html, Size: 5834 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH v5 2/3] drm/plane: modify create_in_formats to accommodate async
2025-02-12 16:18 ` [PATCH v5 2/3] drm/plane: modify create_in_formats to accommodate async Arun R Murthy
@ 2025-02-13 9:55 ` Borah, Chaitanya Kumar
2025-02-14 18:32 ` Borah, Chaitanya Kumar
0 siblings, 1 reply; 12+ messages in thread
From: Borah, Chaitanya Kumar @ 2025-02-13 9:55 UTC (permalink / raw)
To: Murthy, Arun R, dri-devel@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Syrjala, Ville
> -----Original Message-----
> From: Murthy, Arun R <arun.r.murthy@intel.com>
> Sent: Wednesday, February 12, 2025 9:48 PM
> To: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org; intel-
> xe@lists.freedesktop.org
> Cc: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>; Syrjala,
> Ville <ville.syrjala@intel.com>; Murthy, Arun R <arun.r.murthy@intel.com>
> Subject: [PATCH v5 2/3] drm/plane: modify create_in_formats to
> accommodate async
>
> 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 <Chaitanya> Dont add the modifier for
> which none of the formats is not supported.
>
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
> drivers/gpu/drm/drm_plane.c | 46 +++++++++++++++++++++++++++++++++--
> ----------
> 1 file changed, 34 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index
> c9d8871417722186d2b6f87197c9e15a70924b4f..01f67f1f5f29e37b8d0e0793c
> 58bbe1bba337eb2 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -190,9 +190,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; @@ -234,24 +237,26
> @@ 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) {
> + mod->modifier = 0;
> + blob_data->count_modifiers--;
> + continue;
> + }
I don't think change works. 0 represents DRM_FORMAT_MOD_LINEAR.
> mod->modifier = plane->modifiers[i];
> mod->offset = 0;
> mod->pad = 0;
> mod++;
> }
>
> - drm_object_attach_property(&plane->base, config-
> >modifiers_property,
> - blob->base.id);
> -
> - return 0;
> + return blob->base.id;
> }
>
> /**
> @@ -368,6 +373,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)) @@ -474,8 +480,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;
> }
>
> --
> 2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH v5 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC
2025-02-12 16:18 ` [PATCH v5 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC Arun R Murthy
@ 2025-02-14 8:26 ` Borah, Chaitanya Kumar
0 siblings, 0 replies; 12+ messages in thread
From: Borah, Chaitanya Kumar @ 2025-02-14 8:26 UTC (permalink / raw)
To: Murthy, Arun R, dri-devel@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Syrjala, Ville
> -----Original Message-----
> From: Murthy, Arun R <arun.r.murthy@intel.com>
> Sent: Wednesday, February 12, 2025 9:48 PM
> To: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org; intel-
> xe@lists.freedesktop.org
> Cc: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>; Syrjala,
> Ville <ville.syrjala@intel.com>; Murthy, Arun R <arun.r.murthy@intel.com>
> Subject: [PATCH v5 1/3] drm/plane: Add new plane property
> IN_FORMATS_ASYNC
>
> 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 <arun.r.murthy@intel.com>
> ---
> drivers/gpu/drm/drm_mode_config.c | 7 +++++++
> drivers/gpu/drm/drm_plane.c | 5 +++++
> include/drm/drm_mode_config.h | 6 ++++++
> include/drm/drm_plane.h | 17 +++++++++++++++++
> 4 files changed, 35 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_mode_config.c
> b/drivers/gpu/drm/drm_mode_config.c
> index
> 8642a2fb25a90116dab975aa0ab6b51deafb4b96..dbbef20753f834a85ae9ded
> 748cff2b3f0e85043 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..c9d8871417722186d2b6f87
> 197c9e15a70924b4f 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -141,6 +141,11 @@
> * 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.
> + *
We should mention that it is an optional property and userspace should fallback to IN_FORMATS in case this property is not present.
With this change, LGTM
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
> * 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..0c116d6dfd277262b1a4c0f0
> 97fce2d719f43844 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..4393a0e9edf91ccfd78ef62b1
> 68b9313187c1a81 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);
> +
> };
>
> /**
>
> --
> 2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH v5 2/3] drm/plane: modify create_in_formats to accommodate async
2025-02-13 9:55 ` Borah, Chaitanya Kumar
@ 2025-02-14 18:32 ` Borah, Chaitanya Kumar
0 siblings, 0 replies; 12+ messages in thread
From: Borah, Chaitanya Kumar @ 2025-02-14 18:32 UTC (permalink / raw)
To: Murthy, Arun R, dri-devel@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Syrjala, Ville
> -----Original Message-----
> From: Borah, Chaitanya Kumar
> Sent: Thursday, February 13, 2025 3:26 PM
> To: Murthy, Arun R <arun.r.murthy@intel.com>; dri-
> devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org; intel-
> xe@lists.freedesktop.org
> Cc: Syrjala, Ville <ville.syrjala@intel.com>
> Subject: RE: [PATCH v5 2/3] drm/plane: modify create_in_formats to
> accommodate async
>
> > -----Original Message-----
> > From: Murthy, Arun R <arun.r.murthy@intel.com>
> > Sent: Wednesday, February 12, 2025 9:48 PM
> > To: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org;
> > intel- xe@lists.freedesktop.org
> > Cc: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>; Syrjala,
> > Ville <ville.syrjala@intel.com>; Murthy, Arun R
> > <arun.r.murthy@intel.com>
> > Subject: [PATCH v5 2/3] drm/plane: modify create_in_formats to
> > accommodate async
> >
> > 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 <Chaitanya> Dont add
> > the modifier for which none of the formats is not supported.
> >
> > Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> > ---
> > drivers/gpu/drm/drm_plane.c | 46
> +++++++++++++++++++++++++++++++++--
> > ----------
> > 1 file changed, 34 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> > index
> >
> c9d8871417722186d2b6f87197c9e15a70924b4f..01f67f1f5f29e37b8d0e0793c
> > 58bbe1bba337eb2 100644
> > --- a/drivers/gpu/drm/drm_plane.c
> > +++ b/drivers/gpu/drm/drm_plane.c
> > @@ -190,9 +190,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; @@ -234,24 +237,26
> > @@ 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) {
> > + mod->modifier = 0;
> > + blob_data->count_modifiers--;
> > + continue;
> > + }
>
> I don't think change works. 0 represents DRM_FORMAT_MOD_LINEAR.
Relooked into the code, this change will prevent adding modifiers which do not have any formats supported into the modifier list.
So it is correct in that. Smart idea!
However, the line mod->modifier = 0 is redundant. It will just get overwritten by the next valid modifier.
Regards
Chaitanya
>
> > mod->modifier = plane->modifiers[i];
> > mod->offset = 0;
> > mod->pad = 0;
> > mod++;
> > }
> >
> > - drm_object_attach_property(&plane->base, config-
> > >modifiers_property,
> > - blob->base.id);
> > -
> > - return 0;
> > + return blob->base.id;
> > }
> >
> > /**
> > @@ -368,6 +373,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)) @@ -474,8 +480,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;
> > }
> >
> > --
> > 2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH v5 3/3] drm/i915/display: Add i915 hook for format_mod_supported_async
2025-02-12 16:18 ` [PATCH v5 3/3] drm/i915/display: Add i915 hook for format_mod_supported_async Arun R Murthy
@ 2025-02-17 5:28 ` Borah, Chaitanya Kumar
0 siblings, 0 replies; 12+ messages in thread
From: Borah, Chaitanya Kumar @ 2025-02-17 5:28 UTC (permalink / raw)
To: Murthy, Arun R, dri-devel@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: Syrjala, Ville
> -----Original Message-----
> From: Murthy, Arun R <arun.r.murthy@intel.com>
> Sent: Wednesday, February 12, 2025 9:48 PM
> To: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org; intel-
> xe@lists.freedesktop.org
> Cc: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>; Syrjala,
> Ville <ville.syrjala@intel.com>; Murthy, Arun R <arun.r.murthy@intel.com>
> Subject: [PATCH v5 3/3] drm/i915/display: Add i915 hook for
> format_mod_supported_async
>
> 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 <arun.r.murthy@intel.com>
LGTM
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
> ---
> 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
> ba5db553c374259f8f3246c1408b55d32c8794e5..2743b031d1092ccc74b4144b
> d06dba8790f722e7 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -511,6 +511,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) { @@ -2559,30 +2586,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, };
>
>
> --
> 2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v5 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC
2025-02-18 9:02 [PATCH v5 0/3] Expose modifiers/formats supported by async flips Arun R Murthy
@ 2025-02-18 9:02 ` Arun R Murthy
0 siblings, 0 replies; 12+ messages in thread
From: Arun R Murthy @ 2025-02-18 9:02 UTC (permalink / raw)
To: dri-devel, intel-gfx, intel-xe
Cc: chaitanya.kumar.borah, Arun R Murthy, Naveen Kumar
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 <arun.r.murthy@intel.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Tested-by: Naveen Kumar <naveen1.kumar@intel.com>
---
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);
+
};
/**
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-02-18 9:17 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12 16:18 [PATCH v5 0/3] Expose modifiers/formats supported by async flips Arun R Murthy
2025-02-12 16:18 ` [PATCH v5 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC Arun R Murthy
2025-02-14 8:26 ` Borah, Chaitanya Kumar
2025-02-12 16:18 ` [PATCH v5 2/3] drm/plane: modify create_in_formats to accommodate async Arun R Murthy
2025-02-13 9:55 ` Borah, Chaitanya Kumar
2025-02-14 18:32 ` Borah, Chaitanya Kumar
2025-02-12 16:18 ` [PATCH v5 3/3] drm/i915/display: Add i915 hook for format_mod_supported_async Arun R Murthy
2025-02-17 5:28 ` Borah, Chaitanya Kumar
2025-02-12 20:18 ` ✗ Fi.CI.CHECKPATCH: warning for Expose modifiers/formats supported by async flips (rev4) Patchwork
2025-02-12 20:18 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-12 20:34 ` ✗ i915.CI.BAT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2025-02-18 9:02 [PATCH v5 0/3] Expose modifiers/formats supported by async flips Arun R Murthy
2025-02-18 9:02 ` [PATCH v5 1/3] drm/plane: Add new plane property IN_FORMATS_ASYNC Arun R Murthy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox