ctory then
the debugfs_create_file will check if the root is an error pointer. So
passing it "handles" errors itself.
The one time where I've seen that checking for errors is essential is
if they driver dereferences the "test_data" dentry itself. That's
pretty uncom
) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/gpu/drm/drm_hdcp.c:1208 drm_hdcp_helper_enable_hdcp() error:
uninitialized symbol 'check_link_interval'.
Old smatch warnings:
d
Return an error code if msm_dsi_manager_validate_current_config().
Don't return success.
Fixes: 8b03ad30e314 ("drm/msm/dsi: Use one connector for dual DSI mode")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/dsi/dsi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-
This disables a lock which wasn't enabled and it does not disable
the first lock in the array.
Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
6ed ("drm/msm: Initial add DSI connector support")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c
b/drivers/gpu/drm/msm/dsi/dsi_host.c
index c86b5090fae6..42073a5620
This code returns 1 on error instead of a negative error. It leads to
an Oops in the caller. A second problem is that the check for
"if (ret != -ENODATA)" cannot be true because "ret" is set to 1.
Fixes: 5785dd7a8ef0 ("drm/msm: Fix duplicate gpu node in icc sum
e gpu node in icc summary")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
index 4534633fe7cd..8fb847c174ff 100644
--
On Sat, Oct 02, 2021 at 01:59:56AM +0300, Dmitry Baryshkov wrote:
> On 01/10/2021 15:36, Dan Carpenter wrote:
> > The "msg->tx_len" variable is type size_t so if dsi_cmds2buf_tx()
> > returns a negative error code that it type promoted to a high positive
> >
On Sat, Oct 02, 2021 at 01:59:56AM +0300, Dmitry Baryshkov wrote:
> On 01/10/2021 15:36, Dan Carpenter wrote:
> > The "msg->tx_len" variable is type size_t so if dsi_cmds2buf_tx()
> > returns a negative error code that it type promoted to a high positive
> >
The msm_iommu_new() returns error pointers on failure so check for that
to avoid an Oops.
Fixes: ccac7ce373c1 ("drm/msm: Refactor address space initialization")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 4
1 file changed, 4 insertions(+)
di
> 963 pstates[cnt].dpu_pstate = to_dpu_plane_state(pstate);
964 pstates[cnt].drm_pstate = pstate;
965 pstates[cnt].stage = pstate->normalized_zpos;
966 pstates[cnt].pipe_id = dpu_plane_pipe(plane);
967
regards,
dan carpenter
The "vbif->features" is type unsigned long but the debugfs file
is treating it as a u32 type. This will work in little endian
systems, but the correct thing is to change the debugfs to use
an unsigned long.
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Signe
uot;drm/msm/a6xx: Fix PDC register overlap")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index a7c58018959f..3bd
On Tue, Oct 05, 2021 at 02:31:12AM +0300, Dmitry Baryshkov wrote:
> On 04/10/2021 16:47, Dan Carpenter wrote:
> > The "vbif->features" is type unsigned long but the debugfs file
> > is treating it as a u32 type. This will work in little endian
> > systems, but
Add a missing unlock on the error path if drm_sched_entity_init() fails.
Fixes: 68002469e571 ("drm/msm: One sched entity per process per priority")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/msm_submitqueue.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/g
u, REG_A6XX_GBIF_SCACHE_CNTL0, (0x1f << 10) |
--> 1480 (1 << 8), (gpu_scid << 10) | (1 << 8));
^^
Used here.
1481 }
regards,
dan carpenter
The "msm_obj->node" list needs to be initialized earlier so that the
list_del() in msm_gem_free_object() doesn't experience a NULL pointer
dereference.
Fixes: 6ed0897cd800 ("drm/msm: Fix debugfs deadlock")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/msm_ge
)object_init() functions.
In the msm_gem_import() function the "obj" pointer is uninitialized, so
it will lead to a crash.
Fixes: 05b849111c07 ("drm/msm: prime support")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/msm_gem.c | 4 ++--
1 file changed, 2 insertions(+),
The "dp_bridge" pointer is allocated with devm_kzalloc() so it will be
freed automatically. Kfreeing it here will only lead to a double free.
Fixes: 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable
and disable")
Signed-off-by: Dan Carpenter
---
dr
These casts need to happen before the shift. The only time it would
matter would be if "rev.core" is >= 128. In that case the sign bit
would be extended and we do not want that.
Fixes: afab9d91d872 ("drm/msm/adreno: Expose speedbin to userspace")
Signed-off-by: Dan Carp
NOMEM. Or maybe this is meant to be checking for an empty
string?
> +
> + if (!*cmd)
> + *cmd = kstrdup_quotable_cmdline(task, GFP_KERNEL);
Same.
>
> put_task_struct(task);
> }
regards,
dan carpenter
dup(task->comm, GFP_KERNEL);
> >
> > What?
> >
> > If the first allocation failed, then this one is going to fail as well.
> > Just return -ENOMEM. Or maybe this is meant to be checking for an empty
> > string?
>
> fwiw, if ctx->comm is NULL, the kstrdup() will return NULL, so this
> isn't intended to deal with OoM, but the case that comm and/or cmdline
> is not overridden.
Ah, I should have thought about that. Thanks!
regards,
dan carpenter
nt");
2466 ret = fn_wait(phys);
regards,
dan carpenter
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
The msm_gpu_open() function should free "show_priv" on error or it
causes static checker warnings.
Fixes: 4f776f4511c7 ("drm/msm/gpu: Convert the GPU show function to use the GPU
state")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/msm_debugfs.c | 15 +++
The copy_to/from_user() functions return the number of bytes remaining
to be copied but we should return -EFAULT to the user.
Fixes: f05c83e77460 ("drm/msm: add uapi to get/set debug name")
Signed-off-by: Dan Carpenter
---
If I were reviewing this patch, I would be suspicous that we do
Hi Jonathan,
Thank you for the patch! Perhaps something to improve:
url:
https://github.com/0day-ci/linux/commits/Jonathan-Marek/Initial-SM8150-and-SM8250-DPU-bringup/20200526-112725
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
9cb1fd0efd195590b828b9b865421ad345
copy_to/from_user returns the number of bytes remaining to be copied but
we want to return -EFAULT.
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/msm/msm_perf.c b/drivers/gpu/drm/msm/msm_perf.c
index 830857c..17fe4e5 100644
--- a/drivers/gpu/drm/msm/msm_perf.c
+++ b/drivers/gpu/drm
think it can possibly make a difference.
Signed-off-by: Dan Carpenter
---
Not compiled.
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c
b/drivers/gpu/drm/msm/msm_gem_submit.c
index 4896765..1172fe7 100644
--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_sub
We want to free msm_host->bus_clks[0] so the > should be >=.
Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list")
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c
b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 1fc07ce24686..239e79b39a45 1
On Thu, Feb 16, 2017 at 01:27:47PM +0200, Jani Nikula wrote:
> On Thu, 16 Feb 2017, Dan Carpenter wrote:
> > We want to free msm_host->bus_clks[0] so the > should be >=.
> >
> > Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list")
> > Si
We're off by one here. We free something that wasn't allocated and we
don't free msm_host->bus_clks[].
Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list")
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c
b/drivers/gpu/
That means the "sz > SIZE_MAX" condition
is never true even on 32 bit systems. We need to first cast it to u64
and then do the math.
Fixes: 4a630fadbb29 ("drm/msm: Fix potential buffer overflow issue")
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/msm/msm_gem_sub
We recently added locking to this function but there was a direct return
that was overlooked where we need to unlock.
Fixes: 0e08270a1f01 ("drm/msm: Separate locking of buffer resources from
struct_mutex")
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/d
"gpu->aspace" can be either an error pointer or NULL so we need to check
for both.
Fixes: 0dbd7327f4d5 ("drm/msm: Move memptrs to msm_gpu")
Signed-off-by: Dan Carpenter
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index 66af5ac334ba..15
nt ret;
165
166 if (!minor)
^^
Check
167 return 0;
168
regards,
dan carpenter
___
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno
1753 if (!pdev) {
^
But the existing code assumes it can be NULL. Do we really need this
check?
1754 DRM_DEV_ERROR(dev->dev, "No A5XX device is defined\n");
1755 return ERR_PTR(-ENXIO);
regards,
dan carpenter
(dpu_cstate->new_perf.core_clk_rate,
296 clk_rate);
Never initialized
297 }
298 }
299
300 return clk_rate;
301 }
regards,
dan carpenter
add following tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202308041725.npwswh0l-...@intel.com/
smatch warnings:
drivers/base/power/qos.c:973 dev_pm_qos_update_user_latency_tolerance() warn:
possible memory leak of 'req'
vim
), kindly add following tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r/202308090559.rmlh2dl6-...@intel.com/
smatch warnings:
drivers/gpu/drm/display/drm_simple_bridge.c:41 drm_simple_bridge_register()
warn: possible memory leak of 'adev&
The irq_of_parse_and_map() function returns zero on error. It
never returns negative error codes. Fix the check.
Fixes: a689554ba6ed ("drm/msm: Initial add DSI connector support")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 7 +++
1 file changed, 3
825
1826 err_memory:
1827 a6xx_gmu_memory_free(gmu);
1828 err_put_device:
1829 /* Drop reference taken in of_find_device_by_node */
1830 put_device(gmu->dev);
1831
1832 return ret;
1833 }
regards,
dan carpenter
}
370
--> 371 if (irq_idx < 0) {
^^^
It looks like this can be safely removed
372 DRM_DEBUG_KMS("skip irq wait id=%u, callback=%ps\n",
373 DRMID(phys_enc->parent), func);
374 return 0;
375 }
376
regards,
dan carpenter
qmp);
> +remove_device_link:
> + device_link_del(link);
>
This patch looks good to me but there is something happening here which
I don't understand. This is not related to you patch, but where does
the device_link_del() happen in the remove() function?
regards,
dan carpenter
/mdp5_kms.c:847 mdp5_init() warn:
variable dereferenced before check 'mdp5_kms' (see line 782)
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
b
ine 782)
Fixes: 1f50db2f3e1e ("drm/msm/mdp5: move resource allocation to the _probe
function"
Signed-off-by: Dan Carpenter
---
v2: Added a Fixes tag. It's not really a bug fix and so adding the
fixes tag is slightly unfair but it should prevent this patch from
accidentally
On Fri, Oct 13, 2023 at 10:01:49AM +0200, Uwe Kleine-König wrote:
> Hello,
>
> On Fri, Oct 13, 2023 at 10:17:08AM +0300, Dan Carpenter wrote:
> > This NULL check was required when it was added, but we shuffled the code
> > around in commit 1f50db2f3e1e ("drm/msm/mdp5
On Thu, Nov 16, 2023 at 01:05:52PM -0800, Abhinav Kumar wrote:
>
>
> On 11/1/2023 12:23 PM, Abhinav Kumar wrote:
> >
> >
> > On 10/13/2023 1:25 AM, Dan Carpenter wrote:
> > > This NULL check was required when it was added, but we shuffled the code
The platform_get_irq() function returns negative error codes. It never
returns zero. Fix the check accordingly.
Fixes: 82c2a5751227 ("drm/msm/dp: tie dp_display_irq_handler() with dp driver")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/dp/dp_display.c | 4 ++--
1 file
The msm_gem_prime_get_sg_table() needs to return error pointers on
error. This is called from drm_gem_map_dma_buf() and returning a
NULL will lead to a crash in that function.
Fixes: ac45146733b0 ("drm/msm: fix msm_gem_prime_get_sg_table()")
Signed-off-by: Dan Carpenter
---
drivers/g
at the beginning of the commit message,
> - add a correct Fixes tag.
This doesn't fix a bug so the fixes tag is inappropriate.
regards,
dan carpenter
renced before check 'hdmi' (see line 119)
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/hdmi/hdmi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c
index 7001fabd0977..4d3fdc806bef 100644
--- a/dr
33ec ("drm/msm/hdmi: move resource allocation to probe function")
Signed-off-by: Dan Carpenter
---
v2: Add a Fixes tag. Re-work the commit message.
drivers/gpu/drm/msm/hdmi/hdmi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/dr
get_pid(task_pid(task));
839 }
840
841 if (IS_ERR_OR_NULL(aspace))
^^
[QUESTION #3] This check seems reversed. It should be if *NOT* is error
or null.
842 aspace = msm_gem_address_space_get(gpu->aspace);
843
844 return aspace;
845 }
regards,
dan carpenter
applicable
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
smatch warnings:
drivers/gpu/drm/msm/msm_atomic.c:194 msm_atomic_commit_tail() error:
uninitialized symbol 'async'.
vim +/async +194 drivers/gpu/drm/msm/msm_atomic.c
d4d2c60497cfc5 Rob Clark2019-
phys_enc->hw_cdm->ops.bind_pingpong_blk(phys_enc->hw_cdm,
2086
PINGPONG_NONE);
regards,
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
) 12.1.0
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Link: https://lore.kernel.org/r/202303211207.mucst3ck-...@intel.com/
smatch warnings:
drivers/base/power/qos.c:947 dev_pm_qos_update_user_latency_tolerance() error
;,
652 encoder->base.id, rc);
653 return rc;
654 }
655
656 return 0;
657 }
regards,
dan carpenter
Static analysis tools complain about the -EINVAL error code being
stored in an unsigned variable. Let's change this to match
the clk_get_rate() function which is type unsigned long and returns
zero on error.
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Signed-off-by
d long as well and change the
error checking to check for zero instead of negatives. This change
does not affect runtime at all. It's just a clean up.
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 8
1 file changed, 4 insertions(+), 4 dele
vsync_hz);
>
> Nit: no need to print the value here, you know it's zero. Could be
> clarified to just "no vsync clock".
>
Yeah. That's obviously not useful. Sorry, I will resend.
regards,
dan carpenter
d long as well and change the
error checking to check for zero instead of negatives. This change
does not affect runtime at all beyond a minor adjustment to the debug
output.
Suggested-by: Marijn Suijten
Signed-off-by: Dan Carpenter
Reviewed-by: Marijn Suijten
---
v2: update the debug output
On Thu, Jun 08, 2023 at 02:26:14AM +0300, Dmitry Baryshkov wrote:
> On 07/06/2023 17:42, Dan Carpenter wrote:
> > On Tue, Jun 06, 2023 at 10:23:46PM +0200, Marijn Suijten wrote:
> > > > @@ -359,8 +359,8 @@ static void dpu_encoder_phys_cmd_tearcheck_config(
> > > >
63 matches
Mail list logo