Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp433916pxb; Thu, 14 Jan 2021 09:19:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIJ0glIX+63EUpDVp/LR/h1QT8KVXxaRmX/u0XXD6rP63nlugp6DVnECl7vPvUPq2gAuQK X-Received: by 2002:a17:906:36da:: with SMTP id b26mr5862595ejc.28.1610644769193; Thu, 14 Jan 2021 09:19:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610644769; cv=none; d=google.com; s=arc-20160816; b=KRN8zEC0e5blD18IkGvDq24h9QFTd0BLZrC/GxAtWuwG9iSYlG8KQnlrBuTcbE4nnf Fflu7JbY6yScYTjbUfRyJNYSvOSY21MDx/bSuKpPziGfuQPtfqHVMSLSxndPbblGwGKm LYFDwl1bLnVCc1CmzpXFApUryf7rpZWBrB3VNspf1ZujMEY9a949mS5wDuwE1uHy2kfG 93z9iES3ZcP4fvaEQ/ad+s0he60U9FQTn2TfoMilRXeni7cIBYIjQxmQOQ2D0EcnLijK 4EUVI79IBz/RuG4pmRQt6v5qgpSvm7RN2CSNRg+x5C32HUp531tVExzRqTWMqpnmMSYq egIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=o7k9+/ImOTT6+O+qwUq3epvb/TE+j4Ep2dyuyw1DcuA=; b=FXEsjfbrhkv/ed96r0/Dz1HYyxOhnibpjUScZDCw7nmJf+d88yMk9hIocH8fygXbvt g4BpHnkmB9NIbBAs19fyr1SWmZoVQuJHveVufbOndqsbd5FBWgA1dTDKLiPj5NH0qy33 Ilhadxj3WRjhQS/mJ52up0YVRczk8B1QGo/VCNHepDWAOf52atd9kN2fad+XIT/rCr1i KMRwxI8Ko6NkIaMoTJLQSoU9d/AzTtfmPl+PNbgW38JLl/0lEdbw6Xol+jdtD/zcSiVa rSHqA+PH56b/HjQqSYxv56om0KOwUrVfeheP57AUKqFta/2Ab/OOQrnJgSpxEPpuTIXK nEwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GdRk7PiA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si2402053eji.723.2021.01.14.09.18.56; Thu, 14 Jan 2021 09:19:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GdRk7PiA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726671AbhANRR7 (ORCPT + 99 others); Thu, 14 Jan 2021 12:17:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725946AbhANRR7 (ORCPT ); Thu, 14 Jan 2021 12:17:59 -0500 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A16B5C061757 for ; Thu, 14 Jan 2021 09:17:18 -0800 (PST) Received: by mail-oi1-x22a.google.com with SMTP id s2so6666072oij.2 for ; Thu, 14 Jan 2021 09:17:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=o7k9+/ImOTT6+O+qwUq3epvb/TE+j4Ep2dyuyw1DcuA=; b=GdRk7PiAEQ2racZn2Yzx9pBj0WEiHaF3uwKHS3reKPG1MTiN6y+MVTLxKkAdvRMha0 Z3CQVHbWYxlXCeRPxZzv/bTr0cUtQOcXPQy49V8xjgqS5aTznmBg/XUeuBzXuO5XsLHR JojfAOML0XuvM3KiZCEt4PDyiM3KOrToOypLxrP7pYN+YuOMyZlS0Fgvhxrlw1/Y8sjC FFjlER+x5mHVSWWTkLUWI27PbrO5PWHfhIA1rmsf1f5R0AmjKB+De9RgvsQ9Y7cpwrPh zwWxXqNCHeQbzEGGVojA1gizs7EBU6owOXHT+2gaSB4dnWY0uzHDtcBqjm+w9i/u3RPm kzjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=o7k9+/ImOTT6+O+qwUq3epvb/TE+j4Ep2dyuyw1DcuA=; b=Z+Vkdb8LSRx+fJwcV7mMvzNiH3OkQyACLF5ahKoPyhcD5gzJQdYw5+TMdj6zPuwmZj jsH4pCATqF8m4VXoGg1Hrht2fN2/f1xzGl7eL4ZgjPqmcn8RgRYCvPBeYJrKrxtTE4Pr T1PxpAqBPj3B1BUbC9eJDnAdLbiH7Uy1hbW6dTW6qJhCf0Cf61nItn8dhv+GKLCV/5xT DY9oJpQJhOxVo3WxNMt+fyjWF7CQcAElirvtkvEag+TXUro/Y+VmfJibxgR79kViTB7w PrkJuBG0VsTN3Fkd+stKWJ2yUYmM5/sY1jRW3J9sNeZPlYjuoFSyFH93Sp3N7GlZ+Rtq BAbA== X-Gm-Message-State: AOAM5323WGvp8EPmpNUTjmsktLRhC/OVB0n7EVLQ5lsX+Sa5+uyz/MRL tFp3CdKDObV10+yytCUcNg96KV9irl0UR9aTgkc= X-Received: by 2002:aca:6202:: with SMTP id w2mr3020084oib.5.1610644638152; Thu, 14 Jan 2021 09:17:18 -0800 (PST) MIME-Version: 1.0 References: <20210113080752.1003793-1-lee.jones@linaro.org> <20210113080752.1003793-19-lee.jones@linaro.org> In-Reply-To: <20210113080752.1003793-19-lee.jones@linaro.org> From: Alex Deucher Date: Thu, 14 Jan 2021 12:17:07 -0500 Message-ID: Subject: Re: [PATCH 18/30] drm/amd/display/dc/core/dc_link: Move some local data from the stack to the heap To: Lee Jones Cc: Leo Li , LKML , amd-gfx list , David Airlie , Maling list - DRI developers , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 13, 2021 at 3:08 AM Lee Jones wrote: > > Fixes the following W=3D1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c: In function =E2= =80=98dc_link_construct=E2=80=99: > 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-tha= n=3D] > > Cc: Harry Wentland > Cc: Leo Li > Cc: Alex Deucher > Cc: "Christian K=C3=B6nig" > Cc: David Airlie > Cc: Daniel Vetter > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Lee Jones Applied. Thanks! Alex > --- > 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 *lin= k, > struct dc_context *dc_ctx =3D init_params->ctx; > struct encoder_init_data enc_init_data =3D { 0 }; > struct panel_cntl_init_data panel_cntl_init_data =3D { 0 }; > - struct integrated_info info =3D {{{ 0 }}}; > + struct integrated_info *info; > struct dc_bios *bios =3D init_params->dc->ctx->dc_bios; > const struct dc_vbios_funcs *bp_funcs =3D bios->funcs; > struct bp_disp_connector_caps_info disp_connect_caps_info =3D { 0= }; > > DC_LOGGER_INIT(dc_ctx->logger); > > + info =3D kzalloc(sizeof(info), GFP_KERNEL); > + if (!info) > + goto create_fail; > + > link->irq_source_hpd =3D DC_IRQ_SOURCE_INVALID; > link->irq_source_hpd_rx =3D DC_IRQ_SOURCE_INVALID; > > @@ -1532,12 +1536,12 @@ static bool dc_link_construct(struct dc_link *lin= k, > } > > if (bios->integrated_info) > - info =3D *bios->integrated_info; > + memcpy(info, bios->integrated_info, sizeof(*info)); > > /* Look for channel mapping corresponding to connector and device= tag */ > for (i =3D 0; i < MAX_NUMBER_OF_EXT_DISPLAY_PATH; i++) { > struct external_display_path *path =3D > - &info.ext_disp_conn_info.path[i]; > + &info->ext_disp_conn_info.path[i]; > > if (path->device_connector_id.enum_id =3D=3D link->link_i= d.enum_id && > path->device_connector_id.id =3D=3D link->link_id.id = && > @@ -1584,6 +1588,8 @@ static bool dc_link_construct(struct dc_link *link, > link->hpd_gpio =3D NULL; > } > > + kfree(info); > + > return false; > } > > -- > 2.25.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel