Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3984076pxv; Mon, 28 Jun 2021 18:31:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLKEw2utaOFZBpeuX8s8Wkmpkah4eOX6bRVPl7fJqcC6NDVgrwlATQqEx/LT7NzFP+rniB X-Received: by 2002:a05:6402:20e:: with SMTP id t14mr5730111edv.193.1624930294020; Mon, 28 Jun 2021 18:31:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624930294; cv=none; d=google.com; s=arc-20160816; b=HmDcuM6FwP2CmFigJ64GUGwGDyJIljHIZ/G508k7pvbObLlxTmo4+ZMQRJs1ANLysT rjikCGlW6NtsS5cElLt2x8UuD4VhU5bOHk6DEW1jenFu9KMAWuGBS/Ui4P0ZxrsNlism eH+5PmAmPxL7D8CXHGt/pHlZgbydcGVZd6KKJ7hhRk0cStp0S1hV5bfLkXE1LgQeBfkU nZ/66NV1DDiEGFwvf3JRFAjaLc8gb82u8oZKmiNM/79/4zJYhJwu94H8mmNwK9jLZ4qu q1VuheXaWv/GZsmKUp/5o5fBKy4ZvCV7nwEYkGCSvSkNfpGXl0bn3mJQijVB1QkX1FaI mASg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=sdAmp65hciYeluIbPve30oHR/GPcy6OyyGVJziF+xHE=; b=TZtAxWSP66+eVPyNwcPlATwwFi5+6Iu6wDrPk1qQNxMcBX2ZQ/88pK2K82JCyiBvwJ 7RGhBqFd80xEkcjxcIeQqlJPkQoOC75fCnWL72bOofdBSvmd7v4XxvctWsFE7u86KWma /RnYKD2MvgW2oh7IOUSh9rBY8D1LsgZyiKVz2x6zljEsHRxb4TzXM1f/W0HYl8KUIw8C 9ktjmc0lkrYyG1Uk10+otbz8LWzyIl0j6MCEuO9tuOmo+yDAHuBspT1fARti0ypf+Lx9 VyP645Y63OKfMrRTyPOUcYyoTBsACy80VctGzvfYjQMxSNM77snjUJeIZVtpMuKTCQBp 9JXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ajlC3Y2B; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hg16si15336341ejc.410.2021.06.28.18.31.11; Mon, 28 Jun 2021 18:31:34 -0700 (PDT) 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=@chromium.org header.s=google header.b=ajlC3Y2B; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231959AbhF2Bae (ORCPT + 99 others); Mon, 28 Jun 2021 21:30:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230483AbhF2Bae (ORCPT ); Mon, 28 Jun 2021 21:30:34 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08407C061574 for ; Mon, 28 Jun 2021 18:28:08 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id g24so11386849pji.4 for ; Mon, 28 Jun 2021 18:28:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sdAmp65hciYeluIbPve30oHR/GPcy6OyyGVJziF+xHE=; b=ajlC3Y2BbwpJvb//BGwKk0iVmUKdgr6EEkltyLi6EKddugzIYMyVm811CxYaTI5RZ3 XRN3lZcqg0qg+ZKvi6Csnfs2+RUTbc+LchNfBOOelhMYtnA1/2shvLGUzCo6Cz8I6y6n Wgb5Dyeh2Nax5GQ3GRJeG23tObPIf5m6B4JIc= 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:mime-version :content-transfer-encoding; bh=sdAmp65hciYeluIbPve30oHR/GPcy6OyyGVJziF+xHE=; b=DMgs51/RRYnTW71Hpmpx9lUOXgDXKXp+aPyrEolx3vamDJNnQkbMi8xkPW/NCUlPuF VMHNv4OMiWfJlmH3rK1x1depqlsHodCViY/tQWQ7ttFw48Lm/PsUrV8UFJjyqz8+AxXP ycmRALrVRVOngkxcweZRCxmQdK9jMucZiYs4s5iu4TyFZxQCSbwqaSgjg3IkxvwTt99G 0ZSfT+TEQ/yXpQt+whgHkFxZVVwqmmrR+wlkQ5iTVm5HrS1oMEn4DxSlbwSwftvf+ZfM 5EO5C/BF7RG7VUym8eHD4j+yt2Q20fCjqIKm7jRawZrwIRCCdM5eSfOsFbCvozc7BNWf ANyg== X-Gm-Message-State: AOAM533sgcy02O8g6CXbRveQAFQ+Cbednz0eWFNpCoyszdws8I6yxw7r hOUs+ASQ6GUANw/WIgN8uLpHig== X-Received: by 2002:a17:90a:ba94:: with SMTP id t20mr16441598pjr.11.1624930087449; Mon, 28 Jun 2021 18:28:07 -0700 (PDT) Received: from localhost ([2401:fa00:9:14:7a14:49d8:be7f:e60e]) by smtp.gmail.com with UTF8SMTPSA id u10sm15664815pfh.123.2021.06.28.18.28.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Jun 2021 18:28:06 -0700 (PDT) From: Reka Norman X-Google-Original-From: Reka Norman To: amd-gfx@lists.freedesktop.org Cc: Reka Norman , Alex Deucher , Bhawanpreet Lakha , =?UTF-8?q?Christian=20K=C3=B6nig?= , Daniel Kolesa , Daniel Vetter , David Airlie , Harry Wentland , Huang Rui , Leo Li , Nicholas Kazlauskas , "Pan, Xinhui" , Will Deacon , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/amd/display: Respect CONFIG_FRAME_WARN=0 in dml Makefile Date: Tue, 29 Jun 2021 11:27:18 +1000 Message-Id: <20210629112647.1.I7813d8e7298aa1a1c6bee84e6fd44a82ca24805c@changeid> X-Mailer: git-send-email 2.32.0.93.g670b81a890-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Setting CONFIG_FRAME_WARN=0 should disable 'stack frame larger than' warnings. This is useful for example in KASAN builds. Make the dml Makefile respect this config. Fixes the following build warnings with CONFIG_KASAN=y and CONFIG_FRAME_WARN=0: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3642:6: warning: stack frame size of 2216 bytes in function 'dml30_ModeSupportAndSystemConfigurationFull' [-Wframe-larger-than=] drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn31/display_mode_vba_31.c:3957:6: warning: stack frame size of 2568 bytes in function 'dml31_ModeSupportAndSystemConfigurationFull' [-Wframe-larger-than=] Signed-off-by: Reka Norman --- drivers/gpu/drm/amd/display/dc/dml/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile index d34024fd798a..45862167e6ce 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile @@ -50,6 +50,10 @@ dml_ccflags += -msse2 endif endif +ifneq ($(CONFIG_FRAME_WARN),0) +frame_warn_flag := -Wframe-larger-than=2048 +endif + CFLAGS_$(AMDDALPATH)/dc/dml/display_mode_lib.o := $(dml_ccflags) ifdef CONFIG_DRM_AMD_DC_DCN @@ -60,9 +64,9 @@ CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_mode_vba_20v2.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn20/display_rq_dlg_calc_20v2.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn21/display_mode_vba_21.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/dcn21/display_rq_dlg_calc_21.o := $(dml_ccflags) -CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_mode_vba_30.o := $(dml_ccflags) -Wframe-larger-than=2048 +CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_mode_vba_30.o := $(dml_ccflags) $(frame_warn_flag) CFLAGS_$(AMDDALPATH)/dc/dml/dcn30/display_rq_dlg_calc_30.o := $(dml_ccflags) -CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_mode_vba_31.o := $(dml_ccflags) -Wframe-larger-than=2048 +CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_mode_vba_31.o := $(dml_ccflags) $(frame_warn_flag) CFLAGS_$(AMDDALPATH)/dc/dml/dcn31/display_rq_dlg_calc_31.o := $(dml_ccflags) CFLAGS_$(AMDDALPATH)/dc/dml/display_mode_lib.o := $(dml_ccflags) CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/display_mode_vba.o := $(dml_rcflags) -- 2.32.0.93.g670b81a890-goog