All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] drm: Add plane SIZE_HINTS property
@ 2024-03-18 20:44 Ville Syrjala
  2024-03-18 20:44 ` [PATCH v3 1/2] drm: Introduce " Ville Syrjala
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Ville Syrjala @ 2024-03-18 20:44 UTC (permalink / raw)
  To: intel-gfx
  Cc: Simon Ser, Jonas Ådahl, Daniel Stone, Sameer Lattannavar,
	Sebastian Wick, Harry Wentland, Pekka Paalanen

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Final final version I hope. Mainly for CI to test against the
new IGTs.

Real userspace implementation:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3165                                                           

IGT:
https://patchwork.freedesktop.org/series/131199/

Changes from v2:
- Limit to cursor planes only (Simon)

Test-with: 20240315191505.27620-1-ville.syrjala@linux.intel.com
Cc: Simon Ser <contact@emersion.fr>
Cc: Jonas Ådahl <jadahl@redhat.com>
Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Sameer Lattannavar <sameer.lattannavar@intel.com>
Cc: Sebastian Wick <sebastian.wick@redhat.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Pekka Paalanen <pekka.paalanen@collabora.com>

Ville Syrjälä (2):
  drm: Introduce plane SIZE_HINTS property
  drm/i915: Add SIZE_HINTS property for cursors

 drivers/gpu/drm/drm_mode_config.c           |  7 +++
 drivers/gpu/drm/drm_plane.c                 | 56 +++++++++++++++++++++
 drivers/gpu/drm/i915/display/intel_cursor.c | 24 +++++++++
 include/drm/drm_mode_config.h               |  5 ++
 include/drm/drm_plane.h                     |  4 ++
 include/uapi/drm/drm_mode.h                 | 11 ++++
 6 files changed, 107 insertions(+)

-- 
2.43.2


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3 1/2] drm: Introduce plane SIZE_HINTS property
  2024-03-18 20:44 [PATCH v3 0/2] drm: Add plane SIZE_HINTS property Ville Syrjala
@ 2024-03-18 20:44 ` Ville Syrjala
  2024-03-19  6:51   ` kernel test robot
  2024-03-18 20:44 ` [PATCH v3 2/2] drm/i915: Add SIZE_HINTS property for cursors Ville Syrjala
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Ville Syrjala @ 2024-03-18 20:44 UTC (permalink / raw)
  To: intel-gfx
  Cc: Jonas Ådahl, Sameer Lattannavar, Sebastian Wick, Simon Ser,
	Daniel Stone, Harry Wentland, Pekka Paalanen

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Add a new immutable plane property by which a plane can advertise
a handful of recommended plane sizes. This would be mostly exposed
by cursor planes as a slightly more capable replacement for
the DRM_CAP_CURSOR_WIDTH/HEIGHT caps, which can only declare
a one size fits all limit for the whole device.

Currently eg. amdgpu/i915/nouveau just advertize the max cursor
size via the cursor size caps. But always using the max sized
cursor can waste a surprising amount of power, so a better
strategy is desirable.

Most other drivers don't specify any cursor size at all, in
which case the ioctl code just claims that 64x64 is a great
choice. Whether that is actually true is debatable.

A poll of various compositor developers informs us that
blindly probing with setcursor/atomic ioctl to determine
suitable cursor sizes is not acceptable, thus the
introduction of the new property to supplant the cursor
size caps. The compositor will now be free to select a
more optimal cursor size from the short list of options.

Note that the reported sizes (either via the property or the
caps) make no claims about things such as plane scaling. So
these things should only really be consulted for simple
"cursor like" use cases.

Userspace consumer in the form of mutter seems ready:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3165

v2: Try to add some docs
v3: Specify that value 0 is reserved for future use (basic idea from Jonas)
    Drop the note about typical hardware (Pekka)
v4: Update the docs to indicate the list is "in order of preference"
    Add a a link to the mutter MR
v5: Limit to cursors only for now (Simon)

