From patchwork Tue Jan 7 21:27:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 182777 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp3185748ile; Sun, 12 Jan 2020 09:21:33 -0800 (PST) X-Google-Smtp-Source: APXvYqz0Wh3PgDoOdjxl2hCdKEtUc6+9rukL11hjDV/IDUAqbXfifKe+bZvQzJxohz5+SlofKn51 X-Received: by 2002:a63:604:: with SMTP id 4mr17310869pgg.406.1578848705539; Sun, 12 Jan 2020 09:05:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578848705; cv=none; d=google.com; s=arc-20160816; b=jB0+0mbkRVxkqaCz4hg/Z/f1eR6pmngRhW9gE/l+4yM44pg3UlpbVoNRcyDkQnaQ19 Q9PK4mlYW2GEHrk/nhteiMI0kWg6lhLBL8A+KqYq/RwLhOZ0XRzWBy+5dLMtm6NH+9wf ayF04eH0BZxmvKLLdcYHDU2qfoH24irbHAJ6t75an8lYmnbNCVKN9l/iG6zqcp4euHmD as+V5oHK61dRdx7SZlHmMGK/eJNFS1IZHWsM/81h7Q219tOzW7Hk4xQrJhnHorIRUhLB WuyFPxHzjilxh4cLVS59tQySu2RBOO6b+j9G+m3EJiwn+zb4+g3QSU+LclU+DbBRXQuE KpwA== 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:message-id:date:subject:to:from :delivered-to; bh=r0otYCdnmOTx1vMNH7Zt+l56EyXHJUvuSZ4djX6XzfI=; b=ndKUlg9F1Fv3HPW7aRPGjTEYRXV9CSzftBb316K5iD88q9sbrpORUPLjVkzxgBfegG upto8eqrMqssBA7RTp1cHevjxwk/FCqVCURPCenRva3X8mvRz588PLRC+UM6VcdItZKO N5p6BKLcTIrJYtt+AFTpQRWkpma1UfJbY0B9dbwMZV14H9NuXArzWO9PR+9RtTm3EnQ8 Wcga/PpRGYTppiQgiFnuTpM1lvkjpeiZnIB9lmNsKZm0EFBFKJWxzcJ4y3GOSbGUDWA7 waf+tupbYUdDkKCzJrU6T3D0KRaNXaBdu2B42ovNBHzblFTn2KKPPuo4JXns6FbJVy6x BEZw== ARC-Authentication-Results: i=1; mx.google.com; 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 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 y24si9054789pfn.94.2020.01.12.09.05.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jan 2020 09:05:05 -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; 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 Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 36A5C6E09A; Tue, 7 Jan 2020 21:28:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4A5886E09A for ; Tue, 7 Jan 2020 21:28:05 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPA (Nemesis) id 1MGhi0-1itpwb2ZJS-00Dn1Q; Tue, 07 Jan 2020 22:27:51 +0100 From: Arnd Bergmann To: Thierry Reding , David Airlie , Daniel Vetter Subject: [PATCH] drm: panel: fix excessive stack usage in td028ttec1_prepare Date: Tue, 7 Jan 2020 22:27:33 +0100 Message-Id: <20200107212747.4182515-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:oXNXLfN/VIsDQFv/SJwQtBS570cMqOiIoOPgTiSj3Dsp8Mast6V a6nIAwxIdJ7QG8kqaKHVXD9UMVwHTrPE3j3Y3Y83ybDD2FhmplbMZohwEB70kjxFVxHmGZS pyNK70KcneApCD8axx8ajqRUB3eSiIPdg/sGcqYEA5Rl6QBHXZ6yOtpQvGO21SI63N0Rvrq 2nsYRN5jI3BB6x6CtxvLw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:wybcYGCqFeU=:v6JPZuxuKq6KdDpZhERSQB IDxwXvZZ3iIThfYussrtVEboFQsYXSC7qEaAUE2XWaYfMkZWryLaflyAWfWUsATwXMg6kkTS4 2fkNkoMGkNpx4MCKQifZ0nsPoKH47LK3qlyhSzjot+pm7dGqrUBzd3iRu8R5fefc2RZIZREic QWSvAKtAQWM4Ojyk1h0Cv/8n+0At0t7Wag+VUislcxZY83IZULPztI7gUxC9ZGxMgNMBZzerm C1FjL3xOW2Nxg609m+EefeTYjxDmVlKyYPjQgyfmSc2AJgMYU68YS05MCx13u5OZXBNWakZjl /KgJ+JOuDhchGWb7s+vpjoki5rPqogRFfpHTOzCH+e3z3DlaTrUMmhBWgYv4j8qnZ0dIAjChs 4I/vpmANC2amo+pw4P/G/yZzXZS3X3vd/umZZfYB5e+bV2zPMLRhZKmYQiiaKFAbPNNpHrpKi gdKXp1DNdRwtC+mYFMVC9JPVQgmI8nSS6EjHfUbOFOaVjHwtkP79fOsjFMvY2ZL6aotERGia5 qJJl0KLotFNKZuev7SN06GiCBcyLIHv04A8yRtwa5ZX1/EnLjygKqHOMtpZjmSH+RVCLfMu8F Qcj29MPNM33tUkq7Xj/XcC/l6vgOfoe7g11HPeEmG0uOuA4G+9PCOgjZgcoYfhdabasgvEtvG imdpeO5Eh/+GrUr9uEn4xRcNebjiNxHFMQtiFCb8D5OP2Vp3CdiGY4qYvlMszQWLo5vk/Mgby DATbiwe4fFXaHGDfofaqzQudl4XduR+bPZFgTm+Ggp36Sc1O3ogVU69gSKhZ89G4deJiSt+i5 X+8wsPqcTE9MHwxukKoezId5n8vFNAxzQx+tEcRaHTBRmfj1FiOVfaxLtGvlOlJIvvLEGeQAk 3guOx3RvjSFld8FR+sHQ== 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: Oleksandr Natalenko , Arnd Bergmann , Tomi Valkeinen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Boris Brezillon , Laurent Pinchart , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With gcc -O3, the compiler can inline very aggressively, leading to rather large stack usage: drivers/gpu/drm/panel/panel-tpo-td028ttec1.c: In function 'td028ttec1_prepare': drivers/gpu/drm/panel/panel-tpo-td028ttec1.c:233:1: error: the frame size of 2768 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] } Marking jbt_reg_write_1() as noinline avoids the case where multiple instances of this function get inlined into the same stack frame and each one adds a copy of 'tx_buf'. Fixes: mmtom ("init/Kconfig: enable -O3 for all arches") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/panel/panel-tpo-td028ttec1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c b/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c index cf29405a2dbe..17ee5e87141f 100644 --- a/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c +++ b/drivers/gpu/drm/panel/panel-tpo-td028ttec1.c @@ -105,7 +105,7 @@ static int jbt_ret_write_0(struct td028ttec1_panel *lcd, u8 reg, int *err) return ret; } -static int jbt_reg_write_1(struct td028ttec1_panel *lcd, +static int noinline_for_stack jbt_reg_write_1(struct td028ttec1_panel *lcd, u8 reg, u8 data, int *err) { struct spi_device *spi = lcd->spi;