[PATCH] drm/amdgpu: Uninitialized variable in amdgpu_ttm_backend_bind()

2017-08-09 Thread Dan Carpenter
My static checker complains that it's possible for "r" to be uninitialized. It used to be set to zero so this returns it to the old behavior. Fixes: 98a7f88ce9a9 ("drm/amdgpu: bind BOs with GTT space allocated directly v2") Signed-off-by: Dan Carpenter <dan.carpen...@

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-17 Thread Dan Carpenter
t' > > wouldn't > > break something. > > I think Dan was recommending the opposite here, if I understood you > both correctly: > he said we should propagate the error code unless we know it's wrong, while > you > want to keep the current behavior to avoid introducing

[PATCH] drm/nouveau/hwmon: Uninitialized variables in sysfs

2017-07-17 Thread Dan Carpenter
kstrtol() and friends can return -EINVAL or -ERANGE. We have to test for both, otherwise the value is possibly uninitialized. Also in some of these files we accidentally return "count" on error instead of a negative error code. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
On Fri, Jul 14, 2017 at 03:55:26PM +0300, Dan Carpenter wrote: > I don't agree with it as a static analysis dev... What I mean is if it's a macro that returns -ENODEV or a function that returns -ENODEV, they should both be treated the same. The other warnings this check prints are quite cle

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
Ah... I see why it's complaining about these ones in particular... I don't agree with it as a static analysis dev, and I don't like the changes too much. But since it's only generating a hand full of warnings then I don't care. regards, dan carpenter

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
Y8_2X8) 1175 bridge = ISPCTRL_PAR_BRIDGE_BENDIAN; 1176 else 1177 bridge = ISPCTRL_PAR_BRIDGE_DISABLE; 1178 1179 omap3isp_configure_bridge(isp, ccdc->input, parcfg, shift, bridge); regards, dan carpenter

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-14 Thread Dan Carpenter
real bugs. Just disable it. Changing the code to propagate error codes, is the right thing of course so long as it doesn't introduce bugs. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org

[PATCH] drm: shmobile: checking for NULL instead if IS_ERR()

2017-07-12 Thread Dan Carpenter
We changed from ioremap_nocache() to devm_ioremap_resource() so the check needs to be changed from checking for NULL to checking for error pointers. Fixes: 16ad3b2ce8dd ("drm/shmobile: Use devm_* managed functions") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --g