Cc: Jonas Ådahl <jadahl@redhat.com>
Cc: Sameer Lattannavar <sameer.lattannavar@intel.com>
Reviewed-by: Sebastian Wick <sebastian.wick@redhat.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_mode_config.c |  7 ++++
 drivers/gpu/drm/drm_plane.c       | 56 +++++++++++++++++++++++++++++++
 include/drm/drm_mode_config.h     |  5 +++
 include/drm/drm_plane.h           |  4 +++
 include/uapi/drm/drm_mode.h       | 11 ++++++
 5 files changed, 83 insertions(+)

diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index 48fd2d67f352..568972258222 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -372,6 +372,13 @@ static int drm_mode_create_standard_properties(struct drm_device *dev)
 		return -ENOMEM;
 	dev->mode_config.modifiers_property = prop;
 
+	prop = drm_property_create(dev,
+				   DRM_MODE_PROP_IMMUTABLE | DRM_MODE_PROP_BLOB,
+				   "SIZE_HINTS", 0);
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.size_hints_property = prop;
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 672c655c7a8e..eecc24c54efd 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -140,6 +140,25 @@
  *     DRM_FORMAT_MOD_LINEAR. Before linux kernel release v5.1 there have been
  *     various bugs in this area with inconsistencies between the capability
  *     flag and per-plane properties.
+ *
+ * SIZE_HINTS:
+ *     Blob property which contains the set of recommended plane size
+ *     which can used for simple "cursor like" use cases (eg. no scaling).
+ *     Using these hints frees userspace from extensive probing of
+ *     supported plane sizes through atomic/setcursor ioctls.
+ *
+ *     The blob contains an array of struct drm_plane_size_hint, in
+ *     order of preference. For optimal usage userspace should pick
+ *     the first size that satisfies its own requirements.
+ *
+ *     Drivers should only attach this property to planes that
+ *     support a very limited set of sizes.
+ *
+ *     Note that property value 0 (ie. no blob) is reserved for potential
+ *     future use. Current userspace is expected to ignore the property
+ *     if the value is 0, and fall back to some other means (eg.
+ *     &DRM_CAP_CURSOR_WIDTH and &DRM_CAP_CURSOR_HEIGHT) to determine
+ *     the appropriate plane size to use.
  */
 
 static unsigned int drm_num_planes(struct drm_device *dev)
@@ -1729,3 +1748,40 @@ int drm_plane_create_scaling_filter_property(struct drm_plane *plane,
 	return 0;
 }
 EXPORT_SYMBOL(drm_plane_create_scaling_filter_property);
