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

2017-07-12 Thread Dan Carpenter
We accidentally forget to set the error code here, which means that we return NULL. The callers aren't expecting that and Oops. Fixes: 4ff4b44cbb70 ("drm/i915: Store a direct lookup from object handle to vma") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/i91

Re: [Intel-gfx] [PATCH] drm/i915: Prevent unbounded wm results in g4x_compute_wm()

2017-11-07 Thread Dan Carpenter
pect to be > > non-negative, and so silence smatch. > > > > Signed-off-by: Chris Wilson > > Cc: Ville Syrjälä > Cc: Dan Carpenter > > Hi Dan, do you mind sharing any insight as to why smatch generates this > warning and whether the approach in this patch is in

[Intel-gfx] [bug report] drm/i915: Preallocate our mmu notifier workequeu to unbreak cpu hotplug deadlock

2017-10-17 Thread Dan Carpenter
gt;mm->mmap_sem); 231 232 if (mn) { 233 destroy_workqueue(mn->wq); dereference. 234 kfree(mn); 235 } 236 237 return err ? ERR_PTR(err) : mm->mn; 238 } regards, dan ca

Re: [Intel-gfx] drm/i915/gvt: Use common error handling code in shadow_workload_ring_buffer()

2017-10-24 Thread Dan Carpenter
s just that two out of three error messages happened to be the same and Markus wants to save a bit of memory by using the same string. The memory savings is not so big that it's worth making the code less readable. regards, dan carpenter ___ Intel-gf

Re: [Intel-gfx] [PATCH 02/10] drm: i915: Get DSC capability from DP sink

2018-03-04 Thread Dan Carpenter
Hi Gaurav, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20180223] [also build test WARNING on v4.16-rc3] [cannot apply to drm-intel/for-linux-next drm/drm-next v4.16-rc3 v4.16-rc2 v4.16-rc1] [if your patch is applied to the wrong git tree, please drop u

[Intel-gfx] [bug report] drm/i915/gvt: Update MMIO handle policy to compatible KBL platform.

2017-08-11 Thread Dan Carpenter
ow as well? 2856 MMIO_D(0x4ab0, D_SKL | D_KBL); 2857 MMIO_D(0x20d4, D_SKL | D_KBL); 2858 2859 return 0; 2860 } 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 integer overflow tests

2017-08-16 Thread Dan Carpenter
o it could overflow if it's set to UINT_MAX when we do: exec2_list = kvmalloc_array(args->buffer_count + 1, sz, ^^ Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the execobjects array&qu

Re: [Intel-gfx] [PATCH] drm/i915: Fix integer overflow tests

2017-08-17 Thread Dan Carpenter
On Thu, Aug 17, 2017 at 12:37:00PM +0300, Imre Deak wrote: > On Thu, Aug 17, 2017 at 09:23:10AM +0300, Dan Carpenter wrote: > > There are some potential integer overflows here on 64 bit systems. > > > > The condition "if (nfences > SIZE_MAX / sizeof(*fences))&qu

Re: [Intel-gfx] [PATCH] drm/i915: Fix integer overflow tests

2017-08-17 Thread Dan Carpenter
On Thu, Aug 17, 2017 at 07:16:03AM -0700, Jason Ekstrand wrote: > On Thu, Aug 17, 2017 at 2:56 AM, Imre Deak wrote: > > > On Thu, Aug 17, 2017 at 12:50:37PM +0300, Dan Carpenter wrote: > > > On Thu, Aug 17, 2017 at 12:37:00PM +0300, Imre Deak wrote: > > > > O

[Intel-gfx] [PATCH v2] drm/i915: Fix integer overflow tests

