Re: [PATCH] drm/display/dsc: Refactor MST DSC Determination Policy

2024-09-25 Thread Dan Carpenter
/202409231002.bmp89ipm-...@intel.com/config) compiler: microblaze-linux-gcc (GCC) 14.1.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https

Re: [PATCH v4 18/26] drm: sun4i: de3: Implement AFBC support

2024-09-25 Thread Dan Carpenter
/20240923/202409230531.zmb79p9h-...@intel.com/config) compiler: microblaze-linux-gcc (GCC) 14.1.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https

[PATCH next] drm/tegra: Fix NULL vs IS_ERR() check in probe()

2024-09-13 Thread Dan Carpenter
The iommu_paging_domain_alloc() function doesn't return NULL pointers, it returns error pointers. Update the check to match. Fixes: 45c690aea8ee ("drm/tegra: Use iommu_paging_domain_alloc()") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/tegra/drm.c | 4 ++-- 1 file change

[PATCH] drm/mediatek: Fix potential NULL dereference in mtk_crtc_destroy()

2024-09-12 Thread Dan Carpenter
NULL first before calling cmdq_pkt_destroy(). Calling cmdq_pkt_destroy() is unnecessary if we didn't call cmdq_pkt_create() and it will result in a NULL pointer dereference. Fixes: 7627122fd1c0 ("drm/mediatek: Add cmdq_handle in mtk_crtc") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/media

[bug report] drm/msm: add msm8998 hdmi phy/pll support

2024-09-03 Thread Dan Carpenter
sure all registers are flushed to hardware */ 654 wmb(); 655 656 return 0; 657 } regards, dan carpenter

Re: [PATCH v4 4/5] udmabuf: udmabuf_create codestyle cleanup

2024-08-29 Thread Dan Carpenter
in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202408291101.waf552sw-...@intel.com/ smatch warnings: drivers/dma-buf/udmabuf.c:467

[PATCH] drm/amd/display: fix some indenting in CalculatePrefetchSchedule()

2024-08-23 Thread Dan Carpenter
These tabs were deleted accidentally in commit d07722e1fc74 ("drm/amd/display: DML2.1 Reintegration for Various Fixes"). Add them back. Signed-off-by: Dan Carpenter --- .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c| 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

Re: [PATCH] drm/amd/gfx11: move the gfx mutex into the caller

2024-08-20 Thread Dan Carpenter
On Tue, Aug 20, 2024 at 10:39:09AM -0400, Alex Deucher wrote: > Otherwise we can fail to drop the software mutex when > we fail to take the hardware mutex. > > Fixes: 76acba7b7f12 ("drm/amdgpu/gfx11: add a mutex for the gfx semaphore") > Reported-by: Dan Carpenter >

[bug report] accel/ivpu: Add GEM buffer object management

