All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <hwentlan@amd.com>
To: mikita.lipski@amd.com, rdunlap@infradead.org,
	Alexander.Deucher@amd.com, amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu/display: Use u64 divide macro for round up division
Date: Mon, 13 Jan 2020 11:47:11 -0500	[thread overview]
Message-ID: <8c02b7c1-6116-f3b9-875c-95e4e43c6f52@amd.com> (raw)
In-Reply-To: <20200113132042.25717-1-mikita.lipski@amd.com>

On 2020-01-13 8:20 a.m., mikita.lipski@amd.com wrote:
> From: Mikita Lipski <mikita.lipski@amd.com>
> 
> [why]
> Fix compilation warnings on i386 architecture:
> undefined reference to `__udivdi3'
> [how]
> Switch DIV_ROUND_UP to DIV64_U64_ROUND_UP
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>

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

Harry

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index 52fb207393ef..96b391e4b3e7 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -534,7 +534,7 @@ static int kbps_to_peak_pbn(int kbps)
>  
>  	peak_kbps *= 1006;
>  	peak_kbps = div_u64(peak_kbps, 1000);
> -	return (int) DIV_ROUND_UP(peak_kbps * 64, (54 * 8 * 1000));
> +	return (int) DIV64_U64_ROUND_UP(peak_kbps * 64, (54 * 8 * 1000));
>  }
>  
>  static void set_dsc_configs_from_fairness_vars(struct dsc_mst_fairness_params *params,
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Harry Wentland <hwentlan@amd.com>
To: mikita.lipski@amd.com, rdunlap@infradead.org,
	Alexander.Deucher@amd.com, amd-gfx@lists.freedesktop.org
Cc: Harry.Wentland@amd.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu/display: Use u64 divide macro for round up division
Date: Mon, 13 Jan 2020 11:47:11 -0500	[thread overview]
Message-ID: <8c02b7c1-6116-f3b9-875c-95e4e43c6f52@amd.com> (raw)
In-Reply-To: <20200113132042.25717-1-mikita.lipski@amd.com>

On 2020-01-13 8:20 a.m., mikita.lipski@amd.com wrote:
> From: Mikita Lipski <mikita.lipski@amd.com>
> 
> [why]
> Fix compilation warnings on i386 architecture:
> undefined reference to `__udivdi3'
> [how]
> Switch DIV_ROUND_UP to DIV64_U64_ROUND_UP
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>

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

Harry

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index 52fb207393ef..96b391e4b3e7 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -534,7 +534,7 @@ static int kbps_to_peak_pbn(int kbps)
>  
>  	peak_kbps *= 1006;
>  	peak_kbps = div_u64(peak_kbps, 1000);
> -	return (int) DIV_ROUND_UP(peak_kbps * 64, (54 * 8 * 1000));
> +	return (int) DIV64_U64_ROUND_UP(peak_kbps * 64, (54 * 8 * 1000));
>  }
>  
>  static void set_dsc_configs_from_fairness_vars(struct dsc_mst_fairness_params *params,
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-01-13 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13 13:20 [PATCH] drm/amdgpu/display: Use u64 divide macro for round up division mikita.lipski
2020-01-13 13:20 ` mikita.lipski
2020-01-13 16:47 ` Harry Wentland [this message]
2020-01-13 16:47   ` Harry Wentland
2020-01-13 17:07 ` Ville Syrjälä
2020-01-13 17:07   ` Ville Syrjälä
2020-01-16  4:58   ` Randy Dunlap
2020-01-16  4:58     ` Randy Dunlap

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=8c02b7c1-6116-f3b9-875c-95e4e43c6f52@amd.com \
    --to=hwentlan@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mikita.lipski@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.