2017-08-18 Thread Dan Carpenter
exec2_list = kvmalloc_array(args->buffer_count + 1, sz, ^^ Originally, those two integer overflow checks were against UINT_MAX instead of SIZE_MAX and this patch changes them back. Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations ov

Re: [Intel-gfx] [PATCH v2] drm/i915: Fix integer overflow tests

2017-08-18 Thread Dan Carpenter
On Fri, Aug 18, 2017 at 08:46:25AM +0100, Chris Wilson wrote: > Quoting Dan Carpenter (2017-08-18 08:07:00) > > There are some potential integer overflows here on 64 bit systems. > > > > The condition "if (nfences > SIZE_MAX / sizeof(*fences))" can only be > &

Re: [Intel-gfx] [PATCH] #1: test capitalizing PATCH

2017-02-28 Thread Dan Carpenter
On Tue, Feb 28, 2017 at 06:31:48PM +0200, Jani Nikula wrote: > > Cc: Hans, this probably applies to you as well. > > On Tue, 28 Feb 2017, Dan Carpenter wrote: > > The new version patchwork is filtering out my patches for some reason. > > Test if it's because it no

[Intel-gfx] [bug report] drm/i915: Fill different pages of the GTT

2017-03-13 Thread Dan Carpenter
0 } 581 582 err: 583 if (!i915_vma_is_ggtt(vma)) ^ Dereferenced inside function call. regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [bug report] drm/i915: Live testing for context execution

2017-03-13 Thread Dan Carpenter
t(i915, file->driver_priv); 351 } 352 if (IS_ERR(ctx)) { 353 err = PTR_ERR(ctx); 354 goto out_unlock; regards, dan carpenter ___ Intel-gfx mailing list

[Intel-gfx] [bug report] drm/i915/gvt: replace the gvt_err with gvt_vgpu_err

2017-03-22 Thread Dan Carpenter
1344 if (!info) { ^ Existing check. 1345 gvt_vgpu_err("kvmgt_guest_info invalid\n"); 1346 return false; regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http

[Intel-gfx] [bug report] drm/i915/gvt/kvmgt: add vfio/mdev support to KVMGT

2017-01-25 Thread Dan Carpenter
robably you could just delete these lines. 972 } 973 break; 974 975 case VFIO_PCI_BAR3_REGION_INDEX ... VFIO_PCI_BAR5_REGION_INDEX: regards, dan carpenter ___ Intel-gfx

Re: [Intel-gfx] [bug report] drm/i915/gvt/kvmgt: add vfio/mdev support to KVMGT

2017-01-26 Thread Dan Carpenter
to see if it's doing cross function analysis correctly. regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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 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 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

[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 v13 1/2] drm/i915: Add WABB blit for Wa_16018031267 / Wa_16018063123

2023-09-25 Thread Dan Carpenter
: 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/gp

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

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

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

2023-10-04 Thread Dan Carpenter
0 i915_sched_engine_put(ve->base.sched_engine); 3661 intel_engine_free_request_pool(&ve->base); regards, dan carpenter

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

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

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

2023-06-26 Thread Dan Carpenter
user 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/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

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

2023-02-06 Thread Dan Carpenter
ur 187 * usual understanding of ENOMEM. 188 */ 189 if (ret == -ENOSPC) 190 ret = -ENOMEM; 191 192 return ret; 193 } 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/guc: Suspend/resume implementation for new interface

2023-02-08 Thread Dan Carpenter
u, I'm too lazy to lift 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

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

2023-02-08 Thread Dan Carpenter
l_engine_reset_bh(engine, NULL); ^^ 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: Use ttm mmap handling for ttm bo's.

2023-05-19 Thread Dan Carpenter
vma->vm_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/selftests: Stop using kthread_stop()

2023-05-26 Thread Dan Carpenter
y_worker(data[n].worker); 416 } 417 kfree(data); 418 out_file: 419 fput(file); 420 return err; 421 } regards, dan carpenter

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

2023-05-26 Thread Dan Carpenter
m_object_create_internal(gt->i915, PAGE_SIZE); 1552 if (IS_ERR(obj)) { 1553 err = PTR_ERR(obj); 1554 goto err_ctx_lo; 1555 } 1556 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/display: Handle GMD_ID identification in display code

2023-05-26 Thread Dan Carpenter
(i915); 848 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] [bug report] drm/i915/selftests: Add a cancel request selftest that triggers a reset

2023-05-26 Thread Dan Carpenter
intel_context_put(ce); 906 out_spin: 907 igt_spinner_fini(&spin); 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

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

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 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] drm/i915/selftests: Add some missing error propagation

2023-06-05 Thread Dan Carpenter
grep line to their scripts 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

