[RFC,30/40] drm/amd/display: mark plane as needing reset if plane color mgmt changes
Message ID | 20230423141051.702990-31-mwen@igalia.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2242881vqo; Sun, 23 Apr 2023 08:12:34 -0700 (PDT) X-Google-Smtp-Source: AKy350ZxIkps77J9c1+26PPMg6Z/CSIwqpCTqbo+FXUYmeE+pk5G1ntsbuufeoFiFcJ6YAYP2kur X-Received: by 2002:a05:6a20:3d10:b0:f2:c7a5:26d8 with SMTP id y16-20020a056a203d1000b000f2c7a526d8mr9220737pzi.11.1682262753922; Sun, 23 Apr 2023 08:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682262753; cv=none; d=google.com; s=arc-20160816; b=tuzkHim9D1DZR4oUt3yrkEZbSv9RXqt8jCI6/nOteUTwXAXdw0+IRFhRBEyAR+jRaq vYVMmXPPPQm8w8W8F9aXRAayKSiSI+XJ1AEAaT101gt78bQnqwLNAy3QteXbDcNNOuqT eQSNvMVhZ5y9T6BuxUfcKjzz3yzTg7twJAkE/NPRzk8F5bkxNfOC9Svd7tXG+Nlcf/s3 grQ9pslrAuy5zLFfA/qvMXa506abWyssVCd1GS+mRFuYM8BGV11CVeZ0gLUp+QjSK+JY Fa7hjoOXSCQE1LufXVbWDkGsxew8Y7cUGTdrRuUs6VVH+vnSuTyJ3+6baH1wO5LYayLO qUTw== 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=uJMJ+NQtZ0XpbgcU5B6V/mq7bccUXUSsHINPFl3Guj4=; b=BeWXWAbCo8vXu7a1/PxV3QK6khDrvAv1Efj+y6i/F5QrM61RVY1fsVv/pyHotOAYKk dPlmo1lD9ppkLTHLaIN8xuVdvWPavdLZCczlQABMQeDW6/UREMGe3WDeJv0q3ok2jcK9 nvpPkHX6x0KK1zXQlLD6SrdbWKAmHBLCxzOYsBxSXiVTP6fwiB76JhlM67JTEjsUjf/3 chqLtIUt1pBKCyE0cghQbJsSjLV6qrl6mGzFZIU2BuW+NtdPBj5yRd/k4tIp3068MWCP 0e9FqEgwkAv5hNM7bLJkyIPIIqLg1mD1c0hHixEvV1M/A/0plLudt0AssydKLOe5Zycj jqeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=IhYMosca; 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 b11-20020aa7950b000000b0063b843131b1si8882349pfp.324.2023.04.23.08.12.19; Sun, 23 Apr 2023 08:12: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=IhYMosca; 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 S230468AbjDWOuV (ORCPT <rfc822;fengqi706@gmail.com> + 99 others); Sun, 23 Apr 2023 10:50:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230459AbjDWOuP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 23 Apr 2023 10:50:15 -0400 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA67010FB for <linux-kernel@vger.kernel.org>; Sun, 23 Apr 2023 07:50:07 -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=uJMJ+NQtZ0XpbgcU5B6V/mq7bccUXUSsHINPFl3Guj4=; b=IhYMosca0wZ+B+VisCfWEo1sGl 2lQqN8jG09ZDejv+mI53UicwpH5fMnjrZ7Qb1/2dEKmd1yy8nzkvK5Smrs5Qs5WkHkJBoDmHf7AXh dlFAcJyDtpRMTgve+Hn1N7bZgZFmywRF/8ixSlzrFpgc403gIrKQBwen7HpIZWEDuAvrIEIUTJGgj /YmI1sY85xnZ+R1ppu+GGQV3wFqCyEREfiAwopG5AiSOs2UJIObEJ4Pf9H1xEaGDXDfC7X2yToqGc Lk4A819xB5lK1Pt7F++wJ6WUqOg6Z3Z+XzMdwPWZEv/pK6DyL5Fda3ja7GU4gse57Nis3N+nvF2yr QZA5shMQ==; 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 1pqaTA-00ANVs-Ad; Sun, 23 Apr 2023 16:13:36 +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>, Melissa Wen <mwen@igalia.com>, linux-kernel@vger.kernel.org Subject: [RFC PATCH 30/40] drm/amd/display: mark plane as needing reset if plane color mgmt changes Date: Sun, 23 Apr 2023 13:10:42 -0100 Message-Id: <20230423141051.702990-31-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 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, 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: <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?1763980349612967451?= X-GMAIL-MSGID: =?utf-8?q?1763980349612967451?= |
Series |
drm/amd/display: add AMD driver-specific properties for color mgmt
|
|
Commit Message
Melissa Wen
April 23, 2023, 2:10 p.m. UTC
We took a similar path for CRTC color mgmt changes, since we remap CRTC degamma to plane/DPP block. Here we can use the status of `plane->color_mgmt_changed` to detect when a plane color property changed and recreate the plane accordingly. Co-developed-by: Joshua Ashton <joshua@froggi.es> Signed-off-by: Joshua Ashton <joshua@froggi.es> Signed-off-by: Melissa Wen <mwen@igalia.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++ 1 file changed, 3 insertions(+)
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 760080e4a4da..1dac311cab67 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -9441,6 +9441,9 @@ static bool should_reset_plane(struct drm_atomic_state *state, if (drm_atomic_crtc_needs_modeset(new_crtc_state)) return true; + if (new_plane_state->color_mgmt_changed) + return true; + /* * If there are any new primary or overlay planes being added or * removed then the z-order can potentially change. To ensure