Skip to content

Commit c315fbf

Browse files
committed
drm/i915: Enable 10bpc + CCS on TGL+
TGL+ support 10bpc compressed scanout. Enable it. v2: Set .depth=30 for all variants to match drm_fourcc.c Set clear color block size to 0x0 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 0ddae02 commit c315fbf

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
@@ -67,6 +67,18 @@ static const struct drm_format_info gen12_ccs_formats[] = {
6767
{ .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 2,
6868
.char_per_block = { 4, 1 }, .block_w = { 1, 2 }, .block_h = { 1, 1 },
6969
.hsub = 1, .vsub = 1, .has_alpha = true },
70+
{ .format = DRM_FORMAT_XRGB2101010, .depth = 30, .num_planes = 2,
71+
.char_per_block = { 4, 1 }, .block_w = { 1, 2 }, .block_h = { 1, 1 },
72+
.hsub = 1, .vsub = 1, },
73+
{ .format = DRM_FORMAT_XBGR2101010, .depth = 30, .num_planes = 2,
74+
.char_per_block = { 4, 1 }, .block_w = { 1, 2 }, .block_h = { 1, 1 },
75+
.hsub = 1, .vsub = 1, },
76+
{ .format = DRM_FORMAT_ARGB2101010, .depth = 30, .num_planes = 2,
77+
.char_per_block = { 4, 1 }, .block_w = { 1, 2 }, .block_h = { 1, 1 },
78+
.hsub = 1, .vsub = 1, .has_alpha = true },
79+
{ .format = DRM_FORMAT_ABGR2101010, .depth = 30, .num_planes = 2,
80+
.char_per_block = { 4, 1 }, .block_w = { 1, 2 }, .block_h = { 1, 1 },
81+
.hsub = 1, .vsub = 1, .has_alpha = true },
7082
{ .format = DRM_FORMAT_YUYV, .num_planes = 2,
7183
.char_per_block = { 2, 1 }, .block_w = { 1, 2 }, .block_h = { 1, 1 },
7284
.hsub = 2, .vsub = 1, .is_yuv = true },
@@ -113,6 +125,18 @@ static const struct drm_format_info gen12_ccs_cc_formats[] = {
113125
{ .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 3,
114126
.char_per_block = { 4, 1, 0 }, .block_w = { 1, 2, 0 }, .block_h = { 1, 1, 0 },
115127
.hsub = 1, .vsub = 1, .has_alpha = true },
128+
{ .format = DRM_FORMAT_XRGB2101010, .depth = 30, .num_planes = 3,
129+
.char_per_block = { 4, 1, 0 }, .block_w = { 1, 2, 0 }, .block_h = { 1, 1, 0 },
130+
.hsub = 1, .vsub = 1, },
131+
{ .format = DRM_FORMAT_XBGR2101010, .depth = 30, .num_planes = 3,
132+
.char_per_block = { 4, 1, 0 }, .block_w = { 1, 2, 0 }, .block_h = { 1, 1, 0 },
133+
.hsub = 1, .vsub = 1, },
134+
{ .format = DRM_FORMAT_ARGB2101010, .depth = 30, .num_planes = 3,
135+
.char_per_block = { 4, 1, 0 }, .block_w = { 1, 2, 0 }, .block_h = { 1, 1, 0 },
136+
.hsub = 1, .vsub = 1, .has_alpha = true },
137+
{ .format = DRM_FORMAT_ABGR2101010, .depth = 30, .num_planes = 3,
138+
.char_per_block = { 4, 1, 0 }, .block_w = { 1, 2, 0 }, .block_h = { 1, 1, 0 },
139+
.hsub = 1, .vsub = 1, .has_alpha = true },
116140
};
117141

118142
static const struct drm_format_info gen12_flat_ccs_cc_formats[] = {
@@ -128,6 +152,18 @@ static const struct drm_format_info gen12_flat_ccs_cc_formats[] = {
128152
{ .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 2,
129153
.char_per_block = { 4, 0 }, .block_w = { 1, 0 }, .block_h = { 1, 0 },
130154
.hsub = 1, .vsub = 1, .has_alpha = true },
155+
{ .format = DRM_FORMAT_XRGB2101010, .depth = 30, .num_planes = 2,
156+
.char_per_block = { 4, 0 }, .block_w = { 1, 0 }, .block_h = { 1, 0 },
157+
.hsub = 1, .vsub = 1, },
158+
{ .format = DRM_FORMAT_XBGR2101010, .depth = 30, .num_planes = 2,
159+
.char_per_block = { 4, 0 }, .block_w = { 1, 0 }, .block_h = { 1, 0 },
160+
.hsub = 1, .vsub = 1, },
161+
{ .format = DRM_FORMAT_ARGB2101010, .depth = 30, .num_planes = 2,
162+
.char_per_block = { 4, 0 }, .block_w = { 1, 0 }, .block_h = { 1, 0 },
163+
.hsub = 1, .vsub = 1, .has_alpha = true },
164+
{ .format = DRM_FORMAT_ABGR2101010, .depth = 30, .num_planes = 2,
165+
.char_per_block = { 4, 0 }, .block_w = { 1, 0 }, .block_h = { 1, 0 },
166+
.hsub = 1, .vsub = 1, .has_alpha = true },
131167
};
132168

133169
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
@@ -2343,6 +2343,10 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,
23432343
case DRM_FORMAT_XBGR8888:
23442344
case DRM_FORMAT_ARGB8888:
23452345
case DRM_FORMAT_ABGR8888:
2346+
case DRM_FORMAT_XRGB2101010:
2347+
case DRM_FORMAT_XBGR2101010:
2348+
case DRM_FORMAT_ARGB2101010:
2349+
case DRM_FORMAT_ABGR2101010:
23462350
if (intel_fb_is_ccs_modifier(modifier))
23472351
return true;
23482352
fallthrough;
@@ -2359,10 +2363,6 @@ static bool gen12_plane_format_mod_supported(struct drm_plane *_plane,
23592363
return true;
23602364
fallthrough;
23612365
case DRM_FORMAT_RGB565:
2362-
case DRM_FORMAT_XRGB2101010:
2363-
case DRM_FORMAT_XBGR2101010:
2364-
case DRM_FORMAT_ARGB2101010:
2365-
case DRM_FORMAT_ABGR2101010:
23662366
case DRM_FORMAT_XVYU2101010:
23672367
case DRM_FORMAT_C8:
23682368
case DRM_FORMAT_XBGR16161616F:

0 commit comments

Comments
 (0)