AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next 0/3] drm: use clamp() instead of min(max())
@ 2024-08-30  1:22 Li Zetao
  2024-08-30  1:22 ` [PATCH -next 1/3] drm/amd: use clamp() in amdgpu_pll_get_fb_ref_div() Li Zetao
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Li Zetao @ 2024-08-30  1:22 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, Xinhui.Pan, airlied, daniel,
	kherbst, lyude, dakr, felix.kuehling, zhenguo.yin,
	srinivasan.shanmugam, shashank.sharma, Jesse.Zhang
  Cc: lizetao1, amd-gfx, dri-devel, nouveau

Hi,

When it needs to get the value of a certain interval [min, max],
it is easier to understand using clamp(x, min, max) instead of
min(max(x, min), max). What needs to be determined is that min
should be smaller than max.

Li Zetao (3):
  drm/amd: use clamp() in amdgpu_pll_get_fb_ref_div()
  drm/amdgpu: use clamp() in amdgpu_vm_adjust_size()
  drm/amdgpu: use clamp() in nvkm_volt_map()

 drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c         | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c          | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-09-02 17:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30  1:22 [PATCH -next 0/3] drm: use clamp() instead of min(max()) Li Zetao
2024-08-30  1:22 ` [PATCH -next 1/3] drm/amd: use clamp() in amdgpu_pll_get_fb_ref_div() Li Zetao
2024-08-30  1:22 ` [PATCH -next 2/3] drm/amdgpu: use clamp() in amdgpu_vm_adjust_size() Li Zetao
2024-08-30 14:19   ` Christian König
2024-09-02 17:49     ` Alex Deucher
2024-08-30  1:22 ` [PATCH -next 3/3] drm/amdgpu: use clamp() in nvkm_volt_map() Li Zetao
2024-08-30 13:45   ` Alex Deucher
2024-08-30 20:24   ` Lyude Paul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox