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

2024-04-11 Thread Dan Carpenter
gt; > 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 of patches through each o

Re: [PATCH] drm/i915/guc: Remove bogus null check

2024-03-29 Thread Dan Carpenter
ot; should be used when a > bug is fixed, but not for harmless static analyzer reports. > > Besides, if we want to keep the Fixes tag we should also Cc > stable, i guess checkpatch.pl complains about it. > > (BTW, Cc'ed in this mail we have the inventor of the tag and he > can confirm after having had his morning coffee :-) ). > Good. I keep reminding people that I invented the Fixes tag because it is my proudest achievement. :) No. Only use Fixes tags for bug fixes. 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

[bug report] drm/i915/dp: Add support for DP tunnel BW allocation

2024-03-05 Thread Dan Carpenter
if (IS_ERR(tunnel_mgr)) The real implementation of drm_dp_tunnel_mgr_create() returns NULL but the stub implementation returns ERR_PTR(-EOPNOTSUPP). 794 return PTR_ERR(tunnel_mgr); 795 796 i915->display.dp_tunnel_mgr = tunnel_mgr; 797 798 return 0

Re: [PATCH 2/3] drm/i915/psr: Improve fast and IO wake lines calculation

2024-02-26 Thread Dan Carpenter
.org/0day-ci/archive/20240225/202402250758.kqbqxyrz-...@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

[bug report] drm/i915: switch from drm_debug_printer() to device specific drm_dbg_printer()

2024-02-19 Thread Dan Carpenter
if (!rq) { ^^^ Previously we assumed "rq" could be NULL. 103 intel_engine_dump(engine, , 104"%s heartbeat not ticking\n", 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/gpu/drm/i915

Re: [PATCH 4/6] drm/i915/psr: Silence period and lfps half cycle

2024-02-18 Thread Dan Carpenter
-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202402171830.n4hwr2id-...@intel.com/ smatch warnings: drivers/gpu/drm/i915/display/intel_psr.c:1253 _lnl_compute_aux_less_alpm_params() error: uninitialized symbol 'silence_period'. vim +/silence_period +1253

Re: [PATCH 3/5] drm/xe: store bind time pat index to xe_bo

2024-01-31 Thread Dan Carpenter
/0day-ci/archive/20240131/202401311604.1pllaxek-...@intel.com/config) compiler: sparc64-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

[PATCH] drm/i915/gvt: Fix uninitialized variable in handle_mmio()

2024-01-26 Thread Dan Carpenter
. Fixes: e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gvt/handlers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handler

[bug report] drm/i915/gt: Use i915_vm_put on ppgtt_create error paths

2024-01-10 Thread Dan Carpenter
mutex_destroy(>flush); 278 } regards, dan carpenter

Re: [Intel-gfx] [PATCH] drm/i915: Support FP16 compressed formats on MTL

2023-10-15 Thread Dan Carpenter
-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202310150454.s9qf86bl-...@intel.com/ smatch warnings: drivers/gpu/drm/i915/display/skl_universal_plane.c:2126 gen12_plane_format_mod_supported() warn: ignoring unreachable code. vim +2126 drivers/gpu/drm/i915/display/skl_universal_plane.c

[Intel-gfx] [bug report] drm/i915/dsb: Use DEwake to combat PkgC latency

2023-10-04 Thread Dan Carpenter
} 381 382 intel_de_write_fw(dev_priv, DSB_TAIL(pipe, dsb->id), 383 i915_ggtt_offset(dsb->vma) + tail); 384 } regards, dan carpenter

[Intel-gfx] [bug report] drm/i915: Move submission tasklet to i915_sched_engine

2023-10-04 Thread Dan Carpenter
intel_breadcrumbs_put(ve->base.breadcrumbs); 3659 if (ve->base.sched_engine) ^ But previous code had assumed the sched_engine could be NULL. 3660 i915_sched_engine_put(ve->base.sched_engine); 3661 intel_engine_free_request_pool(>base); regards, dan carpenter

[Intel-gfx] [bug report] drm/i915/hdmi: Use connector->ddc everwhere

2023-09-26 Thread Dan Carpenter
if (!connector || connector->base.status != connector_status_connected) ^ Checked too late. 4337 return 0; 4338 regards, dan carpenter

Re: [Intel-gfx] [PATCH v13 1/2] drm/i915: Add WABB blit for Wa_16018031267 / Wa_16018063123

2023-09-25 Thread Dan Carpenter
-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202309252243.l3lv6ixf-...@intel.com/ New smatch warnings: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:4181 guc_kernel_context_pin() error: uninitialized symbol 'ret'. vim +/ret +4181 drivers/gpu/drm/i915

[Intel-gfx] [PATCH] drm/i915/gt: Prevent error pointer dereference

