[PATCH] drm/rockchip: Fix an error handling path

2021-05-01 Thread Christophe JAILLET
'ret' is know to be 0 a this point. Checking the return value of 'phy_init()' and 'phy_set_mode()' was intended instead. So add the missing assignments. Fixes: cca1705c3d89 ("drm/rockchip: lvds: Add PX30 support") Signed-off-by: Christophe JAILLET ---

[PATCH] drm/panel: leadtek: Fix an error handling path

2021-05-01 Thread Christophe JAILLET
'ret' is know to be >=0 a this point. Checking the return value of 'mipi_dsi_dcs_enter_sleep_mode()' was intended instead. So add the missing assignment. Fixes: 6ea4383b9214 ("drm/panel: add panel driver for Leadtek LTK050H3146W") Signed-off-by: Christophe JA

[PATCH] drm/panel: xinpeng: Fix an error handling path

2021-05-01 Thread Christophe JAILLET
'ret' is know to be >=0 a this point. Checking the return value of 'mipi_dsi_dcs_enter_sleep_mode()' was intended instead. So add the missing assignment. Fixes: d1479d028af2 ("drm/panel: add panel driver for Xinpeng XPP055C272 panels") Signed-off-by: Christo

[PATCH] drm/amd/pm: Fix a memory leak in an error handling path in 'vangogh_tables_init()'

2021-08-05 Thread Christophe JAILLET
'watermarks_table' must be freed instead 'clocks_table', because 'clocks_table' is known to be NULL at this point and 'watermarks_table' is never freed if the last kzalloc fails. Fixes: c98ee89736b8 ("drm/amd/pm: add the fine grain tuning function for

[PATCH] drm/msm/dsi: Fix some reference counted resource leaks

2021-08-06 Thread Christophe JAILLET
e the assignment to 'msm_dsi->phy_dev' a few lines above and remove the unneeded 'get_device()' to solve both issues. Fixes: ec31abf6684e ("drm/msm/dsi: Separate PHY to another platform device") Signed-off-by: Christophe JAILLET --- Review carefully, management of

Re: [PATCH 3/8] drm/ingenic: Use standard drm_atomic_helper_commit_tail

2021-08-08 Thread Christophe JAILLET
Le 08/08/2021 à 15:45, Paul Cercueil a écrit : By making the CRTC's .vblank_enable() function return an error when it is known that the hardware won't deliver a VBLANK, we can drop the ingenic_drm_atomic_helper_commit_tail() function and use the standard drm_atomic_helper_commit_tail() function i

Re: [PATCH 3/8] drm/ingenic: Use standard drm_atomic_helper_commit_tail

2021-08-08 Thread Christophe JAILLET
Le 08/08/2021 à 22:09, Paul Cercueil a écrit : Hi Christophe, Le dim., août 8 2021 at 21:50:04 +0200, Christophe JAILLET a écrit : Le 08/08/2021 à 15:45, Paul Cercueil a écrit : By making the CRTC's .vblank_enable() function return an error when it is known that the hardware won't

Re: [PATCH linux-next] drm: drop unneeded assignment in the fx_v6_0_enable_mgcg()

2021-08-20 Thread Christophe JAILLET
Hi, Le 21/08/2021 à 04:08, CGEL a écrit : From: Luo penghao The first assignment is not used. In order to keep the code style consistency of the whole file, the first 'data' assignment should be deleted. The clang_analyzer complains as follows: drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c:2608:10:

[PATCH] media: switch from 'pci_' to 'dma_' API

2021-08-22 Thread Christophe JAILLET
gt;dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwi

[PATCH] drm/i915: switch from 'pci_' to 'dma_' API

2021-08-22 Thread Christophe JAILLET
gt;dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellw

[PATCH] drm/amdgpu: switch from 'pci_' to 'dma_' API

2021-08-22 Thread Christophe JAILLET
gt;dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellw

[PATCH] drm/radeon: switch from 'pci_' to 'dma_' API

2021-08-22 Thread Christophe JAILLET
gt;dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellw

[PATCH] drm/r128: switch from 'pci_' to 'dma_' API

2021-08-22 Thread Christophe JAILLET
gt;dev, e2) @@ expression e1, e2; @@ -pci_set_dma_mask(e1, e2) +dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellw

[PATCH] parisc/parport_gsc: switch from 'pci_' to 'dma_' API

2021-08-23 Thread Christophe JAILLET
The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below. @@ expression e1, e2, e3, e4; @@ -pci_free_consistent(e1, e2, e3, e4) +dma_free_coherent(&e1->dev, e2, e3, e4) Signed-off-by: Christophe JAILLET --- If