2024-08-19 Thread Dan Carpenter
lead to a NULL dereference ahead of time. 120 121 ivpu_dbg(vdev, KREF, "file_priv put: ctx %u refcount %u\n", regards, dan carpenter

Re: [PATCH] staging: vme_user: vme_bridge.h: Document mutex in vme_dma_resource structure

2024-08-14 Thread Dan Carpenter
d. Trying to figure out the locking is a good exercise. It wouldn't surprise me if there were some locking bugs in this code and you should try to fix those. But it's not super easy either. regards, dan carpenter

[PATCH v3] drm/ast: astdp: fix loop timeout check

2024-08-12 Thread Dan Carpenter
Fixes: 2281475168d2 ("drm/ast: astdp: Perform link training during atomic_enable") Signed-off-by: Dan Carpenter --- v3: V2 had the same bug but just without the always true if (i) statement. Remove the final sleep. v2: In V1, I introduced a bug where it would msleep(100) after failu

Re: [PATCH v2] drm/ast: astdp: fix loop timeout check

2024-08-12 Thread Dan Carpenter
aining ultimately fails, the rest of DRM > keeps running. 100 msec is not so short to shrug it off IMHO. > Sure. No problem. regards, dan carpenter

Re: [PATCH v2] drm/ast: astdp: fix loop timeout check

2024-08-11 Thread Dan Carpenter
On Mon, Aug 12, 2024 at 08:48:16AM +0200, Thomas Zimmermann wrote: > Hi > > Am 12.08.24 um 08:42 schrieb Dan Carpenter: > > This code has an issue because it loops until "i" is set to UINT_MAX but > > the test for failure assumes that "i" is set to zero.

Re: [PATCH v2] drm/ast: astdp: fix loop timeout check

2024-08-11 Thread Dan Carpenter
On Mon, Aug 12, 2024 at 09:42:53AM +0300, Dan Carpenter wrote: > This code has an issue because it loops until "i" is set to UINT_MAX but > the test for failure assumes that "i" is set to zero. The result is that > it will only print an error message if we succeed on

[PATCH v2] drm/ast: astdp: fix loop timeout check

2024-08-11 Thread Dan Carpenter
Fixes: 2281475168d2 ("drm/ast: astdp: Perform link training during atomic_enable") Signed-off-by: Dan Carpenter --- v2: In version one, I introduced a bug where it would msleep(100) after failure and that is a pointless thing to do. Also change the loop to a for loop. --- dri

Re: [PATCH] drm/ast: astdp: fix pre-op vs post-op bug

2024-08-09 Thread Dan Carpenter
On Fri, Aug 09, 2024 at 04:43:51PM +0300, Jani Nikula wrote: > On Fri, 09 Aug 2024, Thomas Zimmermann wrote: > > Hi, > > > > thanks a lot for the bugfix. > > > > Am 09.08.24 um 14:33 schrieb Dan Carpenter: > >> The test for "Link training failed&quo

Re: [PATCH] fbdev: omapfb: panel-sony-acx565akm: Simplify show_cabc_available_modes()

2024-08-09 Thread Dan Carpenter
On Fri, Aug 09, 2024 at 05:09:28PM +0200, Christophe JAILLET wrote: > Le 09/08/2024 à 16:42, Dan Carpenter a écrit : > > On Thu, Aug 08, 2024 at 11:46:11AM +0200, Christophe JAILLET wrote: > > > Use sysfs_emit_at() instead of snprintf() + custom logic. > > > Using s

Re: [PATCH] fbdev: omapfb: panel-sony-acx565akm: Simplify show_cabc_available_modes()

2024-08-09 Thread Dan Carpenter
On Fri, Aug 09, 2024 at 05:42:32PM +0300, Dan Carpenter wrote: > On Thu, Aug 08, 2024 at 11:46:11AM +0200, Christophe JAILLET wrote: > > Use sysfs_emit_at() instead of snprintf() + custom logic. > > Using sysfs_emit_at() is much more simple. > > > > Also, sysfs_emi

Re: [PATCH] fbdev: omapfb: panel-sony-acx565akm: Simplify show_cabc_available_modes()

2024-08-09 Thread Dan Carpenter
gt; + buf[len - 1] = '\n'; I'm uncomfortable with this line. It assumes we don't overflow PAGE_SIZE where the original code was careful about checking. Probably easiest to do what the original code did and say: for (i = 0; i < ARRAY_SIZE(cabc_modes); i++) len += sysfs_emit_at(buf, len, "%s%s", cabc_modes[i], i == ARRAY_SIZE(cabc_modes) - 1 ? "\n" : ""); regards, dan carpenter

[PATCH] drm/ast: astdp: fix pre-op vs post-op bug

2024-08-09 Thread Dan Carpenter
obably that's okay. Fixes: 2281475168d2 ("drm/ast: astdp: Perform link training during atomic_enable") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/ast/ast_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ast/ast_dp.c b/drivers/gpu/drm/ast

Re: [PATCH] staging: vme_user: vme_bridge.h: Document mutex in vme_dma_resource structure

2024-08-02 Thread Dan Carpenter
idge.h > +++ b/drivers/staging/vme_user/vme_bridge.h > @@ -61,6 +61,7 @@ struct vme_dma_list { > struct vme_dma_resource { > struct list_head list; > struct vme_bridge *parent; > + /* Mutex to protect DMA controller resources and ensure thread-safe > operations */ "resources" is too vague. "ensure thread-safe operations" is obvious and doesn't need to be said. regards, dan carpenter

[bug report] drm/omap: gem: Replace struct_mutex usage with omap_obj private lock

2024-07-30 Thread Dan Carpenter
goto done; So I think we can just return directly instead of unlocking. 1431 } 1432 } 1433 1434 done: --> 1435 mutex_unlock(&omap_obj->lock); 1436 return obj; 1437 } regards, dan carpenter

Re: [PATCH] fbdev/hpfb: Fix an error handling path in hpfb_dio_probe()

2024-07-29 Thread Dan Carpenter
On Mon, Jul 29, 2024 at 10:09:39PM +0200, Helge Deller wrote: > On 7/29/24 17:59, Dan Carpenter wrote: > > On Mon, Jul 29, 2024 at 10:13:17AM +0200, Helge Deller wrote: > > > On 7/28/24 20:29, Christophe JAILLET wrote: > > > > If an error occurs after request

Re: [PATCH] fbdev/hpfb: Fix an error handling path in hpfb_dio_probe()

2024-07-29 Thread Dan Carpenter
omeone still has such a machine :-) > It surprised me how many patches we backport for ancient stuff. But I guess the risk/reward equation still works because if the code isn't used there the risk is very small. regards, dan carpenter

Re: [PATCH v2] drm/amd/amdgpu: Properly tune the size of struct

2024-07-29 Thread Dan Carpenter
gpu: Update VF2PF interface") > Signed-off-by: Su Hui > Signed-off-by: Dan Carpenter > Signed-off-by: wenlunpeng > Signed-off-by: WangYuli > --- Thanks for doing this, but these Signed-off-by tags aren't correct. Signed-off-by is like signing a legal document. It came

[PATCH] drm/plane: Fix IS_ERR() vs NULL bug

2024-07-26 Thread Dan Carpenter
The drm_property_create_signed_range() function returns NULL on error, it doesn't return error pointers. Change the IS_ERR() tests to check for NULL. Fixes: 8f7179a1027d ("drm/atomic: Add support for mouse hotspots") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/drm_plane.c

Re: [bug report] accel/habanalabs: enforce release order of compute device and dma-buf

2024-07-26 Thread Dan Carpenter
s, Tomer A comment would be grand. Thanks! regards, dan carpenter

Re: [bug report] accel/habanalabs: enforce release order of compute device and dma-buf

2024-07-25 Thread Dan Carpenter
On Thu, Jul 25, 2024 at 08:21:51AM +, Tomer Tayar wrote: > On 24/07/2024 19:08, Dan Carpenter wrote: > > Hello Tomer Tayar, > > > > Commit 09524eb8824e ("accel/habanalabs: enforce release order of > > compute device and dma-buf") from Jan 22, 2023 (li

Re: [PATCH v2 2/2] media: imx: vdic: Introduce mem2mem VDI deinterlacer driver

2024-07-24 Thread Dan Carpenter
meter is optional. strscpy(cap->driver, "imx-m2m-vdic"); strscpy(cap->card, "imx-m2m-vdic"); strscpy(cap->bus_info, "platform:imx-m2m-vdic"); Shazaaam! Magic! > + cap->device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; > + cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; > + > + return 0; > +} regards, dan carpenter

[PATCH] drm/client: Fix error code in drm_client_buffer_vmap_local()

2024-07-24 Thread Dan Carpenter
This function accidentally returns zero/success on the failure path. It leads to locking issues and an uninitialized *map_copy in the caller. Fixes: b4b0193e83cb ("drm/fbdev-generic: Fix locking with drm_client_buffer_vmap_local()") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/dr

[bug report] accel/habanalabs: enforce release order of compute device and dma-buf

2024-07-24 Thread Dan Carpenter
^^^ Potential use after free 1845 1846 kfree(hl_dmabuf); 1847 } regards, dan carpenter

[bug report] drm/v3d: Create a CPU job extension for the reset timestamp job

2024-07-23 Thread Dan Carpenter
563 } 564 job->timestamp_query.count = reset.count; 565 566 return 0; 567 568 error: 569 v3d_timestamp_query_info_free(&job->timestamp_query, i); 570 return err; 571 } regards, dan carpenter

[bug report] drm/vc4: Add CTM support

2024-07-19 Thread Dan Carpenter
(63); 559 if (val > BIT_ULL(32)) 560 return -EINVAL; 561 } 562 563 ctm_state->fifo = fifo; 564 ctm_state->ctm = ctm; 565 } 566 } 567 568 return 0; 569 } regards, dan carpenter

Re: [PATCH 2/2] media: imx: vdic: Introduce mem2mem VDI deinterlacer driver

2024-07-13 Thread Dan Carpenter
= ipu_id; > + priv->ipu_dev = md->ipu[ipu_id]; > + priv->dev = md->md.dev; > + > + mutex_init(&priv->mutex); > + > + vfd = video_device_alloc(); > + if (!vfd) { > + ret = -ENOMEM; > + goto err_vfd; > + } > + > + *vfd = mem2mem_template; > + vfd->lock = &priv->mutex; > + priv->vdev.vfd = vfd; > + > + INIT_LIST_HEAD(&priv->vdev.list); > + spin_lock_init(&priv->irqlock); > + atomic_set(&priv->stream_count, 0); > + > + video_set_drvdata(vfd, priv); > + > + priv->m2m_dev = v4l2_m2m_init(&m2m_ops); > + if (IS_ERR(priv->m2m_dev)) { > + ret = PTR_ERR(priv->m2m_dev); > + v4l2_err(&md->v4l2_dev, "Failed to init mem2mem device: %d\n", > + ret); > + goto err_m2m; > + } > + > + /* Reset formats */ > + priv->fmt[V4L2_M2M_SRC] = ipu_mem2mem_vdic_default; > + priv->fmt[V4L2_M2M_SRC].pixelformat = V4L2_PIX_FMT_YUV420; > + priv->fmt[V4L2_M2M_SRC].field = V4L2_FIELD_SEQ_TB; > + priv->fmt[V4L2_M2M_SRC].bytesperline = DEFAULT_WIDTH; > + priv->fmt[V4L2_M2M_SRC].sizeimage = DEFAULT_WIDTH * DEFAULT_HEIGHT * 3 > / 2; > + > + priv->fmt[V4L2_M2M_DST] = ipu_mem2mem_vdic_default; > + priv->fmt[V4L2_M2M_DST].pixelformat = V4L2_PIX_FMT_RGB565; > + priv->fmt[V4L2_M2M_DST].field = V4L2_FIELD_NONE; > + priv->fmt[V4L2_M2M_DST].bytesperline = DEFAULT_WIDTH * 2; > + priv->fmt[V4L2_M2M_DST].sizeimage = DEFAULT_WIDTH * DEFAULT_HEIGHT * 2; > + > + return &priv->vdev; > + > +err_m2m: > + video_set_drvdata(vfd, NULL); video_device_release(vfd) regards, dan carpenter > +err_vfd: > + kfree(priv); > + return ERR_PTR(ret); > +}