2023-09-13 Thread Dan Carpenter
Move the check for "if (IS_ERR(obj))" in front of the call to i915_gem_object_set_cache_coherency() which dereferences "obj". Otherwise it will lead to a crash. Fixes: 43aa755eae2c ("drm/i915/mtl: Update cache coherency setting for context structure") Signed-off-b

Re: [Intel-gfx] [PATCH v5 3/6] drm/i915/panelreplay: Initializaton and compute config for panel replay

2023-09-06 Thread Dan Carpenter
| Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202309060644.uwp5zw4i-...@intel.com/ smatch warnings: drivers/gpu/drm/i915/display/intel_dp.c:3779 intel_dp_vsc_sdp_pack() warn: was && intended here instead of ||? vim +3779 drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v2] drm/i915/tv: avoid possible division by zero

2023-07-25 Thread Dan Carpenter
On Wed, Jul 26, 2023 at 09:21:50AM +0800, Su Hui wrote: > On 2023/7/25 13:51, Dan Carpenter wrote: > > The reason why the first five attempts had bugs is because we are > > trying to write it in the most complicated way possible, shifting by > > logical not what? > Wond

Re: [Intel-gfx] [PATCH v2] drm/i915/tv: avoid possible division by zero

2023-07-24 Thread Dan Carpenter
The reason why the first five attempts had bugs is because we are trying to write it in the most complicated way possible, shifting by logical not what? regards, dan carpenter diff --git a/drivers/gpu/drm/i915/display/intel_tv.c b/drivers/gpu/drm/i915/display/intel_tv.c index 36b479b46b60

Re: [Intel-gfx] [PATCH] drm/i915/tv: avoid possible division by zero

2023-07-17 Thread Dan Carpenter
; > > + mode->clock = clock / (tv_mode->oversample != 1 ? > > + tv_mode->oversample >> !tv_mode->progressive : 1); > > Seems too smart to me, why not just: > mode->clock = clock / tv_mode->oversample; > if (!tv_mode->progressive) >     mode->clock <<= 1; This is nice. regards, dan carpenter

Re: [Intel-gfx] [PATCH 16/26] drm/i915/gvt: use array_size

2023-06-26 Thread Dan Carpenter
doesn't > know that a truncation has happened. So that if we save from an > overflow here, we might encur to an unwanted access later when we > would start using the array for the size we think is allocated. SIZE_MAX allocations are guaranteed to fail, so the NULL check will still return -ENOMEM. > > kmalloc_array(), for example, returns NULL of there is a > multiplication overflow and I think that's a better behaviour, > although more drastic. It's the same either way. regards, dan carpenter

Re: [Intel-gfx] [PATCH] drm/i915/gsc: Fix error code in intel_gsc_uc_heci_cmd_submit_nonpriv()

2023-06-08 Thread Dan Carpenter
On Wed, Jun 07, 2023 at 06:44:54PM +, Teres Alexis, Alan Previn wrote: > On Tue, 2023-06-06 at 21:32 +0300, Dan Carpenter wrote: > > On Tue, Jun 06, 2023 at 06:07:19PM +, Teres Alexis, Alan Previn wrote: > > > That was my bad, i could have sword i'd fixed that be

Re: [Intel-gfx] [PATCH] drm/i915/gsc: Fix error code in intel_gsc_uc_heci_cmd_submit_nonpriv()

2023-06-07 Thread Dan Carpenter
he fixes tag is significant. > The Fixes tag is correct. It's definitely a bug fix. (I invented the Fixes tag so technically that makes me the worlds #1 expert on Fixes tags). regards, dan carpenter

[Intel-gfx] [PATCH] drm/i915: Fix a NULL vs IS_ERR() bug

2023-06-06 Thread Dan Carpenter
The mmap_offset_attach() function returns error pointers, it doesn't return NULL. Fixes: eaee1c085863 ("drm/i915: Add a function to mmap framebuffer obj") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

[Intel-gfx] [PATCH] drm/i915/gsc: Fix error code in intel_gsc_uc_heci_cmd_submit_nonpriv()

2023-06-06 Thread Dan Carpenter
This should return negative -EAGAIN instead of positive EAGAIN. Fixes: e5e1e6d28ebc ("drm/i915/pxp: Add MTL helpers to submit Heci-Cmd-Packet to GSC") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gt/uc/intel_gsc_uc_heci_cmd_submit.c | 2 +- 1 file changed, 1 insertion(+),

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Add some missing error propagation

2023-06-05 Thread Dan Carpenter
ts to solve that problem. Instead we were having the opposite discussion the other week where the bpf people didn't want to backport selftest stuff and Greg wanted to. https://lore.kernel.org/all/2023052647-tacking-wince-85c5@gregkh/ regards, dan carpenter

