From patchwork Mon Jan 9 14:38:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melissa Wen X-Patchwork-Id: 40903 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2196226wrt; Mon, 9 Jan 2023 06:47:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXseesRwsZYe/NmDZtIeqLE2rzIXoK2FIliUynfNEJjdXqdLleOM6UpNsSESUQhDuEFdD65R X-Received: by 2002:a17:906:3095:b0:809:c1f4:ea09 with SMTP id 21-20020a170906309500b00809c1f4ea09mr51315183ejv.69.1673275655831; Mon, 09 Jan 2023 06:47:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673275655; cv=none; d=google.com; s=arc-20160816; b=IJkNaCfIE9vAtw0g/2zSAcSjvITDiO49nu/xE2gLNUUIEGShJ8yYtngwcaBLtY/Dr+ URt+hrHhHD9rSfQHFL+Xi/4k6xgyBzg7sg2/gmeGuZTHSp/KPXjAbyI1sAIG/712mj2S GYqV3y7gHuE6UFnTUbSuTnmzQ4xRXLfD/SP+wnQbIhqeq5n+mu03LqL83ckTc4q5dMbc oaqUtx8bvLx90SUf1+A6j7FMtDeydiRP31TCBXSjaG8fLM8TPPde1BLmmNZVX4vCGWxK LN9PDO81tQacGpILxla1IbsZqtkeN0qpQxFn3rr+AGeatCeSgf8NPXohEMpTzSi+x6FC 0IaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9648VuOhk39mU4vg9P8mrkFGTnpgxLJ7uh8m6YPwrNA=; b=OVA+cVTEMjVKgL0giAZAIKNC8AFZe8PYXAJF1mrbKR3reDI1QgnqbdYJ7MMGDFaqxD cfViMsXl46WcgwcOWCuIJFlTUcOsnXCdPd5RQYCQJWSyGJRU8RPW7tfDwVy9mEy0+u6L Wq+zfAh1ZBU4IDonSmd0tIbErOQ2XncRc6Tl7B/c+BqZLccWx7wE6mApLN2qEVn1YQor IHuXndOvMkVUjzdBMjDmoJv6JI7461SXTJwalDpLWpwpemHpfpsSvR5NcuyPlOSwOw4f 9aaBy2zbEZYyMWoGAMu/5p1ont/vBHRYiEw/LqUuNPB1iM44GeJKFk18EeunlNlzkQ4f aNug== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=NMPPemoP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xi3-20020a170906dac300b0084c41b233a4si9443656ejb.327.2023.01.09.06.47.11; Mon, 09 Jan 2023 06:47:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=NMPPemoP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231876AbjAIOoU (ORCPT + 99 others); Mon, 9 Jan 2023 09:44:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233446AbjAIOoE (ORCPT ); Mon, 9 Jan 2023 09:44:04 -0500 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3493C1DF02 for ; Mon, 9 Jan 2023 06:44:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=9648VuOhk39mU4vg9P8mrkFGTnpgxLJ7uh8m6YPwrNA=; b=NMPPemoP+IGrVEVN7n9QvaBAEc xnsdpArCjxljyG+xkK+NSzx9kcYcpp3MM+SCH1sHSIbB5AgNnYpzlcp91xRyIRwPemLFkOPT2j1Ij esfPb4u2z3zDGc4+6PQRvGeQHd4z0HwXF3ihgULOT6P/Ycs8AnNWWEFdR0vIZi+QG6w+ajnffhBdD x/gbiBJ+/HYn/QiFKmRWbk3toGrzTI1WMs+rJZvZvKyVgM2qP+HYIJWlugxU1TyEadmjGrL0rIg35 RjzFh06bbyRZBk5lBk4cayR6G6m1BO/nbjWUxExXKNvOQoxgxi+kvUGXmijc+b5GM+oyAxVwwvZxA W9d3LIMw==; Received: from [41.74.137.107] (helo=killbill.home) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1pEtNL-003TyM-DW; Mon, 09 Jan 2023 15:43:47 +0100 From: Melissa Wen To: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch Cc: Joshua Ashton , alex.hung@amd.com, nicholas.kazlauskas@amd.com, sungjoon.kim@amd.com, seanpaul@chromium.org, bhawanpreet.lakha@amd.com, Shashank Sharma , ville.syrjala@linux.intel.com, kernel-dev@igalia.com, laurent.pinchart+renesas@ideasonboard.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 01/18] drm: Add 3D LUT mode and its attributes Date: Mon, 9 Jan 2023 13:38:29 -0100 Message-Id: <20230109143846.1966301-2-mwen@igalia.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230109143846.1966301-1-mwen@igalia.com> References: <20230109143846.1966301-1-mwen@igalia.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754556694436046595?= X-GMAIL-MSGID: =?utf-8?q?1754556694436046595?= From: Alex Hung A struct is defined for 3D LUT modes to be supported by hardware. The elements includes lut_size, lut_stride, bit_depth, color_format and flags. Note: A patchset "IGT tests for pre-blending 3D LUT interfaces" for this proposal is sent to IGT mailing list. Signed-off-by: Alex Hung --- include/uapi/drm/drm_mode.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index fa953309d9ce..fddb86dad4db 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -849,6 +849,23 @@ struct drm_color_lut { __u16 reserved; }; +/* + * struct drm_mode_lut3d_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_lut3d_mode { + __u16 lut_size; + __u16 lut_stride[3]; + __u16 bit_depth; + __u32 color_format; + __u32 flags; +}; + /** * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data. *