Skip to content

Commit 7c35015

Browse files
committed
drm/i915: Enable fp16 + CCS on TGL+
TGL+ support compressed fp16 scanout. Enable it. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Juha-Pekka Heikkila <[email protected]>
1 parent 0c787d4 commit 7c35015

File tree

2 files changed

+40
-4
lines changed

2 files changed

+40
-4
lines changed

drivers/gpu/drm/i915/display/intel_fb.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@ static const struct drm_format_info gen12_ccs_formats[] = {
8787
{ .format = DRM_FORMAT_ABGR2101010, .depth = 30, .num_planes = 2,
8888
.char_per_block = { 4, 1 }, .block_w = { 1, 2 }, .block_h = { 1, 1 },
8989
.hsub = 1, .vsub = 1, .has_alpha = true },
90+
{ .format = DRM_FORMAT_XRGB16161616F, .depth = 0, .num_planes = 2,
91+
.char_per_block = { 8, 1 }, .block_w = { 1, 1 }, .block_h = { 1, 1 },
92+
.hsub = 1, .vsub = 1, },
93+
{ .format = DRM_FORMAT_XBGR16161616F, .depth = 0, .num_planes = 2,
94+
.char_per_block = { 8, 1 }, .block_w = { 1, 1 }, .block_h = { 1, 1 },
95+
.hsub = 1, .vsub = 1, },
96+
{ .format = DRM_FORMAT_ARGB16161616F, .depth = 0, .num_planes = 2,
97+
.char_per_block = { 8, 1 }, .block_w = { 1, 1 }, .block_h = { 1, 1 },
98+
.hsub = 1, .vsub = 1, .has_alpha = true },
99+
{ .format = DRM_FORMAT_ABGR16161616F, .depth = 0, .num_planes = 2,
100+
.char_per_block = { 8, 1 }, .block_w = { 1, 1 }, .block_h = { 1, 1 },
101+
.hsub = 1, .vsub = 1, .has_alpha = true },
90102
{ .format = DRM_FORMAT_YUYV, .num_planes = 2,
91103
.char_per_block = { 2, 1 }, .block_w = { 1, 2 }, .block_h = { 1, 1 },
92104
.hsub = 2, .vsub = 1, .is_yuv = true },
@@ -145,6 +157,18 @@ static const struct drm_format_info gen12_ccs_cc_formats[] = {
145157
{ .format = DRM_FORMAT_ABGR2101010, .depth = 30, .num_planes = 3,
146158
.char_per_block = { 4, 1, 0 }, .block_w = { 1, 2, 0 }, .block_h = { 1, 1, 0 },
147159
.hsub = 1, .vsub = 1, .has_alpha = true },
160+
{ .format = DRM_FORMAT_XRGB16161616F, .depth = 0, .num_planes = 3,
161+
.char_per_block = { 8, 1, 0 }, .block_w = { 1, 1, 0 }, .block_h = { 1, 1, 0 },
162+
.hsub = 1, .vsub = 1, },
163+
{ .format = DRM_FORMAT_XBGR16161616F, .depth = 0, .num_planes = 3,
164+
.char_per_block = { 8, 1, 0 }, .block_w = { 1, 1, 0 }, .block_h = { 1, 1, 0 },
165+
.hsub = 1, .vsub = 1, },
166+
{ .format = DRM_FORMAT_ARGB16161616F, .depth = 0, .num_planes = 3,
167+
.char_per_block = { 8, 1, 0 }, .block_w = { 1, 1, 0 }, .block_h = { 1, 1, 0 },
168+
.hsub = 1, .vsub = 1, .has_alpha = true },
169+
{ .format = DRM_FORMAT_ABGR16161616F, .depth = 0, .num_planes = 3,
170+
.char_per_block = { 8, 1, 0 }, .block_w = { 1, 1, 0 }, .block_h = { 1, 1, 0 },
171+
.hsub = 1, .vsub = 1, .has_alpha = true },
148172
};
149173

150174
static const struct drm_format_info gen12_flat_ccs_cc_formats[] = {
@@ -172,6 +196,18 @@ static const struct drm_format_info gen12_flat_ccs_cc_formats[] = {
172196
{ .format = DRM_FORMAT_ABGR2101010, .depth = 30, .num_planes = 2,
173197
.char_per_block = { 4, 0 }, .block_w = { 1, 0 }, .block_h = { 1, 0 },
174198
.hsub = 1, .vsub = 1, .has_alpha = true },
199+
{ .format = DRM_FORMAT_XRGB16161616F, .depth = 0, .num_planes = 2,
200+
.char_per_block = { 8, 0 }, .block_w = { 1, 0 }, .block_h = { 1, 0 },
201+
.hsub = 1, .vsub = 1, },
202+
{ .format = DRM_FORMAT_XBGR16161616F, .depth = 0, .num_planes = 2,
203+
.char_per_block = { 8, 0 }, .block_w = { 1, 0 }, .block_h = { 1, 0 },
204+
.hsub = 1, .vsub = 1, },
205+
{ .format = DRM_FORMAT_ARGB16161616F, .depth = 0, .num_planes = 2,
206+
.char_per_block = { 8, 0 }, .block_w = { 1, 0 }, .block_h = { 1, 0 },
207+
.hsub = 1, .vsub = 1, .has_alpha = true },
208+
{ .format = DRM_FORMAT_ABGR16161616F, .depth = 0, .num_planes = 2,
209+
.char_per_block = { 8, 0 }, .block_w = { 1, 0 }, .block_h = { 1, 0 },
210+
.hsub = 1, .vsub = 1, .has_alpha = true },
175211
};
176212

177213
struct intel_modifier_desc {

drivers/gpu/drm/i915/display/skl_universal_plane.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,6 +2401,10 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,
24012401
case DRM_FORMAT_XBGR2101010:
24022402
case DRM_FORMAT_ARGB2101010:
24032403
case DRM_FORMAT_ABGR2101010:
2404+
case DRM_FORMAT_XBGR16161616F:
2405+
case DRM_FORMAT_ABGR16161616F:
2406+
case DRM_FORMAT_XRGB16161616F:
2407+
case DRM_FORMAT_ARGB16161616F:
24042408
if (intel_fb_is_ccs_modifier(modifier))
24052409
return true;
24062410
fallthrough;
@@ -2419,10 +2423,6 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,
24192423
case DRM_FORMAT_RGB565:
24202424
case DRM_FORMAT_XVYU2101010:
24212425
case DRM_FORMAT_C8:
2422-
case DRM_FORMAT_XBGR16161616F:
2423-
case DRM_FORMAT_ABGR16161616F:
2424-
case DRM_FORMAT_XRGB16161616F:
2425-
case DRM_FORMAT_ARGB16161616F:
24262426
case DRM_FORMAT_Y210:
24272427
case DRM_FORMAT_Y212:
24282428
case DRM_FORMAT_Y216:

0 commit comments

Comments
 (0)