Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6351057rwl; Mon, 9 Jan 2023 07:20:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXvxu0UlEo2IkVgpGfpfz46lZu3DB6SzSPyi/DRaTIZ7uBZE/CiwzuOR2YRRMdcotED1U1Hv X-Received: by 2002:a05:6a20:4929:b0:a3:218a:c761 with SMTP id ft41-20020a056a20492900b000a3218ac761mr65221049pzb.5.1673277626812; Mon, 09 Jan 2023 07:20:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673277626; cv=none; d=google.com; s=arc-20160816; b=Cw8M9+4mX4Y5OPGX4z9F9wJ3VPiMEf/QDW7r2zPPSFUOOFGXOteMaPGtN+rVlAsh90 sXQNdtc8SwikQS0BDvZvpJUaqTT6tpqU1SMC7Hju1qsYGedFAC+GZMwPxu3uvKECdtPi DVd0a3g6Jue9tWAYkatl0iIAGMKi5ltBm9tsxMd1hmtyjmjrF6ykOW+MsMFIPRzjsmLE MAE9tzfGcJ8HVwYKoqndttv7K76XkGsPi0O0Hs49j70un2c+zyMywKNn3ZHQ1ggR2wLa BmGBbF5AthHnSUG/jdr/Yf+pUBpoAsnH6UdwbdELfhOm5iuUmSPghZBJvJuAlviFmJp3 4PLQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e17-20020a656bd1000000b004468ff8fd57si9072573pgw.680.2023.01.09.07.20.19; Mon, 09 Jan 2023 07:20:26 -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 + 53 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 Content-Transfer-Encoding: 8bit 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 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. * -- 2.35.1