From patchwork Wed Jan 13 08:07:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 362049 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp296913jap; Wed, 13 Jan 2021 00:08:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJweTbuTXNTZfMQe/YKsiD0v2sUciCMISsLrn/FW0ZtBw8v6bZ/AduCvUPpUvcN5V+PwSW+O X-Received: by 2002:a17:90a:db4e:: with SMTP id u14mr1026419pjx.184.1610525311046; Wed, 13 Jan 2021 00:08:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610525311; cv=none; d=google.com; s=arc-20160816; b=zpYQWxfcoiLq5N+p4wWaOHOuOXD1JwyfzNyMQvNFK3PzQk0KynH28+2YGmeimoLDUL 7UIPwTzY3hyLieHJg6bitxR5PRsrelnI28tpq2UHg8+ug3hP12iWoz+r8xLe3k/66inx BwKCpdoFpHmetSjUc4Lv4kWXa7R2r4G2g+eh6t/5Dq96g9BWT2Jj20Ea0E71RSDSxOXE wOpCrHRgw9q549I1W6rNibEE3H+iQF0XHXVjfsUMzPhPdBC00L2LvmNw63Lsn0EsUVoV RrjRo9Eu77tZks/NxHnUAYH+85f7WhkobOkHm8R90WM0sMkmFDoMcO+AUG0Q6wrwsZBG 42tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=eY07xtWygY+Z833jibfgCJbaXgKSE76hM0mRAzXXMDM=; b=pSWoecDNAkUImB+HkUPy+kMuli4FFgpyIZK1txHBBYpj9Ve4k+EecmdbdgeBqG4LPr S7dw7Id9hYezE9k9cWY09x26G0h+t+Lotr2RgojtCYvAyu6MkCblMZKDhxSRGdXxBOEw ksU9hZQfkNWHmH4RjV3YJdTdMG7VPVFQAp9ZNeVEo2gYkhHFCnPIz9WbS309fwVSjD5D LuuGPyiTmD3aecIK/KBU7vm2aGCvmcyhQIiGNQvHz7QN40rCG0Iiddp6FBf3wuZ6gOlM qjk0GmCLOkCiVOhfF0so9o1YB/BJdMBU99Tw0QaksDTMYGn3mk2JOne/IkYk2g2rUwVN +O6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TY9K9YP3; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id b24si1389195pgl.251.2021.01.13.00.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 00:08:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TY9K9YP3; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DD6F66E061; Wed, 13 Jan 2021 08:08:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E1CB6E06D for ; Wed, 13 Jan 2021 08:08:19 +0000 (UTC) Received: by mail-wm1-x32d.google.com with SMTP id r4so708461wmh.5 for ; Wed, 13 Jan 2021 00:08:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UzSVTfnGeF4QxtWxeHYTIcFMIY4s6ebauA3+cdnRC38=; b=TY9K9YP3KeN4jJ31pGivkq0dF1YT54ldZJqLn6MYgdukuVkCp1zu+y0mPY6lahL/cy 1RZcx437IV0+wAEUKVyLgcGDYpTDNEL1Ppn0vXUncrWgNbXQ1NAXE1SAV8ys9N81RnYq L80CoeEUDBznRtSXNf5aVJiLBgu/M3NW5YWML2KRwTpalTbHmI2lrvEOUNFIZGcJmyVN AN22iAp7L+Z2f5Prz8MYydOsJDYBrFjKJ6ueQI3EeMHXH6x5NltDhYkzPnWAsnjVgG1m 3f+UnLYOmmG+9ZtdtXLtJus/mi94hGo7N9uqHpmNiDUIXrk0xJ0Ap+OMgc5sowuOA4BC Xa9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UzSVTfnGeF4QxtWxeHYTIcFMIY4s6ebauA3+cdnRC38=; b=Wlxq7uSDxJD1uUnWOkeB3ijvJGS7qTB5tNsmOv55TBxVF4mUaFoNf6ZL33sApfJyUx dpphNPCZVkeoOhV7JC8nBCA1vQ1IKDp5V1rtXuycNZmxhS1vQCekjqbsjltEAzAT73t4 ydG1sMRQSOElmdUjqgutF3bph5eYb4jazIIrg+9L/1EjITUp9cxw5/cxcsJOirYJxq+r Eh6/hBAvKj2o0RIhqf0YJGxR3opdLtCdZtYSrvo0vB0aNcgJMQhYItZwMJY9E1nD8/Y/ Wv4Yml0euzqrdozfVQfJ1vn8WBjpbdjb7omqrQ/ubZNTu70p87PJwnGpVUhIp2o3W3uL 4SuQ== X-Gm-Message-State: AOAM532pa7xuKDhxn7PDrlmXXxkaiA0G6bjMBu2v/85K4gH8IcEMXILa szcHT3gqcHWHENlkK/BjHvSz0XX3aHcpi4KR X-Received: by 2002:a1c:9d8b:: with SMTP id g133mr939751wme.189.1610525298154; Wed, 13 Jan 2021 00:08:18 -0800 (PST) Received: from dell.default ([91.110.221.229]) by smtp.gmail.com with ESMTPSA id r20sm1642486wmh.15.2021.01.13.00.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 00:08:17 -0800 (PST) From: Lee Jones To: lee.jones@linaro.org Subject: [PATCH 18/30] drm/amd/display/dc/core/dc_link: Move some local data from the stack to the heap Date: Wed, 13 Jan 2021 08:07:40 +0000 Message-Id: <20210113080752.1003793-19-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210113080752.1003793-1-lee.jones@linaro.org> References: <20210113080752.1003793-1-lee.jones@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leo Li , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, David Airlie , dri-devel@lists.freedesktop.org, Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c: In function ‘dc_link_construct’: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:1588:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index 8ccda8b9ac2eb..3366a49f11dc7 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -1364,13 +1364,17 @@ static bool dc_link_construct(struct dc_link *link, struct dc_context *dc_ctx = init_params->ctx; struct encoder_init_data enc_init_data = { 0 }; struct panel_cntl_init_data panel_cntl_init_data = { 0 }; - struct integrated_info info = {{{ 0 }}}; + struct integrated_info *info; struct dc_bios *bios = init_params->dc->ctx->dc_bios; const struct dc_vbios_funcs *bp_funcs = bios->funcs; struct bp_disp_connector_caps_info disp_connect_caps_info = { 0 }; DC_LOGGER_INIT(dc_ctx->logger); + info = kzalloc(sizeof(info), GFP_KERNEL); + if (!info) + goto create_fail; + link->irq_source_hpd = DC_IRQ_SOURCE_INVALID; link->irq_source_hpd_rx = DC_IRQ_SOURCE_INVALID; @@ -1532,12 +1536,12 @@ static bool dc_link_construct(struct dc_link *link, } if (bios->integrated_info) - info = *bios->integrated_info; + memcpy(info, bios->integrated_info, sizeof(*info)); /* Look for channel mapping corresponding to connector and device tag */ for (i = 0; i < MAX_NUMBER_OF_EXT_DISPLAY_PATH; i++) { struct external_display_path *path = - &info.ext_disp_conn_info.path[i]; + &info->ext_disp_conn_info.path[i]; if (path->device_connector_id.enum_id == link->link_id.enum_id && path->device_connector_id.id == link->link_id.id && @@ -1584,6 +1588,8 @@ static bool dc_link_construct(struct dc_link *link, link->hpd_gpio = NULL; } + kfree(info); + return false; }