drm/i915: Add SIZE_HINTS property for cursors
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 18 Mar 2024 20:44:08 +0000 (22:44 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 11 Apr 2024 15:30:19 +0000 (18:30 +0300)
commit42118c5f6853a28c132ab1ae6efe3893b051e0d2
tree2154210423062553f13545e79871f178243ce743
parent9677547d836299497ba2da1ad59851e200109ca1
drm/i915: Add SIZE_HINTS property for cursors

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>
Link: https://patchwork.freedesktop.org/patch/msgid/20240318204408.9687-3-ville.syrjala@linux.intel.com
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
drivers/gpu/drm/i915/display/intel_cursor.c