Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3709670imu; Mon, 28 Jan 2019 09:25:08 -0800 (PST) X-Google-Smtp-Source: ALg8bN6GIPE/jdWVnY0/XWtH2LU97VnqFz+SmPB1FlGjaDjzrEzQ99K7LK6ILtLY8ExRVIp9b8VZ X-Received: by 2002:a17:902:a03:: with SMTP id 3mr22809977plo.112.1548696308101; Mon, 28 Jan 2019 09:25:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548696308; cv=none; d=google.com; s=arc-20160816; b=Rp6dB4flxEkBBxNX2S/HpApkr/ol7hb1tOiEIOkhUSg489cX+v5z0pQyF3AcevIjb9 SEBj05oqkSxNdaPImoXUygc5i+IfyQsWRNDSpyeV276te/pwxFtyVJFY/fb648NdJUWW 4fUhWxSU6bjyRE/J9maHPgJ1FFc8q3nDC7E5ST6+8JB7ec2g8kytYojSaSdDjaM1GV8F px2ipEQqv3rE0OmnbKIdczDUnAvBs1uwE0fVVCB5LrkQvRkq4uEbdzcs/2aQZS+kdKY0 bW3s15o57lc7wwGXQnV56qhUbTJ47UL2T1M89w8d/538xYUviAYz2uCsTL+YZOsTliAw LBTw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=cpMDy8cg0js+pjra93tZb5sNwg+SiYUDFC8BE2dv/ew=; b=p/2udinjk2nX0o6hmVRTp7ufTTgVSaVEhvYyTXqOAri8rizpRnzxLtAr7n6LGhlpRY i7QizE+phCZFaLRITrfvSaOkTDnqyJOP1eSnXTvxoPgRVh2eyFMa1lUomiG1uZuA7PGE GyYvWFaEmSzTbfrMKc1W3r/iAMMlHe3WqFg8XZVuaD4J3qmHfF1NEgKzTd0EKtYxWJB+ iRkhrMueBCnvsO5dlceHdP1EY61qms3WLnPJFMgiPtl6vT8x+UGfy77uJhMq3YtJxK51 16XWD8GCNcZv74vj/talxKj7iquLgQo8kL+4XQwsAG2S6xAwWl0TcMzgO7Nm6+veB5yn leEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PV4Ww5CB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m63si35614364pld.132.2019.01.28.09.24.52; Mon, 28 Jan 2019 09:25:08 -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=PV4Ww5CB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730768AbfA1RYr (ORCPT + 99 others); Mon, 28 Jan 2019 12:24:47 -0500 Received: from mail.kernel.org ([198.145.29.99]:46808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730411AbfA1QBd (ORCPT ); Mon, 28 Jan 2019 11:01:33 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AD1742082E; Mon, 28 Jan 2019 16:01:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548691292; bh=Q42/dfcWUcuSnQDph101c4xf0FYsTxEP3V3rrFsJKcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PV4Ww5CBtGVyIBRlqgsgAESCDveblDDGFo1C7lZn+JjWp9t08joudgARtZuPkhaxN 1HSJ1HwRy1RgW9NDjb3tbIgEt2qtP9ElA3mfY3uxH5ThMDLo9VJ2FlIUuQEgqr+PsQ WdI9a4w8CpN9V02ixSjDhKGQ7SRvNXzvLuTz241I= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Murton Liu , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 4.19 048/258] drm/amd/display: fix gamma not being applied correctly Date: Mon, 28 Jan 2019 10:55:54 -0500 Message-Id: <20190128155924.51521-48-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190128155924.51521-1-sashal@kernel.org> References: <20190128155924.51521-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Murton Liu [ 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 cfcc54f2ce65..33a9d0c58966 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 @@ -1190,7 +1190,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