Return-Path: Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2048.outbound.protection.outlook.com [40.107.101.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3151710E18B for ; Tue, 4 Oct 2022 21:16:57 +0000 (UTC) From: Alex Hung To: Date: Tue, 4 Oct 2022 15:16:23 -0600 Message-ID: <20221004211626.1480938-2-alex.hung@amd.com> In-Reply-To: <20221004211626.1480938-1-alex.hung@amd.com> References: <20221004211626.1480938-1-alex.hung@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Subject: [igt-dev] [RFC PATCH 1/4][i-g-t] include/drm-uapi: Add 3D LUT structs and its attributes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bhawanpreet.lakha@amd.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: A struct is defined for 3D LUT modes to be supported by hardware. The elements includes lut_isze, lut_stride, bit_depth, color_format and flags. This is the same structure as in proposed kernel 3D LUT API. Note: The kernel 3DLUT API proposal "Proposal for Pre-blending 3D LUT interfaces" is sent to dri-devel mailing list. Signed-off-by: Alex Hung --- include/drm-uapi/drm_mode.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/drm-uapi/drm_mode.h b/include/drm-uapi/drm_mode.h index 97198609..2b60de95 100644 --- a/include/drm-uapi/drm_mode.h +++ b/include/drm-uapi/drm_mode.h @@ -845,6 +845,24 @@ struct drm_color_lut_range { __s32 min, max; }; + +/* + * struct drm_mode_3dlut_mode - 3D LUT mode information. + * @lut_size: number of valid points on every dimension of 3D LUT. + * @lut_stride: number of points on every dimension of 3D LUT. + * @bit_depth: number of bits of RGB. If color_mode defines entries with higher + * bit_depth the least significant bits will be truncated. + * @color_format: fourcc values, ex. DRM_FORMAT_XRGB16161616 or DRM_FORMAT_XBGR16161616. + * @flags: flags for hardware-sepcific features + */ +struct drm_mode_3dlut_mode { + __u16 lut_size; + __u16 lut_stride[3]; + __u16 bit_depth; + __u32 color_format; + __u32 flags; +}; + /** * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data. * -- 2.25.1