Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3097438ybi; Thu, 18 Jul 2019 20:59:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxSkheqEYQOD4SKR7D58fJaMALNfBiShAL7AslqHJkv9//j9Q+dA1yhyJ98/4XY0lfwUbR X-Received: by 2002:a65:56c1:: with SMTP id w1mr50819230pgs.395.1563508762224; Thu, 18 Jul 2019 20:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563508762; cv=none; d=google.com; s=arc-20160816; b=p7mMUWB9GSgk36wr15Xn5pcip5XKN9pP+6vM7B0SnQdpTJeuo8RUs8e2Fi4C0bBN+/ I3xan5aEGxc3aeGMZNCZJQZ8e/DUolSyObrBimmSgMwTXJfPLg//nA2HmOuq0GqQD4VX GG4rmELktIsjdjew5q9QbzoJWE7udzHZe3CXbbHEr46TIzlJy4FmwVfIrpQpHV4OIxVX 3fprzxkyaiK6/m59pPZY1PfUO8cljkfrHrjbtsH/gOtHvfKrcgujsQ+6A8cLNS81n6QZ /srJtrp3Buw05ECZELG/6ZXk3MsfWXVPyoSPiXRsrfVVJKdbjvPjImTwR1pWcmeb64Ha AFrg== 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=o03IoaFDVxoswxv60cBfHoBPcN0r/iD8a4PNOVL7nVc=; b=AlNsePUHekSxkrim8vJ1BMxirxyH427tyqpmsjKpgR8EgCPeGOX8yGoiPQM/+Ym1l8 rYRB8WTovvaIcHW/K9gqNsE3YvOLArqP3E/KoTePc+YkTIcIqa9MaxdZgp8hOoOQjgA7 0zsMsbu6IA6yHjcHbm9ErV2H7HBLifOOf8843WUPeywh/Bm1XrSw21ROXzTX4wMAtuP6 08Cc+w5+yCuiX7dyTe3aVMwMrJxhzvRPXtEFBjnyOfNX99h9W23cCbnfOrOQXL6ysZY/ maHHf6CiNOcNHSP5mxPQRv+hLKgn/ZW7OP42MfNnFzTPqdkFU/Ds5yhOuwYVKQ5ND9b9 N0cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G1lNXnI+; 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 21si1538683pfo.138.2019.07.18.20.59.07; Thu, 18 Jul 2019 20:59:22 -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=G1lNXnI+; 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 S1727875AbfGSD6Q (ORCPT + 99 others); Thu, 18 Jul 2019 23:58:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:57530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727823AbfGSD6O (ORCPT ); Thu, 18 Jul 2019 23:58:14 -0400 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 B9FD32184E; Fri, 19 Jul 2019 03:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508693; bh=z+8JcC18Jtyh8uyT6UA2/SC24y/hq7VVcY9YA+weTuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G1lNXnI+nXdooUfTkRfB1jDqaUZXgNl2kvRsTiJDHEXXe0M+JcNvL9PoxjTclzl27 QgJwJkQsFwNPXl/oS7LwA03zjFnEmXl1zwsxOGmY8ENxvNEbJiAvX2HnaDYe4iYAal TDVCPP+mpJwWrLZgc8/e/KJVc8dVX1vGfowN/uWo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Krunoslav Kovac , Aric Cyr , Leo Li , Alex Deucher , Sasha Levin , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.2 036/171] drm/amd/display: CS_TFM_1D only applied post EOTF Date: Thu, 18 Jul 2019 23:54:27 -0400 Message-Id: <20190719035643.14300-36-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review 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: Krunoslav Kovac [ 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