Re: [Intel-gfx] [PATCH] drm/i915/gt: remove redundant assignment to variable x

2020-04-14 Thread Dan Carpenter
Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/i915/gt/intel_engine_cs.c:1210 print_request() error: uninitialized symbol 'x'. # https://github.com/0day-ci/linux/commit/6ee08d455bba0066e8f5f276dcd43d9e3e594dc5 git remote add linux-review https://github.com/0day-ci

Re: [Intel-gfx] [PATCH] drm/i915/gt: remove redundant assignment to variable x

2020-04-16 Thread Dan Carpenter
mit while I think it should emphasize that it's a pre-merge > report on the patch on the mailing list. > To be honest, these are auto-generated by the kbuild bot and I was a bit confused myself. 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/gt: Use the RPM config register to determine clk frequencies

2020-04-29 Thread Dan Carpenter
410 rpcurup, intel_gt_pm_interval_to_ns(gt, rpcurup)); 411 seq_printf(m, "RP PREV UP: %d (%dns)\n", 412 rpprevup, intel_gt_pm_interval_to_ns(gt, rpprevup)); 413 seq_printf(m, "Up th

[Intel-gfx] [PATCH] drm/i915/selftests: fix error handling in __live_lrc_indirect_ctx_bb()

2020-04-29 Thread Dan Carpenter
If intel_context_create() fails then it leads to an error pointer dereference. I shuffled things around to make error handling easier. Fixes: 1dd47b54baea ("drm/i915: Add live selftests for indirect ctx batchbuffers") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gt/self

[Intel-gfx] [bug report] drm/i915/uc: prefer intel_gt over i915 in GuC/HuC paths

2019-07-23 Thread Dan Carpenter
atus & huc->status.mask) == huc->status.value; ^^ It definitely looks like status should be a u32 or something. 174 } 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 some NULL vs IS_ERR() conditions

2019-08-07 Thread Dan Carpenter
There were several places which check for NULL when they should have been checking for IS_ERR(). Fixes: d8af05ff38ae ("drm/i915: Allow sharing the idle-barrier from other kernel requests") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gt/selftest_context.c | 20 ++---

[Intel-gfx] [PATCH] drm/i915: Use after free in error path in intel_vgpu_create_workload()

2019-08-08 Thread Dan Carpenter
We can't free "workload" until after the printk or it's a use after free. Fixes: 2089a76ade90 ("drm/i915/gvt: Checking workload's gma earlier") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gvt/scheduler.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Intel-gfx] [PATCH] drm/i915/tgl: Fix TGL_TRANS_DDI_FUNC_CTL_VAL_TO_PORT() macro

2019-08-15 Thread Dan Carpenter
This macro doesn't work because the right shift has higher precedence than bitwise AND. Fixes: 9749a5b6c09f ("drm/i915/tgl: Fix the read of the DDI that transcoder is attached to") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1

[Intel-gfx] [bug report] drm/i915: buddy allocator

2019-08-15 Thread Dan Carpenter
if (err) 682 break; 683 684 offset += size; 685 686 rem -= size; 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/selftests: Teach igt_gpu_fill_dw() to take intel_context

2019-08-27 Thread Dan Carpenter
red_ctx_exec() error: 'ce' dereferencing possible ERR_PTR() regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [drm-intel:drm-intel-next 8/19] drivers/gpu/drm/i915/display/intel_hdcp.c:817 _intel_hdcp_disable() error: uninitialized symbol 'ret'.

2021-01-18 Thread Dan Carpenter
) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/i915/display/intel_hdcp.c:817 _intel_hdcp_disable() error: uninitialized symbol 'ret'. vim

Re: [Intel-gfx] [PATCH v7 3/3] drm/i915/tgl: Add Clear Color support for TGL Render Decompression

2021-01-19 Thread Dan Carpenter
(Debian 9.3.0-15) 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/display/intel_display.c:15299 intel_atomic_prepare_plane_clear_colors() warn: taking sizeof binop vim +15299

[Intel-gfx] [PATCH] drm/i915/dp: Fix a logical vs bitwise OR bug

2021-01-20 Thread Dan Carpenter
This was supposed to be | instead of ||. Fixes: 522508b665df ("drm/i915/display: Let PCON convert from RGB to YCbCr if it can") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/display/intel_dp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gp

[Intel-gfx] [PATCH] drm/i915/gvt: fix uninitialized return in intel_gvt_update_reg_whitelist()

2021-01-25 Thread Dan Carpenter
e. Fixes: 493f30cd086e ("drm/i915/gvt: parse init context to update cmd accessible reg whitelist") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gvt/cmd_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/d

[Intel-gfx] [PATCH] drm/i915/gem: Fix oops in error handling code

2021-01-25 Thread Dan Carpenter
This code will Oops when it tries to i915_gem_object_free(obj) because "obj" is an error pointer. Fixes: 97d553963250 ("drm/i915/region: convert object_create into object_init") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 12 ---

[Intel-gfx] [drm-tip:drm-tip 1117/1129] drivers/gpu/drm/drm_atomic_uapi.c:342 drm_atomic_set_crtc_for_connector() error: we previously assumed 'crtc' could be null (see line 326)

2020-11-16 Thread Dan Carpenter
(Debian 9.3.0-15) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/drm_atomic_uapi.c:342 drm_atomic_set_crtc_for_connector() error: we previously assumed 'crtc' could be null

Re: [Intel-gfx] [PATCH 05/27] drm/i915/pxp: Enable ioctl action to set the ring3 context

2020-11-16 Thread Dan Carpenter
issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/i915/pxp/intel_pxp.c:62 i915_pxp_ops_ioctl() error: we previously assumed 'i915' could be null (see line 20) vim +/i915 +62 drivers/gpu/dr

Re: [Intel-gfx] [PATCH 000/141] Fix fall-through warnings for Clang

2020-12-01 Thread Dan Carpenter
of a warning. > > FWIW, this series has found at least one bug so far: > https://lore.kernel.org/lkml/CAFCwf11izHF=g1mGry1fE5kvFFFrxzhPSM6qKAO8gxSp=kr...@mail.gmail.com/ This is a fallthrough to a return and not to a break. That should trigger a warning. The fallthrough to a break should not generate a warning. The bug we're trying to fix is "missing break statement" but if the result of the bug is "we hit a break statement" then now we're just talking about style. GCC should limit itself to warning about potentially buggy code. regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 000/141] Fix fall-through warnings for Clang

2020-12-01 Thread Dan Carpenter
h (x) { > case 0: > ++x; > default: > ; > } Don't warn for this. If adding a break statement changes the flow of the code then warn about potentially missing break statements, but if it doesn't change anything then don't warn about it. 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: Check the correct variable

2020-12-03 Thread Dan Carpenter
There is a copy and paste bug in this code. It's supposed to check "obj2" instead of checking "obj" a second time. Fixes: 80f0b679d6f0 ("drm/i915: Add an implementation for i915_gem_ww_ctx locking, v2.") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i9

Re: [Intel-gfx] [PATCH v4 07/16] drm/dp_helper: Add helpers to configure PCONs RGB-YCbCr Conversion

2020-12-09 Thread Dan Carpenter
the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/drm_dp_helper.c:3185 drm_dp_pcon_convert_rgb_to_ycbcr() warn: was && intended here instead of ||? vim +3185 drivers/gpu/drm/drm_dp_helper

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

2021-02-15 Thread Dan Carpenter
If the igt_request_alloc() call fails then this should return a negative error code, but currently it returns success. Fixes: 85fddf0b0027 ("drm/i915: Introduce a context barrier callback") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 1

[Intel-gfx] [bug report] drm/i915: buddy allocator

2021-03-02 Thread Dan Carpenter
^ This is impossible. It's not clear what was intended... 170 pr_err("bad block, dump:\n"); 171 igt_dump_block(mm, block); 172 } 173 174 return err; 175 } regards, dan carpenter _

Re: [Intel-gfx] [PATCH v11 08/12] drm/i915/dp: Master/Slave enable/disable sequence for bigjoiner

2020-10-23 Thread Dan Carpenter
, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter New smatch warnings: drivers/gpu/drm/i915/display/intel_display.c:7303 hsw_crtc_enable() warn: if statement not indented Old smatch warnings: drivers/gpu/drm/i915/display/intel_display.c:6237

[Intel-gfx] [PATCH] drm/i915: Fix a crash in shmem_pin_map() error handling

2020-10-23 Thread Dan Carpenter
There is a signedness bug in shmem_pin_map() error handling because "i" is unsigned. The "while (--i >= 0)" will loop forever until the system crashes. Fixes: bfed6708d6c9 ("drm/i915: use vmap in shmem_pin_map") Signed-off-by: Dan Carpenter --- drivers/gpu/drm

Re: [Intel-gfx] [PATCH] drm/i915: Fix a crash in shmem_pin_map() error handling

2020-10-24 Thread Dan Carpenter
ize_t n_pages; > > void *vaddr; > > + int i; > > > > n_pages = file->f_mapping->host->i_size >> PAGE_SHIFT; > > pages = kvmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL); > > This assumes we never have more than INT_MAX worth of pag

