Messages in this thread | | | Date | Tue, 12 Jan 2021 13:43:27 +0000 | From | Lee Jones <> | Subject | Re: [PATCH 14/40] drm/amd/display/dc/calcs/dce_calcs: Remove some large variables from the stack |
| |
On Mon, 11 Jan 2021, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function ‘bw_calcs_init’: > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:2726:1: warning: the frame size of 1336 bytes is larger than 1024 bytes [-Wframe-larger-than=] > > Cc: Harry Wentland <harry.wentland@amd.com> > Cc: Leo Li <sunpeng.li@amd.com> > Cc: Alex Deucher <alexander.deucher@amd.com> > Cc: "Christian König" <christian.koenig@amd.com> > Cc: David Airlie <airlied@linux.ie> > Cc: Daniel Vetter <daniel@ffwll.ch> > Cc: amd-gfx@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Lee Jones <lee.jones@linaro.org> > --- > .../gpu/drm/amd/display/dc/calcs/dce_calcs.c | 1115 +++++++++-------- > 1 file changed, 560 insertions(+), 555 deletions(-) > > diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c > index a0c69fae40ced..f69c2b84d432b 100644 > --- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c > +++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c > @@ -2035,707 +2035,712 @@ void bw_calcs_init(struct bw_calcs_dceip *bw_dceip, > struct bw_calcs_vbios *bw_vbios, > struct hw_asic_id asic_id) > { > - struct bw_calcs_dceip dceip = { 0 }; > - struct bw_calcs_vbios vbios = { 0 }; > + struct bw_calcs_dceip *dceip; > + struct bw_calcs_vbios *vbios; > > enum bw_calcs_version version = bw_calcs_version_from_asic_id(asic_id); > > - dceip.version = version; > + dceip = kzalloc(sizeof(dceip), GFP_KERNEL); > + vbios = kzalloc(sizeof(vbios), GFP_KERNEL);
Please don't review/merge this yet. I missed some error checking.
-- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
| |