From patchwork Thu Jun 13 19:18:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13697367 Received: from andre.telenet-ops.be (andre.telenet-ops.be [195.130.132.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5B85153567 for ; Thu, 13 Jun 2024 19:18:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.132.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718306299; cv=none; b=n1ejTvSUwZN4dFqG1bp28fLAkyCKV1HFUGNUx5yTsSbhbupKI2+9C7yqM2Mx1r9TTqgZBuximNoB4/PEnOqShFBADp+z4eOU12mbiGox7i/9w6NXi3988OJEdiS3ExhMG8Cwnd5B/wo9TwuepdMNwXKn5Dek5RRIJkVXKBo/QTk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718306299; c=relaxed/simple; bh=/mZa73zwDKX0V9S42wBjaR1oVGDw4zIOxpP9TGhCG7g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Gy4FFgn9yH1WYXsZC7Yixm2NRKk4FF2kXmOrGwSpJiaQdbr/W/cjDwJN4zCt/x6QUCrz6Dwt+7bY5APaFNgmfPsKejcQNwhJX1URlkrQLmqGw8vKd7iYD304r0/fl3CuuuN7Ivh4cVyjtFV0edED3kQ1g9hQiBnMrgGSbYJtDvA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.132.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed80:be2a:f066:50f0:dff7]) by andre.telenet-ops.be with bizsmtp id b7J62C00A3w30qz017J6rJ; Thu, 13 Jun 2024 21:18:08 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1sHpwS-00Ax6l-DD; Thu, 13 Jun 2024 21:18:06 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1sHpxW-00FL8W-Dz; Thu, 13 Jun 2024 21:18:06 +0200 From: Geert Uytterhoeven To: Jocelyn Falempe , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: Helge Deller , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2 2/7] drm/panic: Fix off-by-one logo size checks Date: Thu, 13 Jun 2024 21:18:00 +0200 Message-Id: <1c9d02463cef3eac22cfac3ac6d1adad369f367b.1718305355.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Logos that are either just as wide or just as high as the display work fine. Fixes: bf9fb17c6672868d ("drm/panic: Add a drm panic handler") Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe --- v2: - Rebased. --- drivers/gpu/drm/drm_panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c index fc04ed4e0b399f55..814ef5c20c08ee42 100644 --- a/drivers/gpu/drm/drm_panic.c +++ b/drivers/gpu/drm/drm_panic.c @@ -472,7 +472,7 @@ static void draw_panic_static_user(struct drm_scanout_buffer *sb) drm_panic_fill(sb, &r_screen, bg_color); if ((r_msg.x1 >= drm_rect_width(&r_logo) || r_msg.y1 >= drm_rect_height(&r_logo)) && - drm_rect_width(&r_logo) < sb->width && drm_rect_height(&r_logo) < sb->height) { + drm_rect_width(&r_logo) <= sb->width && drm_rect_height(&r_logo) <= sb->height) { draw_txt_rectangle(sb, font, logo, logo_lines, false, &r_logo, fg_color); } draw_txt_rectangle(sb, font, panic_msg, msg_lines, true, &r_msg, fg_color);