When it needs to get a value within a certain interval, using clamp()
makes the code easier to understand than min(max()).
Reviewed-by: Christian König
Signed-off-by: Li Zetao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
v1: https://lore.kernel.org/all/20240830012216.603623-1-lizet...@huawei.com/
Li Zetao (3):
drm/amd: use clamp() in amdgpu_pll_get_fb_ref_div()
drm/amdgpu: use clamp() in amdgpu_vm_adjust_size()
drm/nouveau/volt: use clamp() in nvkm_volt_map()
drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c
When it needs to get a value within a certain interval, using clamp()
makes the code easier to understand than min(max()).
Reviewed-by: Christian König
Signed-off-by: Li Zetao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
When it needs to get a value within a certain interval, using clamp()
makes the code easier to understand than min(max()).
Reviewed-by: Lyude Paul
Signed-off-by: Li Zetao
---
v1 -> v2: Change the patch title prefix to drm/nouveau/volt
v1: https://lore.kernel.org/all/20240830012216.60362
When it needs to get a value within a certain interval, using clamp()
makes the code easier to understand than min(max()).
Signed-off-by: Li Zetao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu
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
When it needs to get a value within a certain interval, using clamp()
makes the code easier to understand than min(max()).
Signed-off-by: Li Zetao
---
drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm
When it needs to get a value within a certain interval, using clamp()
makes the code easier to understand than min(max()).
Signed-off-by: Li Zetao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu
Use kvmemdup instead of kvmalloc() + memcpy() to simplify the code.
No functional change intended.
Signed-off-by: Li Zetao
---
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
b/drivers
Convert platform_get_resource_byname() + devm_ioremap_resource() to a
single call to devm_platform_ioremap_resource_byname(), as this is
exactly what this function does.
Signed-off-by: Li Zetao
---
drivers/gpu/drm/xlnx/zynqmp_disp.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions
modern_find_vqs(), all queues
will be selected and activated, but once queues are enabled
there is no way to go back except reset.
Fix it by reset virtio device on error handling path. After
init_vq() succeeded, all virtqueues should be stopped on error
handling path.
Signed-off-by: Li Ze
/20221128021005.232105-1-lizet...@huawei.com/
Li Zetao (5):
9p: Fix probe failed when modprobe 9pnet_virtio
virtio-mem: Fix probe failed when modprobe virtio_mem
virtio-input: Fix probe failed when modprobe virtio_input
virtio-blk: Fix probe failed when modprobe virtio_blk
drm/virtio: Fix
on error handling path. After
virtio_find_vqs() succeeded, all virtqueues should be stopped
on error handling path.
Fixes: dc5698e80cf7 ("Add virtio gpu driver.")
Signed-off-by: Li Zetao
---
v1 -> v2: patch is new.
drivers/gpu/drm/virtio/virtgpu_kms.c | 1 +
1 file changed, 1 inserti
on error handling path. After
virtio_find_single_vq() succeeded, all virtqueues should be
stopped on error handling path.
Fixes: ea52bf8eda98 ("9p/trans_virtio: reset virtio device on remove")
Signed-off-by: Li Zetao
Reviewed-by: Christian Schoenebeck
---
v1 -> v2: modify the descri
ath. After
virtio_mem_init_vq() succeeded, all virtqueues should be
stopped on error handling path.
Fixes: 5f1f79bbc9e2 ("virtio-mem: Paravirtualized memory hotplug")
Signed-off-by: Li Zetao
Reviewed-by: David Hildenbrand
---
v1 -> v2: modify the description error of the te
ng path.
Fixes: 271c865161c5 ("Add virtio-input driver.")
Signed-off-by: Li Zetao
---
v1 -> v2: modify the description error of the test case in step 3 and
modify the fixes tag information.
drivers/virtio/virtio_input.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/driv
16 matches
Mail list logo