Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f28f54a authored by Dan Carpenter's avatar Dan Carpenter Committed by Chris Wilson
Browse files

i915: signedness bug in check_overlay_src()



"depth" should be signed in case packed_depth_bytes() returns -EINVAL.

This probably doesn't make a difference at runtime.  In the original
code we would return -EINVAL later if (rec->offset_Y % 4294967274) is
non-zero.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent dd2b379f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -946,7 +946,9 @@ static int check_overlay_src(struct drm_device *dev,
{
	int uv_hscale = uv_hsubsampling(rec->flags);
	int uv_vscale = uv_vsubsampling(rec->flags);
	u32 stride_mask, depth, tmp;
	u32 stride_mask;
	int depth;
	u32 tmp;

	/* check src dimensions */
	if (IS_845G(dev) || IS_I830(dev)) {