+
+/**
+ * drm_plane_add_size_hint_property - create a size hint property
+ *
+ * @plane: drm plane
+ * @hints: size hints
+ * @num_hints: number of size hints
+ *
+ * Create a size hints property for the plane.
+ *
+ * RETURNS:
+ * Zero for success or -errno
+ */
+int drm_plane_add_size_hints_property(struct drm_plane *plane,
+				      const struct drm_plane_size_hint *hints,
+				      int num_hints)
+{
+	struct drm_device *dev = plane->dev;
+	struct drm_mode_config *config = &dev->mode_config;
+	struct drm_property_blob *blob;
+
+	/* extending to other plane types needs actual thought */
+	if (drm_WARN_ON(dev, plane->type != DRM_PLANE_TYPE_CURSOR))
+		return -EINVAL;
+
+	blob = drm_property_create_blob(dev,
+					array_size(sizeof(hints[0]), num_hints),
+					hints);
+	if (IS_ERR(blob))
+		return PTR_ERR(blob);
+
+	drm_object_attach_property(&plane->base, config->size_hints_property,
+				   blob->base.id);
+
+	return 0;
+}
+EXPORT_SYMBOL(drm_plane_add_size_hints_property);
diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
index 973119a9176b..9d8acf7a10eb 100644
--- a/include/drm/drm_mode_config.h
+++ b/include/drm/drm_mode_config.h
@@ -942,6 +942,11 @@ struct drm_mode_config {
 	 */
 	struct drm_property *modifiers_property;
 
+	/**
+	 * @size_hints_propertty: Plane SIZE_HINTS property.
+	 */
+	struct drm_property *size_hints_property;
+
 	/* cursor size */
 	uint32_t cursor_width, cursor_height;
 
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 641fe298052d..ec1112208b73 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -32,6 +32,7 @@
 #include <drm/drm_util.h>
 
 struct drm_crtc;
+struct drm_plane_size_hint;
 struct drm_printer;
 struct drm_modeset_acquire_ctx;
 
@@ -976,5 +977,8 @@ drm_plane_get_damage_clips(const struct drm_plane_state *state);
 
 int drm_plane_create_scaling_filter_property(struct drm_plane *plane,
 					     unsigned int supported_filters);
+int drm_plane_add_size_hints_property(struct drm_plane *plane,
+				      const struct drm_plane_size_hint *hints,
+				      int num_hints);
 
 #endif
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index 7040e7ea80c7..1ca5c7e418fd 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -865,6 +865,17 @@ struct drm_color_lut {
 	__u16 reserved;
 };
 
+/**
+ * struct drm_plane_size_hint - Plane size hints
+ *
+ * The plane SIZE_HINTS property blob contains an
+ * array of struct drm_plane_size_hint.
+ */
+struct drm_plane_size_hint {
+	__u16 width;
+	__u16 height;
+};
+
 /**
  * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data.
  *
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v3 2/2] drm/i915: Add SIZE_HINTS property for cursors
  2024-03-18 20:44 [PATCH v3 0/2] drm: Add plane SIZE_HINTS property Ville Syrjala
  2024-03-18 20:44 ` [PATCH v3 1/2] drm: Introduce " Ville Syrjala
@ 2024-03-18 20:44 ` Ville Syrjala
  2024-03-20 15:55   ` Juha-Pekka Heikkila
  2024-03-18 23:19 ` ✗ Fi.CI.SPARSE: warning for drm: Add plane SIZE_HINTS property (rev6) Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Ville Syrjala @ 2024-03-18 20:44 UTC (permalink / raw)
  To: intel-gfx
  Cc: Simon Ser, Jonas Ådahl, Daniel Stone, Sameer Lattannavar,
	Sebastian Wick, Harry Wentland, Pekka Paalanen

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Advertize more suitable cursor sizes via the new SIZE_HINTS
plane property.

We can't really enumerate all supported cursor sizes on
the platforms where the cursor height can vary freely, so
for simplicity we'll just expose all square+POT sizes between
each platform's min and max cursor limits.

Depending on the platform this will give us one of three
results:
- 64x64,128x128,256x256,512x512
- 64x64,128x128,256x256
- 64x64

Cc: Simon Ser <contact@emersion.fr>
Cc: Jonas Ådahl <jadahl@redhat.com>
Cc: Daniel Stone <daniel@fooishbar.org>
Cc: Sameer Lattannavar <sameer.lattannavar@intel.com>
Cc: Sebastian Wick <sebastian.wick@redhat.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_cursor.c | 24 +++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
index f8b33999d43f..49e9b9be2235 100644
--- a/drivers/gpu/drm/i915/display/intel_cursor.c
+++ b/drivers/gpu/drm/i915/display/intel_cursor.c
@@ -823,6 +823,28 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = {
 	.format_mod_supported = intel_cursor_format_mod_supported,
 };
 
+static void intel_cursor_add_size_hints_property(struct intel_plane *plane)
+{
+	struct drm_i915_private *i915 = to_i915(plane->base.dev);
+	const struct drm_mode_config *config = &i915->drm.mode_config;
+	struct drm_plane_size_hint hints[4];
+	int size, max_size, num_hints = 0;
+
+	max_size = min(config->cursor_width, config->cursor_height);
+
+	/* for simplicity only enumerate the supported square+POT sizes */
+	for (size = 64; size <= max_size; size *= 2) {
+		if (drm_WARN_ON(&i915->drm, num_hints >= ARRAY_SIZE(hints)))
+			break;
+
+		hints[num_hints].width = size;
+		hints[num_hints].height = size;
+		num_hints++;
+	}
+
+	drm_plane_add_size_hints_property(&plane->base, hints, num_hints);
+}
+
 struct intel_plane *
 intel_cursor_plane_create(struct drm_i915_private *dev_priv,
 			  enum pipe pipe)
@@ -881,6 +903,8 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
 						   DRM_MODE_ROTATE_0 |
 						   DRM_MODE_ROTATE_180);
 