Re: [PATCH] parisc/parport_gsc: switch from 'pci_' to 'dma_' API

2021-08-24 Thread Christophe JAILLET
Le 24/08/2021 à 12:24, Robin Murphy a écrit : On 2021-08-23 22:30, Christophe JAILLET wrote: The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below. @@ expression e1, e2, e3, e4; @@ -    pci_free_consistent(e1, e2, e3, e4

Re: [PATCH][next] drm/amdgpu: Add missing BOOTUP_DEFAULT to profile_name[]

2021-01-16 Thread Christophe JAILLET
Le 15/01/2021 à 11:10, Colin Ian King a écrit : On 15/01/2021 10:07, Christophe JAILLET wrote: Le 15/01/2021 à 10:37, Colin Ian King a écrit : On 12/01/2021 10:07, Dan Carpenter wrote: On Mon, Jan 11, 2021 at 11:46:38AM +, Colin King wrote: From: Colin Ian King A recent change added a

Re: [PATCH][next] drm/amdgpu: Add missing BOOTUP_DEFAULT to profile_name[]

2021-01-16 Thread Christophe JAILLET
Le 15/01/2021 à 10:37, Colin Ian King a écrit : On 12/01/2021 10:07, Dan Carpenter wrote: On Mon, Jan 11, 2021 at 11:46:38AM +, Colin King wrote: From: Colin Ian King A recent change added a new BOOTUP_DEFAULT power profile mode to the PP_SMC_POWER_PROFILE enum but omitted updating the co

[PATCH] video: fbdev: imxfb: Fix an error message

2021-05-07 Thread Christophe JAILLET
'ret' is known to be 0 here. No error code is available, so just remove it from the error message. Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct pointer deref") Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/imxfb.c | 2 +- 1 file

Re: [PATCH] video: fbdev: imxfb: Fix an error message

2021-05-07 Thread Christophe JAILLET
Le 07/05/2021 à 07:05, Uwe Kleine-König a écrit : Hello Christophe, On Thu, May 06, 2021 at 08:57:05PM +0200, Christophe JAILLET wrote: 'ret' is known to be 0 here. No error code is available, so just remove it from the error message. Fixes: 72330b0eeefc ("i.MX Framebuffer: U

[PATCH] video: fbdev: lcd_mipid: Fix a memory leak in an error handling path

2021-05-08 Thread Christophe JAILLET
for MIPI-DCS compatible LCDs") Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/omap/lcd_mipid.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c index a75ae0c9b14c..b4b93ff4b41a

[PATCH] drm/virtgpu: Fix a resource leak in an error handling path

2021-05-16 Thread Christophe JAILLET
If an error occurs after calling 'virtio_gpu_init()', 'virtio_gpu_deinit()' must be called as already done in the remove function. Fixes: d516e75c71c9 ("drm/virtio: Drop deprecated load/unload initialization") Signed-off-by: Christophe JAILLET --- drivers/gp

[PATCH] drm/kmb: Fix an error handling path

2021-05-19 Thread Christophe JAILLET
evice_init()' fails. Goto the error handling path instead to free some resources. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/kmb/kmb_drv.c | 8 1 file changed, 4 insertions(+), 4 deletions

[PATCH 2/2] video: fbdev: Fix a dev_err format specifier

2020-12-11 Thread Christophe JAILLET
'phys_addr' is of type 'dma_addr_t'. Use '%pad' instead of '%x' to print this variable in an error message. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/ep93xx-fb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/d

[PATCH 1/2] video: fbdev: Use framebuffer_release instead of kfree to free a frame buffer

2020-12-11 Thread Christophe JAILLET
Use 'framebuffer_release()' instead of 'kfree()' to undo a 'framebuffer_alloc()' call, both in the error handling path of the probe function and in remove function. Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/ep93xx-fb.c | 4 ++-- 1 file changed

[PATCH] video: of: display_timing: Remove a redundant zeroing of memory

2022-03-22 Thread Christophe JAILLET
of_parse_display_timing() already call memset(0) on its 2nd argument, so there is no need to clear it explicitly before calling this function. Use kmalloc() instead of kzalloc() to save a few cycles. Signed-off-by: Christophe JAILLET --- drivers/video/of_display_timing.c | 2 +- 1 file changed

[PATCH] drm: Remove redundant 'flush_workqueue()' calls

2021-10-10 Thread Christophe JAILLET
e(E); Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 - drivers/gpu/drm/msm/dsi/dsi_host.c| 1 - drivers/gpu/drm/msm/edp/edp_ctrl.c| 1 - drivers/gpu/drm/msm/hdmi/hdmi.c | 4 +--- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 4 +--- drivers/gpu/drm/vmwgfx/ttm

Re: [PATCH] drm/i915: Use direction definition DMA_BIDIRECTIONAL instead of PCI_DMA_BIDIRECTIONAL

2021-09-30 Thread Christophe JAILLET
Le 30/09/2021 à 16:21, Daniel Vetter a écrit : On Sat, Sep 25, 2021 at 08:46:12PM +0800, Cai Huoqing wrote: Replace direction definition PCI_DMA_BIDIRECTIONAL with DMA_BIDIRECTIONAL, because it helps to enhance readability and avoid possible inconsistency. Signed-off-by: Cai Huoqing Applied

[PATCH] drm/bridge: lt9611: Fix an error handling path in lt9611_probe()

2022-01-29 Thread Christophe JAILLET
If lt9611_audio_init() fails, some resources still need to be released before returning an error code. Add the missing goto the error handling path. Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/brid

[PATCH 1/2] gpu: host1x: Fix an error handling path in 'host1x_probe()'

2021-11-07 Thread Christophe JAILLET
: Implement buffer object cache") Signed-off-by: Christophe JAILLET --- Untested. I hope that moving host1x_bo_cache_init() is just fine. --- drivers/gpu/host1x/dev.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/h

[PATCH 2/2] gpu: host1x: Fix a memory leak in 'host1x_remove()'

2021-11-07 Thread Christophe JAILLET
Add a missing 'host1x_channel_list_free()' call in the remove function, as already done in the error handling path of the probe function. Fixes: 8474b02531c4 ("gpu: host1x: Refactor channel allocation code") Signed-off-by: Christophe JAILLET --- drivers/gpu/host1x/dev.c | 1

Re: [PATCH linux-next] drm/i915/request: Remove unused variables

2021-11-21 Thread Christophe JAILLET
Le 21/11/2021 à 11:13, cgel@gmail.com a écrit : From: yong yiran The clang_analyzer complains as follows: drivers/gpu/drm/i915/i915_request.c:2119:2 warning: Value stored to 'x' is never read Reported-by: Zeal Robot Signed-off-by: yong yiran --- drivers/gpu/drm/i915/i915_request.c | 3

[PATCH 1/2] drm/amdkfd: Use bitmap_zalloc() when applicable

2021-11-21 Thread Christophe JAILLET
'doorbell_bitmap' is a bitmap. So use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid some open-coded arithmetic in allocator arguments. Also change the corresponding 'kfree()' into 'bitmap_free()' to keep consistency. Signed-off-by:

[PATCH 2/2] drm/amdkfd: Slighly optimize 'init_doorbell_bitmap()'

2021-11-21 Thread Christophe JAILLET
The 'doorbell_bitmap' bitmap has just been allocated. So we can use the non-atomic '__set_bit()' function to save a few cycles as no concurrent access can happen. Signed-off-by: Christophe JAILLET --- bitmap_set() could certainly also be use, but range checking would be tric

Re: [PATCH 2/2] drm/amdkfd: Slighly optimize 'init_doorbell_bitmap()'

2021-11-22 Thread Christophe JAILLET
Le 22/11/2021 à 22:44, Felix Kuehling a écrit : Am 2021-11-21 um 12:41 p.m. schrieb Christophe JAILLET: The 'doorbell_bitmap' bitmap has just been allocated. So we can use the non-atomic '__set_bit()' function to save a few cycles as no concurrent access can happen. Signe

[PATCH v2 1/2] drm/amdkfd: Use bitmap_zalloc() when applicable

2021-11-23 Thread Christophe JAILLET
to keep consistency. Reviewed-by: Felix Kuehling Signed-off-by: Christophe JAILLET --- v1 --> v2: Compile tested :) Add a missing ',' (kernel test robot) Add kfd_process_queue_manager.c (Felix Kuehling) --- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 7

[PATCH v2 2/2] drm/amdkfd: Slighly optimize 'init_doorbell_bitmap()'

2021-11-23 Thread Christophe JAILLET
The 'doorbell_bitmap' bitmap has just been allocated. So we can use the non-atomic '__set_bit()' function to save a few cycles as no concurrent access can happen. Reviewed-by: Felix Kuehling Signed-off-by: Christophe JAILLET --- bitmap_set() could certainly also be use, but

[PATCH 1/2] drm/amdkfd: Use bitmap_zalloc() when applicable

2021-11-28 Thread Christophe JAILLET
'kfd->gtt_sa_bitmap' is a bitmap. So use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid some open-coded arithmetic in allocator arguments. Also change the corresponding 'kfree()' into 'bitmap_free()' to keep consistency. --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 12 +++

[PATCH 2/2] drm/amdkfd: Use non-atomic bitmap functions when possible

2021-11-28 Thread Christophe JAILLET
27; loops. These functions can work on several bits at a time Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kf

[PATCH] drm: Remove some useless memset

2021-12-09 Thread Christophe JAILLET
'bufs' is an array embedded in an structure (struct drm_device_dma) which is kzalloc just a few lines above. So there is no need to explicitly memset each element on the array. It is already cleared. Remove the useless memset. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/drm

[PATCH] drm/omapdrm: Remove a useless bitmap_clear() call

2021-12-15 Thread Christophe JAILLET
The 'tcm->bitmap' is kzalloc'ed just a few lines above, at the same time as 'tcm'. There is no need to initialize it another time here. Remove the useless bitmap_clear() call. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/omapdrm/tcm-sita.c | 1 - 1 file

[PATCH] drm/msm/dp: Simplify dp_debug_init() and dp_debug_get()

2021-12-22 Thread Christophe JAILLET
dp_debug_init() always returns 0. So, make it a void function and simplify the only caller accordingly. While at it remove a useless 'rc' initialization in dp_debug_get() Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/msm/dp/dp_debug.c | 13 +++-- 1 file changed, 3

[PATCH] drm/msm/dp: Fix a potential double free in an error handling path

2021-12-26 Thread Christophe JAILLET
'dp_bridge' is devm_alloc'ed, so there is no need to free it explicitly or there will be a double free(). Fixes: 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable and disable") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/msm/dp/dp_drm.c

[PATCH] drm/armada: Fix a potential double free in an error handling path

2021-12-26 Thread Christophe JAILLET
'priv' is a managed resource, so there is no need to free it explicitly or there will be a double free(). Fixes: 90ad200b4cbc ("drm/armada: Use devm_drm_dev_alloc") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/armada/armada_drv.c | 1 - 1 file changed, 1 delet

[PATCH] drm/bridge: sn65dsi83: Fix an error handling path in sn65dsi83_probe()

2021-12-28 Thread Christophe JAILLET
sn65dsi83_parse_dt() takes a reference on 'ctx->host_node' that must be released in the error handling path of the probe. This is only done in the remove function up to now. Fixes: ceb515ba29ba ("drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver") Signed-off

[PATCH v2] drm/bridge: sn65dsi83: Fix an error handling path in sn65dsi83_probe()

2021-12-29 Thread Christophe JAILLET
er") Signed-off-by: Christophe JAILLET --- v2: add error handling in sn65dsi83_parse_dt() [Laurent Pinchart] --- drivers/gpu/drm/bridge/ti-sn65dsi83.c | 32 +++ 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/dr

Re: [PATCH] drm/msm/dp: Fix a potential double free in an error handling path

2022-01-05 Thread Christophe JAILLET
Le 05/01/2022 à 21:09, Stephen Boyd a écrit : Quoting Christophe JAILLET (2021-12-26 07:14:05) 'dp_bridge' is devm_alloc'ed, so there is no need to free it explicitly or there will be a double free(). Fixes: 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display

Re: [PATCH v2 1/3] drm/bridge: anx7625: Convert to use devm_kzalloc

2022-01-13 Thread Christophe JAILLET
Le 13/01/2022 à 08:31, Hsin-Yi Wang a écrit : Use devm_kzalloc instead of kzalloc and drop kfree(). Let the memory handled by driver detach. Signed-off-by: Hsin-Yi Wang Reviewed-by: Xin Ji --- drivers/gpu/drm/bridge/analogix/anx7625.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deleti

[RFC] Staging: fbtft: Typo in

2019-07-22 Thread Christophe JAILLET
dc8544 should be pcd8544. (d and c switched) As I don't know the implication of such a change, I prefer to first report the potential issue, before proposing a patch for it. Any feedback back appreciated. Best regards, Christophe JAILLET _

[PATCH] backlight: lms283gf05: Fix a typo in the description passed to 'devm_gpio_request_one()'

2019-07-24 Thread Christophe JAILLET
The description passed to 'devm_gpio_request_one()' should be related to LMS283GF05, not LMS285GF05. Signed-off-by: Christophe JAILLET --- drivers/video/backlight/lms283gf05.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/lms283gf05.c

[PATCH] Staging: fbtft: Fix some typo. pdc8544 --> pcd8544

2019-07-25 Thread Christophe JAILLET
The driver is related to 'pcd8544'. However, 2 strings are about pdc8544 (c and d switched) Fix it. Signed-off-by: Christophe JAILLET --- This patch is only theorical. It is based on the fact that a part of the filename (i.e. pcd8544) looks misspelled in the file itself. I don&

Re: [PATCH] drm/connector: Remove usage of the deprecated ida_simple_xxx API

2022-06-16 Thread Christophe JAILLET
Le 16/06/2022 à 07:18, Bo Liu a écrit : Use ida_alloc_xxx()/ida_free() instead of ida_simple_get()/ida_simple_remove(). The latter is deprecated and more verbose. Signed-off-by: Bo Liu --- drivers/gpu/drm/drm_connector.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) dif

