Skip to content

Commit f8fa26f

Browse files
committed
drm/i915: Nuke the TGL+ chroma plane tile row alignment stuff
I don't think the display hardware really has such chroma plane tile row alignment requirements as outlined in commit d156135 ("drm/i915/tgl: Make sure a semiplanar UV plane is tile row size aligned") Bspec had the same exact thing to say about earlier hardware as well, but we never cared and things work just fine. The one thing mentioned in that commit that is definitely true however is the fence alignment issue. But we don't deal with that on earlier hardware either. We do have code to deal with that issue for the first color plane, but not the chroma planes. So I think if we did want to check this more extensively we should do it in the same places where we already check the first color plane (namely convert_plane_offset_to_xy() and intel_fb_bo_framebuffer_init()). Reviewed-by: Imre Deak <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7652126 commit f8fa26f

File tree

3 files changed

+1
-26
lines changed

3 files changed

+1
-26
lines changed

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

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -585,12 +585,6 @@ static bool is_gen12_ccs_cc_plane(const struct drm_framebuffer *fb, int color_pl
585585
return intel_fb_rc_ccs_cc_plane(fb) == color_plane;
586586
}
587587

588-
bool is_semiplanar_uv_plane(const struct drm_framebuffer *fb, int color_plane)
589-
{
590-
return intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier) &&
591-
color_plane == 1;
592-
}
593-
594588
bool is_surface_linear(const struct drm_framebuffer *fb, int color_plane)
595589
{
596590
return fb->modifier == DRM_FORMAT_MOD_LINEAR ||
@@ -1020,11 +1014,7 @@ static int intel_fb_offset_to_xy(int *x, int *y,
10201014
struct drm_i915_private *i915 = to_i915(fb->dev);
10211015
unsigned int height, alignment, unused;
10221016

1023-
if (DISPLAY_VER(i915) >= 12 &&
1024-
!intel_fb_needs_pot_stride_remap(to_intel_framebuffer(fb)) &&
1025-
is_semiplanar_uv_plane(fb, color_plane))
1026-
alignment = intel_tile_row_size(fb, color_plane);
1027-
else if (fb->modifier != DRM_FORMAT_MOD_LINEAR)
1017+
if (fb->modifier != DRM_FORMAT_MOD_LINEAR)
10281018
alignment = intel_tile_size(i915);
10291019
else
10301020
alignment = 0;

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ bool intel_fb_is_ccs_modifier(u64 modifier);
3434
bool intel_fb_is_rc_ccs_cc_modifier(u64 modifier);
3535
bool intel_fb_is_mc_ccs_modifier(u64 modifier);
3636

37-
bool is_semiplanar_uv_plane(const struct drm_framebuffer *fb, int color_plane);
3837
bool intel_fb_is_ccs_aux_plane(const struct drm_framebuffer *fb, int color_plane);
3938
int intel_fb_rc_ccs_cc_plane(const struct drm_framebuffer *fb);
4039

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -515,20 +515,6 @@ static u32 tgl_plane_min_alignment(struct intel_plane *plane,
515515
if (intel_fb_is_ccs_aux_plane(fb, color_plane))
516516
return mult * 4 * 1024;
517517

518-
if (is_semiplanar_uv_plane(fb, color_plane)) {
519-
if (intel_fb_uses_dpt(fb))
520-
return 512 * 4 * 1024;
521-
522-
/*
523-
* TODO: cross-check wrt. the bspec stride in bytes * 64 bytes
524-
* alignment for linear UV planes on all platforms.
525-
*/
526-
if (fb->modifier == DRM_FORMAT_MOD_LINEAR)
527-
return 256 * 1024;
528-
529-
return intel_tile_row_size(fb, color_plane);
530-
}
531-
532518
switch (fb->modifier) {
533519
case DRM_FORMAT_MOD_LINEAR:
534520
case I915_FORMAT_MOD_X_TILED:

0 commit comments

Comments
 (0)