Message ID | 20230423141051.702990-36-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 b10csp2241774vqo; Sun, 23 Apr 2023 08:10:09 -0700 (PDT) X-Google-Smtp-Source: AKy350ameGhpj17B9ysTouTVgd3O7KB5aov2A8fRQIcHNp5gPz87BB0nbKdm6r2WHYylogL6VtRe X-Received: by 2002:a05:6a20:428c:b0:f4:ec49:b83b with SMTP id o12-20020a056a20428c00b000f4ec49b83bmr1698938pzj.15.1682262608783; Sun, 23 Apr 2023 08:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682262608; cv=none; d=google.com; s=arc-20160816; b=MUWzrzLovJuj/QSOIVpLtOpHt0Lv5H8oGjW1Y8yVvNW2EhXTNxsJ2wY5WqPeA1yoc1 /pkCqaR7Gu2vId1Ys/ADT+TvC+s2BrS5oHGu1+nc5GF7pWn130ZRhKvj2VKxQUgtNH4T HNajnFdtBab73r50dyWZfKhAGY7C4sg926hmJTuXL8D9brycauXXgRDrW4bkRNOBxNlc Md10+On2ZWMLwO7wS6XsVRfcekdZnPpRr6P/O4RGYstnILeu+bm/Q7hAgLrqU0RJvwTG Htx9GfCdiEDONoLVORz3olWeF4dV5ceRalSMnCPlIv4iu0ZxvmqqEjViG0RoliJ69oIq ZI5A== 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=av8LLs8d/qgSpvCdtPWbCDxJo/b1Zt+to8SoXN3tsd4=; b=Qse843TuvAtyyBoMY+w7vXo5rhjGsxTaf8guAyY5oYU4yqCf1o0Oi6NCkrPW6J1RLP AmVFezSgnpKNosLlSHGfBz0zvgpWXztE7DiBcZwanEiZtjVrRjKzBRam0Q2QeC5c/VEy 7F326zqMmjsTkKBbGPtY0LXaeJGerL2On6dimRW0utL3mnL7c+LA864255+4yE8UH0Qj 5GLhkqZ7IXJDBXVp8IbTKgvsjwvKcGou3oezIPGbBiBjCIJbyy7huO+XQjVeChn7g7Ig tzldELgmFkh3RmLAgOlBPo5PcWgT5tvIi8YyonRL4VqLAh2XGJOTOCudPmpohhlSZzKf 3FOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=Wc6qM5pM; 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 y62-20020a638a41000000b005203991145csi9464440pgd.623.2023.04.23.08.09.55; Sun, 23 Apr 2023 08:10:08 -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=Wc6qM5pM; 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 S230462AbjDWOq4 (ORCPT <rfc822;fengqi706@gmail.com> + 99 others); Sun, 23 Apr 2023 10:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230426AbjDWOqs (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 23 Apr 2023 10:46:48 -0400 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B5411712 for <linux-kernel@vger.kernel.org>; Sun, 23 Apr 2023 07:46:45 -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=av8LLs8d/qgSpvCdtPWbCDxJo/b1Zt+to8SoXN3tsd4=; b=Wc6qM5pMHNGlmoH2r7Y20qQVBp NKC+XbkMbfhKMprtukVJt0Z3Hzi2/3R88FYmXDbi1XMux2VfCQ2+GUIwleAJ7MPYyXb8L6kAHGn1u 39U8bG5NZyU8GtHxABQ5ystAiLdgU5DLuKmtmMtB9nWSSYFZ4tqRTNbgyGm+V5Z6bn7QoafOVYS1Z zkAg8IXz0XjRFoqPMPRuyL/a8kdnN8ItCPt57F02eEsaF5PKDCbhtTxY5/pTESDnERfs3UYazgTHS g/4hBaT+VASklXTwWmidyr07D28OJzyX3UPkqnS0VIJZ6pSolPWDiUAqHAu+Nh2AzaW1a+yzabwQY gL4oFuoA==; 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 1pqaTW-00ANVs-29; Sun, 23 Apr 2023 16:13:58 +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>, linux-kernel@vger.kernel.org Subject: [RFC PATCH 35/40] drm/adm/display: add HDR multiplier support Date: Sun, 23 Apr 2023 13:10:47 -0100 Message-Id: <20230423141051.702990-36-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?1763980197319588826?= X-GMAIL-MSGID: =?utf-8?q?1763980197319588826?= |
Series |
drm/amd/display: add AMD driver-specific properties for color mgmt
|
|
Commit Message
Melissa Wen
April 23, 2023, 2:10 p.m. UTC
From: Joshua Ashton <joshua@froggi.es> With `dc_fixpt_from_s3132()` translation, we can just use it to set hdr_mult. Signed-off-by: Joshua Ashton <joshua@froggi.es> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 + drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 3 +++ 2 files changed, 4 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 c0321272c129..0e3b6d414ec4 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -7991,6 +7991,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, 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; } amdgpu_dm_plane_fill_dc_scaling_info(dm->adev, new_plane_state, 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 d714728ca143..854510b05194 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 @@ -939,6 +939,8 @@ int amdgpu_dm_update_plane_color_mgmt(struct dm_crtc_state *crtc, has_crtc_cm_degamma = (crtc->cm_has_degamma || crtc->cm_is_degamma_srgb); #ifdef CONFIG_STEAM_DECK + dc_plane_state->hdr_mult = dc_fixpt_from_s3132(dm_plane_state->hdr_mult); + ret = __set_dm_plane_degamma(plane_state, dc_plane_state); if (ret != -EINVAL) return ret; @@ -969,5 +971,6 @@ int amdgpu_dm_update_plane_color_mgmt(struct dm_crtc_state *crtc, return ret; } + return 0; }