Re: [Intel-gfx] [PATCH 01/15] drm/i915/plane: warn on non-zero plane offset

2023-05-29 Thread Dan Carpenter
) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202305280453.8yzcms2i-...@intel.com/ smatch warnings: drivers/gpu/drm/i915/display

Re: [Intel-gfx] [PATCH v8 6/7] drm/i915/mtl: find the best QGV point for the SAGV configuration

2023-05-29 Thread Dan Carpenter
/config) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202305280253.ab8brv2w-...@intel.com/ New smatch warnings: drivers/gpu/drm/i915/display

Re: [Intel-gfx] [PATCH] drm/i915/selftests: fix an error code in copy()

2023-05-26 Thread Dan Carpenter
On Fri, May 26, 2023 at 02:58:01PM +0200, Andi Shyti wrote: > Hi Dan, > > On Fri, May 26, 2023 at 02:59:31PM +0300, Dan Carpenter wrote: > > Return the error code if i915_gem_object_create_internal() fails, > > instead of returning success. > > > > Fixes: cf58

[Intel-gfx] [bug report] drm/i915/selftests: Add a cancel request selftest that triggers a reset

2023-05-26 Thread Dan Carpenter
ner_fini(); 908 out_restore: 909 engine->props.preempt_timeout_ms = preempt_timeout_ms; 910 if (err) 911 pr_err("%s: %s error %d\n", __func__, engine->name, err); 912 return err; 913 } regards, dan carpenter

[Intel-gfx] [bug report] drm/i915/display: Handle GMD_ID identification in display code

2023-05-26 Thread Dan Carpenter
8 out_pci_disable: 849 pci_disable_device(pdev); --> 850 i915_probe_error(i915, "Device initialization failed (%d)\n", ret); Oops. 851 return ret; 852 } regards, dan carpenter

[Intel-gfx] [PATCH] drm/i915/selftests: fix an error code in copy()

2023-05-26 Thread Dan Carpenter
Return the error code if i915_gem_object_create_internal() fails, instead of returning success. Fixes: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gt/selftest_migrate.c | 4 +++- 1 file changed, 3 insertions(+),

[Intel-gfx] [bug report] drm/i915: Remove I915_USER_PRIORITY_SHIFT

2023-05-26 Thread Dan Carpenter
err = PTR_ERR(obj); 1554 goto err_ctx_lo; 1555 } 1556 regards, dan carpenter

[Intel-gfx] [bug report] drm/i915/selftests: Stop using kthread_stop()

2023-05-26 Thread Dan Carpenter
kfree(data); 418 out_file: 419 fput(file); 420 return err; 421 } regards, dan carpenter

[Intel-gfx] [bug report] drm/i915: Use ttm mmap handling for ttm bo's.

2023-05-19 Thread Dan Carpenter
m_ops = obj->ops->mmap_ops; 1008 vma->vm_private_data = node->driver_private; ^^^^^^^^ Patch adds unchecked dereference. 1009 return 0; 1010 } regards, dan carpenter

[Intel-gfx] [bug report] drm/i915/pmu: Use functions common with sysfs to read actual freq

2023-03-29 Thread Dan Carpenter
t; 2110 return intel_rps_get_cagf(rps, freq); Warning. 2111 } regards, dan carpenter

[Intel-gfx] [bug report] drm/i915/guc: Use GuC submission API version number

2023-03-24 Thread Dan Carpenter
e_error(gt, "%s firmware %s: fetch failed %pe\n", 822intel_uc_fw_type_repr(uc_fw->type), uc_fw->file_selected.path, ERR_PTR(err)); 823 gt_info(gt, "%s firmware(s) can be downloaded from %s\n", 824 intel_uc_fw_type_repr(uc_fw->type), INTEL_UC_FIRMWARE_URL); 825 826 release_firmware(fw);/* OK even if fw is NULL */ 827 return err; 828 } regards, dan carpenter

Re: [Intel-gfx] [bug report] drm/i915/dmc: add i915_to_dmc() and dmc->i915 and use them

2023-03-10 Thread Dan Carpenter
On Thu, Mar 09, 2023 at 04:51:10PM +0200, Jani Nikula wrote: > On Thu, 09 Mar 2023, Dan Carpenter wrote: > > Hello Jani Nikula, > > > > This is a semi-automatic email about new static checker warnings. > > > > The patch 1b28c1c789d0: "drm/i915/dmc: add i9

[Intel-gfx] [bug report] drm/i915/dmc: add i915_to_dmc() and dmc->i915 and use them

2023-03-09 Thread Dan Carpenter
ERSION_MAJOR(dmc->version), 1163 DMC_VERSION_MINOR(dmc->version)); Unchecked dereferences. 1164 regards, dan carpenter

