From patchwork Mon Jan 9 14:38:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melissa Wen X-Patchwork-Id: 40906 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2196857wrt; Mon, 9 Jan 2023 06:49:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXteq83EXDDzdSkVdJoRPAIlW9xiZ+QLM3+LYctQ0yPZGDl4/YVojds2f65h1ZRisHZ0Tpke X-Received: by 2002:a62:f246:0:b0:581:bc9:8b49 with SMTP id y6-20020a62f246000000b005810bc98b49mr52342220pfl.11.1673275743225; Mon, 09 Jan 2023 06:49:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673275743; cv=none; d=google.com; s=arc-20160816; b=iCyCKqBJ/LQPGUx4M7XmlxIVBArT6FYXkTYJ863ZBaqAJdAySYRpjfwy4VfTOI4b2R DNEPhcwAImMrhMKytyGl8spHAoNzv97k18d3rX/yTkkFcXU+QqSRwMxGZbFlhiNy5/sz d/sA+uJz9Wysnufxoi8+e8pu+gUXyOgwdlTSnxtzSMD4QxQHbnokqQLsnlW8q9wC1rwq XA6TKgE6GGBHb3sSVnX2mIt6j88yP/Zi3ibHwe8jztwHGNEzh2ygqxs6PpbQ1ni6mgTs nHr2EOr3wBlOQtek4ddeUWoU8m296DVV3ngD7IJEzz/q9Q1f497ukQKpsAqQaALEhDur V1sw== 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=TnpDW0+fbBbPza9wMiMd8HlnPnuskPiG6Rgbq1iBi8g=; b=JEUq+kWfC9dp6wLncIK3NT0n20Rhtf0W/rJ9ctrCKAZPOLhNrg2LvyOH3WRkA03JBF SPUCMRzJ25dV8o1uQW2261UcxmtS3+HJV2Gp2b1gslYa77ivZ9Ld1cs7MgSQ5BOdvA/y B6MLkKIbIrsVd8JQX3g9TLklW2CBqMZcSp8MD5p6Bp/yDJ7T29+dsZkzcAatQw8VnpOs EfjG19VbUzqYSWMvH7VcTrGpL/jzAqt24j4CouURFxcnnbXjpGOo2VfY/7Hh4uJQEGOO w90FWjE4QXLtFEBEF5KA6dVGP34FH03klDEk/PTJbn75H1R2+lbwfXgT8Mjpa5Jdxmk5 nJiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=TWlBIDGP; 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 cn15-20020a056a00340f00b0057349f5fa8asi9070630pfb.112.2023.01.09.06.48.49; Mon, 09 Jan 2023 06:49:03 -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=TWlBIDGP; 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 S232753AbjAIOqG (ORCPT + 99 others); Mon, 9 Jan 2023 09:46:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232742AbjAIOpW (ORCPT ); Mon, 9 Jan 2023 09:45:22 -0500 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3369338AFB for ; Mon, 9 Jan 2023 06:44:37 -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=TnpDW0+fbBbPza9wMiMd8HlnPnuskPiG6Rgbq1iBi8g=; b=TWlBIDGPLku7ghz50n9qdn+SRR rSsoJ5irFxQwjH15eFYk2IYJNrqpRurnCYXnxw8WGxnaWVqs7UDlgQyYIBvLG24rYFugu5wijcoZv D0f6aZZUucwt2K6Z8czdhtetq5QjYHLt51W5IrZuwDpY0zWIa8YnszsUXY/aF8qtWcguCFcJ+L14a X89hvd3/m7fir50TxzHQv1WUOJfvo4JiUrZMeQt9uNvQf6xeUrKn9r+fuIGn43F4m6BQRYWY1LPoa 45WaPqH8IRnEpNo9jpedCoIFIWWrEiWODP/gUFrutpPMPqb06Dt/vkFD/F0gu1cjz6kCdboGFe/fX xiBK5j1w==; 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 1pEtNx-003TyM-HA; Mon, 09 Jan 2023 15:44:25 +0100 From: Melissa Wen To: harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, 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, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, kernel-dev@igalia.com, laurent.pinchart+renesas@ideasonboard.com, Melissa Wen , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 14/18] drm/amd/display: expand array of supported 3D LUT modes Date: Mon, 9 Jan 2023 13:38:42 -0100 Message-Id: <20230109143846.1966301-15-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?1754556785289321178?= X-GMAIL-MSGID: =?utf-8?q?1754556785289321178?= AMD MPC block support 3D LUTs of dimensions 17 and 9, and also bit depth 12 and 10, therefore, advertise them to the userspace. Signed-off-by: Melissa Wen --- .../amd/display/modules/color/color_gamma.h | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.h b/drivers/gpu/drm/amd/display/modules/color/color_gamma.h index 8e159b1eb9c6..69b9a1aa6dd4 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.h +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.h @@ -47,6 +47,37 @@ static const struct drm_mode_lut3d_mode lut3d_mode_17_12bit = { .flags = 0, }; +static const struct drm_mode_lut3d_mode amdgpu_lut3d_modes[] = { + { + .lut_size = 17, + .lut_stride = {17, 17, 18}, + .bit_depth = 12, + .color_format = DRM_FORMAT_XRGB16161616, + .flags = 0, + }, + { + .lut_size = 17, + .lut_stride = {17, 17, 18}, + .bit_depth = 10, + .color_format = DRM_FORMAT_XRGB16161616, + .flags = 0, + }, + { + .lut_size = 9, + .lut_stride = {9, 9, 10}, + .bit_depth = 12, + .color_format = DRM_FORMAT_XRGB16161616, + .flags = 0, + }, + { + .lut_size = 9, + .lut_stride = {9, 9, 10}, + .bit_depth = 10, + .color_format = DRM_FORMAT_XRGB16161616, + .flags = 0, + }, +}; + /* For SetRegamma ADL interface support * Must match escape type */