[PATCH] drm/bochs: Fix some error handling paths in bochs_pci_probe()

2022-06-18 Thread Christophe JAILLET
bochs_hw_init() call. Signed-off-by: Christophe JAILLET --- I've not been able to find a Fixes: tag because of code re-arrangement done in 796c3e35ac16. --- drivers/gpu/drm/tiny/bochs.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tiny/boch

[PATCH] drm/rockchip: Fix an error handling path rockchip_dp_probe()

2022-06-18 Thread Christophe JAILLET
Should component_add() fail, we should call analogix_dp_remove() in the error handling path, as already done in the remove function. Fixes: 152cce0006ab ("drm/bridge: analogix_dp: Split bind() into probe() and real bind()") Signed-off-by: Christophe JAILLET --- drivers/gpu/dr

[PATCH] backlight: pwm_bl: Avoid open coded arithmetic in memory allocation

2022-02-04 Thread Christophe JAILLET
kmalloc_array()/kcalloc() should be used to avoid potential overflow when a multiplication is needed to compute the size of the requested memory. So turn a kzalloc()+explicit size computation into an equivalent kcalloc(). Signed-off-by: Christophe JAILLET --- drivers/video/backlight/pwm_bl.c

[PATCH] drm/radeon: Avoid open coded arithmetic in memory allocation