[Intel-gfx] [bug report] drm/i915/mtl: Add hardware-level lock for steering

2023-02-08 Thread Dan Carpenter
^^ Sleeping. 638 GEM_BUG_ON(rq->fence.error != -EIO); 639 640 engine_unlock_reset_tasklet(engine); preempt enabled again. 641 642 /* Check that we do not resubmit the held request */ regards, dan carpenter

[Intel-gfx] [bug report] drm/i915/guc: Suspend/resume implementation for new interface

2023-02-08 Thread Dan Carpenter
ift a finger to help so who am I to talk...) 657 } 658 659 /* Signal that the GuC isn't running. */ 660 intel_guc_sanitize(guc); 661 662 return 0; 663 } regards, dan carpenter

Re: [Intel-gfx] [bug report] drm/i915: Allow compaction upto SWIOTLB max segment size

2023-02-07 Thread Dan Carpenter
On Mon, Feb 06, 2023 at 04:59:36PM +, Tvrtko Ursulin wrote: > > On 06/02/2023 14:19, Dan Carpenter wrote: > > [ Ancient code but the warning showed up again because the function was > >renamed or something? - dan ] > > > > Hello Chris Wilson, > > &

[Intel-gfx] [bug report] drm/i915: Allow compaction upto SWIOTLB max segment size

2023-02-06 Thread Dan Carpenter
ing of ENOMEM. 188 */ 189 if (ret == -ENOSPC) 190 ret = -ENOMEM; 191 192 return ret; 193 } regards, dan carpenter

Re: [Intel-gfx] [PATCH v2 11/17] drm/display/dp_mst: Add helpers to query for payload allocation errors

2023-02-02 Thread Dan Carpenter
, kindly add following tag where applicable | Reported-by: kernel test robot | Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/display/drm_dp_mst_topology.c:3316 drm_dp_add_payload_part1() warn: missing error code 'ret' vim +/ret +3316 drivers/gpu/drm/display/drm_dp_mst_topology.c

Re: [Intel-gfx] [PATCH v6] drm: Optimise for continuous memory allocation

2022-12-27 Thread Dan Carpenter
test robot | Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/drm_buddy.c:501 find_continuous_blocks() error: uninitialized symbol 'block'. vim +/block +501 drivers/gpu/drm/drm_buddy.c 8a257b57bc11a2 xinhui pan 2022-12-18 472 static struct drm_buddy_block * 8a257b57bc11a2 xinhui pan

[Intel-gfx] [PATCH] drm/i915/uc: Fix double free bug

2022-12-01 Thread Dan Carpenter
The "fw" pointer is freed again in the clean up code at the end of the function. Set it to NULL here to prevent a double free. Fixes: 016241168dc5 ("drm/i915/uc: use different ggtt pin offsets for uc loads") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gt/uc/in

[Intel-gfx] [PATCH] drm/i915: unpin on error in intel_vgpu_shadow_mm_pin()

2022-11-21 Thread Dan Carpenter
Call intel_vgpu_unpin_mm() on this error path. Fixes: 418741480809 ("drm/i915/gvt: Adding ppgtt to GVT GEM context after shadow pdps settled.") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gvt/scheduler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/dr

Re: [Intel-gfx] [bug report] drm/i915/guc: Implement multi-lrc submission

2022-09-23 Thread Dan Carpenter
On Thu, Sep 22, 2022 at 01:01:48PM -0700, John Harrison wrote: > On 9/22/2022 07:26, Dan Carpenter wrote: > > Hello Matthew Brost, > > > > The patch 6b540bf6f143: "drm/i915/guc: Implement multi-lrc > > submission" from Oct 14, 2021, leads to the follow

[Intel-gfx] [bug report] drm/i915/guc: Implement multi-lrc submission

2022-09-22 Thread Dan Carpenter
t: 751 spin_unlock(>guc_state.lock); --> 752 return err; 753 } regards, dan carpenter

[Intel-gfx] [PATCH] drm/i915: prevent integer overflow in query_engine_info()

2022-09-01 Thread Dan Carpenter
This code uses struct_size() but it stores the result in an int so the integer overflow checks are not effective. Record the types as size_t to prevent the size from being truncated. Fixes: bf3c50837506 ("drm/i915/query: Use struct_size() helper") Signed-off-by: Dan Carpenter --- I d

[Intel-gfx] [drm-intel:for-linux-next-gt 1/1] drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c:497 intel_guc_slpc_set_min_freq() warn: inconsistent returns '>lock'.

2022-08-30 Thread Dan Carpenter
-ci/archive/20220830/202208301957.ulaot2oy-...@intel.com/config) compiler: gcc-11 (Debian 11.3.0-5) 11.3.0 If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot Reported-by: Dan Carpenter New smatch warnings: drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c:497