Re: [PATCH v1 2/3] drm/panel: st7701: Add support for SPI for configuration

2024-06-20 Thread Dan Carpenter
: Dan Carpenter | Closes: https://lore.kernel.org/r/202406210841.q17g5isz-...@intel.com/ smatch warnings: drivers/gpu/drm/panel/panel-sitronix-st7701.c:1076 st7701_dsi_probe() warn: passing zero to 'dev_err_probe' vim +/dev_err_probe +1076 drivers/gpu/drm/panel/panel-sitroni

[bug report] drm: atmel-hlcdc: add driver ops to differentiate HLCDC and XLCDC IP

2024-06-20 Thread Dan Carpenter
583 state->pstride[i]); 584 } 585 } regards, dan carpenter

[PATCH] drm/amd/display: Clean up indenting in dm_dp_mst_is_port_support_mode()

2024-06-20 Thread Dan Carpenter
This code works, but it's not aligned correctly. Add a couple missing tabs. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdg

[PATCH] drm/amdgpu/kfd: Add unlock() on error path to add_queue_mes()

2024-06-20 Thread Dan Carpenter
We recently added locking to add_queue_mes() but this error path was overlooked. Add an unlock to the error path. Fixes: 1802b042a343 ("drm/amdgpu/kfd: remove is_hws_hang and is_resetting") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 1

Re: [PATCH] drm/nouveau: Use kmemdup_array() instead of kmemdup()

2024-06-18 Thread Dan Carpenter
On Mon, Jun 17, 2024 at 05:55:33PM +0200, Danilo Krummrich wrote: > On 6/17/24 11:33, Dan Carpenter wrote: > > Use kmemdup_array() because we're allocating an array. > > > > The main difference between kmemdup() and kmemdup_array() is that the > > kmemdup_array

Re: [PATCH v4 08/12] drm/ttm: Add a virtual base class for graphics memory backup

2024-06-17 Thread Dan Carpenter
-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202406170559.wddkfeiu-...@intel.com/ smatch warnings: drivers/gpu/drm/ttm/ttm_backup_shmem.c:130 ttm_backup_shmem_create() error: dereferencing freed memory 'sbackup' vim +/sbackup +130 drivers/gpu/drm/ttm/ttm_backup_shmem.c 8275

[PATCH] drm/nouveau: Use kmemdup_array() instead of kmemdup()

2024-06-17 Thread Dan Carpenter
n on 32bit systems. Fortunately, however, the u_memcpya() function has integer overflow checking which means that it is not an issue. Still using kmemdup_array() is more appropriate and makes auditing the code easier. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/nouveau/no

[PATCH v2] drm/bridge: it6505: remove unnecessary NULL checks

2024-06-10 Thread Dan Carpenter
ULL checking. Do the same for "pdata->ovdd" as well. Signed-off-by: Dan Carpenter --- v2: In the first patch, I added a NULL check but that wasn't necessary or correct. drivers/gpu/drm/bridge/ite-it6505.c | 43 - 1 file changed, 18 insertions(+)

Re: [PATCH] drm/bridge: it6505: Fix potential NULL dereference

2024-06-09 Thread Dan Carpenter
On Sun, Jun 09, 2024 at 10:38:39PM +0300, Dmitry Baryshkov wrote: > On Sat, Jun 08, 2024 at 05:21:08PM +0300, Dan Carpenter wrote: > > Smatch complains correctly that the NULL checking isn't consistent: > > > > drivers/gpu/drm/bridge/ite-it6505.c:2583 it6505_p

[bug report] drm/xe/bo: Simplify xe_bo_lock()

2024-06-08 Thread Dan Carpenter
2127 } else if (__op->op == DRM_GPUVA_OP_PREFETCH) { 2128 op->prefetch.region = prefetch_region; 2129 } 2130 2131 print_op(vm->xe, __op); 2132 } 2133 2134 return ops; 2135 } regards, dan carpenter

[bug report] drm/xe: Introduce a new DRM driver for Intel GPUs