2022-02-05 Thread Christophe JAILLET
kmalloc_array()/kcalloc() should be used to avoid potential overflow when a multiplication is needed to compute the size of the requested memory. So turn a kzalloc()+explicit size computation into an equivalent kcalloc(). Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/radeon

[PATCH] drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name()

2022-02-08 Thread Christophe JAILLET
ixes: db1a0ae21461 ("drm/nouveau/bl: Assign different names to interfaces") Signed-off-by: Christophe JAILLET --- This patch is more a clean-up than a fix. It is unlikely than >= 100 backlight devices will be registered, and the over allocation would occur even much later when the und

[PATCH] backlight: backlight: Slighly simplify devm_of_find_backlight()

2022-02-12 Thread Christophe JAILLET
NULL when this function is called. Signed-off-by: Christophe JAILLET --- drivers/video/backlight/backlight.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 4ae6fae94ac2..b788ff3d0f45 10

[PATCH] tda9950: Slightly simplify tda9950_devm_glue_init()

2022-02-12 Thread Christophe JAILLET
Use devm_add_action_or_reset() instead of hand writing it. This is more straightforward and saves a few lines of code. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/i2c/tda9950.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda9950.c b

Re: [PATCH 1/2] drm/amdkfd: Use bitmap_zalloc() when applicable

