Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3799153ybi; Mon, 29 Jul 2019 12:51:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyh2vP4E0SKMsq9YRhJlI1ehYBJv0fSqC/M2er0OqBbq0N30iFtpAsd8+u9PnEco+uZe9d4 X-Received: by 2002:a17:902:8bc1:: with SMTP id r1mr62902118plo.42.1564429897532; Mon, 29 Jul 2019 12:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429897; cv=none; d=google.com; s=arc-20160816; b=iOGPUCh9HvcDVLfOfQKqsSQ+lqQg7VJRVPhew4pJFtCaSyGZZvPPu069WAKVS9MzSL xYm4kU7wnjncEusp4U5YIWeCJPFkOPakTt1ZLcrVVczt8bLmVfw6YVWhUFzYwXvCw24s sXRstoPXbdDqVXdiG6inrGdtoBBSbGTwlGLBvajZ4HEJs02AdpZ5482HKTo2utmRrfW5 21grKU2Yac+KOVc9xOiQRIjrhDwae/uvCbD+SW8ix7jJvx8oBGjCNThtElhIrJUe33Z1 G5vyp28Kl+kkUJRPfYHw3JFrMwQR6dCSVl8R6PEFVFWDoE5LBNyMb8AQc1kbRP3Ipi3V XV8w== 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=ijGG3kAk5wWeOqOTB7kJQllolXG8Rhctgk9ChqYEDWI=; b=Y1U3HvcXzSetk79r5VRCIZAKk9SwPwtGqE5hMwCjRTkSPOjoEstwE7JbWL3gHs2LLL eulqh1fAN8SvNIBkNLvn4Y0l/MlveY/X+vRtEnbZc6OQfftXILSn14N1LOEfHZEEmD8w 69qiLRYmlTlU4jCGvgjQFhg9Eo+IDNZGbgSiBGxFuLOjbSa6Jz3uwKQ5vQ1IcjCfY0ke bbjePltpaDRa+XYvdXsrywb7UMUvEHzWBSPXqvc22i/fdBoiFDhE6/+jMM8BoBteayCn 6BRy3IhptcP7y8dY+3HRVao2Ng9rLWqpZja//jQyU3ZNQCSB16pgU5YKovBbsTKV6rJY WsxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Je3UnRYd; 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 z14si25904077pju.64.2019.07.29.12.51.22; Mon, 29 Jul 2019 12:51:37 -0700 (PDT) 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=Je3UnRYd; 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 S2390232AbfG2Ts4 (ORCPT + 99 others); Mon, 29 Jul 2019 15:48:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:39186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390175AbfG2Tsw (ORCPT ); Mon, 29 Jul 2019 15:48:52 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.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 C3216205F4; Mon, 29 Jul 2019 19:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429731; bh=WGMYS6q83Thcael11V87cslMUvmVDRsxbyMeEMFWzbg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Je3UnRYdJnaD5suk3+k1xGfqnn1yCqqlwv6mQ8C8HTmg8VVRBg6PEUGt4TMOE4Pz4 98A0AYUGoK1yha+i6evhEUkxTgIs+zlYH3OPMGztPPG0sWx88hm84Lbdm4L1MIRISR Q85iFya4tZNucMp2dKVlv69ToD+I6HsnUbSMBFyE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krunoslav Kovac , Aric Cyr , Leo Li , Alex Deucher , Sasha Levin Subject: [PATCH 5.2 038/215] drm/amd/display: CS_TFM_1D only applied post EOTF Date: Mon, 29 Jul 2019 21:20:34 +0200 Message-Id: <20190729190747.058926921@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@linuxfoundation.org> User-Agent: quilt/0.66 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 [ Upstream commit 6ad34adeaec5b56a5ba90e90099cabf1c1fe9dd2 ] [Why] There's some unnecessary mem allocation for CS_TFM_ID. What's worse, it depends on LUT size and since it's 4K for CS_TFM_1D, it is 16x bigger than in regular case when it's actually needed. This leads to some crashes in stress conditions. [How] Skip ramp combining designed for RGB256 and DXGI gamma with CS_TFM_1D. Signed-off-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c index a1055413bade..31f867bb5afe 100644 --- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c +++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c @@ -1564,7 +1564,8 @@ bool mod_color_calculate_regamma_params(struct dc_transfer_func *output_tf, output_tf->type = TF_TYPE_DISTRIBUTED_POINTS; - if (ramp && (mapUserRamp || ramp->type != GAMMA_RGB_256)) { + if (ramp && ramp->type != GAMMA_CS_TFM_1D && + (mapUserRamp || ramp->type != GAMMA_RGB_256)) { rgb_user = kvcalloc(ramp->num_entries + _EXTRA_POINTS, sizeof(*rgb_user), GFP_KERNEL); -- 2.20.1