For an interlaced manager dispc_ovl_setup_common() halves out_height: if (ilace) { ... out_height /= 2; } A one-pixel tall destination (crtc_h == 1) is accepted by the atomic check but halves to 0, and dispc_ovl_calc_scaling() then divides by out_height: decim_y = DIV_ROUND_UP(DIV_ROUND_UP(height, out_height), maxvdownscale); raising a divide error. The earlier `out_height == 0 ? height : out_height` sanitizer runs before the halving, so it does not help. Keep out_height at least 1 after the interlaced halving. The interlace halving predates at least commit 0c6921de3710 ("OMAPDSS: DISPC: pass pclk & lclk to calc_scaling") and likely further; the true origin could not be determined at reasonable cost, so this carries no Fixes: tag. Cc: stable@vger.kernel.org Signed-off-by: Shirong Zhao --- drivers/gpu/drm/omapdrm/dss/dispc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index 2a23b4c..a5cf867 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -2624,6 +2624,9 @@ static int dispc_ovl_setup_common(struct dispc_device *dispc, in_height /= 2; pos_y /= 2; out_height /= 2; + /* a 1-pixel tall interlaced plane halves to 0 */ + if (!out_height) + out_height = 1; DSSDBG("adjusting for ilace: height %d, pos_y %d, out_height %d\n", in_height, pos_y, out_height); -- 2.53.0