From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 333F4606A322 for ; Fri, 4 Dec 2026 13:53:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=ZQ+0K2BK Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92197112F7B; Fri, 4 Dec 2026 13:53:02 +0000 (UTC) Received: from sender5-op-o11.zoho.com (sender5-op-o11.zoho.com [165.173.182.11]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5654C112F7A for ; Fri, 4 Dec 2026 13:52:56 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1796392348; cv=none; d=zohomail.com; s=zohoarc; b=MTsH560qnSnZp4tVhF0DrW6kth43gRmGBZgKaRioK013K3/s6Dfz9/sTLGA1jC4BpFhQ6qBN008R6zttDjtHJEM/rtw3U8Ki6m4/l2lk+vCxbodEYkBvqHC8ORVTZ3cxV+70Rb6/eSdZGLFjWIgdF86D+Ve8CuoFdChHTPyRTx0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796392348; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=qBau5rw5J6AekuoLcNapSBdl79SLwdfEmVT9tH/55rc=; b=KSvj0AL2ws67b8wuZwIXa6LBFmDwI5ALp+KCf6ONkL6rDrKtcZqDviYdulTzQVQvF3u823/yz91xWCy6Mdb4cEl4i9iVRmVu7OziqLONYDlOMJYeWjwKNHuNBz3Ap8xE3p5N5LJDwfBd9YUOrLr4TI5yOEupJf3PJtzMUBsFZ/s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=ZQ+0K2BKLTBYyJox7IrUH6fMhBvbw5e7SMQtH5DgPZ8Pq/P/0erdEiddM9RvVqPbE3hoBkihLtXRqChNBkE7oSlHlrU16NqU5+gN11Xk0WTHEOo+TmUNkkA40OW7mLfFnfbnXN6b+A4uTNaSLmPxsTUddmyhl0U8l2Uk6sSVSVk=; c=relaxed/relaxed; s=zohomail; d=collabora.com; v=1; bh=qBau5rw5J6AekuoLcNapSBdl79SLwdfEmVT9tH/55rc=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1796392346745287.43461630326647; Fri, 4 Dec 2026 05:52:26 -0800 (PST) From: Robert Mader To: dri-devel@lists.freedesktop.org Cc: Pekka Paalanen , Harry Wentland , Melissa Wen , Sebastian Wick , Robert Mader , Louis Chauvet , Haneen Mohammed , Simona Vetter , Melissa Wen , Oarora Etimis , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Leandro Ribeiro , linux-kernel@vger.kernel.org Subject: [PATCH v1 1/4] drm/vkms: Fix inverse lut naming scheme in script Date: Fri, 4 Dec 2026 14:50:35 +0100 Message-ID: <20261204135131.195561-2-robert.mader@collabora.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204135131.195561-1-robert.mader@collabora.com> References: <20261204135131.195561-1-robert.mader@collabora.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "dri-devel" X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 We went with in srgb_inv instead of inv_srgb in commit 3c7c3c12dfc7 ("drm/vkms: replace uniform sRGB LUT and its inverse with optimal ones") thus adopt the script to reflect that. Fixes: e64f6256cd12 ("drm/vkms: add script to create optimized LUTs for color curves") Signed-off-by: Robert Mader --- .../gpu/drm/vkms/scripts/color-curve-lut.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/vkms/scripts/color-curve-lut.py b/drivers/gpu/drm/vkms/scripts/color-curve-lut.py index c8f13643bdb7..6a1fa804d16f 100644 --- a/drivers/gpu/drm/vkms/scripts/color-curve-lut.py +++ b/drivers/gpu/drm/vkms/scripts/color-curve-lut.py @@ -371,7 +371,7 @@ class Functions: return pow(x, 2.2) @staticmethod - def inv_pow22(x): + def pow22_inv(x): return pow(x, 1.0 / 2.2) @staticmethod @@ -381,7 +381,7 @@ class Functions: return pow(((x + 0.055) / 1.055), 2.4) @staticmethod - def inv_srgb(x): + def srgb_inv(x): if x <= 0.0031308: return 12.92 * x return 1.055 * pow(x, (1.0 / 2.4)) - 0.055 @@ -397,7 +397,7 @@ class Functions: return pow(max(aux - c1, 0.0) / (c2 - c3 * aux), m1_inv) @staticmethod - def inv_pq(x): + def pq_inv(x): m1 = 0.1593017578125 m2 = 78.84375 c1 = 0.8359375 @@ -414,7 +414,7 @@ class Functions: return a * (pow(x, 0.45)) - (a - 1.0) @staticmethod - def inv_bt2020_oetf(x): + def bt2020_oetf_inv(x): a = 1.0993 if x < 0.081: return x / 4.5 @@ -472,7 +472,7 @@ def print_help_and_quit(function_table): print("Possible function names are:") for func in function_table.keys(): print(f" {func}") - print(f" inv_{func}") + print(f" {func}_inv") sys.exit(1) @@ -491,8 +491,8 @@ def parse_cli_params(args, function_table): plot = True func_str = args[1] - use_inverse = func_str.startswith("inv_") - base_func_str = func_str[4:] if use_inverse else func_str + use_inverse = func_str.endswith("_inv") + base_func_str = func_str[:-4] if use_inverse else func_str func_pair = function_table.get(base_func_str) if func_pair is None: @@ -517,10 +517,10 @@ def parse_cli_params(args, function_table): def main(args): function_table = { - "srgb": (Functions.srgb, Functions.inv_srgb), - "pow22": (Functions.pow22, Functions.inv_pow22), - "pq": (Functions.pq, Functions.inv_pq), - "bt2020_oetf": (Functions.bt2020_oetf, Functions.inv_bt2020_oetf), + "srgb": (Functions.srgb, Functions.srgb_inv), + "pow22": (Functions.pow22, Functions.pow22_inv), + "pq": (Functions.pq, Functions.pq_inv), + "bt2020_oetf": (Functions.bt2020_oetf, Functions.bt2020_oetf_inv), } func_str, func_pair, lut_size, plot = parse_cli_params(args, function_table) -- 2.56.1