2022-04-26 Thread Christophe JAILLET
, No problem for me if you can add it. Thanks. But if you prefer a v2, it is also fine for me. BTW sorry for missing the SoB tag. This definitively means that I forgot the checkpatch.pl step for this patch, which is bad. CJ Thanks,   Felix Am 2021-11-28 um 11:45 schrieb Christophe JAILLET:

Re: [PATCH] drm/hyperv: Fix an error handling path in hyperv_vmbus_probe()

2022-08-15 Thread Christophe JAILLET
Le 15/08/2022 à 17:56, Wei Liu a écrit : All that said, the fix looks good, so Reviewed-by: Michael Kelley I made the two changes listed above and applied this patch to hyperv-fixes. Thanks a lot, that saves me a v2. CJ Thanks, Wei.

Re: [PATCH v10 14/21] drm/mediatek: dpi: Add dpintf support

2022-06-01 Thread Christophe JAILLET
Le 23/05/2022 à 12:47, Guillaume Ranquet a écrit : dpintf is the displayport interface hardware unit. This unit is similar to dpi and can reuse most of the code. This patch adds support for mt8195-dpintf to this dpi driver. Main differences are: - Some features/functional components are not av

[PATCH] gpu: host1x: Use the bitmap API to allocate bitmaps

2022-07-04 Thread Christophe JAILLET
Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. While at it, remove a useless bitmap_zero() call. The bitmap is already zero'ed when allocated. Signed-off-by: Christophe JAILLET --- drivers/gpu/host1x/channel.c | 8 ++

