[Intel-gfx] [PATCH] drm/i915: Support FP16 compressed formats on MTL
Melanie Lobo
melanie.lobo at intel.com
Mon Oct 23 09:25:37 UTC 2023
MTL supports FP16 format which is a binary floating-point computer
number format that occupies 16 bits in computer memory.Platform shall
render compression in display engine to receive FP16 compressed formats.
This kernel change was tested with IGT patch,
https://patchwork.freedesktop.org/patch/562014/
Test-with: 20231011095520.10768-1-melanie.lobo at intel.com
Credits: Juha-Pekka <juha-pekka.heikkila at intel.com>
Signed-off-by: Melanie Lobo <melanie.lobo at intel.com>
Reported-by: kernel test robot <lkp at intel.com>
Reported-by: Dan Carpenter <dan.carpenter at linaro.org>
Closes: https://lore.kernel.org/r/202310150454.S9QF86bl-lkp@intel.com/
---
drivers/gpu/drm/i915/display/intel_fb.c | 2 ++
drivers/gpu/drm/i915/display/skl_universal_plane.c | 4 +---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index e7678571b0d7..d48f0daf89e7 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -91,6 +91,8 @@ static const struct drm_format_info gen12_ccs_formats[] = {
{ .format = DRM_FORMAT_P016, .num_planes = 4,
.char_per_block = { 2, 4, 1, 1 }, .block_w = { 1, 1, 2, 2 }, .block_h = { 1, 1, 1, 1 },
.hsub = 2, .vsub = 2, .is_yuv = true },
+ { .format = DRM_FORMAT_XRGB16161616F, .depth = 64, .num_planes = 2,
+ .char_per_block = { 8, 1}, .block_w = { 1, 4}, .block_h = { 1, 2}, .hsub = 1, .vsub = 1 },
};
/*
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 245a64332cc7..6ec5b96904c3 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -2122,9 +2122,7 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,
case DRM_FORMAT_Y216:
case DRM_FORMAT_XVYU12_16161616:
case DRM_FORMAT_XVYU16161616:
- if (!intel_fb_is_ccs_modifier(modifier))
- return true;
- fallthrough;
+ return true;
default:
return false;
}
--
2.17.1
More information about the Intel-gfx
mailing list