[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 <dan.carpen...@oracle.com> diff --git a

[PATCH] drm/amdgpu: Off by one sanity checks

2017-07-11 Thread Dan Carpenter
This is just future proofing code, not something that can be triggered in real life. We're testing to make sure we don't shift wrap when we do "1ull << i" so "i" has to be in the 0-63 range. If it's 64 then we have gone too far. Signed-off-by: Dan Carpenter <da

[PATCH] drm/msm: unlock on error in msm_gem_get_iova()

2017-07-10 Thread Dan Carpenter
We recently added locking to this function but there was a direct return that was overlooked where we need to unlock. Fixes: 0e08270a1f01 ("drm/msm: Separate locking of buffer resources from struct_mutex") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/dri

[PATCH] drm: rcar-du: remove an unneeded NULL check

2017-06-30 Thread Dan Carpenter
"params" can't be NULL here. The next lines assume that we either hit the break statement of "params->mpixelclock == ~0UL". The inconsistent NULL checking makes static checkers complain. I've just removed the test. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.

[PATCH] drm/msm: fix an integer overflow test

2017-06-30 Thread Dan Carpenter
. That means the "sz > SIZE_MAX" condition is never true even on 32 bit systems. We need to first cast it to u64 and then do the math. Fixes: 4a630fadbb29 ("drm/msm: Fix potential buffer overflow issue") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> dif

[PATCH] drm/gma500: remove an unneeded NULL check

2017-06-28 Thread Dan Carpenter
"connector" is the list iterator and it can't be NULL. It causes a static checker warning because we dereference the iterator to get the next item in the list. Let's remove this check. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/driver

[bug report] gma500: initial medfield merge

2017-06-28 Thread Dan Carpenter
if ((temp & PIPEACONF_PIPE_STATE) == 1) ^^ This will never be true. It should just be: if (temp & PIPEACONF_PIPE_STATE) { So this loop will just go until we reach COUNT_MAX. 103 break;

Re: [PATCH v3] staging: vboxvideo: Add vboxvideo to drivers/staging

2017-06-28 Thread Dan Carpenter
s->size, false, ); > >> + if (ret) > >> + return ret; > >> + > >> + ret = drm_gem_handle_create(file, gobj, ); > >> + drm_gem_object_unreference_unlocked(gobj); > >> + if (ret) > >> + return ret; > > > > This is a resource lea

[PATCH] drm/amdkfd: NULL dereference involving create_process()

2017-06-14 Thread Dan Carpenter
We accidentally return ERR_PTR(0) which is NULL. The caller is not expecting that and it leads to an Oops. Fixes: dd59239a9862 ("amdkfd: init aperture once per process") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.

Re: [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. >

[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 <dan.carpen...@oracle.co

[bug report] gma500/cdv: Add eDP support

2017-06-13 Thread Dan Carpenter
r overflow. 91 edp_link_params = >link_params[panel_type]; 92 regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2] staging: vboxvideo: Add vboxvideo to drivers/staging

2017-06-12 Thread Dan Carpenter
changes but it's a lot. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH][drm-next] drm/pl111: make structure pl111_display_funcs static

2017-05-23 Thread Dan Carpenter
On Tue, May 23, 2017 at 11:19:58AM +0300, Jani Nikula wrote: > On Fri, 19 May 2017, Dan Carpenter <dan.carpen...@oracle.com> wrote: > > On Fri, May 19, 2017 at 01:08:20PM -0700, Eric Anholt wrote: > >> OK, that's definitely not how I've read the > >> Documentati

Re: [PATCH][drm-next] drm/pl111: make structure pl111_display_funcs static

2017-05-19 Thread Dan Carpenter
fixes to netdev for example. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH][drm-next] drm/pl111: make structure pl111_display_funcs static

2017-05-19 Thread Dan Carpenter
t from happening again? Who was the original author and have they reviewed the proposed fix?" So I end up looking up the original commit anyway. It helps me a lot to have the Fixes tag there. The Fixes tag is obviously useful for the stable people as well, but that wasn't

Re: [PATCH][drm-next] drm/pl111: make structure pl111_display_funcs static

2017-05-19 Thread Dan Carpenter
t it goes to stable. Only a Cc: <sta...@vger.kernel.org> implies that. Fixes is purely informational to show where the bug was introduced. Just today I was using it to see if API changes introduce a bugs that take months to fix. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/amd/powerplay: ensure loop does not wraparound on decrement

2017-05-17 Thread Dan Carpenter
I sent a patch for this bug earlier. There is a second bug later in the function which my patch fixes as well. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/amd/powerplay: fix a signedness bugs

2017-05-16 Thread Dan Carpenter
Smatch complains about a signedness bug here: vega10_hwmgr.c:4202 vega10_force_clock_level() warn: always true condition '(i >= 0) => (0-u32max >= 0)' Fixes: 7b52db39a4c2 ("drm/amd/powerplay: fix bug sclk/mclk level can't be set on vega10.") Signed-of

Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show()

2017-05-10 Thread Dan Carpenter
h/9716119/ This is not how to send v2 patches. > > Fixes: 02dd95fe316936269a52d6ccb971bb956412b40a ("drm/tinydrm: Add MIPI DBI > support") This is not a bug fix so do not use the fixes tag. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2017-05-04 Thread Dan Carpenter
ds a > > forcewake reference.\n"); > > And now you break the 80col rule. Blind adherence to checkpatch is > impossible. > -Chris No. Checkpatch allows you to go over 80 characters to avoid splitting a string. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/nouveau/fifo/gk104-: Silence a locking warning

2017-04-27 Thread Dan Carpenter
Presumably we can never actually hit this return, but static checkers complain that we should unlock before we return. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c

[PATCH] drm/vmwgfx: Handle vmalloc() failure in vmw_local_fifo_reserve()

2017-04-27 Thread Dan Carpenter
If vmalloc() fails then we need to a bit of cleanup before returning. Fixes: fb1d9738ca05 ("drm/vmwgfx: Add DRM driver for VMware Virtual GPU") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmw

[PATCH v2] drm/mediatek: fix a timeout loop

2017-04-21 Thread Dan Carpenter
ediatek: add dsi transfer function") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> --- v2: Use readl_poll_timeout(). Please review this carefully because I've never used readl_poll_timeout() and could easily mess up. diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/driv

Re: [PATCH] drm/mediatek: fix a loop timeout

2017-04-20 Thread Dan Carpenter
I'll send a v2 that does that. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/mediatek: fix a loop timeout

2017-04-20 Thread Dan Carpenter
We expected to end with "timeout_ms" set to zero, but it's a post-op so the current code ends with -1. Let's fix this by changing it to a pre-op. Fixes: 21898816831f ("drm/mediatek: add dsi transfer function") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> di

[PATCH] drm: atmel-hlcdc: Uninitialized return in atmel_hlcdc_create_outputs()

2017-04-15 Thread Dan Carpenter
It's not possible for endpoint to be zero so the test doesn't work. If we break on the first iteration through the loop then endpoint is 1 and "ret" is uninitialized. Fixes: ebc944613567 ("drm: convert drivers to use drm_of_find_panel_or_bridge") Signed-off-by: Dan C

[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 "ret"

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

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

[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 <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/i915/selftests/mock_request.c b/drivers/gpu/dr

[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 <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel

[PATCH] drm/edid: checking for NULL instead of IS_ERR

2017-04-12 Thread Dan Carpenter
drm_mode_create_tile_group() uses error pointers, it doesn't return NULL. I re-arranged it a tiny bit to be more clear. Fixes: 40d9b043a89e ("drm/connector: store tile information from displayid (v3)") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a

[PATCH] drm: bridge: dw-hdmi: Add a missing break statement

2017-04-05 Thread Dan Carpenter
There was supposed to be a break before the next case statement. Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm

[bug report] drm: bridge: dw-hdmi: Switch to V4L bus format and encodings

2017-04-05 Thread Dan Carpenter
FAULT; 1683 1684 /* TOFIX: Default to RGB888 output format */ 1685 hdmi->hdmi_data.enc_out_bus_format = MEDIA_BUS_FMT_RGB888_1X24; regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 2/2] drm/amd/powerplay: fix a couple locking issues

2017-04-03 Thread Dan Carpenter
We should return unlock on the error path in pp_dpm_dispatch_tasks() and there is a double lock bug in pp_dpm_set_sclk_od(). Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/d

[PATCH] drm/amdgpu: Fix a NULL deref in amdgpu_vm_add_prt_cb()

2017-04-03 Thread Dan Carpenter
We accidentally dereference "cb" if the kmalloc() fails. Fixes: 451bc8eb8fe6 ("drm/amdgpu: fix PRT teardown on VM fini v3") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdg

[PATCH 1/2] drm/amd/powerplay: fix pp_dpm_get_current_power_state()

2017-04-03 Thread Dan Carpenter
This switch statement is missing breaks. Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c in

Re: [bug report] drm/amdgpu/gfx6: clean up cu configuration

2017-04-03 Thread Dan Carpenter
tch is trying to do or why it exists... > adev->gfx.config.max_shader_engines is set in gfx_v6_0_gpu_init() and > it must be < 4 so we'll never be beyond the end of the array. Could you remove the condition then? We should either check it always or not at all. We shoul

[bug report] drm/amdgpu/gfx6: clean up cu configuration

2017-03-31 Thread Dan Carpenter
(i * 16 + j * 8)); 3749 } 3750 } 3751 3752 gfx_v6_0_select_se_sh(adev, 0x, 0x, 0x); 3753 mutex_unlock(>grbm_idx_mutex); 3754 3755 cu_info->number = active_cu_number; 3756