[PATCH] drm/vc4: Use the bitmap API to allocate bitmaps

2022-07-08 Thread Christophe JAILLET
Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/vc4/vc4_validate_shaders.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vc4

[PATCH] headers: Remove some left-over license text in include/uapi/drm/

2022-09-25 Thread Christophe JAILLET
There is already a SPDX-License-Identifier tag, so the corresponding license text can be removed. Signed-off-by: Christophe JAILLET --- include/uapi/drm/armada_drm.h | 4 include/uapi/drm/etnaviv_drm.h | 12 include/uapi/drm/exynos_drm.h | 5 - include/uapi/drm

[PATCH] drm/amd/display: Fix typo in some comments

2019-10-05 Thread Christophe JAILLET
p and g are switched in 'amdpgu_dm' Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH] dma-buf: Fix a typo in Kconfig

2020-02-17 Thread Christophe JAILLET
A 'h' ismissing in' syncronization' Signed-off-by: Christophe JAILLET --- drivers/dma-buf/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig index 0613bb7770f5..e7d820ce0724 100644 --- a/drivers/d

[PATCH] drm/amdgpu/display: Fix an error handling path in 'dm_update_crtc_state()'

2020-03-09 Thread Christophe JAILLET
'dc_stream_release()' may be called twice. Once here, and once below in the error handling path if we branch to the 'fail' label. Set 'new_stream' to NULL, once released to avoid the duplicated release function call. Signed-off-by: Christophe JAILLET --- Mayb

[PATCH] drm/msm: Fix an error handling path 'msm_drm_init()'

2020-03-15 Thread Christophe JAILLET
If this memory allocation fails, we have to go through the error handling path to perform some clean-up, as already done in other other paths of this function. Fixes: db735fc4036b ("drm/msm: Set dma maximum segment size for mdss") Signed-off-by: Christophe JAILLET --- drivers/g

[PATCH] drm/mcde: Fix some resource leak in an error path in 'mcde_probe()'

2019-09-15 Thread Christophe JAILLET
All error handling paths before and after this one go to the 'clk_disable' label in order to free some resources. So the same here. Fixes: ca5be902a87d ("drm/mcde: Fix uninitialized variable") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/mcde/mcde_drv.c | 3 ++

[PATCH] drm/msm/a6xx: Fix a typo in an error message

2019-12-04 Thread Christophe JAILLET
'in' is duplicated in the error message. Axe one of them. While at it, slighly improve indentation. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6x

[PATCH] drm/mcde: Fix an error handling path in 'mcde_probe()'

2019-08-22 Thread Christophe JAILLET
If we don't find any matching components, we should go through the error handling path, in order to free some resources. Fixes: ca5be902a87d ("drm/mcde: Fix uninitialized variable") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/mcde/mcde_drv.c | 3 ++- 1 file changed, 2 i

[PATCH] pxa168fb: Fix the function used to release some memory in an error handling path

2019-08-31 Thread Christophe JAILLET
ion. Also, remove a useless 'PAGE_ALIGN()'. 'info->fix.smem_len' is already PAGE_ALIGNed. Fixes: 638772c7553f ("fb: add support of LCD display controller on pxa168/910 (base layer)") Signed-off-by: Christophe JAILLET --- The change about PAGE_ALIGN should proba

[PATCH] drm/amd/display: Fix a typo - amdpgu_dm --> amdgpu_dm

2019-08-10 Thread Christophe JAILLET
This should be 'amdgpu_dm', not 'amdpgu_dm' Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/a

[PATCH] drm/amd/display: Fix a typo - dce_aduio_mask --> dce_audio_mask

2019-08-10 Thread Christophe JAILLET
This should be 'dce_audio_mask', not 'dce_aduio_mask'. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 2 +- drivers/gpu/drm/amd/display/dc/dce/dce_audio.h | 6 +++--- drivers/gpu/drm/amd/display/dc/dce100/d

[PATCH] drm/amdgpu: Fix a typo in the include header guard of 'navi12_ip_offset.h'

2019-08-19 Thread Christophe JAILLET
'_navi10_ip_offset_HEADER' is already used in 'navi10_ip_offset.h', so use '_navi12_ip_offset_HEADER' instead here. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/include/navi12_ip_offset.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) di

[PATCH v2 1/2] drm/kmb: Fix an error handling path

2021-05-26 Thread Christophe JAILLET
rved_mem_device_init()' fails. Goto the error handling path instead to free some resources. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Christophe JAILLET --- v2: Keep label name Fix the commit message where a wrong function name was used ---