2024-06-08 Thread Dan Carpenter
; 677 } else { 678 curs.size = xe_vma_size(vma); 679 } 680 681 ret = xe_pt_walk_range(&pt->base, pt->level, xe_vma_start(vma), 682 xe_vma_end(vma), &xe_walk.base); 683 684 *num_entries = xe_walk.wupd.num_used_entries; 685 return ret; 686 } regards, dan carpenter

[PATCH] drm/bridge: it6505: Fix potential NULL dereference

2024-06-08 Thread Dan Carpenter
error path. Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/bridge/ite-it6505.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c index 3f68c82888c

[bug report] drm/meson: fix unbind path if HDMI fails to bind

2024-06-08 Thread Dan Carpenter
;afbcd.ops->exit(priv); 374 free_drm: 375 drm_dev_put(drm); 376 --> 377 meson_encoder_dsi_remove(priv); 378 meson_encoder_hdmi_remove(priv); 379 meson_encoder_cvbs_remove(priv); 380 381 if (has_components) 382 component_unbind_all(dev, drm); 383 384 return ret; 385 } regards, dan carpenter

[PATCH] backlight: lm3509_bl: Fix NULL vs IS_ERR() check in register() function

2024-06-06 Thread Dan Carpenter
The devm_backlight_device_register() doesn't return NULL, it returns error pointers. Update the error checking to match. Fixes: b72755f5b577 ("backlight: Add new lm3509 backlight driver") Signed-off-by: Dan Carpenter --- drivers/video/backlight/lm3509_bl.c | 5 +++-- 1

Re: [PATCH v2 3/3] drm/panic: Add a kmsg panic screen

2024-06-04 Thread Dan Carpenter
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202406041051.kuvqtzcd-...@intel.com/ smatch warnings: drivers/gpu

Re: [PATCH v3 7/9] staging: media: atmel: use for_each_endpoint_of_node()

2024-05-29 Thread Dan Carpenter
warning because now "ret" is uninitialized if the for_each_endpoint_of_node() list is empty. Is that something which is possible? I've been meaning to make a list of loops which always iterate at least one time. for_each_cpu() etc. regards, dan carpenter

Re: [PATCH v3 4/9] media: platform: microchip: use for_each_endpoint_of_node()

2024-05-29 Thread Dan Carpenter
talking about. We're taking storing "subdev_entity->epn = epn" but then not incrementing the refcount. Perhaps it's not necessary? The difference between this and _scoped() would be if we stored epn and then returned. I feel like that's less common. We could detect that sort of thing using static analysis if it turned out to be an issue. regards, dan carpenter

Re: [PATCH v2 resend 2/8] hwtracing: use for_each_endpoint_of_node()

2024-05-29 Thread Dan Carpenter
On Wed, May 29, 2024 at 05:52:53PM +0300, Laurent Pinchart wrote: > On Wed, May 29, 2024 at 05:34:41PM +0300, Dan Carpenter wrote: > > On Wed, May 29, 2024 at 03:40:47AM +0300, Laurent Pinchart wrote: > > > > @@ -286,7 +286,7 @@ static int of_get_coresight_platform_data(struct

Re: [PATCH v2 resend 2/8] hwtracing: use for_each_endpoint_of_node()

2024-05-29 Thread Dan Carpenter
r_each_endpoint_of_node_scoped(). #define for_each_endpoint_of_node_scoped(parent, child) \ for (struct device_node *child __free(device_node) = \ of_graph_get_next_endpoint(parent, NULL); child != NULL; \ child = of_graph_get_next_endpoint(parent, child)) regards, dan carpenter

[PATCH] drm/amdgpu: delete unnecessary check

2024-05-04 Thread Dan Carpenter
The "ret" variable is zero. No need to check. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index a0

[PATCH] drm/amd/pm: Fix error code in vega10_hwmgr_backend_init()

2024-05-04 Thread Dan Carpenter
Return -EINVAL on error instead of success. Also on the success path, return a literal zero instead of "return result;" Fixes: e098bc9612c2 ("drm/amd/pm: optimize the power related source code layout") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/pm/powerplay/hwmg

Re: [PATCH] staging: fb_tinylcd Alignment to open parenthesis

2024-05-04 Thread Dan Carpenter
tch has been sent before. Otherwise ignore checkpatch if it tells you to do something that makes the code less readable. regards, dan carpenter

Re: [PATCH] staging: fb_tinylcd Alignment to open parenthesis

2024-05-02 Thread Dan Carpenter
On Thu, May 02, 2024 at 06:52:16PM -0700, Ashok Kumar wrote: > Corrected coding style CHECK: Alignment should match open parenthesis > The original author was aligned it deliberately to improve readability. Just ignore checkpatch on this. regards, dan carpenter

Re: [PATCH] staging: fbtft:fixes unnecessary parentheses

2024-04-28 Thread Dan Carpenter
mp;& > + devcode != 0x9320) Nah, just leave it. It's a personal preference for Greg. https://lore.kernel.org/all/?q=init_display%20devcode regards, dan carpenter