Re: [Intel-gfx] [bug report] drm/i915: Replace some gamma_mode ifs with switches

2020-11-02 Thread Dan Carpenter
Similar bug: drivers/gpu/drm/i915/display/intel_color.c:794 bdw_load_luts() error: we previously assumed 'gamma_lut' could be null (see line 784) regards, dan carpenter On Mon, Nov 02, 2020 at 04:07:36PM +0300, Dan Carpenter wrote: > Hello Ville Syrjälä, > > This is a s

[Intel-gfx] [bug report] drm/i915: Replace some gamma_mode ifs with switches

2020-11-02 Thread Dan Carpenter
a_lut, PAL_PREC_SPLIT_MODE | ^ Unchecked dereference. Possibly pass "blob" here? 766 PAL_PREC_INDEX_VALUE(512)); 767 break; regards, dan carpenter

[Intel-gfx] [bug report] drm/i915: Use the async worker to avoid reclaim tainting the ggtt->mutex

2020-05-07 Thread Dan Carpenter
dma_fence_wait(fence, MAX_SCHEDULE_TIMEOUT); The dma_fence_wait() takes a bool, not a timeout value. 357 dma_fence_put(fence); 358 } 359 } 360 361 re

[Intel-gfx] [kbuild] Re: [PATCH v12 3/4] drm/i915/perf: prepare driver to receive multiple ctx handles

2020-05-07 Thread Dan Carpenter
, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter New smatch warnings: drivers/gpu/drm/i915/i915_perf.c:1457 i915_oa_stream_destroy() error: uninitialized symbol 'err'. Old smatch warnings: drivers/gpu/drm/i915/i915_perf.c:1383 oa_get_rend

Re: [Intel-gfx] [PATCH v1] drm/i915: Fix wrong CDCLK adjustment changes

2020-06-01 Thread Dan Carpenter
) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/i915/display/intel_bw.c:453 skl_bw_calc_min_cdclk() error: uninitialized symbol 'pipe'. # https://github.com/0day-ci/li

Re: [Intel-gfx] [PATCH] drm/i915/display: fix missing null check on allocated dsb object

2020-06-16 Thread Dan Carpenter
Note: added a drm_err message in keeping with the error message style > in the function. Don't give in to peer pressure! That's like being a lemming when Disney film makers come to push you off the cliff to create the 1958 nature film "Whi

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

2020-07-14 Thread Dan Carpenter
The error code is not set on this error path. It's either zero or uninitialized at this point. Fixes: ed2690a9ca89 ("drm/i915/selftest: Check that GPR are restored across noa_wait") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/selftests/i915_perf.c | 1 + 1 file chang

Re: [Intel-gfx] [PATCH] drm/i915/selftest: Fix an error code in live_noa_gpr()

2020-07-14 Thread Dan Carpenter
On Tue, Jul 14, 2020 at 05:16:33PM +0300, Lionel Landwerlin wrote: > On 14/07/2020 17:12, Dan Carpenter wrote: > > The error code is not set on this error path. It's either zero or > > uninitialized at this point. > > > > Fixes: ed2690a9ca89 ("drm/i915/

[Intel-gfx] [PATCH v2] drm/i915/selftest: Fix an error code in live_noa_gpr()

2020-07-14 Thread Dan Carpenter
The error code needs to be set on this path. It currently returns success. Fixes: ed2690a9ca89 ("drm/i915/selftest: Check that GPR are restored across noa_wait") Reported-by: Lionel Landwerlin Signed-off-by: Dan Carpenter --- v2: Fix a different bug instead. :P Colin fixed mi

Re: [Intel-gfx] [PATCH v2] drm/i915/selftest: Fix an error code in live_noa_gpr()

2020-07-14 Thread Dan Carpenter
On Tue, Jul 14, 2020 at 06:15:22PM +0100, Chris Wilson wrote: > Quoting Lionel Landwerlin (2020-07-14 15:39:21) > > On 14/07/2020 17:36, Dan Carpenter wrote: > > > The error code needs to be set on this path. It currently returns > > > success. > > > > >

Re: [Intel-gfx] [PATCH 2/6] drm/xen-front: Fix misused IS_ERR_OR_NULL checks

2020-08-06 Thread Dan Carpenter
Looks great! Thanks. Reviewed-by: Dan Carpenter regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH 2/6] drm/xen-front: Fix misused IS_ERR_OR_NULL checks

