Skip to content

Commit

Permalink
drm/i915/fbc: Remove ancient 16k plane stride limit
Browse files Browse the repository at this point in the history
The 16k max plane stride limit seems to be originally from
i965gm, and no explicit limit has been specified since (g4x+).
So let's assume the max plane stride itself is a suitable limit
also for the more recent FBC hardware.

In fact even for i965gm the max X-tiled stride is also 16k so
technically we don't need the check there either, but let's
keep it there anyway since it's explicitly mentioned in the
spec. Gen2/3 have more strict limits checked separately.

Reviewed-by: Swati Sharma <[email protected]>
Reviewed-by: Juha-Pekka Heikkila <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
vsyrjala committed Oct 5, 2023
1 parent 6097cda commit da7b3b0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/i915/display/intel_fbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,17 +871,15 @@ static bool stride_is_valid(const struct intel_plane_state *plane_state)
if (DISPLAY_VER(i915) == 2 || DISPLAY_VER(i915) == 3)
return stride == 4096 || stride == 8192;

if (DISPLAY_VER(i915) == 4 && !IS_G4X(i915) && stride < 2048)
if (DISPLAY_VER(i915) == 4 && !IS_G4X(i915) &&
(stride < 2048 || stride > 16384))
return false;

/* Display WA #1105: skl,bxt,kbl,cfl,glk */
if ((DISPLAY_VER(i915) == 9 || IS_GEMINILAKE(i915)) &&
fb->modifier == DRM_FORMAT_MOD_LINEAR && stride & 511)
return false;

if (stride > 16384)
return false;

return true;
}

Expand Down

0 comments on commit da7b3b0

Please sign in to comment.