[PATCH] drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()

2024-04-28 Thread Dan Carpenter
The "instance" variable needs to be signed for the error handling to work. Fixes: b34ddc71267a ("drm/amdgpu: add error handle to avoid out-of-bounds") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH] drm/amd/display: re-indent dpp401_dscl_program_isharp()

2024-04-28 Thread Dan Carpenter
at I could replace "scl_data->dscl_prog_data." with just "data->" and shorten the lines a bit. It's more readable without the line breaks. I also tried to align it so you can see what is changing on each line. Signed-off-by: Dan Carpenter --- .../displ

[PATCH v2] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-25 Thread Dan Carpenter
These lines are indented too far. Clean the whitespace. Signed-off-by: Dan Carpenter --- v2: Delete another blank line (checkpatch.pl --strict). drivers/gpu/drm/amd/display/dc/core/dc.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc

Re: [PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-24 Thread Dan Carpenter
On Wed, Apr 24, 2024 at 03:33:11PM +0200, Christian König wrote: > Am 24.04.24 um 15:20 schrieb Dan Carpenter: > > On Wed, Apr 24, 2024 at 03:11:08PM +0200, Christian König wrote: > > > Am 24.04.24 um 13:41 schrieb Dan Carpenter: > > > > These lines are indented

Re: [PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-24 Thread Dan Carpenter
On Wed, Apr 24, 2024 at 03:11:08PM +0200, Christian König wrote: > Am 24.04.24 um 13:41 schrieb Dan Carpenter: > > These lines are indented too far. Clean the whitespace. > > > > Signed-off-by: Dan Carpenter > > --- > > drivers/gpu/drm/amd/display/dc/core/dc.c

[PATCH] drm/amd/display: re-indent dc_power_down_on_boot()

2024-04-24 Thread Dan Carpenter
These lines are indented too far. Clean the whitespace. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/amd/display/dc/core/dc.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c

Re: [PATCH] staging:fbtft:fb_ili9320 Removed redundant Parentheses

2024-04-22 Thread Dan Carpenter
splay(struct fbtft_par *par) > devcode = read_devicecode(par); > fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "Device code: > 0x%04X\n", 4) This patch is corrupt and will not apply. Read the first two paragraphs of Documentation/process/email-clients.rst. regards, dan carpenter

[bug report] drm/nouveau/disp/r535: initial support

2024-04-15 Thread Dan Carpenter
lient.gsp->internal.device.subdevice; 1492 1493 ctrl = nvkm_gsp_rm_ctrl_get(subdevice, 1494 NV2080_CTRL_CMD_INTERNAL_INIT_BRIGHTC_STATE_LOAD, 1495 sizeof(*ctrl)); 1496 if (IS_ERR(ctrl)) regards, dan carpenter

Re: [PATCH] treewide: Fix common grammar mistake "the the"

2024-04-11 Thread Dan Carpenter
changes. > > Signed-off-by: Thorsten Blum > --- It's tricky to know which tree a patch like this would go through. We used to have a trivial tree for this stuff but I guess that didn't work. It's possible that it could go through linux-doc, but probably it has to go as a set

[bug report] drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference

2024-04-11 Thread Dan Carpenter
lock before returning. 2064 2065 drm_mode_set_name(mhdp_state->current_mode); 2066 2067 dev_dbg(mhdp->dev, "%s: Enabling mode %s\n", __func__, mode->name); 2068 2069 mhdp->bridge_enabled = true; 2070 2071 out: 2072 mutex_unlock(&mhdp->link_mutex); 2073 if (ret < 0) --> 2074 schedule_work(&mhdp->modeset_retry_work); 2075 } regards, dan carpenter

Re: [bug report] drm/panthor: Add the scheduler logical block

2024-04-10 Thread Dan Carpenter
On Wed, Apr 10, 2024 at 03:11:52PM +0100, Steven Price wrote: > On 08/04/2024 08:35, Dan Carpenter wrote: > > Hello Boris Brezillon, > > > > Commit de8548813824 ("drm/panthor: Add the scheduler logical block") > > from Feb 29, 2024 (linux-next), leads to th

[PATCH] drm/panthor: clean up some types in panthor_sched_suspend()

2024-04-08 Thread Dan Carpenter
ars out the top 32 bits which would likely be a bug if anything were stored there. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/panthor/panthor_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panth

[bug report] drm/panthor: Add the scheduler logical block

2024-04-08 Thread Dan Carpenter
cs_slot_reset_locked(ptdev, csg_id, i); 1171 } 1172 } 1173 1174 group->state = new_state; 1175 } regards, dan carpenter

Re: [PATCH 7/7] drm/udl: Remove struct udl_connector