2020-08-06 Thread Dan Carpenter
this and the rest of misused places with IS_ERR_OR_NULL in the > >> driver. > >> > >> Fixes:  c575b7eeb89f: "drm/xen-front: Add support for Xen PV display > >> frontend" > > > > Again forgot

Re: [Intel-gfx] [PATCH 2/5] Critical-KlockWork-Fixes-intel_display.c-NullDeref

2020-08-25 Thread Dan Carpenter
-20200824 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 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/display/intel_display.c:2271 intel_pin_and_fence_fb_obj() error

Re: [Intel-gfx] [PATCH 4/5] Critical-KlockWork-Fix-intel_tv.c-Possible-Null

2020-08-25 Thread Dan Carpenter
-20200824 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/i915/display/intel_tv.c:1842 intel_tv_atomic_check() warn: variable

Re: [Intel-gfx] [PATCH] block: convert tasklets to use new tasklet_setup() API

2020-08-26 Thread Dan Carpenter
- out_cast() or outer_cast() > > > - from_member(). > > > - container_from() or from_container() > > > > > > from_container() sounds fine, would trimming it a bit work? like > > > from_cont(). > > >

[Intel-gfx] [bug report] drm/i915: Use per object locking in execbuf, v12.

2020-09-10 Thread Dan Carpenter
8_canonical_addr(addr + 4); 1472 1473 *batch++ = MI_STORE_DWORD_IMM_GEN4; 1474 *batch++ = lower_32_bits(addr); 1475 *batch++ = upper_32_bits(addr); regards, dan carpenter ___ Intel-gfx mailing

[Intel-gfx] [bug report] drm/i915: Use ww pinning for intel_context_create_request()

2020-09-10 Thread Dan Carpenter
i915_gem_ww_ctx_fini(&ww); 480 481 if (IS_ERR(rq)) ^^ 482 return rq; 483 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 i915_gem_object_copy_blt()

2020-09-10 Thread Dan Carpenter
This code should use "vma[1]" instead of "vma". The "vma" is a variable is a valid pointer. Fixes: 6b05030496f7 ("drm/i915: Convert i915_gem_object/client_blt.c to use ww locking as well, v2.") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/

[Intel-gfx] [PATCH v2] drm/i915: Fix an error code i915_gem_object_copy_blt()

2020-09-11 Thread Dan Carpenter
This code should use "vma[1]" instead of "vma". The "vma" variable is a valid pointer. Fixes: 6b05030496f7 ("drm/i915: Convert i915_gem_object/client_blt.c to use ww locking as well, v2.") Signed-off-by: Dan Carpenter Reviewed-by: Mika Kuoppala --- v2:

[Intel-gfx] [PATCH] drm/i915/selftests: test the correct variable in igt_gem_ww_ctx()

2020-09-11 Thread Dan Carpenter
There is a copy and paste error here. The "obj" should be "obj2". The current code could result in an Oops. Fixes: 80f0b679d6f0 ("drm/i915: Add an implementation for i915_gem_ww_ctx locking, v2.") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/selftes

[Intel-gfx] [bug report] drm/i915: Add an implementation for i915_gem_ww_ctx locking, v2.

2020-09-11 Thread Dan Carpenter
25 list_add_tail(&obj->obj_link, &ww->obj_list); 126 if (ret == -EALREADY) 127 ret = 0; 128 129 if (ret == -EDEADLK) 130 ww->contended = obj; ^ Unchecked

[Intel-gfx] [PATCH] drm/i915: Uninitialized variable in i915_gem_object_map_page()

2020-09-24 Thread Dan Carpenter
The "i" iterator is never set to zero. This probably doesn't affect testing because GCC sometimes initializes variables and also we have a new pluggin to initialize stack variables to zero. Fixes: 7edd32a9e614 ("drm/i915: use vmap in i915_gem_object_map") Signed-off-

[Intel-gfx] [PATCH] drm/i915/selftests: Fix return in assert_mmap_offset()

2020-02-28 Thread Dan Carpenter
The assert_mmap_offset() returns type bool so if we return an error pointer that is "return true;" or success. If we have an error, then we should return false. Fixes: 3d81d589d6e3 ("drm/i915: Test exhaustion of the mmap space") Signed-off-by: Dan Carpenter --- Not tes

Re: [Intel-gfx] [PATCH 03/51] drm: add managed resources tied to drm_device

2020-03-03 Thread Dan Carpenter
: kbuild test robot Reported-by: Dan Carpenter smatch warnings: drivers/gpu/drm/drm_drv.c:843 drm_dev_release() error: dereferencing freed memory 'dev' # https://github.com/0day-ci/linux/commit/5aba700d4c32ae5722a9931c959b13a6217a86e2 git remote add linux-review https://github.com/0day-ci

