summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinod Govindapillai <vinod.govindapillai@intel.com>2025-10-27 15:40:00 +0200
committerVinod Govindapillai <vinod.govindapillai@intel.com>2025-10-31 13:32:16 +0200
commitaa1625abae53646e87573786fdf789ea6e1858f7 (patch)
tree0ff1af4b42e59bc08d407e300b6f08561189f6a1
parent5aa457874e374ea2b349858f4cf37774e61d5b6c (diff)
drm/i915/xe3p_lpd: extract pixel format valid routine for FP16 formats
As the pixel normalizer block is needed only for the FP16 formats, separating out the FP16 formats handling will benefit in selectively enabling the pixel normalizer block in the following patch. Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Link: https://patch.msgid.link/20251027134001.325064-4-vinod.govindapillai@intel.com
-rw-r--r--drivers/gpu/drm/i915/display/intel_fbc.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c b/drivers/gpu/drm/i915/display/intel_fbc.c
index 57f4ff2d10ca..0f697c7b1d46 100644
--- a/drivers/gpu/drm/i915/display/intel_fbc.c
+++ b/drivers/gpu/drm/i915/display/intel_fbc.c
@@ -1084,6 +1084,20 @@ static bool lnl_fbc_pixel_format_is_valid(const struct intel_plane_state *plane_
}
}
+static bool
+xe3p_lpd_fbc_fp16_format_is_valid(const struct intel_plane_state *plane_state)
+{
+ const struct drm_framebuffer *fb = plane_state->hw.fb;
+
+ switch (fb->format->format) {
+ case DRM_FORMAT_ARGB16161616F:
+ case DRM_FORMAT_ABGR16161616F:
+ return true;
+ default:
+ return false;
+ }
+}
+
static bool xe3p_lpd_fbc_pixel_format_is_valid(const struct intel_plane_state *plane_state)
{
const struct drm_framebuffer *fb = plane_state->hw.fb;
@@ -1091,13 +1105,14 @@ static bool xe3p_lpd_fbc_pixel_format_is_valid(const struct intel_plane_state *p
if (lnl_fbc_pixel_format_is_valid(plane_state))
return true;
+ if (xe3p_lpd_fbc_fp16_format_is_valid(plane_state))
+ return true;
+
switch (fb->format->format) {
case DRM_FORMAT_XRGB16161616:
case DRM_FORMAT_XBGR16161616:
case DRM_FORMAT_ARGB16161616:
case DRM_FORMAT_ABGR16161616:
- case DRM_FORMAT_ARGB16161616F:
- case DRM_FORMAT_ABGR16161616F:
return true;
default:
return false;