[PATCH -next v3] drm/amd/amdgpu: Use kmemdup to simplify kmalloc and memcpy logic

2023-08-15 Thread Chen Jiahao
Using kmemdup() helper function rather than implementing it again with kmalloc() + memcpy(), which improves the code readability. Signed-off-by: Chen Jiahao --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers

[PATCH -next] drm/nouveau/disp: fix incompatible types in subtraction

2023-08-05 Thread Chen Jiahao
ess spaces) In struct nvif_push, "cur" is of type u32 *, whereas dmac->_push.mem.object.map.ptr is of type void __iomem *. Converting push->cur to u32 __iomem * to fix above sparse error. Fixes: 9cf06d6ef7fd ("drm/nouveau/disp: fix cast removes address space of expression warnin

[PATCH] drm: nouveau: fix nouveau_backlight compiling error

2021-06-14 Thread Chen Jiahao
->uses_dpcd) { |^~ The problem is solved by adding the CONFIG_DRM_NOUVEAU_BACKLIGHT dependency where struct nouveau_backlight is used. Signed-off-by: Chen Jiahao --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 1 file changed, 4 insertions(+) diff --git a/d