[Intel-gfx] [PATCH] drm/i915/selftests: Potential uninitialized return in live_reset_whitelist()

2018-04-27 Thread Dan Carpenter
Smatch complains that "err" could be uninitialized at the end. I don't know the code well but that seems like a reasonable warning. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/selftests/intel_workarounds.c b/drivers/gpu/drm/i915/selftests/intel_work

[Intel-gfx] [PATCH] drm/i915/dp: silence a static checker warning

2018-05-03 Thread Dan Carpenter
Smatch warns that "n_entries" isn't always set. It would trigger a some WARN_ON()s on that path so presumably it can't happen but it's simple enough to initialize it to zero just to silence the warning. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/

[Intel-gfx] [bug report] i915/dp/fec: Cache the FEC_CAPABLE DPCD register

2018-11-22 Thread Dan Carpenter
intel_dp->fec_capable); Probably this was suppose to be outside the braces? It's hard to say... 3848 } 3849 } 3850 } 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/gvt: Use after free in intel_vgpu_destroy_ggtt_mm()

2018-11-22 Thread Dan Carpenter
We need to use the _safe() version of this macro so that we don't dereference "pos" when it is freed. Fixes: bc0686ff5fad ("drm/i915/gvt: support inconsecutive partial gtt entry write") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gvt/gtt.c | 4 ++-- 1 file ch

[Intel-gfx] [PATCH] drm/i915/gvt: fix a bounds check in ring_id_to_context_switch_event()

2017-04-13 Thread Dan Carpenter
There are two bugs here. The && should be || and the > is off by one so it should be >= ARRAY_SIZE(). Fixes: 8453d674ae7e ("drm/i915/gvt: vGPU execlist virtualization") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i

[Intel-gfx] [PATCH] drm/i915: uninitialized value on error path

2017-04-13 Thread Dan Carpenter
"ret" isn't initialized on this error path. It doesn't really cause any problems unless it's randomly set to -EDEADLK which is not likely. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 4

[Intel-gfx] [PATCH] drm/i915: checking for NULL instead of IS_ERR() in mock selftests

2017-04-13 Thread Dan Carpenter
i915_gem_request_alloc() uses error pointers. It never returns NULLs. Fixes: 0daf0113cff6 ("drm/i915: Mock infrastructure for request emission") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/selftests/mock_request.c b/drivers/gpu/drm/i915/selftests/mock_reque

Re: [Intel-gfx] [PATCH] drm/i915: uninitialized value on error path

2017-04-13 Thread Dan Carpenter
True. I'll resend. regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH v2] drm/i915: set "ret" correctly on error paths

2017-04-14 Thread Dan Carpenter
If "crtc" is NULL, then my static checker complains that "ret" isn't initialized on that path. It doesn't really cause a problem unless "ret" is somehow set to -EDEADLK which is not likely. Chris Wilson also noticed another error path where "