[Intel-gfx] [PATCH v2] drm/i915/selftests: fix a couple IS_ERR() vs NULL tests

2022-07-08 Thread Dan Carpenter
The shmem_pin_map() function doesn't return error pointers, it returns NULL. Fixes: be1cb55a07bf ("drm/i915/gt: Keep a no-frills swappable copy of the default context state") Signed-off-by: Dan Carpenter Reviewed-by: Matthew Auld --- v2: Correct the Fixes tag. Add Matthew's revie

Re: [Intel-gfx] [PATCH] drm/i915/selftests: fix a couple IS_ERR() vs NULL tests

2022-07-08 Thread Dan Carpenter
On Fri, Jul 08, 2022 at 10:02:34AM +0100, Matthew Auld wrote: > On 08/07/2022 09:40, Dan Carpenter wrote: > > The shmem_pin_map() function doesn't return error pointers, it returns > > NULL. > > > > Fixes: a0d3fdb628b8 ("drm/i915/gt: Split logical ring contex

[Intel-gfx] [PATCH] drm/i915/gvt: IS_ERR() vs NULL bug in intel_gvt_update_reg_whitelist()

2022-07-08 Thread Dan Carpenter
The shmem_pin_map() function returns NULL, it doesn't return error pointers. Fixes: 97ea656521c8 ("drm/i915/gvt: Parse default state to update reg whitelist") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[Intel-gfx] [PATCH] drm/i915/selftests: fix a couple IS_ERR() vs NULL tests

2022-07-08 Thread Dan Carpenter
The shmem_pin_map() function doesn't return error pointers, it returns NULL. Fixes: a0d3fdb628b8 ("drm/i915/gt: Split logical ring contexts from execlist submission" Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gt/selftest_lrc.c | 8 1 file changed, 4 insert

[Intel-gfx] [PATCH] drm/i915: Fix error code in icl_compute_combo_phy_dpll()

2022-06-24 Thread Dan Carpenter
This function is supposed to return zero or negative error codes but it accidentally returns true on failure. Fixes: 92a020747d6c ("drm/i915: Split shared dpll .get_dplls() into compute and get phases") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/display/intel_dpll_mgr.c

[Intel-gfx] [bug report] drm/i915/migrate: Evict and restore the flatccs capable lmem obj

2022-05-05 Thread Dan Carpenter
!sg_dma_len(it_ccs.sg) { 884 err = -EINVAL; 885 break; 886 } 887 888 cond_resched(); 889 } while (1); 890 891 out_ce: 892 return err; 893 } regards, dan carpenter

Re: [Intel-gfx] [PATCH 0/6] Remove usage of list iterator past the loop body

2022-03-07 Thread Dan Carpenter
les, but unfortunately that warning is disabled by default so we still have to rely on kbuild/Clang/Smatch to find the bugs. But hopefully the new API encourages people to write clearer code so it prevents bugs in the long run. regards, dan carpenter

Re: [Intel-gfx] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-03 Thread Dan Carpenter
44 --- a/mm/slab.c +++ b/mm/slab.c @@ -3771,6 +3771,9 @@ EXPORT_SYMBOL(kmem_cache_free_bulk); * * Don't free memory not originally allocated by kmalloc() * or you will run into trouble. + * + * CHECKER information + * frees: $0 */ void kfree(const void *objp) { regards, dan carpenter

Re: [Intel-gfx] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-03-03 Thread Dan Carpenter
for (port = 0; port < r8a66597->max_root_hub; port++) { 427 if (r8a66597->root_hub[port].dev == dev) { ^^^ 428 r8a66597->root_hub[port].dev = NULL; 429 break; 430 } 431 } Printing the freed pointer in debug code is another thing people do. regards, dan carpenter

Re: [Intel-gfx] [PATCH 1/6] drivers: usb: remove usage of list iterator past the loop body

2022-02-28 Thread Dan Carpenter
On Mon, Feb 28, 2022 at 10:20:28AM -0800, Joe Perches wrote: > On Mon, 2022-02-28 at 14:24 +0300, Dan Carpenter wrote: > > > a multi-line indent gets curly braces for readability even though > > it's not required by C. And then both sides would get curly braces. > > T

Re: [Intel-gfx] [PATCH 1/6] drivers: usb: remove usage of list iterator past the loop body

2022-02-28 Thread Dan Carpenter
lated part of a patch is a bit vague and some maintainers will ask you to add or subtract from a patch depending on their individual tastes. I don't really have an exact answer, but I felt like this patch needs to be subtracted from. Especially if there is a whole chunk of the patch which can be removed, then to me, that obviously should be in a different patch. regards, dan carpenter

Re: [Intel-gfx] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr

2022-02-28 Thread Dan Carpenter
name(&_phy->dev)); > BUG(); > } > } else { > - sas_port_create_link(port, phy); > - list_add_tail(>port_siblings, >phy_list); > + sas_port_create_link(port, _phy); > + list_add_tail(&_phy->port_siblings, >phy_list); > port->num_phys++; > } > mutex_unlock(>phy_list_mutex); regards, dan carpenter

Re: [Intel-gfx] [PATCH 6/6] treewide: remove check of list iterator against head past the loop body

2022-02-28 Thread Dan Carpenter
te now. Just delete it. > - if (group && >list == >tid_group_list.list) > + if (!group) > goto bail_eagain; > group = list_prepare_entry(group, >tid_group_list.list, > list); regards, dan carpenter

Re: [Intel-gfx] [PATCH 3/6] treewide: fix incorrect use to determine if list is empty

2022-02-28 Thread Dan Carpenter
-- > drivers/media/pci/saa7134/saa7134-alsa.c | 4 ++-- > drivers/perf/xgene_pmu.c | 13 +++-- > 3 files changed, 11 insertions(+), 10 deletions(-) These are all bug fixes. 1) Send them as 3 separate patches. 2) Add Fixes tags. regards, dan carpenter

Re: [Intel-gfx] [PATCH 1/6] drivers: usb: remove usage of list iterator past the loop body

2022-02-28 Thread Dan Carpenter
pped = stopped; > spin_unlock_irqrestore(>dev->lock, flags); > return -EINVAL; > @@ -954,7 +957,6 @@ net2272_dequeue(struct usb_ep *_ep, struct usb_request > *_req) > dev_dbg(ep->dev->dev, "unlink (%s) pio\n", _ep->name); > net2272_done(ep, req, -ECONNRESET); > } > - req = NULL; Another unrelated change. These are all good changes but send them as separate patches. > ep->stopped = stopped; > > spin_unlock_irqrestore(>dev->lock, flags); regards, dan carpenter

[Intel-gfx] [bug report] drm/i915: Use vma resources for async unbinding

2022-02-27 Thread Dan Carpenter
a->resource); If "vma->resource" is NULL here then it leads to a crash in i915_vma_resource_get(). 488 work->cache_level = cache_level; 489 work->flags = bind_flags; 490 regards, dan carpenter

[Intel-gfx] [bug report] drm/i915: Extract intel_bw_check_data_rate()

2022-02-25 Thread Dan Carpenter
ow that relationship is not so clear so it causes a Smatch warning. 923 if (ret) 924 return ret; 925 926 data_rate = intel_bw_data_rate(dev_priv, new_bw_state); 927 data_rate = DIV_ROUND_UP(data_rate, 1000); 928 regards, dan carpenter

Re: [Intel-gfx] [PATCH] drm/i915: delete shadow "ret" variable

2022-01-27 Thread Dan Carpenter
On Fri, Jan 28, 2022 at 07:20:02AM +0100, Thomas Hellström wrote: > On Thu, 2022-01-27 at 17:26 -0500, Rodrigo Vivi wrote: > > On Thu, Jan 27, 2022 at 11:51:15AM +0300, Dan Carpenter wrote: > > > This "ret" declaration shadows an existing "ret" variable

[Intel-gfx] [PATCH] drm/i915: delete shadow "ret" variable

2022-01-27 Thread Dan Carpenter
This "ret" declaration shadows an existing "ret" variable at the top of the function. Delete it. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/i915_vma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i

[Intel-gfx] [PATCH] drm/i915/selftests: fix some error codes in __cancel_reset()

2022-01-27 Thread Dan Carpenter
There were two error paths in __cancel_reset() which return success instead of a negative error code as expected. Fixes: 4e6835466771 ("drm/i915/selftests: Add a cancel request selftest that triggers a reset") Signed-off-by: Dan Carpenter --- >From static analysis. I am

[Intel-gfx] [PATCH] drm/i915/overlay: Prevent divide by zero bugs in scaling

2022-01-24 Thread Dan Carpenter
ror: potential divide by zero bug '/ rec->dst_width'. Prevent this by ensuring that the dst height and width are non-zero. Fixes: 02e792fbaadb ("drm/i915: implement drmmode overlay support v4") Signed-off-by: Dan Carpenter --- >From static analysis. Not tested. drivers/g

[Intel-gfx] [bug report] drm/i915/gt: Replace direct submit with direct call to tasklet

2021-12-10 Thread Dan Carpenter
_and_wake_up_bit(bit, lock); 1623 } 1624 local_bh_enable(); 1625 } regards, dan carpenter

[Intel-gfx] [bug report] drm/i915: Add support for moving fence waiting

2021-11-28 Thread Dan Carpenter
code dereferences it without checking. 1016 flags, work); 1017 if (err) regards, dan carpenter