+	intel_cursor_add_size_hints_property(cursor);
+
 	zpos = DISPLAY_RUNTIME_INFO(dev_priv)->num_sprites[pipe] + 1;
 	drm_plane_create_zpos_immutable_property(&cursor->base, zpos);
 
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* ✗ Fi.CI.SPARSE: warning for drm: Add plane SIZE_HINTS property (rev6)
  2024-03-18 20:44 [PATCH v3 0/2] drm: Add plane SIZE_HINTS property Ville Syrjala
  2024-03-18 20:44 ` [PATCH v3 1/2] drm: Introduce " Ville Syrjala
  2024-03-18 20:44 ` [PATCH v3 2/2] drm/i915: Add SIZE_HINTS property for cursors Ville Syrjala
@ 2024-03-18 23:19 ` Patchwork
  2024-03-18 23:37 ` ✗ Fi.CI.BAT: failure " Patchwork
  2024-03-19  9:28 ` [PATCH v3 0/2] drm: Add plane SIZE_HINTS property Ville Syrjälä
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2024-03-18 23:19 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: drm: Add plane SIZE_HINTS property (rev6)
URL   : https://patchwork.freedesktop.org/series/113758/
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] 8+ messages in thread

* ✗ Fi.CI.BAT: failure for drm: Add plane SIZE_HINTS property (rev6)
  2024-03-18 20:44 [PATCH v3 0/2] drm: Add plane SIZE_HINTS property Ville Syrjala
                   ` (2 preceding siblings ...)
  2024-03-18 23:19 ` ✗ Fi.CI.SPARSE: warning for drm: Add plane SIZE_HINTS property (rev6) Patchwork
@ 2024-03-18 23:37 ` Patchwork
  2024-03-19  9:28 ` [PATCH v3 0/2] drm: Add plane SIZE_HINTS property Ville Syrjälä
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2024-03-18 23:37 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 12582 bytes --]

== Series Details ==

Series: drm: Add plane SIZE_HINTS property (rev6)
URL   : https://patchwork.freedesktop.org/series/113758/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_14443 -> Patchwork_113758v6
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_113758v6 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_113758v6, 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_113758v6/index.html

Participating hosts (35 -> 34)
------------------------------

  Additional (2): bat-arls-4 bat-jsl-1 
  Missing    (3): bat-kbl-2 bat-dg2-11 fi-snb-2520m 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_113758v6:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live@slpc:
    - bat-arls-1:         [PASS][1] -> [DMESG-WARN][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-arls-1/igt@i915_selftest@live@slpc.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-arls-1/igt@i915_selftest@live@slpc.html

  
New tests
---------

  New tests have been introduced between CI_DRM_14443 and Patchwork_113758v6:

### New IGT tests (23) ###

  * igt@kms_cursor_crc@cursor-size-hints:
    - Statuses : 7 skip(s)
    - Exec time: [0.0] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-dp-1:
    - Statuses : 4 pass(s)
    - Exec time: [0.42, 0.51] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-dp-2:
    - Statuses : 1 pass(s)
    - Exec time: [0.47] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-dp-3:
    - Statuses : 2 pass(s)
    - Exec time: [0.55, 0.56] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-dp-6:
    - Statuses : 1 pass(s)
    - Exec time: [1.54] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-edp-1:
    - Statuses : 5 pass(s)
    - Exec time: [0.66, 0.83] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-hdmi-a-1:
    - Statuses : 6 pass(s)
    - Exec time: [0.29, 0.74] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-hdmi-a-2:
    - Statuses : 3 pass(s)
    - Exec time: [0.52, 0.81] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-a-vga-1:
    - Statuses : 3 pass(s)
    - Exec time: [0.29, 0.84] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-b-hdmi-a-1:
    - Statuses : 1 pass(s)
    - Exec time: [0.32] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-b-vga-1:
    - Statuses : 2 pass(s)
    - Exec time: [0.27, 0.68] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-c-dp-1:
    - Statuses : 3 pass(s)
    - Exec time: [0.51, 0.56] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-c-edp-1:
    - Statuses : 3 pass(s)
    - Exec time: [1.40, 1.47] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-c-hdmi-a-1:
    - Statuses : 3 pass(s)
    - Exec time: [0.27, 0.35] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-c-hdmi-a-2:
    - Statuses : 1 pass(s)
    - Exec time: [0.67] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-c-vga-1:
    - Statuses : 1 pass(s)
    - Exec time: [0.23] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-dp-1:
    - Statuses : 1 pass(s)
    - Exec time: [0.39] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-dp-2:
    - Statuses : 1 pass(s)
    - Exec time: [0.44] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-dp-3:
    - Statuses : 2 pass(s)
    - Exec time: [0.52, 0.54] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-dp-6:
    - Statuses : 1 pass(s)
    - Exec time: [0.79] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-edp-1:
    - Statuses : 2 pass(s)
    - Exec time: [1.34, 1.40] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-hdmi-a-1:
    - Statuses : 2 pass(s)
    - Exec time: [0.23, 0.34] s

  * igt@kms_cursor_crc@cursor-size-hints@pipe-d-hdmi-a-2:
    - Statuses : 3 pass(s)
    - Exec time: [0.40, 0.67] s

  

Known issues
------------

  Here are the changes found in Patchwork_113758v6 that come from known issues:

### CI changes ###

#### Possible fixes ####

  * boot:
    - fi-cfl-8109u:       [FAIL][3] ([i915#8293]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-cfl-8109u/boot.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/fi-cfl-8109u/boot.html

  

### IGT changes ###

#### Issues hit ####

  * igt@debugfs_test@basic-hwmon:
    - bat-jsl-1:          NOTRUN -> [SKIP][5] ([i915#9318])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-jsl-1/igt@debugfs_test@basic-hwmon.html

  * igt@gem_huc_copy@huc-copy:
    - fi-cfl-8109u:       NOTRUN -> [SKIP][6] ([i915#2190])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/fi-cfl-8109u/igt@gem_huc_copy@huc-copy.html
    - bat-jsl-1:          NOTRUN -> [SKIP][7] ([i915#2190])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-jsl-1/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@parallel-random-engines:
    - bat-jsl-1:          NOTRUN -> [SKIP][8] ([i915#4613]) +3 other tests skip
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-jsl-1/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@gem_lmem_swapping@verify-random:
    - fi-cfl-8109u:       NOTRUN -> [SKIP][9] ([i915#4613]) +3 other tests skip
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/fi-cfl-8109u/igt@gem_lmem_swapping@verify-random.html

  * igt@i915_selftest@live@guc_multi_lrc:
    - bat-arls-1:         [PASS][10] -> [DMESG-FAIL][11] ([i915#10262]) +3 other tests dmesg-fail
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-arls-1/igt@i915_selftest@live@guc_multi_lrc.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-arls-1/igt@i915_selftest@live@guc_multi_lrc.html

  * {igt@kms_cursor_crc@cursor-size-hints} (NEW):
    - bat-dg2-8:          NOTRUN -> [SKIP][12] ([i915#9197])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-dg2-8/igt@kms_cursor_crc@cursor-size-hints.html
    - fi-kbl-guc:         NOTRUN -> [SKIP][13]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/fi-kbl-guc/igt@kms_cursor_crc@cursor-size-hints.html
    - bat-adlm-1:         NOTRUN -> [SKIP][14] ([i915#9900])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-adlm-1/igt@kms_cursor_crc@cursor-size-hints.html
    - bat-dg2-9:          NOTRUN -> [SKIP][15] ([i915#9197])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-dg2-9/igt@kms_cursor_crc@cursor-size-hints.html
    - fi-kbl-x1275:       NOTRUN -> [SKIP][16]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/fi-kbl-x1275/igt@kms_cursor_crc@cursor-size-hints.html
    - fi-kbl-8809g:       NOTRUN -> [SKIP][17]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/fi-kbl-8809g/igt@kms_cursor_crc@cursor-size-hints.html
    - bat-atsm-1:         NOTRUN -> [SKIP][18] ([i915#6078])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-atsm-1/igt@kms_cursor_crc@cursor-size-hints.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - bat-jsl-1:          NOTRUN -> [SKIP][19] ([i915#4103]) +1 other test skip
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-jsl-1/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_dsc@dsc-basic:
    - fi-cfl-8109u:       NOTRUN -> [SKIP][20] +11 other tests skip
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/fi-cfl-8109u/igt@kms_dsc@dsc-basic.html
    - bat-jsl-1:          NOTRUN -> [SKIP][21] ([i915#3555] / [i915#9886])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-jsl-1/igt@kms_dsc@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
    - bat-jsl-1:          NOTRUN -> [SKIP][22]
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-jsl-1/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - bat-jsl-1:          NOTRUN -> [SKIP][23] ([i915#3555])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-jsl-1/igt@kms_setmode@basic-clone-single-crtc.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@gem_contexts:
    - fi-apl-guc:         [ABORT][24] -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/fi-apl-guc/igt@i915_selftest@live@gem_contexts.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/fi-apl-guc/igt@i915_selftest@live@gem_contexts.html

  * igt@i915_selftest@live@hangcheck:
    - bat-adlp-6:         [ABORT][26] ([i915#10021]) -> [PASS][27]
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-adlp-6/igt@i915_selftest@live@hangcheck.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-adlp-6/igt@i915_selftest@live@hangcheck.html
    - bat-rpls-3:         [DMESG-WARN][28] ([i915#5591]) -> [PASS][29]
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14443/bat-rpls-3/igt@i915_selftest@live@hangcheck.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/bat-rpls-3/igt@i915_selftest@live@hangcheck.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [i915#10021]: https://gitlab.freedesktop.org/drm/intel/issues/10021
  [i915#10196]: https://gitlab.freedesktop.org/drm/intel/issues/10196
  [i915#10197]: https://gitlab.freedesktop.org/drm/intel/issues/10197
  [i915#10200]: https://gitlab.freedesktop.org/drm/intel/issues/10200
  [i915#10202]: https://gitlab.freedesktop.org/drm/intel/issues/10202
  [i915#10206]: https://gitlab.freedesktop.org/drm/intel/issues/10206
  [i915#10207]: https://gitlab.freedesktop.org/drm/intel/issues/10207
  [i915#10208]: https://gitlab.freedesktop.org/drm/intel/issues/10208
  [i915#10209]: https://gitlab.freedesktop.org/drm/intel/issues/10209
  [i915#10211]: https://gitlab.freedesktop.org/drm/intel/issues/10211
  [i915#10212]: https://gitlab.freedesktop.org/drm/intel/issues/10212
  [i915#10213]: https://gitlab.freedesktop.org/drm/intel/issues/10213
  [i915#10214]: https://gitlab.freedesktop.org/drm/intel/issues/10214
  [i915#10216]: https://gitlab.freedesktop.org/drm/intel/issues/10216
  [i915#10262]: https://gitlab.freedesktop.org/drm/intel/issues/10262
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591
  [i915#6078]: https://gitlab.freedesktop.org/drm/intel/issues/6078
  [i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293
  [i915#8809]: https://gitlab.freedesktop.org/drm/intel/issues/8809
  [i915#9197]: https://gitlab.freedesktop.org/drm/intel/issues/9197
  [i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
  [i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732
  [i915#9812]: https://gitlab.freedesktop.org/drm/intel/issues/9812
  [i915#9886]: https://gitlab.freedesktop.org/drm/intel/issues/9886
  [i915#9900]: https://gitlab.freedesktop.org/drm/intel/issues/9900


Build changes
-------------

  * IGT: IGT_7769 -> IGTPW_10848
  * Linux: CI_DRM_14443 -> Patchwork_113758v6

  CI-20190529: 20190529
  CI_DRM_14443: ce8cc731d53f9197a853b0d00386d7835f2b80e6 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_10848: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10848/index.html
  IGT_7769: 7769
  Patchwork_113758v6: ce8cc731d53f9197a853b0d00386d7835f2b80e6 @ git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

3ebe7f36efb4 drm/i915: Add SIZE_HINTS property for cursors
90a85e9601b4 drm: Introduce plane SIZE_HINTS property

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113758v6/index.html

[-- Attachment #2: Type: text/html, Size: 13199 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 1/2] drm: Introduce plane SIZE_HINTS property
  2024-03-18 20:44 ` [PATCH v3 1/2] drm: Introduce " Ville Syrjala