[PATCH] drm: qxl: add missing return check

2017-03-14 Thread Dan Carpenter
My static checker complains that "release" is uninitialized if qxl_alloc_release_reserved() fails, so let's add a check for that. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c in

[bug report] drm/nouveau/secboot: add gp102/gp104/gp106/gp107 support

2017-03-10 Thread Dan Carpenter
n NULL because we're not passing a NULL to it. I guess we should be checking for ERR_PTR(). But really why does nvkm_engine_ref() ever return NULL? It feels like if we pass it a NULL pointer it should return ERR_PTR(-EINVAL) on that path instead. 64 falcon = device->nvdec->fa

Re: [RFC PATCH 04/12] staging: android: ion: Call dma_map_sg for syncing and mapping

2017-03-03 Thread Dan Carpenter
gt; + } > + > +err: > + free_duped_table(table); > + return ERR_PTR(ret); ret isn't initialized on success. > } > regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

[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 <dan.carpen...@oracle.com

[patch v2] drm/msm/dsi: free first element on error

2017-02-16 Thread Dan Carpenter
We're off by one here. We free something that wasn't allocated and we don't free msm_host->bus_clks[]. Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/

Re: [patch] drm/msm/dsi: free first element on error

2017-02-16 Thread Dan Carpenter
On Thu, Feb 16, 2017 at 01:27:47PM +0200, Jani Nikula wrote: > On Thu, 16 Feb 2017, Dan Carpenter <dan.carpen...@oracle.com> wrote: > > We want to free msm_host->bus_clks[0] so the > should be >=. > > > > Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus cl

[patch] drm/msm/dsi: free first element on error

2017-02-16 Thread Dan Carpenter
We want to free msm_host->bus_clks[0] so the > should be >=. Fixes: 6e0eb52eba9e ("drm/msm/dsi: Parse bus clocks from a list") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_

[bug report] drm/exynos/decon5433: configure sysreg in case of hardware trigger

2017-02-13 Thread Dan Carpenter
x->sysreg, DSD_CFG_MUX, 141 DSD_CFG_MUX_TE_UNMASK_GLOBAL, ~0)) 142 DRM_ERROR("Cannot update sysreg.\n"); 143 } regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[patch] drm/exynos/decon5433: & vs | typo

