Message ID | 20230810160314.48225-15-mwen@igalia.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp538606vqi; Thu, 10 Aug 2023 09:30:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkMYfJvlVM7Cbz6HuILoxt2AnNLKPBr/pjnp3eX34tLZnGhYH/hfmnsEcds8PsdFzHCTGB X-Received: by 2002:a17:90a:bb85:b0:26b:198a:9dcb with SMTP id v5-20020a17090abb8500b0026b198a9dcbmr775423pjr.31.1691685044034; Thu, 10 Aug 2023 09:30:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691685044; cv=none; d=google.com; s=arc-20160816; b=DHfihFnjLZZCD/W/9tX5YMx4MxCRhju5ywVV6ANVPtsB+5YbeKGM+vnNptDC/Y0tzG 4CRG3zWEWU1kr/LchCsFnk+zPjdY8jC/jj419cvT1QdwwEXXK2Y3IkvkWUzWmOC7eVnc WFZExV5H79FAGFXVu8oPEHhbadSEIVUhk+KzV5oMvGnmW8QRerJEgAGGfSFXeEGdM1ZH ZRfQqcYGMkEe9bwmnHgANSGJ4a83EP/BAXWSkAopILyA5ogIzzB2VUxeoKXBN19dkjS/ cWZrhxPEo6hsoB0RFGAYFkr/LldRsa62EXXmttuEyTu4rdgKyfnYYsQh9kAq84NlpEAt T5NQ== 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=jHZ39nOiWNLuUcZxnNLJc24b5oV7xLgRtpwx3i1dlkA=; fh=K4g2hpcHeis9i+u86e9V+yTBU0PZFkfdrKenkMdV+qw=; b=Y6hpTZsxAnyKWUSGhiW0ute1QSPp16NPxSL2bG+0aPqanh1CofuEg4ZLDxb/KFJlwu dhY0hWFGKUXohzDNKWmUhPZKepHYXNRzr9AubxH+XzKmgsUhCWiZRo4D+MERloPsMv5/ l9tme8WxAOu8ol/yH82uzym5akleJ8cktnS3Xz+6uE8qJP2aPFfo9RZ/Hn5zmPQkugjI /YokjuirLiNiU/J5Q7pwf8ceAmbFcAEeRbkC36RqFxKRBsiyt7YcyBNhl3BSAw8xtWkL mrtYe0t4SMN7+lPOpz/EVacvmSiPMuvQp17GK0yPV0J+gppLSgmEkuZ9pQvHugEbKIAH sgKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=sVX+iW8V; 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 e18-20020a17090ac21200b0026825823da0si1814749pjt.59.2023.08.10.09.30.28; Thu, 10 Aug 2023 09:30:44 -0700 (PDT) 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=sVX+iW8V; 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 S236550AbjHJQEg (ORCPT <rfc822;lanlanxiyiji@gmail.com> + 99 others); Thu, 10 Aug 2023 12:04:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236334AbjHJQEA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 10 Aug 2023 12:04:00 -0400 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 799532705 for <linux-kernel@vger.kernel.org>; Thu, 10 Aug 2023 09:03:59 -0700 (PDT) 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=jHZ39nOiWNLuUcZxnNLJc24b5oV7xLgRtpwx3i1dlkA=; b=sVX+iW8VoXBFM+HvUD/I2W3aqB erwTXAFPg/RCab1XT3IxUXsEcVpXDOC345wdys+buPFSM5OjPQBBSvXE7JsbKT4+58EgyOeMWHSZ9 w2leZZivtA1WhnV6QmxE9fcZH1jumVUOvj899ZsJQo6yv3jHo01KnAf0EdQ9awX6AJzFfuv4ps1eK GqzNFJ5yYbFMFgrq/G+s79csLWgfIrzKt2IBd1OCwu2aEyxY5eZa8fus6jk6IAgO5Az6gdKOdJg6F XWPlqKX6LHNYqI4UNYBCCakvwgTxhJFYpH3psczxQZWxFI0Q9v3k54N3mAd7+a9yVJzzgegAJK8iT M1k9nbUA==; Received: from [38.44.68.151] (helo=killbill.home) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qU88a-00GjYD-GP; Thu, 10 Aug 2023 18:03:48 +0200 From: Melissa Wen <mwen@igalia.com> To: amd-gfx@lists.freedesktop.org, Harry Wentland <harry.wentland@amd.com>, Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>, sunpeng.li@amd.com, Alex Deucher <alexander.deucher@amd.com>, dri-devel@lists.freedesktop.org, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch Cc: Joshua Ashton <joshua@froggi.es>, Sebastian Wick <sebastian.wick@redhat.com>, Xaver Hugl <xaver.hugl@gmail.com>, Shashank Sharma <Shashank.Sharma@amd.com>, Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>, sungjoon.kim@amd.com, Alex Hung <alex.hung@amd.com>, Pekka Paalanen <pekka.paalanen@collabora.com>, Simon Ser <contact@emersion.fr>, kernel-dev@igalia.com, linux-kernel@vger.kernel.org Subject: [PATCH v2 14/34] drm/amd/display: add comments to describe DM crtc color mgmt behavior Date: Thu, 10 Aug 2023 15:02:54 -0100 Message-Id: <20230810160314.48225-15-mwen@igalia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230810160314.48225-1-mwen@igalia.com> References: <20230810160314.48225-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,RCVD_IN_DNSWL_BLOCKED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773860336404632694 X-GMAIL-MSGID: 1773860336404632694 |
Series |
drm/amd/display: add AMD driver-specific properties for color mgmt
|
|
Commit Message
Melissa Wen
Aug. 10, 2023, 4:02 p.m. UTC
Describe some expected behavior of the AMD DM color mgmt programming.
Signed-off-by: Melissa Wen <mwen@igalia.com>
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c index 841e0391f7fb..0a9aa162d4a0 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c @@ -640,12 +640,23 @@ int amdgpu_dm_update_crtc_color_mgmt(struct dm_crtc_state *crtc) stream->out_transfer_func->type = TF_TYPE_DISTRIBUTED_POINTS; stream->out_transfer_func->tf = TRANSFER_FUNCTION_SRGB; + /* Note: although we pass has_rom as parameter here, we never + * actually use ROM because the color module only takes the ROM + * path if transfer_func->type == PREDEFINED. + * + * See more in mod_color_calculate_regamma_params() + */ r = __set_legacy_tf(stream->out_transfer_func, regamma_lut, regamma_size, has_rom); if (r) return r; } else if (has_regamma) { - /* If atomic regamma, CRTC RGM goes into RGM LUT. */ + /* CRTC RGM goes into RGM LUT. + * + * Note: there is no implicit sRGB regamma here. We are using + * degamma calculation from color module to calculate the curve + * from a linear base. + */ stream->out_transfer_func->type = TF_TYPE_DISTRIBUTED_POINTS; stream->out_transfer_func->tf = TRANSFER_FUNCTION_LINEAR;