[PATCH v2 2/2] drm/kmb: Do not report 0 (success) in case of error

2021-05-26 Thread Christophe JAILLET
'ret' is known to be 0 at this point. Reporting the error from the previous 'platform_get_irq()' call is likely, so add the missing assignment. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Christophe JAILLET --- v2: New patch ---

[PATCH] drm/amdgpu: Fix a a typo in a comment

2021-06-05 Thread Christophe JAILLET
s/than/then/ Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 89ebbf363e27..1476236f5c7c 100644 --- a/drivers

[PATCH] video: fbdev: uvesafb: Fixes an error handling path in 'uvesafb_probe()'

2021-06-06 Thread Christophe JAILLET
de") Fixes: 8bdb3a2d7df4 ("uvesafb: the driver core") Signed-off-by: Christophe JAILLET --- Unsure about the Fixes tag, maybe it is 63e28a7a5ffc --- drivers/video/fbdev/uvesafb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uv

[PATCH] drm/amd: Optimize some memory initializations

2023-01-29 Thread Christophe JAILLET
Instead of zeroing some memory and then copying data in part or all of it, use memcpy_and_pad(). This avoids writing some memory twice and should save a few cycles. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 11 --- drivers/gpu/drm/amd/amdgpu

Re: [PATCH] drm/amdkfd: Fix an illegal memory access

2023-02-21 Thread Christophe JAILLET
Le 21/02/2023 à 17:26, Felix Kuehling a écrit : On 2023-02-21 06:35, qu.huang-fxuvxftifdnyg1zeobx...@public.gmane.org wrote: From: Qu Huang In the kfd_wait_on_events() function, the kfd_event_waiter structure is allocated by alloc_event_waiters(), but the event field of the waiter structure

[PATCH v2] video: fbdev: omapfb: Use kstrtobool() instead of strtobool()

2023-01-14 Thread Christophe JAILLET
strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET --- This patch

Re: [PATCH] agp/amd64: Fix full name of the GPL

2023-01-22 Thread Christophe JAILLET
Le 22/01/2023 à 19:16, Diederik de Haas a écrit : Signed-off-by: Diederik de Haas --- drivers/char/agp/amd64-agp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index ce8651436609..3020fd92fd00 100644 --- a/driv

Re: [PATCH] drm/i915/perf: remove redundant variable 'taken'

2022-10-08 Thread Christophe JAILLET
Le 07/10/2022 à 21:53, Colin Ian King a écrit : The assignment to variable taken is redundant and so it can be removed as well as the variable too. Cleans up clang-scan build warnings: warning: Although the value stored to 'taken' is used in the enclosing expression, the value is never actually

[PATCH 15/30] video: fbdev: omapfb: Use kstrtobool() instead of strtobool()

2022-11-01 Thread Christophe JAILLET
strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel. In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name. While at it, include the corresponding header file () Signed-off-by: Christophe JAILLET --- This patch

[PATCH v2 1/2] video: fbdev: uvesafb: Fixes an error handling path in uvesafb_probe()

2022-12-10 Thread Christophe JAILLET
("uvesafb: the driver core") Signed-off-by: Christophe JAILLET --- Unsure about the Fixes tag, maybe it is 63e28a7a5ffc Change in v2: - add arch_phys_wc_del() at the right place in the error handling path v1 (a long time ago!): https://lore.kernel.org/all/dd2a4806d3a570ab84947806f38a494

[PATCH v2 2/2] video: fbdev: uvesafb: Simplify uvesafb_remove()

2022-12-10 Thread Christophe JAILLET
When the remove() function is called, we know that the probe() function has successfully been executed. So 'info' is known to be not NULL. Simplify the code accordingly. Signed-off-by: Christophe JAILLET --- Change in v2: - new patch --- drivers/video/fbdev/uves

[PATCH] drm/msm/hdm: Fix the error handling path of msm_hdmi_dev_probe()

2022-12-10 Thread Christophe JAILLET
If an error occurs after a successful msm_hdmi_get_phy() call, it must be undone by a corresponding msm_hdmi_put_phy(), as already done in the remove function. Fixes: 437365464043 ("drm/msm/hdmi: move msm_hdmi_get_phy() to msm_hdmi_dev_probe()") Signed-off-by: Christophe JAILLET --- N

[PATCH v2] drm/msm/hdmi: Fix the error handling path of msm_hdmi_dev_probe()

2022-12-12 Thread Christophe JAILLET
If an error occurs after a successful msm_hdmi_get_phy() call, it must be undone by a corresponding msm_hdmi_put_phy(), as already done in the remove function. Fixes: 437365464043 ("drm/msm/hdmi: move msm_hdmi_get_phy() to msm_hdmi_dev_probe()") Signed-off-by: Christophe JAILLET R

