From 6a86e215baf60e8daf7bcd92553ed4023cb70e5d Mon Sep 17 00:00:00 2001 From: Vinod Govindapillai Date: Wed, 22 Jul 2026 16:24:46 +0300 Subject: [PATCH] drm/xe/display: Expose plane max width/height helpers to global scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enabling features like FBC on platforms may depend on a plane's maximum supported resolutions or some other arbitrary constant values because of hw restrictions. Currently the helpers that report a plane's max width and height are private to skl_plane / skl_universal_plane. Change the scope to golbal so that this can be queried from other areas as well. v2: function parameter alignment fixes Signed-off-by: Vinod Govindapillai Reviewed-by: Jouni Högander Link: https://patch.msgid.link/20260722132448.318112-1-vinod.govindapillai@intel.com --- .../gpu/drm/i915/display/skl_universal_plane.c | 16 ++++++++-------- .../gpu/drm/i915/display/skl_universal_plane.h | 9 +++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c index b246fc48558b..07a683293352 100644 --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c @@ -1932,10 +1932,10 @@ static int intel_plane_min_height(struct intel_plane *plane, return 1; } -static int intel_plane_max_width(struct intel_plane *plane, - const struct drm_framebuffer *fb, - int color_plane, - unsigned int rotation) +int intel_plane_max_width(struct intel_plane *plane, + const struct drm_framebuffer *fb, + int color_plane, + unsigned int rotation) { if (plane->max_width) return plane->max_width(fb, color_plane, rotation); @@ -1943,10 +1943,10 @@ static int intel_plane_max_width(struct intel_plane *plane, return INT_MAX; } -static int intel_plane_max_height(struct intel_plane *plane, - const struct drm_framebuffer *fb, - int color_plane, - unsigned int rotation) +int intel_plane_max_height(struct intel_plane *plane, + const struct drm_framebuffer *fb, + int color_plane, + unsigned int rotation) { if (plane->max_height) return plane->max_height(fb, color_plane, rotation); diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.h b/drivers/gpu/drm/i915/display/skl_universal_plane.h index 5e2451c21eeb..ad71105cc55a 100644 --- a/drivers/gpu/drm/i915/display/skl_universal_plane.h +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.h @@ -8,6 +8,7 @@ #include +struct drm_framebuffer; struct intel_crtc; struct intel_display; struct intel_initial_plane_config; @@ -42,5 +43,13 @@ bool icl_is_hdr_plane(struct intel_display *display, enum plane_id plane_id); u32 skl_plane_aux_dist(const struct intel_plane_state *plane_state, int color_plane); +int intel_plane_max_width(struct intel_plane *plane, + const struct drm_framebuffer *fb, + int color_plane, + unsigned int rotation); +int intel_plane_max_height(struct intel_plane *plane, + const struct drm_framebuffer *fb, + int color_plane, + unsigned int rotation); #endif