2017-02-13 Thread Dan Carpenter
"&" was obviously intended instead of "|". The original condition is always true. Fixes: b93c2e8b5d9d ("drm/exynos/decon5433: configure sysreg in case of hardware trigger") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/

[bug report] drm/amdgpu: refine uvd4.2 init/stop code.

2017-02-13 Thread Dan Carpenter
reak; 425 mdelay(1); 426 } 427 break; ^^ 428 } 429 regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[bug report] drm/msm/dsi: Move PHY operations out of host

2017-02-10 Thread Dan Carpenter
msm_dsi_host_reset_phy(mdsi->host); ^^ Unchecked dereference. 175 ret = enable_phy(msm_dsi, src_pll_id, _timings[id]); 176 if (ret) regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.f

Re: [bug report] drm: zte: add overlay plane support

2017-02-07 Thread Dan Carpenter
Oh. Also this one: drivers/gpu/drm/zte/zx_plane.c:253 zx_vl_plane_atomic_update() warn: always true condition '(fmt >= 0) => (0-u32max >= 0)' regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.

[bug report] drm: zte: add overlay plane support

2017-02-07 Thread Dan Carpenter
83 zx_writel(rsz + RSZ_VL_LUMA_VER, rsz_step_value(src_h, dst_h)); 184 zx_writel(rsz + RSZ_VL_CHROMA_HOR, rsz_step_value(src_chroma_w, dst_w)); 185 zx_writel(rsz + RSZ_VL_CHROMA_VER, rsz_step_value(src_chroma_h, dst_h)); 186 187 zx_vl_rsz_set_update

[patch] drm/atomic: fix an error code in mode_fixup()

2017-02-07 Thread Dan Carpenter
ysis and I don't know if it affects run time. Fixes: 4cd4df8080a3 ("drm/atomic: Add ->atomic_check() to encoder helpers") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c inde

