Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE063C624D4 for ; Thu, 3 Sep 2026 07:37:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F214A10F438; Thu, 3 Sep 2026 07:37:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="AsbYy7U+"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9078810F438; Thu, 3 Sep 2026 07:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:Cc:To:From:Subject: MIME-Version:Date:Message-ID:From:Reply-To; bh=WEQIDYGlBUXhn3lmR9XsLq39KcvZDQUH9U5OcoHbWm4=; b=AsbYy7U+gP1W/xxoc271+oO9r+ aUSK9N25hQPV1YDsOsU46chXiEvhgEnIQsDi5xKj/cgoKFB1KefettZcUtPHnq3W/WVW/Ze6sG/6H XIzIvLVvXCZmWs+6vKKsHWpUUzCb6hJN2cTpYfxq2bsP03My2GkbEAxv+yW6GTjPmRj5w16uqFl0F bxYEGhQHg9zyMVnRTt27lx42tpJIydEatPt1L7zkof2nIgChQF2H8cpSChU9dqEIYiCsjKb6SvLdF T5zqlbkFoQfn5GFVmalLcNuh3p0lcaggbvuyipfhUi/qzzcaNGVUqvfN3CbVcDP7OGg3OhOyXBGjB o3wh+1sg==; Received: from [31.4.135.164] (helo=[192.168.1.126]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1x220G-00EEP3-Ki; Thu, 03 Sep 2026 09:36:56 +0200 Message-ID: <141dded4-e312-4207-ad9c-572e9d1d7316@igalia.com> Date: Thu, 3 Sep 2026 09:36:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/amd/display: use plane color_mgmt_changed to track colorop changes From: Melissa Wen To: Dave Airlie Cc: Alex Deucher , Harry Wentland , sunpeng.li@amd.com, siqueira@igalia.com, christian.koenig@amd.com, airlied@gmail.com, simona@ffwll.ch, kernel-dev@igalia.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann , Maxime Ripard , Maarten Lankhorst References: <20260807115712.22423-1-mwen@igalia.com> <22a3be63-ebe9-4334-9f42-73e62f123277@igalia.com> Content-Language: en-US In-Reply-To: <22a3be63-ebe9-4334-9f42-73e62f123277@igalia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 27/08/2026 12:24, Melissa Wen wrote: > > > On 10/08/2026 20:40, Alex Deucher wrote: >> On Fri, Aug 7, 2026 at 8:08 AM Melissa Wen wrote: >>> This is a resubmission of d79716401a95 ("drm/amd/display: use plane >>> color_mgmt_changed to track colorop changes") whose change was reverted >>> by 0461ba9a7994 ("Merge tag 'amd-drm-next-7.3-2026-07-02' of >>> https://gitlab.freedesktop.org/agd5f/linux into drm-next") during a >>> merge conflict resolution. >>> >>> Original commit message: >>> >>> ``` >>> Ensure the driver tracks changes in any colorop property of a plane >>> color pipeline by using the same mechanism of CRTC color management and >>> update plane color blocks when any colorop property changes. It >>> fixes an >>> issue observed on gamescope settings for night mode which is done via >>> shaper/3D-LUT updates. >>> ``` After talking to Dave, I applied to drm-misc-fixes: - 88f8113ab118 ("drm/amd/display: use plane color_mgmt_changed to track colorop changes") Melissa >>> >>> Fixes: 0461ba9a7994 ("Merge tag 'amd-drm-next-7.3-2026-07-02' of >>> https://gitlab.freedesktop.org/agd5f/linux into drm-next") >>> Signed-off-by: Melissa Wen >>> >> Acked-by: Alex Deucher > > Hey Dave, > > Can you apply it to drm-next? > > This a regression from > https://lists.freedesktop.org/archives/amd-gfx/2026-July/148126.html > And AFAIU drm-misc's branches are not the right place. > > Best Regards, > > Melissa > >> >> >>> --- >>> >>> Hey, >>> >>> I noticed this problem in the resolution of a merge conflict after >>> testing drm-misc-next on SteamDeck with KMS colorop API support and >>> verifying the issue of missing updates in nightlight-mode was back. >>> >>> Let me know what are the right steps to address it. >>> >>> Thanks, >>> >>> Melissa >>> >>> --- >>>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +++++- >>>   1 file changed, 5 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 67b825cbb88f..d0e612371c8f 100644 >>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >>> @@ -4202,7 +4202,7 @@ static void amdgpu_dm_commit_planes(struct >>> drm_atomic_commit *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; >>> @@ -6012,6 +6012,10 @@ static bool should_reset_plane(struct >>> drm_atomic_commit *state, >>>          if (new_crtc_state->color_mgmt_changed) >>>                  return true; >>> >>> +       /* Plane color pipeline or its colorop changes. */ >>> +       if (new_plane_state->color_mgmt_changed) >>> +               return true; >>> + >>>          /* >>>           * On zpos change, planes need to be reordered by removing >>> and re-adding >>>           * them one by one to the dc state, in order of descending >>> zpos. >>> -- >>> 2.53.0 >>> >