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 D23DFC83F03 for ; Sun, 6 Jul 2025 19:54:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2AB0B10E2E4; Sun, 6 Jul 2025 19:54:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="lzNLqvRi"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0AE6710E2E0 for ; Sun, 6 Jul 2025 19:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1751831696; x=1783367696; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ofpRokLfaZXLyCjsC5xYlw6VayZ79awFK89qhpxNxc0=; b=lzNLqvRi/AJJ/mo9DoIKBdx1UCdb1URmMj37j1My9Tmu0k/GSVMCgACf huKNso/Iiy+l/7DfwTATBihM2p4h2mg3J63P6D82CtSMSUYQA5qZBctJA vMJeZE91O3K32h3ryVjningumzWaxXTH79fzVhTz1Xd9ALxOz1wfuA/0D 8PZElof5bNQksxJi0P8hjd6tFzEKEshK7YZBebVWdLlk1BHiRj6eHKbeY 4JuFbKXnBA8HIB7bURY6hOf4/652QZ07sHJXmZ4qv0cRgbVWKrsjcbnq5 nKC/KZydbEhKkOl3WyJsKlaE2JvWFpQF42vDlBTiBcX4QX2FCYgIsI8ug A==; X-CSE-ConnectionGUID: W32rGqMJSAuMRoi4fmfBwg== X-CSE-MsgGUID: AcYEwv8xScS9W72d/v7EwA== X-IronPort-AV: E=McAfee;i="6800,10657,11486"; a="53983009" X-IronPort-AV: E=Sophos;i="6.16,292,1744095600"; d="scan'208";a="53983009" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2025 12:54:55 -0700 X-CSE-ConnectionGUID: mniK0JL/TUC2oGqYoyq7pg== X-CSE-MsgGUID: 8ea2UXXMQayam1kfhF3vZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,292,1744095600"; d="scan'208";a="159064768" Received: from dut2122ptlh.iind.intel.com (HELO linux-X299-AORUS-Gaming-3-Pro.iind.intel.com) ([10.223.34.115]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2025 12:54:54 -0700 From: Swati Sharma To: igt-dev@lists.freedesktop.org Cc: Swati Sharma Subject: [PATCH i-g-t 3/9] drm-uapi: Add Color lut range attributes Date: Mon, 7 Jul 2025 01:31:19 +0530 Message-Id: <20250706200125.35741-4-swati2.sharma@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250706200125.35741-1-swati2.sharma@intel.com> References: <20250706200125.35741-1-swati2.sharma@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" Signed-off-by: Swati Sharma --- include/drm-uapi/drm_mode.h | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/include/drm-uapi/drm_mode.h b/include/drm-uapi/drm_mode.h index 4c8d404b1..26ee2a68e 100644 --- a/include/drm-uapi/drm_mode.h +++ b/include/drm-uapi/drm_mode.h @@ -1103,6 +1103,70 @@ struct hdr_output_metadata { DRM_MODE_PAGE_FLIP_ASYNC | \ DRM_MODE_PAGE_FLIP_TARGET) +/** + * DRM_COLOROP_1D_LUT_MULTSEG_INTERPOLATE + * + * linearly interpolate between the points + */ +#define DRM_COLOROP_1D_LUT_MULTSEG_INTERPOLATE BIT(0) + +/** + * DRM_COLOROP_1D_LUT_MULTSEG_REUSE_LAST + * + * the last value of the previous range is the + * first value of the current range. + */ +#define DRM_COLOROP_1D_LUT_MULTSEG_REUSE_LAST BIT(1) + +/** + * DRM_COLOROP_1D_LUT_MULTSEG_NON_DECREASING + * + * the curve must be non-decreasing + */ +#define DRM_COLOROP_1D_LUT_MULTSEG_NON_DECREASING BIT(2) + +/** + * DRM_COLOROP_1D_LUT_MULTSEG_REFLECT_NEGATIVE + * + * the curve is reflected across origin for negative inputs + */ +#define DRM_COLOROP_1D_LUT_MULTSEG_REFLECT_NEGATIVE BIT(3) + +/** + * DRM_COLOROP_1D_LUT_MULTSEG_SINGLE_CHANNEL + * + * the same curve (red) is used for blue and green channels as well + */ +#define DRM_COLOROP_1D_LUT_MULTSEG_SINGLE_CHANNEL BIT(4) + +/** + * struct drm_color_lut_range + * + * structure to advertise capability of a color hardware + * block that accepts LUT values. It can represent LUTs with + * varied number of entries and distributions + * (Multi segmented, Logarithmic etc). + */ + +struct drm_color_lut_range { + /* DRM_COLOROP_1D_LUT_MULTSEG_* */ + __u32 flags; + /* number of points on the curve in the segment */ + __u16 count; + /* input start/end values of the segment */ + __s32 start, end; + /* normalization factor. Represents 1.0 in terms of smallest step size */ + __u32 norm_factor; + + /* precision of HW LUT*/ + struct { + /* Integer precision */ + __u16 intp; + /* Fractional precision */ + __u16 fracp; + } precision; +}; + /* * Request a page flip on the specified crtc. * -- 2.25.1