From patchwork Tue Aug 20 23:57:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11105799 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5F0C7912 for ; Wed, 21 Aug 2019 07:33:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 47E782332A for ; Wed, 21 Aug 2019 07:33:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47E782332A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none 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 53DBF6E925; Wed, 21 Aug 2019 07:33:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id AF27D6E8E7; Tue, 20 Aug 2019 23:57:25 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id b16so245632wrq.9; Tue, 20 Aug 2019 16:57:25 -0700 (PDT) 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=CFWxZfDSgaxpgiVvfnA+C89QxTNzwFuJSCG0oY5/8cU=; b=uKrWlJpK9qVZW6Ku+zufEfkDDqlLT4IxbRw/emRXxv8BFvygyjdlX1MYw0DExJ67GK 1q8+EOPKG6tAAbFyG2oMpmgmtOz+zf2X0OvqE92IWRsuuyg4dI18pNeAJUDF7xfH2CO3 dMbxm113eQActoxxoRoRdwNqdMyLYbwihIT6DCD0sKJeXszwTEO81FY5J6lo2ZarYXNz UjB31s1stsZBcoQaC8ligmhtyInnIqoIKN7+I3c+8dr/tu/mXTRnxkdZX5YDrHZ9Ym6H Ggf/pLfDfouqa7nKZiXZDr+assafhq1uUVnlLd03lzm2EuZkaH5rxrcADSbrxB1ddstL /+bw== X-Gm-Message-State: APjAAAV00rJ3YlzNSV/ljsrFD8VRw9ud//R9YtBsdTAppfcbfv0d/6gO Mcfz0Bum4xg81wTOx6sHZP8= X-Google-Smtp-Source: APXvYqxE8oZO9D0ftd/BMspekKYA6qAtN7ZH+yFAachqoYvAcGRekIGFBW94LXpj+pVcTZyDYfKrDw== X-Received: by 2002:a5d:42c1:: with SMTP id t1mr29487098wrr.344.1566345444030; Tue, 20 Aug 2019 16:57:24 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:222:2f1b::2]) by smtp.gmail.com with ESMTPSA id p4sm19534872wrs.6.2019.08.20.16.57.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 16:57:23 -0700 (PDT) From: Nathan Chancellor To: Harry Wentland , Leo Li , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "David (ChunMing) Zhou" Subject: [PATCH] drm/amd/display: Fix 32-bit divide error in wait_for_alt_mode Date: Tue, 20 Aug 2019 16:57:13 -0700 Message-Id: <20190820235713.3429-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Patchwork-Bot: notify X-Mailman-Approved-At: Wed, 21 Aug 2019 07:33:34 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CFWxZfDSgaxpgiVvfnA+C89QxTNzwFuJSCG0oY5/8cU=; b=NoOVkgQB5pI8+yvEo8zXInR2QIQgLE4GQTEHpmN0+49qM/bhxbTPmI6JlthW55qtBh E3iDLclKnfNYx+VB5kzXihL+ZzRe0bvdWb7UizyYbkXhJtzEyupEToQXeJC4TFV/oqcv 7sl1CDWiYNPBfc6eYG10HCfSe+E//wiQ3DbU9QfTpkhI3nE04oNx1lZMbUe0K776Puv+ wE+NtpDo83HoT5Dd8n31RL7zcAG3nYAyiLxMbkk5gnn7glp6ma3MS786qGrmi0f52voK +AGuxlDiaNzE6l0RWv9CHvvQXo/R6r/zlv0vxNwy/OTad4qrJ93D81/pxaHrLcObmp/V CaDA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nathan Chancellor , Randy Dunlap , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" When building arm32 allyesconfig: ld.lld: error: undefined symbol: __aeabi_uldivmod >>> referenced by dc_link.c >>> gpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archive drivers/built-in.a >>> referenced by dc_link.c >>> gpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archive drivers/built-in.a time_taken_in_ns is of type unsigned long long so we need to use div_u64 to avoid this error. Fixes: b5b1f4554904 ("drm/amd/display: Enable type C hotplug") Reported-by: Randy Dunlap Signed-off-by: Nathan Chancellor Acked-by: Randy Dunlap # build-tested Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index f2d78d7b089e..8634923b4444 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -721,7 +721,7 @@ bool wait_for_alt_mode(struct dc_link *link) time_taken_in_ns = dm_get_elapse_time_in_ns( link->ctx, finish_timestamp, enter_timestamp); DC_LOG_WARNING("Alt mode entered finished after %llu ms\n", - time_taken_in_ns / 1000000); + div_u64(time_taken_in_ns, 1000000)); return true; } @@ -730,7 +730,7 @@ bool wait_for_alt_mode(struct dc_link *link) time_taken_in_ns = dm_get_elapse_time_in_ns(link->ctx, finish_timestamp, enter_timestamp); DC_LOG_WARNING("Alt mode has timed out after %llu ms\n", - time_taken_in_ns / 1000000); + div_u64(time_taken_in_ns, 1000000)); return false; }