@ 2024-03-19  6:51   ` kernel test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kernel test robot @ 2024-03-19  6:51 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx
  Cc: oe-kbuild-all, Jonas Ådahl, Sameer Lattannavar,
	Sebastian Wick, Simon Ser, Daniel Stone, Harry Wentland,
	Pekka Paalanen

Hi Ville,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.8 next-20240319]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ville-Syrjala/drm-Introduce-plane-SIZE_HINTS-property/20240319-044605
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20240318204408.9687-2-ville.syrjala%40linux.intel.com
patch subject: [PATCH v3 1/2] drm: Introduce plane SIZE_HINTS property
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20240319/202403191412.UTJldbq9-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240319/202403191412.UTJldbq9-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403191412.UTJldbq9-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/drm_plane.c:1767: warning: expecting prototype for drm_plane_add_size_hint_property(). Prototype was for drm_plane_add_size_hints_property() instead


vim +1767 drivers/gpu/drm/drm_plane.c

  1751	
  1752	/**
  1753	 * drm_plane_add_size_hint_property - create a size hint property
  1754	 *
  1755	 * @plane: drm plane
  1756	 * @hints: size hints
  1757	 * @num_hints: number of size hints
  1758	 *
  1759	 * Create a size hints property for the plane.
  1760	 *
  1761	 * RETURNS:
  1762	 * Zero for success or -errno
  1763	 */
  1764	int drm_plane_add_size_hints_property(struct drm_plane *plane,
  1765					      const struct drm_plane_size_hint *hints,
  1766					      int num_hints)
> 1767	{

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 0/2] drm: Add plane SIZE_HINTS property
  2024-03-18 20:44 [PATCH v3 0/2] drm: Add plane SIZE_HINTS property Ville Syrjala
                   ` (3 preceding siblings ...)
  2024-03-18 23:37 ` ✗ Fi.CI.BAT: failure " Patchwork
@ 2024-03-19  9:28 ` Ville Syrjälä
  4 siblings, 0 replies; 8+ messages in thread
