From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ADED8C79FA0 for ; Mon, 7 Sep 2026 21:10:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0CF2210E659; Mon, 7 Sep 2026 21:10:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="ges3/SVW"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id D3F7D10E659 for ; Mon, 7 Sep 2026 21:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1788815399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FuVXo6f9Z1spKRdlImVETM3b3qRtGRWXee9cH9hEi4U=; b=ges3/SVWE4Ts89l/Qj4GDA62YM5nH/14wTb1iUriY3oDHxwaLxIlzIhKbFBwgT19BrPIrh KP9UAnHWGyuGJheHLcnP0/mpmUIqooxKCDkwx36U6G257A8+IJj4TpTHNTq6YbsmkSSn/q AazXyYnTJf9uZqZ/ZlvVn2yI1NziEng= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-_p36ToZzOMyOl86nP76L3Q-1; Mon, 07 Sep 2026 17:09:53 -0400 X-MC-Unique: _p36ToZzOMyOl86nP76L3Q-1 X-Mimecast-MFC-AGG-ID: _p36ToZzOMyOl86nP76L3Q_1788815391 Received: from mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1D3701801200; Mon, 7 Sep 2026 21:09:50 +0000 (UTC) Received: from [100.91.157.188] (headnet03.pony-001.prod.iad2.dc.redhat.com [10.2.32.114]) by mx-prod-int-10.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D0FA15B1; Mon, 7 Sep 2026 21:09:42 +0000 (UTC) Message-ID: Date: Mon, 7 Sep 2026 23:09:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 07/14] drm/panic: Return from screen_user if display is too small To: Thomas Zimmermann , javierm@redhat.com, airlied@gmail.com, simona@ffwll.ch, maarten.lankhorst@linux.intel.com, mripard@kernel.org, geert@linux-m68k.org, rdunlap@infradead.org Cc: dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, amd-gfx@lists.freedesktop.org, rust-for-linux@vger.kernel.org, linux-hyperv@vger.kernel.org, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, nouveau@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, virtualization@lists.linux.dev, sashiko-reviews@lists.linux.dev References: <20260902121930.597222-1-tzimmermann@suse.de> <20260902121930.597222-8-tzimmermann@suse.de> From: Jocelyn Falempe In-Reply-To: <20260902121930.597222-8-tzimmermann@suse.de> X-Scanned-By: MIMEDefang 3.6 on 10.30.177.95 X-Mimecast-MFC-PROC-ID: X0KGNfdzR_UZbbLbore1rqqHqcjcsaVvC9B8Yax3YYM_1788815391 X-Mimecast-Originator: redhat.com Content-Language: en-US, fr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 9/2/26 14:13, Thomas Zimmermann wrote: > Return an error if the display is too small to display at least a > single character. If the panic handler cannot display any message > it does at least not destroy the current output, which might help > with identifying the problem. > > This change duplicates the logic from screen_kmsg output. Thanks, it looks good to me. maybe add a check also for font->height > sb->height Reviewed-by: Jocelyn Falempe > > Signed-off-by: Thomas Zimmermann > --- > 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 f597ef04c5bc..c317afc76669 100644 > --- a/drivers/gpu/drm/drm_panic.c > +++ b/drivers/gpu/drm/drm_panic.c > @@ -486,7 +486,7 @@ static int draw_panic_screen_user(struct drm_scanout_buffer *sb, u32 fg_color, u > struct drm_rect r_screen, r_logo, r_msg; > unsigned int msg_width, msg_height; > > - if (!font) > + if (!font || font->width > sb->width) > return -EINVAL; > > fg_color = drm_draw_color_from_xrgb8888(fg_color, sb->format->format);