Re: [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: uninitialized value on error path (rev3)

2017-04-17 Thread Dan Carpenter
have sent the patch if it couldn't compile which is basically all this is testing. It's not exercising the failure path. regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: uninitialized value on error path (rev3)

2017-04-18 Thread Dan Carpenter
On Tue, Apr 18, 2017 at 10:58:44AM +0300, Jani Nikula wrote: > On Mon, 17 Apr 2017, Dan Carpenter wrote: > > On Fri, Apr 14, 2017 at 08:13:43PM -, Patchwork wrote: > >> == Series Details == > >> > >> Series: drm/i915: uninitialized value on

Re: [Intel-gfx] [PATCH 7/9] drm/i915: Combine substrings for a message in gen6_drpc_info()

2017-05-04 Thread Dan Carpenter
naccurate because somebody " > > - "holds a forcewake reference \n"); > > + seq_puts(m, > > +"RC information inaccurate because somebody holds a > > forcewake r

Re: [Intel-gfx] [PATCH 1/6] drm/dp_mst: Introduce drm_dp_mst_connector_atomic_check()

2018-09-20 Thread Dan Carpenter
Hi Lyude, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Lyude-Paul/Fix-legacy-DPMS-changes-with-MST/20180919-203434 base: git://anongit.freedesktop.org/drm-intel for-linux-next smatch warnings: drivers/gpu/drm/drm_dp_mst_topology.c:314

Re: [Intel-gfx] [PATCH v5 08/40] drm/i915: Initialize HDCP2.2 and its MEI interface

2018-06-28 Thread Dan Carpenter
[ The bot has a bug where it doesn't copy the error messages so I just guess what the issue is. - dan ] Hi Ramalingam, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Ramalingam-C/drm-i915-Implement-HDCP2-2/20180627-174219 base: git:/

Re: [Intel-gfx] [PATCH v2 5/9] drm/nouveau: Use drm_connector_for_each_possible_encoder()

2018-06-30 Thread Dan Carpenter
Hi Ville, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-Third-attempt-at-fixing-the-fb-helper-best_encoder-mess/20180629-014202 base: git://people.freedesktop.org/~airlied/linux.git drm-next smatch warnings: drivers/g

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

2018-07-19 Thread Dan Carpenter
The dma_mapping_error() returns true on error but we want to return -ENOMEM here. Fixes: 79e542f5af79 ("drm/i915/kvmgt: Support setting dma map for huge pages") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 4d

[Intel-gfx] [PATCH] drm/i915/gvt: Off by one in intel_vgpu_write_fence()

2018-08-06 Thread Dan Carpenter
The > should be >= here so that we don't read one element beyond the end of the array. Fixes: 28a60dee2ce6 ("drm/i915/gvt: vGPU HW resource management") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/gvt/aperture_gm.c b/drivers/gpu/drm/i915/gvt/aperture_gm

Re: [Intel-gfx] [PATCH 3/9] drm/i915/selftests: Basic stress test for rapid context switching

2018-09-05 Thread Dan Carpenter
Hi Chris, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on v4.19-rc2 next-20180904] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.

[Intel-gfx] [bug report] drm/i915: Eliminate lots of iterations over the execobjects array

2018-03-15 Thread Dan Carpenter
7;s there if I looked harder". But today I've drawn a line in the sand! No more! Also the error code is wrong, we should return -EFAULT if the copy fails. ;) 2550 } 2551 } 2552 2553 kvfree(exec_list); regards, dan carpenter __

Re: [Intel-gfx] [bug report] drm/i915: Eliminate lots of iterations over the execobjects array

2018-03-15 Thread Dan Carpenter
On Thu, Mar 15, 2018 at 01:17:23PM +, Chris Wilson wrote: > Quoting Dan Carpenter (2018-03-15 13:10:30) > > Hello Chris Wilson, > > > > The patch 2889caa92321: "drm/i915: Eliminate lots of iterations over > > the execobjects array" from Jun 16, 2017, lead

Re: [Intel-gfx] [PATCH v7 2/8] drm/i915: Add CRTC output format YCBCR 4:2:0

2018-04-04 Thread Dan Carpenter
Hi Shashank, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on next-20180403] [cannot apply to v4.16] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

[Intel-gfx] [bug report] drm/i915/bios: add support for MIPI sequence block v3

2018-06-08 Thread Dan Carpenter
case MIPI_SEQ_ELEM_DELAY: 936 case MIPI_SEQ_ELEM_GPIO: 937 case MIPI_SEQ_ELEM_I2C: 938 case MIPI_SEQ_ELEM_SPI: 939 case MIPI_SEQ_ELEM_PMIC: 940 break; 941

Re: [Intel-gfx] [bug report] drm/i915/bios: add support for MIPI sequence block v3

2018-06-08 Thread Dan Carpenter
On Fri, Jun 08, 2018 at 03:50:47PM +0300, Jani Nikula wrote: > On Fri, 08 Jun 2018, Dan Carpenter wrote: > > Hello Jani Nikula, > > > > The patch 2a33d93486f2: "drm/i915/bios: add support for MIPI sequence > > block v3" from Jan 11, 2016, leads to the

Re: [Intel-gfx] [PATCH][V2] drm/i915/guc: fix GEM_BUG_ON check

