Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2770102imj; Mon, 11 Feb 2019 08:12:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IalFJU97LGHFaKW5aveNXf/FrNm04y/kTxQ3zVBeznUyA8w6hXBUncO2SD5gFLnTMViQ6HK X-Received: by 2002:a17:902:112a:: with SMTP id d39mr38487862pla.66.1549901538994; Mon, 11 Feb 2019 08:12:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901538; cv=none; d=google.com; s=arc-20160816; b=CjIA+5G1c/vpyyzEezmM3DIACzIBZHwTonsib+LuO5cMn1nqv8yqU5N9FalwHWW4oc stTnHYouIVBz/d50NCvez+S8Mdl9jhi7Km1ok48qIcNyQ7ob+N7enDM0Z66/Wcnoq4Kb 3tpW3N75ChN/pcykw6IpM0Cau0phHAXTMDuBYCaMh4OrC/fnJdGbYhTZ0Wh8LznA8xj7 bDdsafbP+nsPJA+ouylepH4lH4V/TIFyn0Ex72gnFUMRyDrFu1rPqoocl9MudXX3oh/B 5qojGfPfPO742vIWrEzM387h8u8753bIB/i2leJnzex6R673phwpFNaD2pikBP7p5c81 Vh6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SQfAv4RsQEeTFr2RBWDHTpR7t7zOKQm8PMyyIG6k+VI=; b=mW0z3sgxNpG0MBLLyj6k36ObwAYtev4SoBzq/c/xeSMQMfBj0ou6w10v6lr7eyq4sc JQd1a4XgVvjhb2Kqeh1kFCAGqKbwsvSbJto/f1LNcsm8AOn/k8TYdbQfp0s5ToaoN7hP nZVzmhUsI9ZLfPdYeFhiHQAx8NGG7HN0tkHkdmU8VKttUPAgb4lJvwprQrQT5sjSSNGQ 8iuL06j64QfgId6Y7apbKQBZnzJKht6qKGe5z1Y7pW1b4w7ZXP97h2BS3IR14FhK0N4h 2ye4leLE/i1Crel3GFIGAG2C87wIssMAEfVwq5+BnMszeWX+WAZ/H6S4c+zSwtNpytDt 8cAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lbXt9G2l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h18si2908055pgj.479.2019.02.11.08.12.01; Mon, 11 Feb 2019 08:12:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lbXt9G2l; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729509AbfBKQKp (ORCPT + 99 others); Mon, 11 Feb 2019 11:10:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:57628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728239AbfBKOYZ (ORCPT ); Mon, 11 Feb 2019 09:24:25 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ECC2C20821; Mon, 11 Feb 2019 14:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895064; bh=Pi7zxNGNXnrFqsGW7Qk8jqi+88OOg4kGv2mQ881/gf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lbXt9G2l0WeFRIN5JxHkV449qBh5i9kx013901WsXU0kd11Tv3K0rYK/RIJCD9sl5 kn62B1DOB5RXITvwMnfvbQvhYP5oQSiOzEeSYo+YG0Nwp5SJE0ulvolck3qsp6FALm 6Jhzyyc9LdBOurcG73zvYGcmcoYDAagWiruLOWGg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Murton Liu , Krunoslav Kovac , Bhawanpreet Lakha , Alex Deucher , Sasha Levin Subject: [PATCH 4.20 049/352] drm/amd/display: fix gamma not being applied correctly Date: Mon, 11 Feb 2019 15:14:36 +0100 Message-Id: <20190211141849.375284545@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 8ce504b9389be846bcdf512ed5be8f661b3bf097 ] [why] Gamma was always being set as identity on SDR monitor, leading to no changes in gamma. This caused nightlight to not apply correctly. [how] Added a default gamma structure to compare against in the sdr case. Signed-off-by: Murton Liu Reviewed-by: Krunoslav Kovac Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c index 193184affefb..32e4c653b1b4 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c @@ -1226,7 +1226,8 @@ static bool dcn10_set_input_transfer_func(struct pipe_ctx *pipe_ctx, tf = plane_state->in_transfer_func; if (plane_state->gamma_correction && - !plane_state->gamma_correction->is_identity + !dpp_base->ctx->dc->debug.always_use_regamma + && !plane_state->gamma_correction->is_identity && dce_use_lut(plane_state->format)) dpp_base->funcs->dpp_program_input_lut(dpp_base, plane_state->gamma_correction); -- 2.19.1