[Intel-gfx] [PATCH] drm/i915/gvt: Prevent integer overflow in intel_vgpu_emulate_cfg_write()

2021-11-24 Thread Dan Carpenter
The "offset" is a u32 that comes from the user. The bug is that the "offset + bytes" operation can have an integer overflow problem which leads to an out of bounds access. Fixes: 4d60c5fd3f87 ("drm/i915/gvt: vGPU PCI configuration space virtualization"

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/ttm: Fix error code in i915_ttm_eviction_valuable()

2021-11-22 Thread Dan Carpenter
ke there should be a human reading them but it's not me... The system is broken, but who is fixing it? regards, dan carpenter > > == Summary == > > CI Bug Log - changes from CI_DRM_10911_full -> Patchwork_21650_full > >

[Intel-gfx] [PATCH] drm/i915/ttm: Fix error code in i915_ttm_eviction_valuable()

2021-11-21 Thread Dan Carpenter
This function returns a bool type so returning -EBUSY is equivalent to returning true. It should return false instead. Fixes: 7ae034590cea ("drm/i915/ttm: add tt shmem backend") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- 1 file changed, 1 inser

Re: [Intel-gfx] [bug report] drm/i915/ttm: add tt shmem backend

2021-11-18 Thread Dan Carpenter
On Thu, Nov 18, 2021 at 03:15:31PM +, Matthew Auld wrote: > On 18/11/2021 15:01, Dan Carpenter wrote: > > Hello Matthew Auld, > > > > The patch 7ae034590cea: "drm/i915/ttm: add tt shmem backend" from Oct > > 18, 2021, leads to the following Smatch static

[Intel-gfx] [bug report] drm/i915/ttm: add tt shmem backend

2021-11-18 Thread Dan Carpenter
ill on TTM's LRU lists */ 338 return i915_gem_object_evictable(obj); 339 } regards, dan carpenter

[Intel-gfx] [PATCH] drm/i915/guc: fix NULL vs IS_ERR() checking

2021-11-16 Thread Dan Carpenter
The intel_engine_create_virtual() function does not return NULL. It returns error pointers. Fixes: e5e32171a2cf ("drm/i915/guc: Connect UAPI to GuC multi-lrc interface") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 ++-- 1 file changed, 2

[Intel-gfx] [PATCH] drm/i915: Fix error pointer dereference in i915_gem_do_execbuffer()

2021-11-16 Thread Dan Carpenter
460c33821 ("drm/i915: Multi-BB execbuf") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c in

[Intel-gfx] [PATCH] drm/i915: pin: delete duplicate check in intel_pin_and_fence_fb_obj()

2021-11-09 Thread Dan Carpenter
The "ret" variable is checked on the previous line so we know it's zero. No need to check again. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/display/intel_fb_pin.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i9

Re: [Intel-gfx] [PATCH][next] drm/i915: Fix dereference of pointer backup before it is null checked

2021-10-12 Thread Dan Carpenter
of feel like we shouldn't work around static checker bugs. But when we do then there shouldn't be a Fixes tag. regards, dan carpenter

Re: [Intel-gfx] [PATCH] drm/i915: remove IS_ACTIVE

2021-10-05 Thread Dan Carpenter
On Mon, Oct 04, 2021 at 01:52:27PM -0700, Lucas De Marchi wrote: > Cc'ing Dan Carpenter > > On Fri, Oct 01, 2021 at 12:57:13PM +0300, Jani Nikula wrote: > > On Fri, 01 Oct 2021, Chris Wilson wrote: > > > Quoting Lucas De Marchi (2021-10-01 08:40:41) > > >

[Intel-gfx] [PATCH] drm/i915/tc: Delete bogus NULL check in intel_ddi_encoder_destroy()

2021-10-04 Thread Dan Carpenter
The "digi_port" pointer can't be NULL and we have already dereferenced it so checking for NULL is not necessary. Delete the check. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/display/intel_ddi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drive

Re: [Intel-gfx] [bug report] drm/i915/tc: Fix TypeC PHY connect/disconnect logic on ADL-P

2021-10-01 Thread Dan Carpenter
On Fri, Oct 01, 2021 at 05:20:17PM +0300, Ville Syrjälä wrote: > On Fri, Oct 01, 2021 at 04:25:35PM +0300, Dan Carpenter wrote: > > Hello Imre Deak, > > > > This is a semi-automatic email about new static checker warnings. > > > > The patch 3e0abc7661c8: "d

[Intel-gfx] [bug report] drm/i915/tc: Fix TypeC PHY connect/disconnect logic on ADL-P

2021-10-01 Thread Dan Carpenter
kfree(dig_port); regards, dan carpenter

[Intel-gfx] [kbuild] Re: [PATCH v2 04/13] drm/hdcp: Expand HDCP helper library for enable/disable/check

2021-09-17 Thread Dan Carpenter
) 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: drivers/gpu