From: Ville Syrjälä @ 2024-03-19  9:28 UTC (permalink / raw)
  To: intel-gfx
  Cc: Simon Ser, Jonas Ådahl, Daniel Stone, Sameer Lattannavar,
	Sebastian Wick, Harry Wentland, Pekka Paalanen, dri-devel

On Mon, Mar 18, 2024 at 10:44:06PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Final final version I hope. Mainly for CI to test against the
> new IGTs.
> 
> Real userspace implementation:
> https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3165                                                           
> 
> IGT:
> https://patchwork.freedesktop.org/series/131199/

CI said the IGT was correctly skipping without the
kernel patches, and passed on all i915 supported
machines with the kernel patches in place. 

So looks like we're all good to merge this, as soon
as I get someone to review thew i915 patch...

PS. I forgot to cc dri-devel with this series, but bounced
    the whole thing there now.

> 
> Changes from v2:
> - Limit to cursor planes only (Simon)
> 
> Test-with: 20240315191505.27620-1-ville.syrjala@linux.intel.com
> Cc: Simon Ser <contact@emersion.fr>
> Cc: Jonas Ådahl <jadahl@redhat.com>
> Cc: Daniel Stone <daniel@fooishbar.org>
> Cc: Sameer Lattannavar <sameer.lattannavar@intel.com>
> Cc: Sebastian Wick <sebastian.wick@redhat.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
> 
> Ville Syrjälä (2):
>   drm: Introduce plane SIZE_HINTS property
>   drm/i915: Add SIZE_HINTS property for cursors
> 
>  drivers/gpu/drm/drm_mode_config.c           |  7 +++
>  drivers/gpu/drm/drm_plane.c                 | 56 +++++++++++++++++++++
>  drivers/gpu/drm/i915/display/intel_cursor.c | 24 +++++++++
>  include/drm/drm_mode_config.h               |  5 ++
>  include/drm/drm_plane.h                     |  4 ++
>  include/uapi/drm/drm_mode.h                 | 11 ++++
>  6 files changed, 107 insertions(+)
> 
> -- 
> 2.43.2

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3 2/2] drm/i915: Add SIZE_HINTS property for cursors
  2024-03-18 20:44 ` [PATCH v3 2/2] drm/i915: Add SIZE_HINTS property for cursors Ville Syrjala
@ 2024-03-20 15:55   ` Juha-Pekka Heikkila
  0 siblings, 0 replies; 8+ messages in thread