2018-06-12 Thread Dan Carpenter
t; @@ -206,7 +206,7 @@ void intel_guc_fini(struct intel_guc *guc) > static u32 get_log_control_flags(void) > { > u32 level = i915_modparams.guc_log_level; > - u32 flags = 0; > + s32 flags = 0; > > GEM_BUG_ON(level < 0); Only insane people use &quo

[Intel-gfx] [PATCH] drm/i915/selftests: Don't dereference an error pointer

2018-06-20 Thread Dan Carpenter
There is an error path where "ctx" is an error pointer so we can't pass it to kernel_context_close(). Fixes: 09a4c02e58c1 ("drm/i915: Look for an active kernel context before switching") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/selftests/i915_gem

Re: [Intel-gfx] drm/i915/guc: add enable_guc_loading parameter

2016-05-31 Thread Dan Carpenter
if (*fw_path == '\0') ^^^ Oops. 419 DRM_INFO("No GuC firmware known for this platform\n"); 420 err = -ENODEV; regards, dan carpenter __

[Intel-gfx] [patch] drm/i915/mocs: || vs | typo in get_mocs_settings()

2016-06-12 Thread Dan Carpenter
It seems pretty clear that bitwise OR was intended here and not logical OR. Fixes: 6fc29133eafb ('drm/i915/gen9: Add WaDisableSkipCaching') Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/intel_mocs.c b/drivers/gpu/drm/i915/intel_mocs.c index 8f96c40..3c1482b 10

[Intel-gfx] [bug report] drm/i915/gvt: vGPU command scanner

2016-10-20 Thread Dan Carpenter
1428 gma = cmd_val(s, 1) & GENMASK(31, 2); 1429 if (gmadr_bytes == 8) { 1430 gma_high = cmd_val(s, 2) & GENMASK(15, 0); 1431 gma = (gma_high << 32) | gma; 1432 } 1433 ret = cmd_address_audit(s, gma, op_s

[Intel-gfx] [bug report] drm/i915/gvt: vGPU graphics memory virtualization

2016-10-20 Thread Dan Carpenter
Maybe make this a void function? 1949 } 1950 1951 gtt->scratch_page_mfn = mfn; 1952 gvt_dbg_core("vgpu%d create scratch page: mfn=0x%lx\n", vgpu->id, mfn); 1953 return 0; 1954 } 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/gvt: cleanup a type issue in submit_context()

2016-10-21 Thread Dan Carpenter
elsp_mmio_write() where it is ignored. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c index c50a3d1a5131..bc69ba1842ea 100644 --- a/drivers/gpu/drm/i915/gvt/execlist.c +++ b/drivers/gpu/drm/i915/gvt/execlist.c @@ -616,7 +616,

[Intel-gfx] [patch] drm/i915/gvt: i915_gem_object_create() returns error pointers

2016-10-21 Thread Dan Carpenter
The i915_gem_object_create() returns error pointers on error, it never returns NULLs. Fixes: ("drm/i915/gvt: vGPU command scanner") Signed-off-by: Dan Carpenter --- The error handling in perform_bb_shadow() is a bit leaky as well. diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c

Re: [Intel-gfx] [patch] drm/i915/gvt: cleanup a type issue in submit_context()

2016-10-21 Thread Dan Carpenter
On Fri, Oct 21, 2016 at 04:27:38PM +0800, Zhenyu Wang wrote: > On 2016.10.21 11:06:01 +0300, Dan Carpenter wrote: > > submit_context() should return negative error codes and zero on success > > but by mistake we made it a bool. I've changed it to int. Also I made > > it

[Intel-gfx] [bug report] drm/i915/gvt: vGPU display virtualization

2016-11-10 Thread Dan Carpenter
t; 24; GVT_AUX_I2C_REPLY_ACK is 0 << 6. Which is weird. The whole line is a no-op. 507 vgpu_vreg(vgpu, offset + 4) = aux_data_for_write; 508 } regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https:

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

2016-11-14 Thread Dan Carpenter
ark_end(sg); Then don't check here. Also do we really need to sg_mark_end() twice? 2359 for_each_sgt_page(page, sgt_iter, st) 2360 put_page(page); 2361 sg_free_table(st); 2362 kfree(st); regards, dan carpenter __

[Intel-gfx] [bug report] drm/i915/gvt: fix deadlock in workload_thread

2016-11-23 Thread Dan Carpenter
d->req = i915_gem_request_get(rq); 187 188 ret = intel_gvt_scan_and_shadow_workload(workload); 189 if (ret) 190 goto out; 191 192 ret = intel_gvt_scan_and_shadow_wa_ctx(&workload->wa_ctx); 193 if (ret) 194

[Intel-gfx] [bug report] drm/i915: Small compaction of the engine init code

2016-12-15 Thread Dan Carpenter
974 } 1975 1976 return ret; 1977 } 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 a read size argument

2016-10-13 Thread Dan Carpenter
We want to read 3 bytes here, but because the parenthesis are in the wrong place we instead read: sizeof(intel_dp->edp_dpcd) == sizeof(intel_dp->edp_dpcd) which is one byte. Fixes: fe5a66f91c88 ("drm/i915: Read PSR caps/intermediate freqs/etc. only once on eDP") Si

Re: [Intel-gfx] [patch] drm/i915: fix a read size argument