[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(+),

[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 del

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

2023-06-06 Thread Dan Carpenter
the 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

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 th

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

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

2024-01-10 Thread Dan Carpenter
;base.pd); 276 277 mutex_destroy(&ppgtt->flush); 278 } regards, dan carpenter

[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

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

2022-09-22 Thread Dan Carpenter
915_request_guc_submit(rq); 749 750 out: 751 spin_unlock(&ce->guc_state.lock); --> 752 return err; 753 } regards, dan carpenter

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] [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

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

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

2023-03-09 Thread Dan Carpenter
1160 goto out; 1161 1162 seq_printf(m, "version: %d.%d\n", DMC_VERSION_MAJOR(dmc->version), 1163 DMC_VERSION_MINOR(dmc->version)); Unchecked dereferences. 1164 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/guc: Use GuC submission API version number

2023-03-24 Thread Dan Carpenter
INTEL_UC_FIRMWARE_ERROR); 820 --> 821 gt_probe_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

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

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

[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] [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_

[bug report] drm/i915/gem: Downgrade stolen lmem setup warning

2024-07-12 Thread Dan Carpenter
struct intel_memory_region *mem = i915->mm.regions[i]; 377 u64 region_size, io_size; regards, dan carpenter

Re: [PATCH] drm/i915: Allow NULL memory region

2024-07-17 Thread Dan Carpenter
On Wed, Jul 17, 2024 at 05:05:55PM +0200, Nirmoy Das wrote: > > On 7/12/2024 11:41 PM, Jonathan Cavitt wrote: > > Prevent a NULL pointer access in intel_memory_regions_hw_probe. > > > > Fixes: 05da7d9f717b ("drm/i915/gem: Downgrade stolen lmem setup warning&quo

Re: [PATCH] drm/i915: Allow NULL memory region

2024-07-17 Thread Dan Carpenter
event a NULL pointer access in intel_memory_regions_hw_probe. > > > > > > > > Fixes: 05da7d9f717b ("drm/i915/gem: Downgrade stolen lmem setup > > > > warning") > > > > Reported-by: Dan Carpenter > > > > Signed-off-by: Jonathan Cavitt >

Re: [PATCH] drm/i915: Allow NULL memory region

2024-07-25 Thread Dan Carpenter
ay. "I'm not lying" at the end. It should be the pointless patches which say, "I'm doing a pointless thing. Don't bother backporting." Most stable patch backports are done automatically and people have various tools and scripts to do that. If the tools don't handle this patch automatically then they are defective. regards, dan carpenter

Re: [PATCH] drm/i915: Allow NULL memory region

2024-07-25 Thread Dan Carpenter
On Thu, Jul 25, 2024 at 10:58:08AM -0500, Dan Carpenter wrote: > On Thu, Jul 25, 2024 at 08:48:35AM +0100, Tvrtko Ursulin wrote: > > > > Hi, > > > > On 12/07/2024 22:41, Jonathan Cavitt wrote: > > > Prevent a NULL pointer access in intel_memory_regions_hw_

Re: [PATCH] drm/i915: Allow NULL memory region

2024-07-26 Thread Dan Carpenter
On Fri, Jul 26, 2024 at 09:17:20AM +0100, Tvrtko Ursulin wrote: > > On 25/07/2024 16:58, Dan Carpenter wrote: > > On Thu, Jul 25, 2024 at 08:48:35AM +0100, Tvrtko Ursulin wrote: > > > > > > Hi, > > > > > > On 12/07/2024 22:41, Jonathan Cavitt

Re: [PATCH v10] drm/i915: WA context support for L3flush

2024-08-16 Thread Dan Carpenter
| Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202408170547.2jchhuar-...@intel.com/ New smatch warnings: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:4415 guc_kernel_context_pin() error: uninitialized symbol 'ret'. vim +/ret +4415 drivers/gpu/drm/i915/gt/uc/intel_guc_su

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

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_pe

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

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

2024-02-19 Thread Dan Carpenter
101 102 if (!rq) { ^^^ Previously we assumed "rq" could be NULL. 103 intel_engine_dump(engine, &p, 104 "%s heartbeat not ticking\n", regards, dan carpenter

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/dp: Add support for DP tunnel BW allocation

2024-03-05 Thread Dan Carpenter
gt;display.dp_tunnel_mgr = tunnel_mgr; 797 798 return 0; 799 } 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] drm/i915/guc: Remove bogus null check

2024-03-29 Thread Dan Carpenter
ot;Fixes:" 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

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

Re: [PATCH] drm/i915/display: Workaround for odd panning for planar yuv

2024-09-15 Thread Dan Carpenter
/20240915/202409151558.etiw5umu-...@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

[Intel-gfx] [patch] drm/i915: remove a superflous semi-colon

2013-06-20 Thread Dan Carpenter
This macro doesn't need a semi-colon. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index e5cc7c0..592b0eb9 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1773,7 +1773,7 @

Re: [Intel-gfx] drm/i915: add i915_gem_context_get_hang_stats()

2013-06-20 Thread Dan Carpenter
RCS) 319 return ERR_PTR(-EINVAL); 320 321 if (file == NULL) New check. 322 return ERR_PTR(-EINVAL); 323 regards, dan carpenter ___ Intel-gfx mailing list I

[Intel-gfx] [patch 1/2] drm/i915: checking for NULL instead of IS_ERR()

2013-07-18 Thread Dan Carpenter
i915_gem_vma_create() returns and ERR_PTR() or a valid pointer, it never returns NULL. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 40c2fc6..9a9a77a 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915

[Intel-gfx] [patch 2/2] drm/i915: use after free on error path

2013-07-18 Thread Dan Carpenter
i915_gem_vma_destroy() frees its argument so we have to move the drm_mm_remove_node() call up a few lines. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 9a9a77a..f347ad5 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b

[Intel-gfx] [patch] drm/i915: precedence bug in hsw_compute_wm_results()

2013-08-09 Thread Dan Carpenter
The '!' operation has higher precedence than the compare so probably this test is never true. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index a5a9959..0b9d9a7 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drive

[Intel-gfx] [patch] drm/i915: unbreak i915_gem_object_ggtt_unbind()

2013-08-09 Thread Dan Carpenter
There is an extra semi-colon here so we just leak and never unbind anything. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 735f43f..a582540 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [patch v2] drm/i915: fix a limit check in hsw_compute_wm_results()

2013-08-09 Thread Dan Carpenter
The '!' here was not intended. Since '!' has higher precedence than compare, it means the check is never true. Signed-off-by: Dan Carpenter --- v2: My first patch was wrong. diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 96234c6..

[Intel-gfx] [patch] drm/i915: use _safe version of list_for_each

2013-08-19 Thread Dan Carpenter
We sometimes call i915_vma_unbind() inside the loop and that can free the vma. Signed-off-by: Dan Carpenter --- Static checker stuff. Untested. diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 9b3b5f8..5249735 100644 --- a/drivers/gpu

Re: [Intel-gfx] drm/i915: Switch eviction code to use vmas

2013-08-19 Thread Dan Carpenter
This often frees the "vma". 144 145 list_del_init(&vma->exec_list); ^^^ Dereference. 146 drm_gem_object_unrefe

[Intel-gfx] [patch] drm/i915: cleanup a min_t() cast

2013-09-20 Thread Dan Carpenter
The lower layers of sysfs will not allow an "offset" of more than GEN7_L3LOG_SIZE and also l3_access_valid() caps it a second time. But it's a little easier to audit if we don't have to worry that the subtraction will result in negative values. Signed-off-by: Dan Carpenter

[Intel-gfx] [patch] drm/i915: precendence bug in GT_PARITY_ERROR()

2013-09-24 Thread Dan Carpenter
The | operation has higher precedence than "?:" so the macro always returns GT_RENDER_L3_PARITY_ERROR_INTERRUPT_S1. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index c4f9bef..87b 100644 --- a/drivers/gpu/drm/i915/

[Intel-gfx] [patch] drm/i915/skl: cleanup an indenting issue

2015-03-13 Thread Dan Carpenter
This statement is indented an extra space. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 959058f..028c6d4 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -3905,13 +3905,13 @@ static void

[Intel-gfx] [patch] drm/i915: memory leak in __i915_gem_vma_create()

2015-03-18 Thread Dan Carpenter
In the original code then if WARN_ON(i915_is_ggtt(vm) != !!ggtt_view) was true then we leak "vma". Presumably that doesn't happen often but static checkers complain and this bug is easy to fix. Fixes: c3bbb6f2825d ('drm/i915: Do not use ggtt_view with (aliasing) PPGTT&

Re: [Intel-gfx] drm/i915: Track GEN6 page table usage

2015-03-23 Thread Dan Carpenter
allers expect a negative error code. 315 } regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] drm/i915: Initialize all contexts

