From patchwork Sun Apr 23 14:10:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melissa Wen X-Patchwork-Id: 86738 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2222322vqo; Sun, 23 Apr 2023 07:26:34 -0700 (PDT) X-Google-Smtp-Source: AKy350ZbHBnRJPg+vm38CJL+aiO68Fiwa5G5JuzlgVicr8SB2N3wwVhzfKrJVawJplw/Wim+LTLj X-Received: by 2002:a05:6a20:1583:b0:f0:a283:4854 with SMTP id h3-20020a056a20158300b000f0a2834854mr11911567pzj.13.1682259994016; Sun, 23 Apr 2023 07:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682259994; cv=none; d=google.com; s=arc-20160816; b=Z4rhT/OK5vydy/aXzwyW6gX7qR0gftiSiEw7J7ylI4wo2D0+uQwWfUZBpGZyXxkE2V WNJ2SHQykywomikmk4hPtBN9pb6GvjiI6enbjXPoiscrgMlgHlLHMGLdjm/jKD14Ma/p jXEne3m1dRinQH9icXZE3oiu7/mL+OR3g5dFnaznWXHkBBVdpzuh1ygzhcl/tvYJm+kP vUkqrBdbUs8uRdus1gnXnBAfMK9KBzxFw363lRQJf3N1L7di5kDqSJJAt/4mev6A22O3 rE96JqGQw7j2LXbjzCGZ7AR+G2HibUYKsXh2ToKa3H+HD/dLzka75GoQWCmNVTSb6f6y 6AGg== 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=ThKpXKa9g7weqsnCPtd4OEDTst1upZkxiTxtrVaNrZo=; b=WxgyWeHwFKzRG5TqICvLgbtvDLLQlW5bqjCFMRLurq/0UMp6kDM4BiO28kgH2FRoxt Y50SjEi5jB8t3DNA+M6LmrdqNCcEeGvUdWYtjw8XwLsnSDMOzI7rnA5Od5XmAjBJ5jPa UoOVuXYpxIyPHCSNgdcGw7eyNFHmANunwt7JcPxkKUZF7ftIZ1hiLwkuNnZIEIpGVLjd 9ef/4LPer9Lz1cJrEaXvp8IQIn2+ZXcdQizEhoxZJF5zI2f/Ss6eI9oPAWI3xA3fbUXE ys7W7+9PrXvnxEoWctMg7/4qbSBMB8NP5mbmAiLTZ4lVUx7sA+ZYijmAwXc11zKqOMWU oNaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=l3NFJXyr; 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 b10-20020aa7950a000000b0063b7f1093e1si9050032pfp.110.2023.04.23.07.26.19; Sun, 23 Apr 2023 07:26:33 -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=l3NFJXyr; 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 S230256AbjDWOQ4 (ORCPT + 99 others); Sun, 23 Apr 2023 10:16:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230319AbjDWOQx (ORCPT ); Sun, 23 Apr 2023 10:16:53 -0400 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F013612B for ; Sun, 23 Apr 2023 07:16:21 -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=ThKpXKa9g7weqsnCPtd4OEDTst1upZkxiTxtrVaNrZo=; b=l3NFJXyryB+V2jHF63KnKZh7N/ tqMOm8AWuWPKzrRUTZoIBRHuAMeYCCdGt3zyZhG8lML4Y4SbyiSeH4cgsnk+PuIHTh1QUAq9CvWs8 9z5T3W/S83PXwvDRmBsw5p/3CC7voRayxUW6LM3tY/7iQFnurh1IFNvRcJW89Jv2R14jgU8YusFOz 9r6QKI6UIOXsTGJFnns4kA2D8gMZ4Tu42j75bvDum/zMJmIYYFepEvGgw7YIgis1VI2M1RSmzDLN6 jxDKMmxcfaZ2ljNRocczsja39KWG2iEr8Ljvto2RTcqBnHTRuBw0EDa3ENcgkboVvVAlSIqvKZ2gO 4Xx/7DWw==; Received: from nat-wifi.fi.muni.cz ([147.251.43.9] helo=killbill.fi.muni.cz) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1pqaTi-00ANVs-Ti; Sun, 23 Apr 2023 16:14:11 +0200 From: Melissa Wen To: amd-gfx@lists.freedesktop.org, Harry Wentland , Rodrigo Siqueira , sunpeng.li@amd.com, Alex Deucher , dri-devel@lists.freedesktop.org, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch Cc: Joshua Ashton , Sebastian Wick , Xaver Hugl , Shashank Sharma , Nicholas Kazlauskas , sungjoon.kim@amd.com, Alex Hung , Melissa Wen , linux-kernel@vger.kernel.org Subject: [RFC PATCH 39/40] drm/amd/display: copy dc_plane color settings to surface_updates Date: Sun, 23 Apr 2023 13:10:51 -0100 Message-Id: <20230423141051.702990-40-mwen@igalia.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230423141051.702990-1-mwen@igalia.com> References: <20230423141051.702990-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, T_SCC_BODY_TEXT_LINE 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?1763977455247190933?= X-GMAIL-MSGID: =?utf-8?q?1763977455247190933?= As per previous code, copy shaper, 3d and blend settings from dc_plane to surface_updates before commit. Signed-off-by: Melissa Wen --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 0e3b6d414ec4..cdaaec1b2a3a 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -7987,11 +7987,13 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, continue; bundle->surface_updates[planes_count].surface = dc_plane; - if (new_pcrtc_state->color_mgmt_changed) { + if (new_pcrtc_state->color_mgmt_changed || new_plane_state->color_mgmt_changed) { bundle->surface_updates[planes_count].gamma = dc_plane->gamma_correction; bundle->surface_updates[planes_count].in_transfer_func = dc_plane->in_transfer_func; bundle->surface_updates[planes_count].gamut_remap_matrix = &dc_plane->gamut_remap_matrix; bundle->surface_updates[planes_count].hdr_mult = dc_plane->hdr_mult; + bundle->surface_updates[planes_count].func_shaper = dc_plane->in_shaper_func; + bundle->surface_updates[planes_count].lut3d_func = dc_plane->lut3d_func; } amdgpu_dm_plane_fill_dc_scaling_info(dm->adev, new_plane_state,