[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 <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index 3f656e3a6e5a..773a45a

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 <dan.carpe

[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 <dan.carpen...@oracle.com> 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/

[patch] drm/amdgpu/virt: double free in amdgpu_map_static_csa()

2017-02-07 Thread Dan Carpenter
The amdgpu_vm_bo_rmv() function frees "bo_va" so we shouldn't free it a second time. Fixes: 4e4bbe7343a6 ("drm/amdgpu:add new file for SRIOV") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/dr

[patch] drm/radeon: remove some dead code

2017-02-07 Thread Dan Carpenter
If "rdev->bios" is NULL then we don't need to free it. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/gpu/drm/radeon/radeon_bios.c b/drivers/gpu/drm/radeon/radeon_bios.c index 00cfb5d2875f..04c0ed41374f 100644 --- a/drivers/gpu/drm/radeon/

Re: [bug report] drm/amdgpu: fix memleak in pptable_init

2017-01-25 Thread Dan Carpenter
Ping? regards, dan carpenter On Wed, Nov 30, 2016 at 10:18:41PM +0300, Dan Carpenter wrote: > Hello Monk Liu, > > The patch 9d8f086cd059: "drm/amdgpu: fix memleak in pptable_init" > from May 30, 2016, leads to the following static checker warning: > >

Re: [bug report] drm/amdgpu: Add support for CIK parts

2017-01-25 Thread Dan Carpenter
This one still needs to be fixed as well. regards, dan carpenter On Tue, Dec 13, 2016 at 01:34:17PM +0300, Dan Carpenter wrote: > Hello Alex Deucher, > > The patch a2e73f56fa62: "drm/amdgpu: Add support for CIK parts" from > Apr 20, 2015, leads to the following

Re: [bug report] drm/amdgpu: impl late_fini for amdgpu_pp_ip

2017-01-25 Thread Dan Carpenter
What can we do to fix this one? regards, dan carpenter On Wed, Nov 30, 2016 at 10:19:21PM +0300, Dan Carpenter wrote: > Hello Monk Liu, > > The patch 482587e3145e: "drm/amdgpu: impl late_fini for amdgpu_pp_ip" > from May 19, 2016, leads to the following

Re: [patch] drm/vc4: fix a bounds check

2017-01-16 Thread Dan Carpenter
4_full_res_bounds_check();" is fine too. It's not something that bothers me. I guess I just would do whatever the original author prefers. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[patch] drm/msm: return -EFAULT if copy_from_user() fails

2017-01-16 Thread Dan Carpenter
it can possibly make a difference. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> --- Not compiled. diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 4896765..1172fe7 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/d

[bug report] drm: Use atomic state for FB in legacy ioctls

2017-01-13 Thread Dan Carpenter
plies a non-NULL "crtc->primary->state", but I didn't spot the relationship immediately. 393 crtc_resp->y = crtc->primary->state->src_y >> 16; 394 if (crtc->state->enable) { regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[patch] drm/vc4: fix a bounds check

2017-01-12 Thread Dan Carpenter
We accidentally return success even if vc4_full_res_bounds_check() fails. Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> --- Not tested. diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/dri

[bug report] drm: kselftest for drm_mm and eviction

2017-01-10 Thread Dan Carpenter
1299 1300 return assert_continuous(mm, nodes[0].node.size); 1301 } regards, dan carpenter

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

2016-12-15 Thread Dan Carpenter
} 1975 1976 return ret; 1977 } regards, dan carpenter

[patch] drm: mxsfb: drm_dev_alloc() returns error pointers

2016-12-13 Thread Dan Carpenter
We should be checking for IS_ERR() instead of NULL because drm_dev_alloc() returns error pointers. Fixes: 45d59d704080 ("drm: Add new driver for MXSFB controller") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index 79

[bug report] drm/amdgpu: Add support for CIK parts

2016-12-13 Thread Dan Carpenter
wind it's own allocations, doing it that way basically writes a mirroring de-allocate function for every allocator for no effort. 6294 mutex_unlock(>pm.mutex); 6295 DRM_ERROR("amdgpu: dpm initialization failed\n"); 6296 return ret; 6297 } regards, dan carpenter

[bug report] drm/bridge: Add ti-tfp410 DVI transmitter driver

2016-12-06 Thread Dan Carpenter
dev_info(dvi->dev, "Connector's ddc i2c bus found\n"); 150 else 151 ret = -EPROBE_DEFER; 152 153 fail: 154 of_node_put(ep); 155 of_node_put(connector_node); 156 of_node_put(ddc_phandle); 157 return ret; 158 } regards, dan carpenter

[bug report] drm/amdgpu: impl late_fini for amdgpu_pp_ip

2016-11-30 Thread Dan Carpenter
owerplay.ip_funcs->late_fini( 219adev->powerplay.pp_handle); But we use it again here. 220 } regards, dan carpenter

[bug report] drm/amdgpu: fix memleak in pptable_init

2016-11-30 Thread Dan Carpenter
gt;pptable_func->pptable_fini(hwmgr); 109 110 return ret; 111 } regards, dan carpenter

