Message ID | 20230109143846.1966301-11-mwen@igalia.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2196004wrt; Mon, 9 Jan 2023 06:47:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXvSbkSLpuX/IXmNnJg4VGql+GUwh/IDl6msOziMEx5aIFVfeKIJqe8RfATMl8Vj+TumslUd X-Received: by 2002:a05:6402:380d:b0:47e:eaae:9a5b with SMTP id es13-20020a056402380d00b0047eeaae9a5bmr54918020edb.42.1673275629085; Mon, 09 Jan 2023 06:47:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673275629; cv=none; d=google.com; s=arc-20160816; b=RnmYdZ+qQihR0jafbJvQWk8lkepAxLnoLVE0d+d081ZGUjmIXRrsgxpYbOJgWnh58Q Ikc5szMx7Iw08EAC6W+BigbOS8w5GhV9gEhKaxMG8GN4f5a77r7tuobqWNF7JrT1PPbZ X9g/HtcZCWsRXUzUvhkBwDqxmxUzPW91AINhf7YNgKBvSAbaxtGrGqr1KntH/h8LZ1hc EzFtseBL7RoSF/OddDTJ9IL0NQDlIjgIQtgqPUyhYzsAkcsZw0PNNAGg6wNtxRRVWfl9 iLRhLVppmZJwP7E2xVI8K290UqOcO+V3c3qDDala31CWTgi2WGmjl23orGX7DQzFc8YP cTuA== 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=nDAiETVpEvUgb7mqS6Y9TlEIy67mC7r1XqqTtdFTtiY=; b=V7CXqa1JlsrAkFGblxEV3ApuBtKcHWgeNBOVbMNHCdqbjLJzRAh6mO0XxmRpYlmobl dVTzi9otyniULUAE2EAqLUluzMLtHSLKgPUhhboVjVy5midXpGCqBl3u5++EH04kZWyS YRHxl6598woaNykrzY/wbcgvEri3n1X5OpSZdwUr5Nwg/ir5GpzhR2XzqKgzcvFu0ef5 CyEYQG8znwBn4yJa5ytzXQ1P5DFljfrq9OLQ+i2QRowIpg4SgphcsK0gANMB1mdVKLpS n+Oz0j8+vPnHR66lCf2Ocs2Pkt6fFf2Rc7cPSW3ZG+3az3XKpgMdCsRpOGqvMU7vQsia 5nWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=kHyTtVGw; 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 m23-20020aa7d357000000b0046a0331778dsi8273167edr.118.2023.01.09.06.46.44; Mon, 09 Jan 2023 06:47:09 -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=kHyTtVGw; 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 S231232AbjAIOpo (ORCPT <rfc822;274620705z@gmail.com> + 99 others); Mon, 9 Jan 2023 09:45:44 -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 S234615AbjAIOoz (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 9 Jan 2023 09:44:55 -0500 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7408F34D57 for <linux-kernel@vger.kernel.org>; Mon, 9 Jan 2023 06:44:29 -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=nDAiETVpEvUgb7mqS6Y9TlEIy67mC7r1XqqTtdFTtiY=; b=kHyTtVGwbnVzhzXBtMOs71gktY Ie73QRlCKbRBdTSjXoGo/ArajaRk41KPu+1YdmWbhgvc2qKOFPK3gQsrtSiqOq1cgPsTp4WZmJO+4 0qcBRxvxrKMYIFzdGx6gGfLUUWZ/VHDF31/5SBXqVADhdo2hxhQmfl3CNbOkWWSn9PZ7QQR2hwamb 6AP2zQ3IHyOs7SBrkeEms8rtNK1ot7SfTdo2gaYYKAzEH6YviSli630lSGSoOaQlohu2svXmQN141 reDGPodRElCD2SUYzfrqxPWeOJVzTOJZ/NnrOCoq8D8DKiSRZzHoGbNAoHMAUC4lCYx8WMhunx3lb yDsf57Yg==; 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 1pEtNm-003TyM-TO; Mon, 09 Jan 2023 15:44:15 +0100 From: Melissa Wen <mwen@igalia.com> 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 <joshua@froggi.es>, alex.hung@amd.com, nicholas.kazlauskas@amd.com, sungjoon.kim@amd.com, seanpaul@chromium.org, bhawanpreet.lakha@amd.com, Shashank Sharma <shashank.sharma@amd.com>, 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 <mwen@igalia.com>, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 10/18] drm/amd/display: update lut3d and shaper lut to stream Date: Mon, 9 Jan 2023 13:38:38 -0100 Message-Id: <20230109143846.1966301-11-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754556666228627732?= X-GMAIL-MSGID: =?utf-8?q?1754556666228627732?= |
Series |
Add DRM CRTC 3D LUT interface
|
|
Commit Message
Melissa Wen
Jan. 9, 2023, 2:38 p.m. UTC
It follows the same path of out_transfer_func for stream updates, since
shaper LUT and 3D LUT is programmed in funcs.set_output_transfer_func()
and this function is called in the atomic commit_tail when
update_flags.bits.out_tf is set.
Signed-off-by: Melissa Wen <mwen@igalia.com>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 2c18c8527079..88f1130c3b83 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -2562,7 +2562,7 @@ static enum surface_update_type check_update_surfaces_for_stream( stream_update->integer_scaling_update) su_flags->bits.scaling = 1; - if (stream_update->out_transfer_func) + if (stream_update->out_transfer_func || stream_update->lut3d_func) su_flags->bits.out_tf = 1; if (stream_update->abm_level) @@ -2911,6 +2911,14 @@ static void copy_stream_update_to_stream(struct dc *dc, sizeof(struct dc_transfer_func_distributed_points)); } + if (update->func_shaper && + stream->func_shaper != update->func_shaper) + stream->func_shaper = update->func_shaper; + + if (update->lut3d_func && + stream->lut3d_func != update->lut3d_func) + stream->lut3d_func = update->lut3d_func; + if (update->hdr_static_metadata) stream->hdr_static_metadata = *update->hdr_static_metadata;