Skip to content

Commit 394676f

Browse files
committed
drm/i915: Add WA for planes ending close to left screen edge
While running the kms_plane clipping test I noticed a similar problem to the one described in Display WA #1175. In this case, similarly for planes other than the cursor, with 1 or 3 pixels visible from the left edge of the screen to the end of the plane and an odd plane X offset used for clipping causes the same kind of underflow and display corruption as described for WA #1175. Fix this in a similar way as that WA rejecting planes ending <4 pixels from the left screen edge. v2: - Rebase on v2 of patch 1/1. Testcase: igt/kms_plane/plane-clipping-pipe-*-planes Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent c322c64 commit 394676f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2959,12 +2959,16 @@ static int skl_check_main_surface(const struct intel_crtc_state *crtc_state,
29592959
* Planes other than the cursor may cause FIFO underflow and display
29602960
* corruption if starting less than 4 pixels from the right edge of
29612961
* the screen.
2962+
* Besides the above WA fix the similar problem, where planes other
2963+
* than the cursor ending less than 4 pixels from the left edge of the
2964+
* screen may cause FIFO underflow and display corruption.
29622965
*/
29632966
if ((IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) &&
2964-
dst_x > pipe_src_w - 4) {
2965-
DRM_DEBUG_KMS("requested plane X start position %d invalid (valid range %d-%d)\n",
2966-
dst_x,
2967-
0, pipe_src_w - 4);
2967+
(dst_x + w < 4 || dst_x > pipe_src_w - 4)) {
2968+
DRM_DEBUG_KMS("requested plane X %s position %d invalid (valid range %d-%d)\n",
2969+
dst_x + w < 4 ? "end" : "start",
2970+
dst_x + w < 4 ? dst_x + w : dst_x,
2971+
4, pipe_src_w - 4);
29682972
return -ERANGE;
29692973
}
29702974

0 commit comments

Comments
 (0)