[patch] drm/hisilicon/hibmc: Checking for NULL instead of IS_ERR()

2016-11-24 Thread Dan Carpenter
The drm_dev_alloc() function returns error pointers. It never returns NULLs. Fixes: 5e0df3a08f3d ("drm/hisilicon/hibmc: Add hisilicon hibmc drm master driver") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisil

[bug report] drm/amd/powerplay/smu7: fix checks in smu7_get_evv_voltages (v2)

2016-11-15 Thread Dan Carpenter
o something must be wrong. 1487 return -EINVAL; 1488 sclk_table = table_info->vdd_dep_on_sclk; regards, dan carpenter

[patch] drm: zte: checking for NULL instead of IS_ERR()

2016-11-15 Thread Dan Carpenter
drm_dev_alloc() never returns NULL, it only returns error pointers on error. Fixes: 0a886f59528a ("drm: zte: add initial vou drm driver") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c index abc8099..3e76f72 100644 --- a/d

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

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

2016-10-21 Thread Dan Carpenter
() 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,7 @@ static int

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

2016-10-20 Thread Dan Carpenter
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

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

2016-10-20 Thread Dan Carpenter
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_size,

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

2016-10-20 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

[bug report] drm/amd/powerplay: implement smu7 hwmgr to manager asics with smu ip version 7.

2016-10-14 Thread Dan Carpenter
his call corrupt tab->vddgfx. 2129 } 2130 2131 return 0; 2132 } regards, dan carpenter

[bug report] drm/amd/powerplay: add vce state tables initialize for ppt v1.

2016-10-13 Thread Dan Carpenter
*vce_state_table; if (!pp_table) return 0; vce_state_table = (void *)pp_table + le16_to_cpu(pp_table->usVCEStateTableOffset); return vce_state_table->ucNumEntries; } regards, dan carpenter

[patch] drm/exynos: fix a timeout loop

2016-10-13 Thread Dan Carpenter
ead of 100 but that's probably ok. Fixes: a696394c5224 ('drm/exynos: mixer: simplify loop in vp_win_reset()') Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index edb20a3..fcc7e4f 100644 --- a/drivers/gpu/drm/exynos/exynos_mix

[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

[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

[patch] drm/vc4: Fix a couple error codes in vc4_cl_lookup_bos()

2016-10-13 Thread Dan Carpenter
If the allocation fails the current code returns success. If copy_from_user() fails it returns the number of bytes remaining instead of -EFAULT. Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/vc4/vc4_gem.c

[patch] drm/imx: drm_dev_alloc() returns error pointers

2016-10-13 Thread Dan Carpenter
We are checking for NULL here, when we should be checking for error pointers. Fixes: 54db5decce17 ("drm/imx: drop deprecated load/unload drm_driver ops") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index 98df09

[bug report] drm/vc4: Add support for drawing 3D frames.

2016-10-12 Thread Dan Carpenter
); 800 801 if (*timeout_ns >= delta) 802 *timeout_ns -= delta; 803 } 804 805 return ret; 806 } regards, dan carpenter

[patch] drm/savage: dereferencing an error pointer

2016-10-12 Thread Dan Carpenter
A recent cleanup changed the kmalloc() + copy_from_user() to memdup_user() but the error handling wasn't updated so we might call kfree(-EFAULT) and crash. Fixes: a6e3918bcdb1 ('GPU-DRM-Savage: Use memdup_user() rather than duplicating') Signed-off-by: Dan Carpenter diff --git a/drivers/gpu

[patch] drm/amdgpu: potential NULL dereference in debugfs code

2016-10-12 Thread Dan Carpenter
debugfs_create_file() returns NULL on error, it only returns error pointers if debugfs isn't enabled in the config and we checked for that earlier so it can't happen. Fixes: 4f4824b55650 ('drm/amd/amdgpu: Convert ring debugfs entries to binary') Signed-off-by: Dan Carpenter diff --git a/drivers

[bug report] drm/amd/powerplay: implement smu7 hwmgr to manager asics with smu ip version 7.

2016-10-12 Thread Dan Carpenter
d dereference. 1464 if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, 1465 PHM_PlatformCaps_ClockStretcher)) { regards, dan carpenter

<    5   6   7   8   9   10   11   12   13   14   >