[Intel-gfx] [PATCH] drm/i915/gt: Potential error pointer dereference in pinned_context()

2021-08-13 Thread Dan Carpenter
If the intel_engine_create_pinned_context() function returns an error pointer, then dereferencing "ce" will Oops. Use "vm" instead of "ce->vm". Fixes: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Dan Carpenter --- drivers/gpu

[Intel-gfx] [bug report] drm/i915/gem: Correct the locking and pin pattern for dma-buf (v8)

2021-08-13 Thread Dan Carpenter
'rq'. drivers/gpu/drm/i915/gt/selftest_migrate.c:193 clear() error: uninitialized symbol 'vaddr'. drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:819 __unwind_incomplete_requests() error: uninitialized symbol 'pl'. regards, dan carpenter

[Intel-gfx] [bug report] drm/i915/gt: Replace direct submit with direct call to tasklet

2021-07-27 Thread Dan Carpenter
ke_up_bit(bit, lock); 1623 } 1624 local_bh_enable(); 1625 } regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [drm-intel:drm-intel-gt-next 8/14] drivers/gpu/drm/i915/gt/selftest_migrate.c:102 copy() error: uninitialized symbol 'rq'.

2021-07-02 Thread Dan Carpenter
which involves dropping some locks), if we see any other > error then the loop is terminated with ww->loop = false, which then > hits the goto err_out. > Ah, yeah, you're right. False positive. I hadn't looked at this code in context (I only had reviewed the email). Now that I've pulled th

Re: [Intel-gfx] [drm-intel:drm-intel-gt-next 8/14] drivers/gpu/drm/i915/gt/selftest_migrate.c:102 copy() error: uninitialized symbol 'rq'.

2021-07-02 Thread Dan Carpenter
On Fri, Jul 02, 2021 at 02:07:27PM +0300, Dan Carpenter wrote: > On Fri, Jul 02, 2021 at 11:32:45AM +0100, Matthew Auld wrote: > > On Fri, 2 Jul 2021 at 09:45, Dan Carpenter wrote: > > > cf586021642d80 Chris Wilson 2021-06-17 84 > > > cf586021642d80 Chris Wilson 2021

Re: [Intel-gfx] [drm-intel:drm-intel-gt-next 8/14] drivers/gpu/drm/i915/gt/selftest_migrate.c:102 copy() error: uninitialized symbol 'rq'.

2021-07-02 Thread Dan Carpenter
On Fri, Jul 02, 2021 at 11:32:45AM +0100, Matthew Auld wrote: > On Fri, 2 Jul 2021 at 09:45, Dan Carpenter wrote: > > > > tree: git://anongit.freedesktop.org/drm-intel drm-intel-gt-next > > head: 5cd57f676bb946a00275408f0dd0d75dbc466d25 > > commit: cf586021642d8017

[Intel-gfx] [drm-intel:drm-intel-gt-next 7/8] drivers/gpu/drm/i915/selftests/intel_memory_region.c:227 igt_mock_reserve() error: 'mem' dereferencing possible ERR_PTR()

2021-07-02 Thread Dan Carpenter
(Debian 9.3.0-22) 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/i915/selftests/intel_memory_region.c:227 igt_mock_reserve() error: 'mem' dereferencing possible ERR_PTR() vim +/mem

[Intel-gfx] [drm-intel:drm-intel-gt-next 8/14] drivers/gpu/drm/i915/gt/selftest_migrate.c:102 copy() error: uninitialized symbol 'rq'.

2021-07-02 Thread Dan Carpenter
9.3.0-22) 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/i915/gt/selftest_migrate.c:102 copy() error: uninitialized symbol 'rq'. drivers/gpu/drm/i915/gt/selftest_migrate.c:113 copy

[Intel-gfx] [bug report] drm/i915/guc: Add support for data reporting in GuC responses

2021-06-18 Thread Dan Carpenter
440 mutex_unlock(>send_mutex); 441 442 return ret; 443 } regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH] drm/i915: fix an error code in intel_overlay_do_put_image()

2021-04-14 Thread Dan Carpenter
This code should propagate the error from intel_overlay_pin_fb() but currently it returns success. Fixes: 1b321026e213 ("drm/i915: Pass ww ctx to intel_pin_to_display_plane") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/display/intel_overlay.c | 4 +++- 1 file changed, 3

[Intel-gfx] [PATCH] drm/i915/gvt: Fix error code in intel_gvt_init_device()

2021-04-14 Thread Dan Carpenter
and make everything consistent. Fixes: c5d71cb31723 ("drm/i915/gvt: Move vGPU type related code into gvt file") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gvt/gvt.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/d

  1   2   3   >