2016-10-13 Thread Dan Carpenter
On Thu, Oct 13, 2016 at 10:01:03AM +0100, Chris Wilson wrote: > On Thu, Oct 13, 2016 at 11:55:08AM +0300, Dan Carpenter wrote: > > We want to read 3 bytes here, but because the parenthesis are in the > > wrong place we instead read: > > > > sizeof(intel_dp-&g

[Intel-gfx] [patch] drm/i915/gvt/kvmgt: remove some dead code

2017-02-07 Thread Dan Carpenter
If "caps.buf" is already NULL then it doesn't need to be freed or set to NULL. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 3f656e3a6e5a..de2a55178a37 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drive

Re: [Intel-gfx] [patch] drm/i915/gvt/kvmgt: remove some dead code

2017-02-07 Thread Dan Carpenter
On Tue, Feb 07, 2017 at 04:34:57PM +0200, Joonas Lahtinen wrote: > On ti, 2017-02-07 at 16:16 +0300, Dan Carpenter wrote: > > If "caps.buf" is already NULL then it doesn't need to be freed or set to > > NULL. > > > > Signed-off-by: Dan Carpenter >

[Intel-gfx] [patch v2] drm/i915/gvt/kvmgt: remove some dead code

2017-02-07 Thread Dan Carpenter
"caps.buf" is always NULL here and "caps.size" is always zero. The code is a no-op and can be removed. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 3f656e3a6e5a..773a45aa18f8 100644 --- a/drivers/gpu/

[Intel-gfx] [patch] drm/i915: return false on failure in intel_dp_compute_config()

2017-02-23 Thread Dan Carpenter
This function is a bool type where we are supposed to return false on failure and true on success. Negative error codes are currently treated as true. Fixes: a1b2278e4dfc ("drm/i915: skylake panel fitting using shared scalers") Signed-off-by: Dan Carpenter diff --git a/drivers/gp

Re: [Intel-gfx] [patch] drm/i915: return false on failure in intel_dp_compute_config()

2017-02-23 Thread Dan Carpenter
On Thu, Feb 23, 2017 at 01:09:14PM +0200, Joonas Lahtinen wrote: > On to, 2017-02-23 at 13:39 +0300, Dan Carpenter wrote: > > This function is a bool type where we are supposed to return false on > > failure and true on success.  Negative error codes are currently trea

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

2017-02-28 Thread Dan Carpenter
The new version patchwork is filtering out my patches for some reason. Test if it's because it now insists on a capital [PATCH] in the subject. Patchwork should be more version control agnostic than that. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/intel_dp.c b/driver

[Intel-gfx] [patch] #2: test adding ---

2017-02-28 Thread Dan Carpenter
The new version of patchwork is filtering out my patches which apply fine with git am and have worked for everyone else's patchwork. Perhaps it's insisting on a --- break? Signed-off-by: Dan Carpenter --- diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_

[Intel-gfx] [patch] #3 try sending original patch again

2017-02-28 Thread Dan Carpenter
This is the control where I resend the original patch to make verify that it really doesn't work as-is. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index d1670b8afbf5..9173548ba601 100644 --- a/drivers/gpu/drm/i915/intel_dp.c

Re: [Intel-gfx] [patch] #2: test adding ---

2017-02-28 Thread Dan Carpenter
On Tue, Feb 28, 2017 at 12:10:19PM +, Chris Wilson wrote: > On Tue, Feb 28, 2017 at 02:46:18PM +0300, Dan Carpenter wrote: > > The new version of patchwork is filtering out my patches which apply > > fine with git am and have worked for everyone else's patchwork. Perhaps &

Re: [Intel-gfx] drm/i915: Decouple execbuf uAPI from internal implementation

2016-01-28 Thread Dan Carpenter
user_ring_map[user_ring_id]]; 1414 } 1415 1416 if (!intel_ring_initialized(*ring)) { 1417 DRM_DEBUG("execbuf with invalid ring: %u\n", user_ring_id); 1418 return -EINVAL; 1419 } regards, dan carpent

[Intel-gfx] [PATCH] drm/i915/selftests: silence a bogus spammy warning

2017-06-14 Thread Dan Carpenter
These tests are reversed so it complains on every successful call and stays quiet for every failure. Also we may as well preserve the error code. Fixes: f40a7b7558ef ("drm/i915: Initial selftests for exercising eviction") Signed-off-by: Dan Carpenter --- Static analysis. Not tes

Re: [Intel-gfx] [PATCH] drm/i915/selftests: silence a bogus spammy warning

2017-06-14 Thread Dan Carpenter
On Wed, Jun 14, 2017 at 10:29:57AM +0100, Chris Wilson wrote: > Quoting Dan Carpenter (2017-06-14 10:14:52) > > These tests are reversed so it complains on every successful call and > > stays quiet for every failure. Also we may as well preserve the error > > code. > &g

<    1   2   3   4   >