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...@
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
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
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
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
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
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
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
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
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
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
"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.
. 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
"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
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;
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
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.
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.
>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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"
True. I'll resend.
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
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
"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
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
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
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
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
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
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
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
(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
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
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
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
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
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
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/
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
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_
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
"&" 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/
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
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
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.
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
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
"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
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
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/
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
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/
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:
>
>
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
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
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
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
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
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
1299
1300 return assert_continuous(mm, nodes[0].node.size);
1301 }
regards,
dan carpenter
}
1975
1976 return ret;
1977 }
regards,
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
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
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
owerplay.ip_funcs->late_fini(
219adev->powerplay.pp_handle);
But we use it again here.
220 }
regards,
dan carpenter
gt;pptable_func->pptable_fini(hwmgr);
109
110 return ret;
111 }
regards,
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
o something must be wrong.
1487 return -EINVAL;
1488 sclk_table =
table_info->vdd_dep_on_sclk;
regards,
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
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
() 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
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
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,
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
his call corrupt tab->vddgfx.
2129 }
2130
2131 return 0;
2132 }
regards,
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
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
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
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
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
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
);
800
801 if (*timeout_ns >= delta)
802 *timeout_ns -= delta;
803 }
804
805 return ret;
806 }
regards,
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
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
d dereference.
1464 if
(phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
1465
PHM_PlatformCaps_ClockStretcher)) {
regards,
dan carpenter
901 - 1000 of 1463 matches
Mail list logo