mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Harry Wentland <hwentlan@amd.com>
To: Nathan Chancellor <natechancellor@gmail.com>,
	"Wentland, Harry" <Harry.Wentland@amd.com>,
	"Li, Sun peng (Leo)" <Sunpeng.Li@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>,
	"Zhou, David(ChunMing)" <David1.Zhou@amd.com>
Cc: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH] drm/amd/display: Fix 32-bit divide error in wait_for_alt_mode
Date: Wed, 21 Aug 2019 16:40:15 +0000	[thread overview]
Message-ID: <f594d746-9eaf-76fe-d380-bb033cce06f8@amd.com> (raw)
In-Reply-To: <20190820235713.3429-1-natechancellor@gmail.com>

On 2019-08-20 7:57 p.m., Nathan Chancellor wrote:
> 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 <rdunlap@infradead.org>
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  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;
>  }
>  
> 

  parent reply	other threads:[~2019-08-21 16:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 23:57 Nathan Chancellor
2019-08-21  3:44 ` Randy Dunlap
2019-08-21 16:40 ` Harry Wentland [this message]
2019-08-22  2:12   ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f594d746-9eaf-76fe-d380-bb033cce06f8@amd.com \
    --to=hwentlan@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=David1.Zhou@amd.com \
    --cc=Harry.Wentland@amd.com \
    --cc=Sunpeng.Li@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®