2024-04-04 Thread Dan Carpenter
/202404051359.y6aguwfi-...@intel.com/config) compiler: hppa-linux-gcc (GCC) 13.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https

[PATCH] drm: xlnx: db: fix a memory leak in probe

2024-04-04 Thread Dan Carpenter
Free "dp" before returning. Fixes: be318d01a903 ("drm: xlnx: dp: Reset DisplayPort IP") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/xlnx/zynqmp_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_dp.c b/drivers/gpu/drm/xl

Re: [PATCH v5 02/10] PCI: Deprecate iomap-table functions

2024-04-03 Thread Dan Carpenter
.qixhnemu-...@intel.com/config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r

Re: [PATCH v3] drm/panthor: Fix couple of NULL vs IS_ERR() bugs

2024-04-02 Thread Dan Carpenter
On Tue, Apr 02, 2024 at 05:19:25PM +0200, Boris Brezillon wrote: > On Tue, 2 Apr 2024 17:44:18 +0300 > Dan Carpenter wrote: > > > On Tue, Apr 02, 2024 at 04:38:38PM +0200, Boris Brezillon wrote: > > > On Tue, 2 Apr 2024 07:14:11 -0700 > > > Harshit Mogalapalli

Re: [PATCH v3] drm/panthor: Fix couple of NULL vs IS_ERR() bugs

2024-04-02 Thread Dan Carpenter
4bdca1150792 ("drm/panthor: Add the driver frontend block") > > I would explain that the code was correct, but the documentation didn't > match the function behavior, otherwise it feels a bit weird to have a > Fixes tag here. The code wasn't correct, it returned a mix of error pointers and NULL. So it needs a Fixes tag. regards, dan carpenter

[PATCH] drm/panthor: Fix a couple -ENOMEM error codes

2024-04-02 Thread Dan Carpenter
These error paths forgot to set the error code to -ENOMEM. Fixes: 647810ec2476 ("drm/panthor: Add the MMU/VM logical block") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/panthor/panthor_mmu.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/d

[PATCH] drm/panthor: Fix off by one in panthor_fw_get_cs_iface()

2024-04-02 Thread Dan Carpenter
The ->iface.streams[csg_slot][] array has MAX_CS_PER_CSG elements so this > comparison needs to be >= to prevent an out of bounds access. Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/panthor/panthor_fw.c | 2 +-

[PATCH] drm/panthor: Fix error code in panthor_gpu_init()

2024-04-02 Thread Dan Carpenter
ge <= to < 0. Fixes: 5cd894e258c4 ("drm/panthor: Add the GPU logical block") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/panthor/panthor_gpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_gpu.c b/drivers/gpu/drm/pant

Re: [PATCH 4/8] media: platform: ti: use for_each_endpoint_of_node()

2024-03-25 Thread Dan Carpenter
e end it has: of_node_put(endpoint); return pdata; Since endpoint is NULL this was always a pointless no-op but now it's more obvious, so lets delete that. regards, dan carpenter

Re: [PATCH v5 08/11] devm-helpers: Add resource managed version of debugfs directory create function

2024-03-25 Thread Dan Carpenter
NFIG_DEBUGFS is disabled. I have written a blog about this: https://staticthinking.wordpress.com/2023/07/24/debugfs-functions-are-not-supposed-to-be-checked/ regards, dan carpenter

[PATCH] backlight: mp3309c: fix signedness bug in mp3309c_parse_fwnode()

2024-03-16 Thread Dan Carpenter
acklight: mp3309c: Make use of device properties") Signed-off-by: Dan Carpenter --- drivers/video/backlight/mp3309c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c index c80a1481e742..4e98e60417d2 1

[PATCH] drm/amd/display: delete unnecessary check in dcn35_set_long_vblank()

2024-03-16 Thread Dan Carpenter
"timing" is "&pipe_ctx[i]->stream->timing" where ->timing is not the first struct member of ->stream. So it's the address which points into the middle of a struct. It can't be NULL so delete the NULL check. Signed-off-by: Dan Carpenter

Re: [PATCH 3/6] backlight/omap1-bl: Replace FB_BLANK_ states with simple on/off

2024-03-14 Thread Dan Carpenter
as been around for over a year. I don't care about which > patches go in as long as they remove the dependency on . I saw > that Dan has already r-b'ed the current patchset, but if you prefer I'll > adopt yours. I hadn't seen Sam's patch. It's a little bit more daring, but it's really nice code and I trust him. regards, dan carpenter

Re: [PATCH 0/6] backlight: Remove struct backlight_properties.fb_blank

2024-03-13 Thread Dan Carpenter
I was only going to comment on the staging bits but, heck, I reviewed the whole series. Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH 1/6] auxdisplay/ht16k33: Replace use of fb_blank with backlight helper

2024-03-13 Thread Dan Carpenter
ent/implements/. regards, dan carpenter