From: Juha-Pekka Heikkila @ 2024-03-20 15:55 UTC (permalink / raw)
  To: Ville Syrjala, intel-gfx
  Cc: Simon Ser, Jonas Ådahl, Daniel Stone, Sameer Lattannavar,
	Sebastian Wick, Harry Wentland, Pekka Paalanen

look all ok to me.

Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>

On 18.3.2024 22.44, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Advertize more suitable cursor sizes via the new SIZE_HINTS
> plane property.
> 
> We can't really enumerate all supported cursor sizes on
> the platforms where the cursor height can vary freely, so
> for simplicity we'll just expose all square+POT sizes between
> each platform's min and max cursor limits.
> 
> Depending on the platform this will give us one of three
> results:
> - 64x64,128x128,256x256,512x512
> - 64x64,128x128,256x256
> - 64x64
> 
> Cc: Simon Ser <contact@emersion.fr>
> Cc: Jonas Ådahl <jadahl@redhat.com>
> Cc: Daniel Stone <daniel@fooishbar.org>
> Cc: Sameer Lattannavar <sameer.lattannavar@intel.com>
> Cc: Sebastian Wick <sebastian.wick@redhat.com>
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Pekka Paalanen <pekka.paalanen@collabora.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_cursor.c | 24 +++++++++++++++++++++
>   1 file changed, 24 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
> index f8b33999d43f..49e9b9be2235 100644
> --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> @@ -823,6 +823,28 @@ static const struct drm_plane_funcs intel_cursor_plane_funcs = {
>   	.format_mod_supported = intel_cursor_format_mod_supported,
>   };
>   
> +static void intel_cursor_add_size_hints_property(struct intel_plane *plane)
> +{
> +	struct drm_i915_private *i915 = to_i915(plane->base.dev);
> +	const struct drm_mode_config *config = &i915->drm.mode_config;
> +	struct drm_plane_size_hint hints[4];
> +	int size, max_size, num_hints = 0;
> +
> +	max_size = min(config->cursor_width, config->cursor_height);
> +
> +	/* for simplicity only enumerate the supported square+POT sizes */
> +	for (size = 64; size <= max_size; size *= 2) {
> +		if (drm_WARN_ON(&i915->drm, num_hints >= ARRAY_SIZE(hints)))
> +			break;
> +
> +		hints[num_hints].width = size;
> +		hints[num_hints].height = size;
> +		num_hints++;
> +	}
> +
> +	drm_plane_add_size_hints_property(&plane->base, hints, num_hints);
> +}
> +
>   struct intel_plane *
>   intel_cursor_plane_create(struct drm_i915_private *dev_priv,
>   			  enum pipe pipe)
> @@ -881,6 +903,8 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
>   						   DRM_MODE_ROTATE_0 |
>   						   DRM_MODE_ROTATE_180);
>   
> +	intel_cursor_add_size_hints_property(cursor);
> +
>   	zpos = DISPLAY_RUNTIME_INFO(dev_priv)->num_sprites[pipe] + 1;
>   	drm_plane_create_zpos_immutable_property(&cursor->base, zpos);
>   


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-20 15:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 20:44 [PATCH v3 0/2] drm: Add plane SIZE_HINTS property Ville Syrjala
2024-03-18 20:44 ` [PATCH v3 1/2] drm: Introduce " Ville Syrjala
2024-03-19  6:51   ` kernel test robot
2024-03-18 20:44 ` [PATCH v3 2/2] drm/i915: Add SIZE_HINTS property for cursors Ville Syrjala
2024-03-20 15:55   ` Juha-Pekka Heikkila
2024-03-18 23:19 ` ✗ Fi.CI.SPARSE: warning for drm: Add plane SIZE_HINTS property (rev6) Patchwork
2024-03-18 23:37 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-03-19  9:28 ` [PATCH v3 0/2] drm: Add plane SIZE_HINTS property Ville Syrjälä

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.