2015-03-23 Thread Dan Carpenter
Existing unchecked dereference. 731 /* The hardware context switch is emitted, but we haven't 732 * actually changed the state - so it's probably safe to bail regards, dan carpenter ___ Intel-gfx mailing

Re: [Intel-gfx] drm/i915: Initialize all contexts

2015-03-24 Thread Dan Carpenter
Ugh... Sorry for that. Smatch is supposed to do cross function analysis but I seem to have broken something. I will investigate and silence this false positive. regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http

Re: [Intel-gfx] [PATCH 2/5] drm/i915: i915_dma_map_single returns positive error codes

2015-03-24 Thread Dan Carpenter
EN6 page table usage"). > Please give me reporter credit so I can justify my paycheck to my boss. Reported-by: Dan Carpenter > Cc: Dan Carpenter > Cc: Mika Kuoppala > Signed-off-by: Michel Thierry > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- > 1 file changed, 1 inserti

Re: [Intel-gfx] [PATCH 2/5] drm/i915: i915_dma_map_single returns positive error codes

2015-03-24 Thread Dan Carpenter
On Tue, Mar 24, 2015 at 06:57:13PM +0300, Dan Carpenter wrote: > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c > > b/drivers/gpu/drm/i915/i915_gem_gtt.c > > index 645c363..79ade6f 100644 > > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > > +++ b/drivers/gpu/drm/i91

Re: [Intel-gfx] drm/i915: Copy the staged connector config to the legacy atomic state

2015-03-27 Thread Dan Carpenter
if (connector->new_encoder != connector->encoder) 11935 connector->encoder = connector->new_encoder; 11936 } else { 11937 connector_state->crtc = NULL; 11938

Re: [Intel-gfx] drm/i915: Copy the staged connector config to the legacy atomic state

2015-03-27 Thread Dan Carpenter
DRM_DEBUG_KMS("Couldn't release load detect pipe.\n"); 9118 drm_atomic_state_free(state); ^ Dereferenced inside function call. 9119 } 9120 regards, dan carpenter ___ Intel-gfx mailing list

Re: [Intel-gfx] drm/i915: Copy the staged connector config to the legacy atomic state

2015-03-30 Thread Dan Carpenter
err:, out:, or bail are not very good label names. The disadvantage of having multiple returns is that it means you can't have a debug statement, but debug statements are mostly a waste of RAM and we can use ftrace for that. regards, dan carpenter ___

Re: [Intel-gfx] drm/i915: Inline feature detection into sanitize_enable_ppgtt

2014-10-28 Thread Dan Carpenter
pre-B3 step VLV\n"); 67 return 0; 68 } 69 70 return has_aliasing_ppgtt ? 1 : 0; ^^ The patch introduces this already known condition. 71 } regards, dan carpenter

[Intel-gfx] [patch] drm/i915: unlock on error in i915_ppgtt_info()

2015-10-02 Thread Dan Carpenter
We need to call intel_runtime_pm_put() and mutex_unlock() before returning. Fixes: 7cb5dff8d59d ('drm/i915: fix task reference leak in i915_debugfs.c') Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index afa798

Re: [Intel-gfx] drm/i915/gen8: page directories rework allocation

2015-04-30 Thread Dan Carpenter
(pdp->page_directory[pdpe], dev); 780 781 return -ENOMEM; 782 } regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] drm/i915: Don't use staged config for VLV cdclk calculations

2015-04-30 Thread Dan Carpenter
rtc); 12856 struct drm_plane *primary = set->crtc->primary; 12857 int vdisplay, hdisplay; 12858 regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx

<    1   2   3   4   >