Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp480499lqj; Sun, 2 Jun 2024 07:21:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVVfD3LdxD/XRVC4xfSeiqmixSvCXbEC/lY+PvhPe6I38Rp4gL72FFOaVRc2TQQZU+l8+A7RmAN3KHLyt+j6OJt8xkH6YASBMrP7zxAfQ== X-Google-Smtp-Source: AGHT+IF0MTxmOrEQ0g6n7rfnSX1LK9FAaITK559BRfIw1IMM7d8R/CBcmGU2o2Al2N543Rl9+p+c X-Received: by 2002:a05:620a:201d:b0:792:c401:1b7f with SMTP id af79cd13be357-794f5ed3b53mr658091185a.71.1717338090008; Sun, 02 Jun 2024 07:21:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717338089; cv=pass; d=google.com; s=arc-20160816; b=Yn2fWiXKfLAC2NOrsa2pK4eJ2p+hGrVH4L3tEdOw8PFZwtrEhM7+gAWYYMztg5NboZ oRlo/voBkcS8OLogAZOjTJgafxgXSkGdpCEbNJ49h2sKxePYtK9/UhGRsFEHRSI4NTrg EUkAWQl5vq4J12+y09cwjivZhhqLplaR0YifjxsB1LatRlKfgZVUlZeADeLlTu3Cfafx fQV3Sp2a/bOb5fNdO6hfiCEfuyUSaYWr8YmD5iJQTw6p+pcvp8FTsROIJnwovBb2QzXy xpLr7TjglHp2QFc0bcSBk4b61BROU360Qg3ZLTz9GWnd07yjaEN69RenrS4wkIMdNCiO LI0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=TWa/6tVsrzzF0J2Y3TFSOLrGHRu9hMqocQj6YrPaA1M=; fh=/mL9sHRGrNGnV3pDLVfHrv/H3LdmvZ8rr3dl3c2HSig=; b=V0A7RA1mVWonPQb2hwJR771uUB0ooxT40agpH/fv3LpuBhOczmidAa3N8EfrK80FMn MxIK2fyzbq6S7sMQ86HYvXSk8DynGDrI9s+QKFE2U1rPt5YDVbfutTiZiQBVm/+qN6hv FFPXE6drsUyfjQnmVTD85Ty+v+nddkq3F3SiwjBVAcntHUv/6ylzAom/P5T0pnPJU8TC o0yKkCRbgTgTdPW5aHJNdbyQlRSAM08obigEZopRRZqXaWkZUHFOy4L7FwIUJreiHD/c hXettiDyvAma0KGDEQcViORTHHHF/FlkgDEpTKH0wPswtVMmb0Bu1e6Qufz38Q9updgP UUjQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MIWxWhRz; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-198287-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198287-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794f3062e67si724876285a.227.2024.06.02.07.21.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 07:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198287-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MIWxWhRz; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-198287-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198287-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B924E1C20E86 for ; Sun, 2 Jun 2024 14:21:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 381BB43AC5; Sun, 2 Jun 2024 14:21:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MIWxWhRz" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDF5343ABD for ; Sun, 2 Jun 2024 14:21:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717338074; cv=none; b=ZlyG9WR1xl7hKF3y80oh/6+bVKkNaUo7SCVAjfIvUiK3l9jrAoZOAnyxkD81YiqAYVAO6gPrLeBXYkeFYwI0EFaAqbvOqAHH5HMxNks/NyGDnPjTUcfTt8GT7bs3p/BjO41yqzN9ByOaZ/Jxx2qU80m8nGPHirwWSTp6+OE4yqQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717338074; c=relaxed/simple; bh=oadUV7GI47XB1/5yBXbfmigyApPprinWQqP+x7Kl/Hk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=lktXqJYXNfxLLxFqqJvASL0bTW7Zn2CP85535bawcM4BkY43PYZ3U9IXG7sf6hrOvwr8N0fu+142JdMfFu6y04s/Mk+kd1zNNdZmeWk5W6Yhnx3KsCAdWY5TBwUsRCdOABeEs0CecrDytjGMKgyRCvo71gggk1D4SgnpYGcef1k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=MIWxWhRz; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717338073; x=1748874073; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=oadUV7GI47XB1/5yBXbfmigyApPprinWQqP+x7Kl/Hk=; b=MIWxWhRzhdvTuAaxFgyQlBoZxSuaUyXybfEtL1+OFJzWzJEcbjSo6La4 sd0ExKruzrCfAzcFmsHumPYLpazURjETka0Dxn3MsNO0+0UTaoYpLAZXx Elm8NWZFznb9wznY0/9LodGm+V0vmrqSLyUyr3JZxB26aypVi0ZYcC3CW 3um8TQ+4yFMUBNlspGoZmmvD9JEAGLKgMqRykt0p4wzyVbcDIrRScMAOJ QjGAwQ3ue+AK8wcOrz6QToRDM3ypZqG5J+VB7kZMJaeyfNyaX1MWzTY1V mM60y7Xc6SbyOcOt4ppCNXLG0eTIjAv9LnqWGMAAn7EXEypQdMOxtZWmo A==; X-CSE-ConnectionGUID: dJr8wl1wS1q2ROpxX4t9sg== X-CSE-MsgGUID: MpRVUxDOTBmf6l42hau10A== X-IronPort-AV: E=McAfee;i="6600,9927,11091"; a="25238383" X-IronPort-AV: E=Sophos;i="6.08,209,1712646000"; d="scan'208";a="25238383" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2024 07:21:12 -0700 X-CSE-ConnectionGUID: x7cBwlDkQniQF7ZWg474Ag== X-CSE-MsgGUID: 9l107NcSSH+Iotuu6PVigA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,209,1712646000"; d="scan'208";a="59808440" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa002.fm.intel.com with ESMTP; 02 Jun 2024 07:21:09 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id EF6921CB; Sun, 02 Jun 2024 17:21:07 +0300 (EEST) From: Andy Shevchenko To: Alex Deucher , Lewis Huang , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Harry Wentland , Leo Li , Rodrigo Siqueira , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Andy Shevchenko Subject: [PATCH v1 1/1] drm/amd/display: Fix too big frame size Date: Sun, 2 Jun 2024 17:21:03 +0300 Message-ID: <20240602142103.3259613-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Compilation fails on arm with: link_factory.c:743:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Fix the frame size by allocation one of the big structures. Signed-off-by: Andy Shevchenko --- .../gpu/drm/amd/display/dc/link/link_factory.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/link/link_factory.c b/drivers/gpu/drm/amd/display/dc/link/link_factory.c index cf22b8f28ba6..78f1b2102839 100644 --- a/drivers/gpu/drm/amd/display/dc/link/link_factory.c +++ b/drivers/gpu/drm/amd/display/dc/link/link_factory.c @@ -456,10 +456,10 @@ static bool construct_phy(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 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 }; + struct integrated_info *info; DC_LOGGER_INIT(dc_ctx->logger); @@ -672,12 +672,16 @@ static bool construct_phy(struct dc_link *link, } if (bios->integrated_info) - info = *bios->integrated_info; + info = kmemdup(bios->integrated_info, sizeof(*info), GFP_KERNEL); + else + info = kzalloc(sizeof(*info), GFP_KERNEL); + if (!info) + goto device_tag_fail; /* 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 && @@ -698,14 +702,15 @@ static bool construct_phy(struct dc_link *link, if (link->chip_caps & EXT_DISPLAY_PATH_CAPS__DP_FIXED_VS_EN) { link->bios_forced_drive_settings.VOLTAGE_SWING = - (info.ext_disp_conn_info.fixdpvoltageswing & 0x3); + info->ext_disp_conn_info.fixdpvoltageswing & 0x3; link->bios_forced_drive_settings.PRE_EMPHASIS = - ((info.ext_disp_conn_info.fixdpvoltageswing >> 2) & 0x3); + (info->ext_disp_conn_info.fixdpvoltageswing >> 2) & 0x3; } break; } } + kfree(info); if (bios->funcs->get_atom_dc_golden_table) bios->funcs->get_atom_dc_golden_table(bios); -- 2.43.0.rc1.1336.g36b5255a03ac