From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380657; b=LA85O70xV7I42sCpoNFy3YDMN0jprQvZtY16hiv5Zds+ZwlyQ6MVJoyJKKuwzNcT9WVr ykmXyJ+4MOQKL8ySOwvWhykXme73jsG9MqyezT6Rr0+TeyZRhC/hMkOd/YgpsoJjrzQ9P KaWVHqUPMJz5Sf/YMx5cRyIcWhWagf7mB8YRafrZKxdsj2b2cQsxNwSoiGSvXO5xKfzhA 7wpqTjiqNMtKcYoznh5XhLK/dJM9RZ8+jP/B5opuiGSckI01IyozXAYB26xb0HnoII5Rb WEEsSzbN5sPoE1g0+TJ+YTwRTbmIG3OnXIQWXgl26DZr37Rwoqk++8z9+6s4Ye2Rl8A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380657; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=LTTFI0wtEr2dtaEUeQk9oad/r16uvPlyKTQ4IGvxl6k=; b=Bjt37zM3D5xOnXWjAGuybl4qqxeiOUbHCcsD0QIOMRhK8kLGG9Fsb6ehv/JQLnZCDbw8 rt/iImatOf5Ihq5jxmbsBH/TdFqk7tk/aa7KHnesszkbUHbaddz2wIHepVl9Q7FP+RMvx 1FjLlIUcqqcjFUhJT6ettYJJxTASjIyfZPTAlALJ4UximsTDEiD/YoX4DxNqaKS3Z6iTd tVJbimgGpyovL8CEOOPXW/j6gJMDqYTmswrSCo/6+VlgopV+pk4FwbqhCVapEjhWkr/nF 7aFgSdHarwzukINEF5Q08gyriT1P3brx5cINyYl8wQxMD74FOThakdnB21WBclINW2g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b="WU56h9/t"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F0D2606A681; Fri, 4 Dec 2026 10:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=WU56h9/t Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9102C1F000CE; Fri, 4 Dec 2026 10:37:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380657; bh=LTTFI0wtEr2dtaEUeQk9oad/r16uvPlyKTQ4IGvxl6k=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WU56h9/tCMYYwE/dg5NnQhQbwpMd0xiU3Q7Yw6cw0ANvPJlGGY+CN3EuJpD/U3upg v7KnzwOlP/1EZivaGAGcFnFmrjFeuuqCfP1WNRQkpItUlisntCH5ZOL5U0Vk6dZDB0 hx7ACj2l0gL6i2UhmQxFkqdqsuIMa6r+aJEv1Y8o= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Linlin Yang , Mario Limonciello , Alex Deucher , Dillon Varone , Ivan Lipski , Alex Hung Subject: [PATCH 7.3 370/742] drm/amd/display: Fix __udivdi3 link error in DCN6 DML2 Date: Fri, 4 Dec 2026 19:03:54 +0900 Message-ID: <20261204100644.916866399@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ivan Lipski commit d489c42c9bd542b3fbbda97b97dc9a0b07010eb3 upstream. [Why&How] dchub_v2_get_sop_total_available_bandwidth_KBps() and dchub_v2_is_qos_bandwidth_supported_by_sop() divide 64-bit integers by 100. On 32-bit builds this emits a call to __udivdi3, which the kernel does not link. Use double-cast division instead. Fixes: 7f7d7ea1fa51 ("drm/amd/display: Add new sources for DCN6") Cc: Linlin Yang Cc: Mario Limonciello Cc: Alex Deucher Cc: Dillon Varone Signed-off-by: Ivan Lipski Reviewed-by: Alex Hung Signed-off-by: Alex Deucher (cherry picked from commit 83e7c8cb33363f2a2f893758c630f9a805ac4573) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v2.h | 32 +++++----- drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v3.h | 2 2 files changed, 17 insertions(+), 17 deletions(-) --- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v2.h +++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v2.h @@ -58,27 +58,27 @@ static inline void dchub_v2_get_sop_tota { const struct utm_soc_operating_point *sop = &model->sops[sop_index]; const struct utm_qos_model_socbb *socbb = &model->socbb; - uint64_t dram_available_bandwidth_KBps_nominal; - uint64_t fabric_available_bandwidth_KBps_nominal; - uint64_t dram_available_bandwidth_KBps_urgent; - uint64_t fabric_available_bandwidth_KBps_urgent; + double dram_available_bandwidth_KBps_nominal; + double fabric_available_bandwidth_KBps_nominal; + double dram_available_bandwidth_KBps_urgent; + double fabric_available_bandwidth_KBps_urgent; - dram_available_bandwidth_KBps_nominal = (uint64_t) sop->uclk_khz + dram_available_bandwidth_KBps_nominal = (double) sop->uclk_khz * socbb->dram_channel_count * socbb->dram_channel_width_bytes * socbb->dram_transactions_per_clock - * socbb->dram_derate_percent_nominal / 100; - dram_available_bandwidth_KBps_urgent = (uint64_t) sop->uclk_khz + * socbb->dram_derate_percent_nominal / 100.0; + dram_available_bandwidth_KBps_urgent = (double) sop->uclk_khz * socbb->dram_channel_count * socbb->dram_channel_width_bytes * socbb->dram_transactions_per_clock - * socbb->dram_derate_percent_urgent / 100; - fabric_available_bandwidth_KBps_nominal = (uint64_t) sop->fclk_khz + * socbb->dram_derate_percent_urgent / 100.0; + fabric_available_bandwidth_KBps_nominal = (double) sop->fclk_khz * socbb->fabric_datapath_to_dcn_data_return_bytes - * socbb->fabric_derate_percent_nominal / 100; - fabric_available_bandwidth_KBps_urgent = (uint64_t) sop->fclk_khz + * socbb->fabric_derate_percent_nominal / 100.0; + fabric_available_bandwidth_KBps_urgent = (double) sop->fclk_khz * socbb->fabric_datapath_to_dcn_data_return_bytes - * socbb->fabric_derate_percent_urgent / 100; + * socbb->fabric_derate_percent_urgent / 100.0; total_available_bandwidth->nominal_bandwidth_KBps = dram_available_bandwidth_KBps_nominal < fabric_available_bandwidth_KBps_nominal ? @@ -99,8 +99,8 @@ static inline bool dchub_v2_is_qos_bandw { struct utm_qos_model_dchub_memory_path_bandwidth_v2 available_bandwidth = {0}; const struct utm_qos_model_dchub_v2 *dchub = model->dchub_v2; - uint64_t nominal_available_bandwidth_KBps; - uint64_t urgent_available_bandwidth_KBps; + double nominal_available_bandwidth_KBps; + double urgent_available_bandwidth_KBps; if (nominal_utm_budget_percent > dchub->max_nominal_utm_budget_percent || nominal_utm_budget_percent < dchub->min_nominal_utm_budget_percent || @@ -112,9 +112,9 @@ static inline bool dchub_v2_is_qos_bandw nominal_available_bandwidth_KBps = available_bandwidth.nominal_bandwidth_KBps; urgent_available_bandwidth_KBps = available_bandwidth.urgent_bandwidth_KBps; - if ((nominal_available_bandwidth_KBps * nominal_utm_budget_percent / 100) < qos_bandwidth->nominal_bandwidth_KBps) + if ((nominal_available_bandwidth_KBps * nominal_utm_budget_percent / 100.0) < qos_bandwidth->nominal_bandwidth_KBps) return false; - else if ((urgent_available_bandwidth_KBps * urgent_utm_budget_percent / 100) < qos_bandwidth->urgent_bandwidth_KBps) + else if ((urgent_available_bandwidth_KBps * urgent_utm_budget_percent / 100.0) < qos_bandwidth->urgent_bandwidth_KBps) return false; else return true; --- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v3.h +++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/inc/bounding_boxes/utm_qos_model_dchub_v3.h @@ -50,4 +50,4 @@ struct utm_qos_model_dchub_v3 { sops[UTM_QOS_MODEL_V3_MAX_LOAD_LEVEL_COUNT][UTM_QOS_MODEL_V3_MAX_SOP_COUNT]; }; -#endif /* #ifndef UTM_QOS_MODEL_DCHUB_V3_H */ \ No newline at end of file +#endif /* #ifndef UTM_QOS_MODEL_DCHUB_V3_H */