From nobody Wed Dec 17 19:41:28 2025 Received: from delivery.antispam.mailspamprotection.com (delivery.antispam.mailspamprotection.com [185.56.87.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9310433A9C4 for ; Wed, 17 Dec 2025 08:08:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=185.56.87.11 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765958926; cv=pass; b=BtFaLhOc3vEC9l6rJ8ey2XWPLrP0ZUu390iyI3x6u5w+OPJFmwA4SFVxxL4NKUQ8nsMXfUCaJ0o1q/x8Av1suqq4ga3lAN8J4jl1nmgtrnQZJV+tmbHNqSNNnwHBNaI5KbZJ+1hL/U9W6QoZtYM2Qu7FHis3bZ8QTGyZeQVD8Bw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765958926; c=relaxed/simple; bh=3R2Fi+LMXSFAxxhMSgWy+NDD1j2U6w1AOA2qqvgyJ58=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WqlT/vYMgLwbot5E65YGSKeT1BMf8I1J9vAAedvlT4LBX7pTKeY1omeva1cpTYNCFfDpoKV5sIVPwfMYeCE5efCQjnrSOEgWz2+jezWUuSXrrHEL2UjJQ1/kI80w0W7WM+9ZV65Lz9Me8a6yO3p7iBeWrg4IVwGkdxxrgctXDLw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it; spf=pass smtp.mailfrom=valla.it; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b=dqgdU4VN; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b=jDh98vxC; arc=pass smtp.client-ip=185.56.87.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valla.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b="dqgdU4VN"; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b="jDh98vxC" ARC-Seal: i=1; cv=none; a=rsa-sha256; d=outgoing.instance-europe-west4-mwgq.prod.antispam.mailspamprotection.com; s=arckey; t=1765958924; b=QU479fwkjFqjJUBdcZN2NO7dVz6qppo0Wp3tGV45g59Mz9jQVY8E8QDjBwHiQXxVmguOhV7dA+ dvi2jGWXYXjs6/62xt2NvgXOkYJGTnNZvgsrooKirI7edfaUuGhBkrqckoztH6w5hkV3ajXuiD CKS+iFqvZpV5Sd33kHkzOABQCoa7KWnB/az8XtCeCeZiyjeY91LrcFvec/D1WSHu9XIO8UalTl hH7tz3RSAbZEJMe4pdc9nr/cTlmrpikEJmKUerLmStv7lDrkgExIuJV6LKEzHMvtIJpmzlP120 j49PkR4cqZ9sL5Bz1O4lY9rQ2QaLdQ8QwlS3yZOuCKPnMQ==; ARC-Authentication-Results: i=1; outgoing.instance-europe-west4-mwgq.prod.antispam.mailspamprotection.com; smtp.remote-ip=35.214.173.214; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=outgoing.instance-europe-west4-mwgq.prod.antispam.mailspamprotection.com; s=arckey; t=1765958924; bh=3R2Fi+LMXSFAxxhMSgWy+NDD1j2U6w1AOA2qqvgyJ58=; h=Cc:To:In-Reply-To:References:Message-ID:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:DKIM-Signature:DKIM-Signature; b=KkB53l6v+mGU488fgvRWvnPRDbQOFzIPyAY//StQv+t6Ac4Uta/ObFVCDt6yPwAbrbcKqXlBYM iwS7cwVko9bSwnpQv8S1e4LdkQsKeEIBJNXHOn3gXaMaEBBMNaQh7VFNHB8jEb0Kue2zxX9VTm OJLsEl7oUBjUYd+63Jxl3LU6HZrbOD9MqbJUN4CdQYJAP4gMX203LHPP9knMqCaB3EuYSvlrZM XYD8buaylmhUVFL1B66crvbgAoOj9Ddb8l4vq+WF55F/FzZbkG2n3HDvlKptak/3zJSKatGrdT 1t/9SIupcgwR+mTqEO2AUsxuUuIk1NRHt4XExwCFIiNVsw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=antispam.mailspamprotection.com; s=default; h=CFBL-Feedback-ID:CFBL-Address :Cc:To:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject :Date:From:Reply-To:List-Unsubscribe; bh=1tihKt8uvSIfndhnOmOIg83PXG8YIJ50aUVeqkQLmRI=; b=dqgdU4VNO5yibJfVYlGFPyQWFo Vt87kWYaFVTkOW52CrvfUsMqLGO/nmW/tDbUX7w3UMTRcecCbt24oNIwqJYEUMGcEATpNdEuzjcmx 7Lq7GLhEpqncHrXj35Ef5pyFfPek4OszBldFSfqgB9k4N+62Ojhf67K6/KA2VQbyBi0c=; Received: from 214.173.214.35.bc.googleusercontent.com ([35.214.173.214] helo=esm19.siteground.biz) by instance-europe-west4-mwgq.prod.antispam.mailspamprotection.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vVmaI-00000000dFe-0I4x for linux-kernel@vger.kernel.org; Wed, 17 Dec 2025 08:08:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=valla.it; s=default; h=Cc:To:Subject:Date:From:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; bh=1tihKt8uvSIfndhnOmOIg83PXG8YIJ50aUVeqkQLmRI=; b=jDh98vxCaObQQ7chNsDdXZAegp +3uV6cxi74HNY6PgyqEwr6l1W+jD4lJo2MNM2mfY9lG2yPMFYMIfXiUWy8DqLLHLUkl3kQ5PU1c3G 1AVioNlY1dZnKW7e+mp19OpIrGF8WjluULEC9hu7apqx6SRv/ZvECtJ5yoAs2Qy/COBs=; Received: from [79.34.194.176] (port=63558 helo=[192.168.178.175]) by esm19.siteground.biz with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vVmZy-00000000ENx-3weV; Wed, 17 Dec 2025 08:08:14 +0000 From: Francesco Valla Date: Wed, 17 Dec 2025 09:06:54 +0100 Subject: [PATCH v3 1/3] drm/draw: add drm_draw_can_convert_from_xrgb8888 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251217-drm_draw_conv_check-v3-1-15b6f8bc1cbc@valla.it> References: <20251217-drm_draw_conv_check-v3-0-15b6f8bc1cbc@valla.it> In-Reply-To: <20251217-drm_draw_conv_check-v3-0-15b6f8bc1cbc@valla.it> To: Jocelyn Falempe , Javier Martinez Canillas , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Francesco Valla X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2291; i=francesco@valla.it; h=from:subject:message-id; bh=3R2Fi+LMXSFAxxhMSgWy+NDD1j2U6w1AOA2qqvgyJ58=; b=owGbwMvMwCX2aH1OUIzHTgbG02pJDJlOKW+F6w40bOtkW/z4vsGKqKtOlrsvaRm0x6d1vuXQC f407UFIRykLgxgXg6yYIkvIuhv39sw1/5a2gfERzBxWJpAhDFycAjARdnGGfyZSmnt3uJ2/GLhz h0lO6CvOPQsnBghmRr7/eWYJ/8UN7z0ZGU57x5R/mnRNvvT7deVDSUrJzGHPFkjNje7zeXD6sEz tO04A X-Developer-Key: i=francesco@valla.it; a=openpgp; fpr=CC70CBC9AA13257C6CCED8669601767CA07CA0EA X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - esm19.siteground.biz X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - valla.it X-Source: X-Source-Args: X-Source-Dir: X-SGantispam-id: 0fc04927c55831335c3c7387c06b8835 AntiSpam-DLS: false AntiSpam-DLSP: AntiSpam-DLSRS: AntiSpam-TS: 1.0 CFBL-Address: feedback@antispam.mailspamprotection.com; report=arf CFBL-Feedback-ID: 1vVmaI-00000000dFe-0I4x-feedback@antispam.mailspamprotection.com Authentication-Results: outgoing.instance-europe-west4-mwgq.prod.antispam.mailspamprotection.com; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none Add drm_draw_can_convert_from_xrgb8888() function that can be used to determine if a XRGB8888 color can be converted to the specified format. Reviewed-by: Jocelyn Falempe Signed-off-by: Francesco Valla --- drivers/gpu/drm/drm_draw.c | 29 +++++++++++++++++++++++++++++ drivers/gpu/drm/drm_draw_internal.h | 2 ++ 2 files changed, 31 insertions(+) diff --git a/drivers/gpu/drm/drm_draw.c b/drivers/gpu/drm/drm_draw.c index 5b956229c82fb6e232e3342705a226c8e14c8568..5043baf901b82e730cb7c3fe55a= ab99c91cd9fdf 100644 --- a/drivers/gpu/drm/drm_draw.c +++ b/drivers/gpu/drm/drm_draw.c @@ -15,6 +15,35 @@ #include "drm_draw_internal.h" #include "drm_format_internal.h" =20 +/** + * drm_draw_can_convert_from_xrgb8888 - check if xrgb8888 can be converted= to the desired format + * @format: format + * + * Returns: + * True if XRGB8888 can be converted to the specified format, false otherw= ise. + */ +bool drm_draw_can_convert_from_xrgb8888(u32 format) +{ + switch (format) { + case DRM_FORMAT_RGB565: + case DRM_FORMAT_RGBA5551: + case DRM_FORMAT_XRGB1555: + case DRM_FORMAT_ARGB1555: + case DRM_FORMAT_RGB888: + case DRM_FORMAT_XRGB8888: + case DRM_FORMAT_ARGB8888: + case DRM_FORMAT_XBGR8888: + case DRM_FORMAT_ABGR8888: + case DRM_FORMAT_XRGB2101010: + case DRM_FORMAT_ARGB2101010: + case DRM_FORMAT_ABGR2101010: + return true; + default: + return false; + } +} +EXPORT_SYMBOL(drm_draw_can_convert_from_xrgb8888); + /** * drm_draw_color_from_xrgb8888 - convert one pixel from xrgb8888 to the d= esired format * @color: input color, in xrgb8888 format diff --git a/drivers/gpu/drm/drm_draw_internal.h b/drivers/gpu/drm/drm_draw= _internal.h index 20cb404e23ea6263b535ea2b81b25f84c37be8a2..2619671456359efa3406a480890= a0b5ac63dd9ea 100644 --- a/drivers/gpu/drm/drm_draw_internal.h +++ b/drivers/gpu/drm/drm_draw_internal.h @@ -24,6 +24,8 @@ static inline const u8 *drm_draw_get_char_bitmap(const st= ruct font_desc *font, return font->data + (c * font->height) * font_pitch; } =20 +bool drm_draw_can_convert_from_xrgb8888(u32 format); + u32 drm_draw_color_from_xrgb8888(u32 color, u32 format); =20 void drm_draw_blit16(struct iosys_map *dmap, unsigned int dpitch, --=20 2.52.0 From nobody Wed Dec 17 19:41:28 2025 Received: from delivery.antispam.mailspamprotection.com (delivery.antispam.mailspamprotection.com [185.56.87.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A43433EB0C for ; Wed, 17 Dec 2025 08:08:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=185.56.87.12 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765958928; cv=pass; b=urc4JUN/4fyAfdDqD+42txOlAQkWaKS7XsUGuwtn6NUxsZXX7UN6ukC2zKB4s8C5PriKEedAxjbL4KeBxP2awGPOlbtTwiapAL4q33xl2tagPw/C7B4q5TGe5G3XPuwxFYEtLa0OqROAoQ3Vahx/csGeRh0lpI2Ht0aO4RTm8uk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765958928; c=relaxed/simple; bh=ve2YlrOrfqp26weodtzAkKHhv6zFIo4Ht7/fa7CIS94=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Y/yMXjnWr7FU7AbUT2MoU02f4FK532J34eDaZabechdRXC28CvXLLx8fhNYuo5fOng34YaOkq8Fx9cx/6h1V8LIf2VgmENJ1vfLBvg9p5o8PzA2qNQejsLGCqYtZUgftREgYQ/mF+mCozU2Pfmc0ol9XW1g5fEVc5eB0EbDxEs4= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it; spf=pass smtp.mailfrom=valla.it; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b=RMpfojgO; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b=ja38b2lA; arc=pass smtp.client-ip=185.56.87.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valla.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b="RMpfojgO"; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b="ja38b2lA" ARC-Seal: i=1; cv=none; a=rsa-sha256; d=outgoing.instance-europe-west4-v76v.prod.antispam.mailspamprotection.com; s=arckey; t=1765958926; b=YHJtyebTJT2iB6FSDKvs45ZqD4cKOT+dHcWtUb5qutPg/yGjPKpTAXYz92zMz3COiuDNMYsPOr uW89mXD94P5ffSwkDoQx5J6ubIi2ofWT/FMw0fJsxiT/OMIuLHe5RETzAGSS4h5Z9/8Bb4Bh/q fcaNR8huFdnsHy2pzWM8Njg7DabvWQwQxQ2pI0vx07rxEYzlUImgA5JgcMnPpyaXD7KBV4Jbca RYogOmc1G2x4ITAVJmlnn26jTPLgeoEMDMdM6CQj1uN8DhsoAIeRHwaRltByyczB9/zPJaKeFm 8vs/MPnj9qF4Mf4D3Qdvkj3HrhWN8T57OIsqaI8ha/0Uuw==; ARC-Authentication-Results: i=1; outgoing.instance-europe-west4-v76v.prod.antispam.mailspamprotection.com; smtp.remote-ip=35.214.173.214; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=outgoing.instance-europe-west4-v76v.prod.antispam.mailspamprotection.com; s=arckey; t=1765958926; bh=ve2YlrOrfqp26weodtzAkKHhv6zFIo4Ht7/fa7CIS94=; h=Cc:To:In-Reply-To:References:Message-ID:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:DKIM-Signature:DKIM-Signature; b=PL2RySKs/4TdlQDAaDnuLO9YpV0h2P3QscUKRmCziGxw1y6HhddZYoFHjpjj2BdvpmN5vPI1ux /uNzuwRXljvu45TybhYMPyZ1tc3Yyf/DyDeow2bYTA/jKZgsUtT07+UXzBppovtf8b2PG5DjNJ tyHfB5g6FSxjJUqNU7QBsg5wgpyfD3tIMdhgyV6Xrq1Vvx5wrAdh4+pA0n4tBwDxzM7RBssnmT 4UbtTFAb6NtgjEss+lUwIVyaARxInWlE7aC5Y1LPpYZOnXDdPyTNIHbfpyMZehzsIkAKmv+Mu9 NMOQtP0vFudko+kTkSqLhPJTK4mfxpEkraIT63p4ZivmgA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=antispam.mailspamprotection.com; s=default; h=CFBL-Feedback-ID:CFBL-Address :Cc:To:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject :Date:From:Reply-To:List-Unsubscribe; bh=8IimDFstunH4qRXNsjg10pPSw+FgX1OVnx8RsMzVbt0=; b=RMpfojgOaFjN666SCE/acTc2z0 e2L5zM+2hfcHFGItHJieiEBcyzKxIuonM6C5BuEDP/cm3+dFCC9vw3uFUqySYp/BaM5pIq6YCK+Sy ezqmv1Wl8iSnCuFBCbUDfsw0zXwDkkHFdbLeA+qwq4EX9zvuYS/l5jlm/43LRiG3hX3A=; Received: from 214.173.214.35.bc.googleusercontent.com ([35.214.173.214] helo=esm19.siteground.biz) by instance-europe-west4-v76v.prod.antispam.mailspamprotection.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vVmaJ-00000001rm6-3IYO for linux-kernel@vger.kernel.org; Wed, 17 Dec 2025 08:08:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=valla.it; s=default; h=Cc:To:Subject:Date:From:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; bh=8IimDFstunH4qRXNsjg10pPSw+FgX1OVnx8RsMzVbt0=; b=ja38b2lAimBZz6QfeBI2tfpipX q5zdlibe50cc9NgOrQ/uNb4fIuNHfT+dysLiwRuyoUfghhYFEUbASVCKswhA9UmcNBWPMpM/E1MzJ nF8TnJv25PkMAiu3LPurGXfE4EKT3Ej+zM0Aqg7J/zgaSU3Ep8glTBbIJCpgU/YzhV0Y=; Received: from [79.34.194.176] (port=63558 helo=[192.168.178.175]) by esm19.siteground.biz with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vVmZz-00000000ENx-1g6t; Wed, 17 Dec 2025 08:08:15 +0000 From: Francesco Valla Date: Wed, 17 Dec 2025 09:06:55 +0100 Subject: [PATCH v3 2/3] drm/log: avoid WARN when searching for usable format Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251217-drm_draw_conv_check-v3-2-15b6f8bc1cbc@valla.it> References: <20251217-drm_draw_conv_check-v3-0-15b6f8bc1cbc@valla.it> In-Reply-To: <20251217-drm_draw_conv_check-v3-0-15b6f8bc1cbc@valla.it> To: Jocelyn Falempe , Javier Martinez Canillas , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Francesco Valla X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1028; i=francesco@valla.it; h=from:subject:message-id; bh=ve2YlrOrfqp26weodtzAkKHhv6zFIo4Ht7/fa7CIS94=; b=owGbwMvMwCX2aH1OUIzHTgbG02pJDJlOKW8nG06c0PUgl7f42dKF2uYaf7S8wj+enTzZebX5q uDpzGX5HaUsDGJcDLJiiiwh627c2zPX/FvaBsZHMHNYmUCGMHBxCsBENs9mZPh+rOj1u5Ncu5et /qqu63M9Uap9bYqEsseO47tqKxes2bCB4a9k1fNaWce62aujYvUKDqx02DW1rqTXLPxqyIunWk8 yj7ICAA== X-Developer-Key: i=francesco@valla.it; a=openpgp; fpr=CC70CBC9AA13257C6CCED8669601767CA07CA0EA X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - esm19.siteground.biz X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - valla.it X-Source: X-Source-Args: X-Source-Dir: X-SGantispam-id: 81133bf7412944cec2f9c21548df9083 AntiSpam-DLS: false AntiSpam-DLSP: AntiSpam-DLSRS: AntiSpam-TS: 1.0 CFBL-Address: feedback@antispam.mailspamprotection.com; report=arf CFBL-Feedback-ID: 1vVmaJ-00000001rm6-3IYO-feedback@antispam.mailspamprotection.com Authentication-Results: outgoing.instance-europe-west4-v76v.prod.antispam.mailspamprotection.com; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none Use drm_draw_can_convert_from_xrgb8888() instead of drm_draw_color_from_xrgb8888() while searching for a usable color format. This avoids a WARN in case the first format is not usable. Reviewed-by: Jocelyn Falempe Signed-off-by: Francesco Valla --- drivers/gpu/drm/clients/drm_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/clients/drm_log.c b/drivers/gpu/drm/clients/dr= m_log.c index 4d3005273b278e8c4c0ff7a411165efb7684316e..2bd5189c967e1952f9e6ad17120= b2cd920c79a96 100644 --- a/drivers/gpu/drm/clients/drm_log.c +++ b/drivers/gpu/drm/clients/drm_log.c @@ -182,7 +182,7 @@ static u32 drm_log_find_usable_format(struct drm_plane = *plane) int i; =20 for (i =3D 0; i < plane->format_count; i++) - if (drm_draw_color_from_xrgb8888(0xffffff, plane->format_types[i]) !=3D = 0) + if (drm_draw_can_convert_from_xrgb8888(plane->format_types[i])) return plane->format_types[i]; return DRM_FORMAT_INVALID; } --=20 2.52.0 From nobody Wed Dec 17 19:41:28 2025 Received: from delivery.antispam.mailspamprotection.com (delivery.antispam.mailspamprotection.com [185.56.87.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AC7433F399 for ; Wed, 17 Dec 2025 08:08:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=185.56.87.13 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765958930; cv=pass; b=SGiAViN5mw8QGkRHYydwhXKpY2nWBmWeHqk22Ztou9nScSg9nTYgmKufP0gqOf/Q2Jtln4ZpUc0F9lKDQMctBmZ2tkZq41E8ivgECrq97y8lLoyzuQD9RhQ8FX8i2BjW6KVspI1/c/OmGwIisuXL5gBUg3sffH/DQxhey2cop20= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765958930; c=relaxed/simple; bh=xmTY/xIaeVDRWbqqsfAuF9zewXHVGxAP+LExztEljPw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MZuw84ltwX+MbNw9LpyM7qrTjeEHzMWHFu+ek0t1UEiKXSJKWybt9VcyMyCMAnPwknNNxKdkPFCeH4PxYYFugPLisGlZp4deyFcMHMNlKn3Kq0zUN2ORRs5gfgQ1UDt4BGPD2wShVN2TYiB6nPGcIv0ULA8AUazqSmdd4e4TXYk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it; spf=pass smtp.mailfrom=valla.it; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b=pxN+b6x6; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b=Xkwq72id; arc=pass smtp.client-ip=185.56.87.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=valla.it Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=valla.it Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antispam.mailspamprotection.com header.i=@antispam.mailspamprotection.com header.b="pxN+b6x6"; dkim=pass (1024-bit key) header.d=valla.it header.i=@valla.it header.b="Xkwq72id" ARC-Seal: i=1; cv=none; a=rsa-sha256; d=outgoing.instance-europe-west4-pxq2.prod.antispam.mailspamprotection.com; s=arckey; t=1765958928; b=dcf5tC8U5vveCHWmqDR4zKRUAirVUK0JmE0ftDPiqn/9d0f5mv9AOmq7SG5XxbGPPBgIUn0kLu ipV1BXte/WzsdUS/lOEcbNRY/0oUMIJQWFWmnSO28cpg/MC3zaO31NNUGTrwJPehYLm1tw/6ve OlhT+cRZTSPGxQTRmFjYJ379xvJ6ciYgu9408zex/DMFX79AIYAR1uUYvui0dNoTnwaYX0pYks rC7bCerhoNKNLErWk+E1sJWH+ttTfj0GtMcKVhjzTlfJAfd9RUVuWNoIKhNI6ph48jpHHll8L1 YqufgzGm0jYJFZLEf7LsCt82Ab83aqhnqw9jvPfx084/zg==; ARC-Authentication-Results: i=1; outgoing.instance-europe-west4-pxq2.prod.antispam.mailspamprotection.com; smtp.remote-ip=35.214.173.214; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=outgoing.instance-europe-west4-pxq2.prod.antispam.mailspamprotection.com; s=arckey; t=1765958928; bh=xmTY/xIaeVDRWbqqsfAuF9zewXHVGxAP+LExztEljPw=; h=Cc:To:In-Reply-To:References:Message-ID:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:DKIM-Signature:DKIM-Signature; b=P8ruCcSdnDxbpjH2pUD9n8gjF/H+yj3FiECM8do0v6uGwByC+1HR4wHXhLaSmukpgiwPL0/4wt S5aCqoQ1Q6U9IDcdbErtPAy8DZrHDGAnX7VgGIwd4FKkTuEVgWGIc8yGNVTonHQWfKigFQhq/X rvGtsIlyUJq1X7pFKFfHRLlPIDPdLARTbEaYyI6J4awFk5KfbpXUw1BBLK/6RZm/xGlEjB7Ftc XQeIrJf8xPUjU31QIn2yjM3XBFOBTrrx26a5To0x/UiD5xW6hNdyb5Mjix/mPdg8rQkNDHXiJY 5L9kCKQ2J7wv+a9KllovzI+iMhwXsZtsLWnGocOy/Itnlw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=antispam.mailspamprotection.com; s=default; h=CFBL-Feedback-ID:CFBL-Address :Cc:To:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject :Date:From:Reply-To:List-Unsubscribe; bh=8Npd93JQJmakN0GeSlmk3CntxmjM1Fs8EpKnVHSDXVQ=; b=pxN+b6x6D69AnjSPgyiLwglEuE zozcNWyX8qZSy51YUSjEHjp2txpVuCgGa4FZgNVfgGItZwCtbaptVxITBfmCua/RwPEyK94QdtTDD rx9XDvKMsj1zg1GiuhBY2ypDPA0atYlphjBWFOTuTdv9BN1vtqlLWcc1ymj614cGV7LU=; Received: from 214.173.214.35.bc.googleusercontent.com ([35.214.173.214] helo=esm19.siteground.biz) by instance-europe-west4-pxq2.prod.antispam.mailspamprotection.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vVmaJ-00000008q5l-0ONg for linux-kernel@vger.kernel.org; Wed, 17 Dec 2025 08:08:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=valla.it; s=default; h=Cc:To:Subject:Date:From:list-help:list-unsubscribe: list-subscribe:list-post:list-owner:list-archive; bh=8Npd93JQJmakN0GeSlmk3CntxmjM1Fs8EpKnVHSDXVQ=; b=Xkwq72id1ZYGRxYnb2nIXxj2Xx X9yKX8l6qkAmL5EJ5VymyGc9OiX+kKSnJKi3hXHBXD5t12yU76kwT8r/k8Xj6FO5oMes3Bf95i1+X VHCl7BjJcJhHYAvjxKFQQebEEWI6qgqPEjV/IhhPXrD6hs5TPZQrfmXf4EZ3XLtuL384=; Received: from [79.34.194.176] (port=63558 helo=[192.168.178.175]) by esm19.siteground.biz with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1vVmZz-00000000ENx-3bB7; Wed, 17 Dec 2025 08:08:15 +0000 From: Francesco Valla Date: Wed, 17 Dec 2025 09:06:56 +0100 Subject: [PATCH v3 3/3] drm/panic: avoid WARN when checking format support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251217-drm_draw_conv_check-v3-3-15b6f8bc1cbc@valla.it> References: <20251217-drm_draw_conv_check-v3-0-15b6f8bc1cbc@valla.it> In-Reply-To: <20251217-drm_draw_conv_check-v3-0-15b6f8bc1cbc@valla.it> To: Jocelyn Falempe , Javier Martinez Canillas , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Francesco Valla X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1002; i=francesco@valla.it; h=from:subject:message-id; bh=xmTY/xIaeVDRWbqqsfAuF9zewXHVGxAP+LExztEljPw=; b=owGbwMvMwCX2aH1OUIzHTgbG02pJDJlOKW+NhNbty9Tc3W4rfP+b73L2Jsug+PPyG78bhS89v ufZQv/tHaUsDGJcDLJiiiwh627c2zPX/FvaBsZHMHNYmUCGMHBxCsBEfHIZ/gc1mOie8vy7fHnV qsoSJclvX+buaP3Bu6SpVfmCz82gRntGhg07/3iplrWVuedv+JV7RPXh/41ub5YvCxYsDcmvUJV YzAYA X-Developer-Key: i=francesco@valla.it; a=openpgp; fpr=CC70CBC9AA13257C6CCED8669601767CA07CA0EA X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - esm19.siteground.biz X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - valla.it X-Source: X-Source-Args: X-Source-Dir: X-SGantispam-id: 737bef77cfc15cbe80f51bcd0c3aebad AntiSpam-DLS: false AntiSpam-DLSP: AntiSpam-DLSRS: AntiSpam-TS: 1.0 CFBL-Address: feedback@antispam.mailspamprotection.com; report=arf CFBL-Feedback-ID: 1vVmaJ-00000008q5l-0ONg-feedback@antispam.mailspamprotection.com Authentication-Results: outgoing.instance-europe-west4-pxq2.prod.antispam.mailspamprotection.com; iprev=pass (214.173.214.35.bc.googleusercontent.com) smtp.remote-ip=35.214.173.214; auth=pass (LOGIN) smtp.auth=esm19.siteground.biz; dkim=pass header.d=valla.it header.s=default header.a=rsa-sha256; arc=none Use drm_draw_can_convert_from_xrgb8888() instead of drm_draw_color_from_xrgb8888() while checking if a color format is usable. This avoids a WARN in case the first format is not usable. Reviewed-by: Jocelyn Falempe Signed-off-by: Francesco Valla --- 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 d4b6ea42db0fe65ea010255ff57554baf723e60c..27989a010ace38b18bc047ad87d= b64128ec25790 100644 --- a/drivers/gpu/drm/drm_panic.c +++ b/drivers/gpu/drm/drm_panic.c @@ -833,7 +833,7 @@ static bool drm_panic_is_format_supported(const struct = drm_format_info *format) { if (format->num_planes !=3D 1) return false; - return drm_draw_color_from_xrgb8888(0xffffff, format->format) !=3D 0; + return drm_draw_can_convert_from_xrgb8888(format->format); } =20 static void draw_panic_dispatch(struct drm_scanout_buffer *sb) --=20 2.52.0