Re: [PATCH] drm/amd/pm: avoid large variable on kernel stack

2022-12-15 Thread Christophe JAILLET
Le 15/12/2022 à 17:36, Arnd Bergmann a écrit : From: Arnd Bergmann The activity_monitor_external[] array is too big to fit on the kernel stack, resulting in this warning with clang: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1438:12: error: stack frame size (1040) exceeds

[PATCH] drm/bridge: tc358767: Use devm_clk_get_enabled() helper

2022-12-30 Thread Christophe JAILLET
devm_add_action_or_reset(). Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/bridge/tc358767.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 2a58eb271f70..b95c36ca660d 100644 --- a/drivers

[PATCH v2] drm/bridge: tc358767: Use devm_clk_get_enabled() helper

2022-12-30 Thread Christophe JAILLET
devm_add_action_or_reset(). Signed-off-by: Christophe JAILLET Reviewed-by: Andrzej Hajda --- Change in v2: - Convert to dev_err_probe()[Andrzej Hajda] - Update the error message[Andrzej Hajda] - Add R-b tag[Andrzej Hajda] v1: https://lore.kernel.org/all

[PATCH] drm/amd/display: Fix a test CalculatePrefetchSchedule()

2023-04-17 Thread Christophe JAILLET
It is likely Height was expected here, instead of Width. Test the correct variable. Fixes: 17529ea2acfa ("drm/amd/display: Optimizations for DML math") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c | 2 +- 1 file changed, 1 inser

[PATCH] drm/amd/display: Fix a test dml32_rq_dlg_get_rq_reg()

2023-04-17 Thread Christophe JAILLET
It is likely p1_min_meta_chunk_bytes was expected here, instead of min_meta_chunk_bytes. Test the correct variable. Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321") Signed-off-by: Christophe JAILLET --- .../gpu/drm/amd/display/dc/dml/dcn32/display_rq_dlg_calc_32.c

Re: [PATCH] video: fbdev: mmp: Fix deferred clk handling in mmphw_probe()

2023-04-18 Thread Christophe JAILLET
Le 19/04/2023 à 06:59, Dan Carpenter a écrit : On Sat, Apr 15, 2023 at 04:09:03PM +0300, Dan Carpenter wrote: On Thu, Apr 13, 2023 at 09:33:17PM +0200, Christophe JAILLET wrote: When dev_err_probe() is called, 'ret' holds the value of the previous successful devm_request_irq()

[PATCH] drm/amd/display: Correctly initialize some memory in get_available_dsc_slices()

2023-04-25 Thread Christophe JAILLET
bda0322b8a ("drm/amd/display: Add DSC support for Navi (v2)") Signed-off-by: Christophe JAILLET --- NOT even compile-tested. make -j7 drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.o on my setup, it fails with: CC drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.o drivers/gpu/drm/amd/displa

Re: [PATCH v2 net-next 3/6] net: bcmasp: Add support for ASP2.0 Ethernet controller

2023-05-02 Thread Christophe JAILLET
Le 26/04/2023 à 20:54, Justin Chen a écrit : Add support for the Broadcom ASP 2.0 Ethernet controller which is first introduced with 72165. This controller features two distinct Ethernet ports that can be independently operated. This patch supports: - Wake-on-LAN using magic packets - basic eth

Re: [PATCH] drm/armada: Fix a potential double free in an error handling path

2023-04-11 Thread Christophe JAILLET
Le 26/12/2021 à 17:34, Christophe JAILLET a écrit : 'priv' is a managed resource, so there is no need to free it explicitly or there will be a double free(). Fixes: 90ad200b4cbc ("drm/armada: Use devm_drm_dev_alloc") Signed-off-by: Christophe JAILLET --- drivers/gpu/drm

[PATCH] video: fbdev: mmp: Fix deferred clk handling in mmphw_probe()

2023-04-13 Thread Christophe JAILLET
d "-ENOENT" so that -EPROBE_DEFER is handled and propagated correctly. Fixes: 81b63420564d ("video: fbdev: mmp: Make use of the helper function dev_err_probe()") Signed-off-by: Christophe JAILLET --- drivers/video/fbdev/mmp/hw/mmp_ctrl.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH] drm/amd/display: Slightly optimize dm_dmub_outbox1_low_irq()

2023-03-21 Thread Christophe JAILLET
A kzalloc()+memcpy() can be optimized in a single kmemdup(). This saves a few cycles because some memory doesn't need to be zeroed. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --

  1   2   3   >