Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2586284lqb; Tue, 28 May 2024 04:52:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXs8iFF0bbnLcUUEqXCxp75iTIYPQ2xM1qZisOwBsx3EnmQV5q9fFTJoJSZ4VCsxidlxUMYMnxLePofeT1X4hSCg3qbDnAfOR1mNYzccw== X-Google-Smtp-Source: AGHT+IHiBXv3HATr7r/SoXqbaWnyw2zOI+CY2XNE+tm5rVlU+SXuFtHF2ma96MnJM4ACtq8N0jBs X-Received: by 2002:a50:bb0b:0:b0:574:f26f:cb63 with SMTP id 4fb4d7f45d1cf-578519a2a49mr7921193a12.27.1716897136104; Tue, 28 May 2024 04:52:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716897136; cv=pass; d=google.com; s=arc-20160816; b=GHIfmziQ+DcOpBUXZ1aQoGHStaZJsabVPOFCyOh3BQocn9P0cRNJu5envaz2ng/4m1 sL9dDrym5sgoF7qawpBvLfdD+maHnXTuZyzVBWaU2kWN/qWeZWLzphY0gJVk44nrzQsU EtzXBK1F6yQA9iEVUlhAwB3T2Ui3zfyoREOpenN2yRnjMElYLtZ6Ut3Mh+W8EzotEvTR HR1qx1TOf2+ELSr+deopF8oMbfnG5MgJjlt88tc/2KxWgjaDAHc+qrMCExj+nZqqK0oN l7wygIGPl/k7CDj/5cCYgoMi9/dMA1S/2pkvOWGLuJ/T7xtJKEmC6wiuvBcLRnoOTpsq w+2g== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=w6Yi3NmE2y8mzhsEJXG52psnKkuGUubcFvaQLccnhgc=; fh=liPM5M1z8D5ymvI7FxMq9NhSUfB2MwK6ZMD57AfAkjk=; b=TVtVYI8dFi//UTpZo5b/66Dj+8STNYdxWlJ+ohXFLs58O7gnfVuxF/GIUTWHDlhw1U yITm2gPQFBAAPC00tecbnRFc7dB3vDIVeBbrZdFfSuqAKG7l6SCvXGBHdgTy+OIh8t6V akXPznGjvx+8ilR9mXGaDU4cKHe/OKOiypViw/sX7FuEJkk1Ud4olnk5guTyEmr52Z+U ggzPVpQryh7DZ288f74ZSh8vwYpMWYvnFz8uo+dvYqUXTPt+Y+v3wFboikzwq9iNNyNj xVmhSBE+zuMtKXEP4KaL2n4eGYk2VlUzfZNXCeRpR7BnturtPfbLs5ycpyHtnlvN577z pAvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AUNRaBey; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-192223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192223-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-579c9424b26si2972920a12.28.2024.05.28.04.52.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 04:52:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AUNRaBey; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-192223-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192223-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id D37AE1F24093 for ; Tue, 28 May 2024 11:52:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C11DD16C85B; Tue, 28 May 2024 11:52:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AUNRaBey" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 EF40A16ABC1 for ; Tue, 28 May 2024 11:52:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716897126; cv=none; b=WvB42MZie09y/bOV4mPXBgEezxe1QTSZKqv27JoeQaq9DHcRJ3IiSCq4lhh78DaWEJkIZNLwl1CjcEPtyJDCbsRG4fQnbTumU2IBm7Z5QBwuB/BY/aTHa5JvVLEtNebglXHIiUdyq/CdklH1FIJNVZp3ECiLqsejEe55R4bVhOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716897126; c=relaxed/simple; bh=TcxjokVtWXmJOGhnJW9abbtWL0y6hS0Uwog6v9HcmCo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o6tlIjSZd9rFlwDjd9FWMC7ZtSxr6LbQE3YB09bBKFrXwWpMCbU2etrLFsF3Odd1ZXrhSjZ2/zZvejB1Cx3JCz3drnEUEmqLhAXelIR2dH5GtxZzZUby3xQh04djlCiBpTa6GDWKnp6GdwRZ7xWh804RvpdDskpB5iWfK3ql8JM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AUNRaBey; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F038C32782; Tue, 28 May 2024 11:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716897125; bh=TcxjokVtWXmJOGhnJW9abbtWL0y6hS0Uwog6v9HcmCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AUNRaBeyx6rMagKw2XMqLf9UxVbVUCTU2rz+d4rU4OCqWKbmh5yZKOeCTs6WLWIE0 DZTfDaO43bdToSAa9iTrSUiL8kN6YtVzvgiRhYsxN5MTAEdf/0xSLI3xh6N6sDT9g6 HGUmkVieB7F5nkqMDWqn5t82+8xOjPQJ1oaexjat73SuPNkBc+4Yh/jZwZ1u3xeDxo ZWInPMfjVS6gn1zkEmqaXBrNQLCu2aWuHvqzTHBYQnwRo45PfdxW86GYzN0tNMqvqN q77+16Lt9PwE7NVgG0TGTg0/9+IgY6NjTaey2/yGcr2KpcRjlIeXqlz5B+07KCe7PW 8XiA2fM2c7dmQ== From: Arnd Bergmann To: Harry Wentland , Leo Li , Rodrigo Siqueira Cc: Arnd Bergmann , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , Roman Li , Mounika Adhuri , Martin Leung , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] [RESEND] drm/amd/display: fix graphics_object_id size Date: Tue, 28 May 2024 13:51:19 +0200 Message-Id: <20240528115146.2870032-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240528115146.2870032-1-arnd@kernel.org> References: <20240528115146.2870032-1-arnd@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann The graphics_object_id structure is meant to fit into 32 bits, as it's passed by value in and out of functions. A recent change increased the size to 128 bits, so it's now always passed by reference, which is clearly not intended and ends up producing a compile-time warning: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c: In function 'construct_phy': drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:743:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Add back the bitfields to revert to the original size, while keeping the 'enum' type change. fec85f995a4b ("drm/amd/display: Fix compiler redefinition warnings for certain configs") Signed-off-by: Arnd Bergmann --- Originally sent as https://lore.kernel.org/all/20240418083421.3956461-2-arnd@kernel.org/ --- drivers/gpu/drm/amd/display/include/grph_object_id.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/include/grph_object_id.h b/drivers/gpu/drm/amd/display/include/grph_object_id.h index 08ee0350b31f..54e33062b3c0 100644 --- a/drivers/gpu/drm/amd/display/include/grph_object_id.h +++ b/drivers/gpu/drm/amd/display/include/grph_object_id.h @@ -226,8 +226,8 @@ enum dp_alt_mode { struct graphics_object_id { uint32_t id:8; - enum object_enum_id enum_id; - enum object_type type; + enum object_enum_id enum_id :4; + enum object_type type :4; uint32_t reserved:16; /* for padding. total size should be u32 */ }; -- 2.39.2