Re: [PATCH 5/6] staging/fbtft: Remove reference to fb_blank

2024-03-13 Thread Dan Carpenter
aging/fbtft/fb_ssd1351.c | 4 +--- > drivers/staging/fbtft/fbtft-core.c | 5 ++--- Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH 1/6] auxdisplay/ht16k33: Replace use of fb_blank with backlight helper

2024-03-13 Thread Dan Carpenter
advantage to making this const? regards, dan carpenter

Re: [PATCH 00/14] Add support for suppressing warning backtraces

2024-03-13 Thread Dan Carpenter
Thanks! Acked-by: Dan Carpenter regards, dan carpenter

[drm-intel:for-linux-next-gt 1/4] drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:2680 guc_context_policy_init_v70() warn: variable dereferenced before check 'ce' (see line 2663)

2024-03-10 Thread Dan Carpenter
/20240310/202403101225.7ahejhzj-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes

Re: [PATCH] soc: qcom: pmic_glink_altmode: Use common error handling code in pmic_glink_altmode_probe()

2024-02-28 Thread Dan Carpenter
d yet and it would need a bit of adjusting for this use case but it's basically what you want. regards, dan carpenter

Re: [PATCH] staging: fbtft: Fix "space prohibited before that close parenthesis ')'" error reported by checkpatch

2024-02-21 Thread Dan Carpenter
efore that > close parenthesis ')'". > > Signed-off-by: Kyoji Ogasawara This breaks the build. You could do a search for it. https://lore.kernel.org/all/?q=define_fbtft_write_reg regards, dan carpenter

Re: [PATCH v2] udmabuf: Fix a potential (and unlikely) access to unallocated memory

2024-02-19 Thread Dan Carpenter
On Mon, Feb 19, 2024 at 06:59:02PM +0100, Christophe JAILLET wrote: > Le 19/02/2024 à 09:37, Dan Carpenter a écrit : > > On Sun, Feb 18, 2024 at 06:46:44PM +0100, Christophe JAILLET wrote: > > > If 'list_limit' is set to a very high value, 'lsize' computati

Re: [PATCH v2] udmabuf: Fix a potential (and unlikely) access to unallocated memory

2024-02-19 Thread Dan Carpenter
t high enough to lead to an integer overflow then you kind of deserve what you get. This patch is nice for kernel hardening and making the code easier to read/audit but the real world security impact is negligible. regards, dan carpenter

Re: [PATCH 16/28] drm/i915/color: Create a transfer function color pipeline

2024-02-18 Thread Dan Carpenter
| Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202402180310.gmdixajx-...@intel.com/ New smatch warnings: drivers/gpu/drm/i915/display/intel_color.c:3867 intel_plane_tf_pipeline_init() error: 'colorop' dereferencing possible ERR_PTR() vim +/colorop +3867 drivers/gp

[PATCH] drm/nouveau/mmu/r535: uninitialized variable in r535_bar_new_()

2024-02-13 Thread Dan Carpenter
If gf100_bar_new_() fails then "bar" is not initialized. Fixes: 5bf0257136a2 ("drm/nouveau/mmu/r535: initial support") Signed-off-by: Dan Carpenter --- It looks like this was intended to handle a failure from the "rm" func but "rm" can't actually fa

[PATCH] drm/imx/dcss: fix resource size calculation

2024-02-13 Thread Dan Carpenter
The resource is inclusive of the ->start and ->end addresses so this calculation is not correct. It should be "res->end - res->start + 1". Use the resource_size() to do the calculation. Fixes: 90393c9b5408 ("drm/imx/dcss: request memory region") Signed-off-by:

[PATCH] drm/amd/display: Fix && vs || typos

2024-02-09 Thread Dan Carpenter
These ANDs should be ORs or it will lead to a NULL dereference. Fixes: fb5a3d037082 ("drm/amd/display: Add NULL test for 'timing generator' in 'dcn21_set_pipe()'") Fixes: 886571d217d7 ("drm/amd/display: Fix 'panel_cntl' could be null in '

[bug report] drm/bridge: imx: add driver for HDMI TX Parallel Video Interface

2024-02-07 Thread Dan Carpenter
>input_bus_flags; 81 else if (bridge_state) This check for NULL is too late. Hopefully it can it be removed? 82 bus_flags = bridge_state->input_bus_cfg.flags; 83 regards, dan carpenter

[PATCH] drm/imagination: Fix an IS_ERR vs NULL bug in pvr_context_create()

2024-02-01 Thread Dan Carpenter
The pvr_vm_context_lookup() function returns NULL on error (not error pointers). Update the check accordingly. Fixes: d2d79d29bb98 ("drm/imagination: Implement context creation/destruction ioctls") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/imagination/pvr_context.c | 4 ++

  1   2   3   4   5   6   7   8   9   10   >