[PATCH] drm/msm: check for equals 0 only

2019-04-25 Thread Nicholas Mc Guire
wait_for_completion_timeout() returns 0 on timeout and aleast 1 otherwise so checking for < makes no sense here. Signed-off-by: Nicholas Mc Guire --- Problem located with an experimental coccinelle script While this check does no harm in this form - it should be fixed anyway to comply w

[RFC PATCH] drm/nouveau/fb/ram/gk104: move assignment out of condition

2019-03-25 Thread Nicholas Mc Guire
all in the nouveau driver. I would like to know if this will be accepted at all. Signed-off-by: Nicholas Mc Guire --- Problem located by and experiemental coccinelle script. Note that the last hunk retained the if (i == 0) rather than switching to a more consistent if (!i) - but then again t

[PATCH] drm/omap: dss: do not allow devm_kasprintf() to fail

2018-11-23 Thread Nicholas Mc Guire
ion function that most likely will be called during system initialization it should be OK to use __GFP_NOFAIL here to prevent devm_kasprintf() from returning NULL. Signed-off-by: Nicholas Mc Guire Fixes: 36c61ae2b755 ("drm/omap: dss: Remove display ordering from dss/display.c") --- Problem

Re: [PATCH 4.19 regression fix 1/2] staging: vboxvideo: Fix IRQs no longer working

2018-09-12 Thread Nicholas Mc Guire
On Tue, Sep 11, 2018 at 10:20:41AM +0300, Dan Carpenter wrote: > On Tue, Sep 11, 2018 at 06:48:27AM +0000, Nicholas Mc Guire wrote: > > On Mon, Sep 10, 2018 at 08:30:38PM +0200, Hans de Goede wrote: > > > Commit 1daddbc8dec5 ("staging: vboxvideo: Update driver to use

Re: [PATCH 4.19 regression fix 1/2] staging: vboxvideo: Fix IRQs no longer working

2018-09-12 Thread Nicholas Mc Guire
On Tue, Sep 11, 2018 at 08:53:35AM +0200, Hans de Goede wrote: > Hi, > > On 11-09-18 08:48, Nicholas Mc Guire wrote: > >On Mon, Sep 10, 2018 at 08:30:38PM +0200, Hans de Goede wrote: > >>Commit 1daddbc8dec5 ("staging: vboxvideo: Update driver to use > >>drm

Re: [PATCH 4.19 regression fix 1/2] staging: vboxvideo: Fix IRQs no longer working

2018-09-11 Thread Nicholas Mc Guire
e driver to use ...") > Cc: Fabio Rafael da Rosa > Cc: Nicholas Mc Guire > Signed-off-by: Hans de Goede Reviewed-by: Nicholas Mc Guire > --- > drivers/staging/vboxvideo/vbox_drv.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/staging/

Re: [PATCH V3] drm: handle error values properly

2018-08-31 Thread Nicholas Mc Guire
On Wed, Jul 18, 2018 at 11:14:04AM +0200, Nicholas Mc Guire wrote: > drm_legacy_ctxbitmap_next() returns idr_alloc() which can return > -ENOMEM, -EINVAL or -ENOSPC none of which are -1. since drm_context_t > is an unsigned int an intermediate variable is used to handle the > error cas

[PATCH RFC] drm: omapdrm: do not allow kmalloc to fail

2018-08-24 Thread Nicholas Mc Guire
2/omapfb/dss/omapdss-boot-init.c:113: Pleas let me know if that fix (use of __GFP_NOFAIL) is suitable for this situation. Signed-off-by: Nicholas Mc Guire Fixes: f2dd36ac9974 ("OMAPDSS: move 'compatible' converter to omapdss driver") --- Issue located with an experimental coc

Re: [bug report] drm: re-enable error handling

2018-07-19 Thread Nicholas Mc Guire
On Thu, Jul 19, 2018 at 11:10:30AM +0300, Dan Carpenter wrote: > Hello Nicholas Mc Guire, > > The patch d530b5f1ca0b: "drm: re-enable error handling" from Jul 14, > 2018, leads to the following static checker warning: > > drivers/gpu/drm/drm_context.c:375 drm_

[PATCH V3] drm: handle error values properly

2018-07-18 Thread Nicholas Mc Guire
cit cast is to mark the type conversion as intentional. Signed-off-by: Nicholas Mc Guire Reported-by: kbuild test robot Reported-by: Sean Paul Fixes: d530b5f1ca0b ("drm: re-enable error handling") Fixes: 62968144e673 ("drm: convert drm context code to use Linux idr") --- V3:

Re: [PATCH V2] drm: handle error values properly

2018-07-18 Thread Nicholas Mc Guire
On Tue, Jul 17, 2018 at 04:14:16PM -0400, Sean Paul wrote: > On Tue, Jul 17, 2018 at 03:28:21PM +0200, Nicholas Mc Guire wrote: > > drm_legacy_ctxbitmap_next() returns idr_alloc() which can return > > -ENOMEM, -EINVAL or -ENOSPC none of which are -1. since drm_context_t > >

[PATCH V2] drm: handle error values properly

2018-07-17 Thread Nicholas Mc Guire
cit cast is to mark the type conversion as intentional. Signed-off-by: Nicholas Mc Guire Reported-by: kbuild test robot Fixes: d530b5f1ca0b ("drm: re-enable error handling") Fixes: 62968144e673 ("drm: convert drm context code to use Linux idr") --- kbuild test robot

[PATCH] drm: re-enable error handling

2018-07-14 Thread Nicholas Mc Guire
reenable error handling by checking for < 0. Signed-off-by: Nicholas Mc Guire Fixes: 62968144e673 ("drm: convert drm context code to use Linux idr") --- Problem located with experimental coccinelle script The noted Fixes tag is one of the commits that removed the -1 return value

Re: [PATCH] staging: vboxvideo: Update driver to use drm_dev_register.

2018-06-03 Thread Nicholas Mc Guire
On Sat, Jun 02, 2018 at 08:41:44AM -0300, Fabio Rafael da Rosa wrote: > The use of load and unload hooks is deprecated. DRM drivers should > use drm_dev_alloc|drm_dev_init and drm_dev_register for initialization > and publishing. > > Signed-off-by: Fabio Rafael da Rosa Reviewed-

[PATCH V2] drm/i915: relax uncritical udelay_range()

2016-12-16 Thread Nicholas Mc Guire
tions") Link: http://lkml.org/lkml/2016/12/15/147 Signed-off-by: Nicholas Mc Guire --- V2: use relaxed uslee_range() rather than udelay fix documentation of changed timings Problem found by coccinelle: Patch was compile tested with: x86_64_defconfig (implies CONFIG_DRM_I915) Patch is aga

[PATCH V2] drm/i915: relax uncritical udelay_range() settings

2016-12-16 Thread Nicholas Mc Guire
("drm/i915/bxt: DSI enable for BXT") Signed-off-by: Nicholas Mc Guire --- V2: use relaxed uslee_range() rather than udelay fix documentation of changed timings Problem found by coccinelle: Patch was compile tested with: x86_64_defconfig (implies CONFIG_DRM_I915) Patch is aga

[Intel-gfx] [PATCH] drm/i915: use udelay for very short delays

2016-12-15 Thread Nicholas Mc Guire
On Thu, Dec 15, 2016 at 10:27:59AM +0100, Daniel Vetter wrote: > On Thu, Dec 15, 2016 at 10:25:19AM +0100, Daniel Vetter wrote: > > On Thu, Dec 15, 2016 at 11:08:49AM +0200, Jani Nikula wrote: > > > On Thu, 15 Dec 2016, Nicholas Mc Guire wrote: > > > > Even on fast

[PATCH] drm/i915: use udelay for very short delays

2016-12-15 Thread Nicholas Mc Guire
On Thu, Dec 15, 2016 at 12:20:01PM +0200, Jani Nikula wrote: > On Thu, 15 Dec 2016, Ville Syrjälä wrote: > > On Thu, Dec 15, 2016 at 11:52:34AM +0200, Jani Nikula wrote: > >> On Thu, 15 Dec 2016, Nicholas Mc Guire wrote: > >> > On Thu, Dec 15, 2016 at 11:08

[PATCH] drm/i915: use udelay for very short delays

2016-12-15 Thread Nicholas Mc Guire
On Thu, Dec 15, 2016 at 11:08:49AM +0200, Jani Nikula wrote: > On Thu, 15 Dec 2016, Nicholas Mc Guire wrote: > > Even on fast systems a 2 microsecond delay is most likely more efficient > > as a busy-wait loop. The overhead of a hrtimer does not seem warranted - > > chan

[PATCH] drm/i915: use udelay for very small delays

2016-12-15 Thread Nicholas Mc Guire
On Thu, Dec 15, 2016 at 10:47:57AM +0200, Jani Nikula wrote: > On Thu, 15 Dec 2016, Nicholas Mc Guire wrote: > > usleep_range() is intended for delays in the 10us to 10ms range that need > > good precision. a useleep_range(1, will effectively be no more than an > > impre

[PATCH] drm/i915: use udelay for very short delays

2016-12-15 Thread Nicholas Mc Guire
Even on fast systems a 2 microsecond delay is most likely more efficient as a busy-wait loop. The overhead of a hrtimer does not seem warranted - change this to a udelay(2). Signed-off-by: Nicholas Mc Guire --- Problem found by coccinelle: Patch was compile tested with: x86_64_defconfig

[PATCH] drm/i915: use udelay for very small delays

2016-12-15 Thread Nicholas Mc Guire
/i915: add VLV DSI PLL Calculations") Signed-off-by: Nicholas Mc Guire --- Problem located by coccinelle The requirement of waiting at least 0.5 us is assured with the udelay(1) here which should be more effective than a usleep_range() - would ndelay(500) make sense here ? Patch was compile t

[PATCH RFC] drm/radeon/ci add comment to document intentionally unreachable code

2016-07-19 Thread Nicholas Mc Guire
eon/ci: disable needless sclk changes") Signed-off-by: Nicholas Mc Guire --- ./drivers/gpu/drm/radeon/ci_dpm.c:3847 bad/useless conditional 3845 } else { 3846 /* XXX check display min clock requirements */ 3847 if (CISLAND_MINIMUM_ENGINE_CLOCK != CISLAND_MINIMU

[PATCH RFC] drm/i2c: tda998x: dead-code or unhandled error condition ?

2015-06-10 Thread Nicholas Mc Guire
was effectively being ignoring - as the timeout will be checked a few lines below the error condition being checked here seems to be wrong or this is simply dead code which would be my guess as the timeout condition check covers the wait-queue related failure condition. Signed-off-by: Nicholas Mc Gu

[PATCH] DRM: Armada: fixup wait_event_timeout being ignored

2015-06-10 Thread Nicholas Mc Guire
On Wed, 10 Jun 2015, Russell King - ARM Linux wrote: > On Wed, Jun 10, 2015 at 01:07:08PM +0200, Nicholas Mc Guire wrote: > > The calling side seems to assume 0 as success and <0 as error so > > returning -ETIME should be fine here. > > The idea here is to allow the

[PATCH] DRM: Armada: fixup wait_event_timeout being ignored

2015-06-10 Thread Nicholas Mc Guire
>=0 always thus the negative check was effectively ignoring the timeout event - this looks like a bug. An appropriately named variable of type long is inserted and the call fixed up as well as the negative return check changed to detect the timeout event. Signed-off-by: Nicholas Mc Guire ---

[PATCH 1/3] drm/msm: match wait_for_completion_timeout return type

2015-04-16 Thread Nicholas Mc Guire
On Mon, 13 Apr 2015, Thierry Reding wrote: > On Sat, Apr 11, 2015 at 03:10:36PM +0200, Nicholas Mc Guire wrote: > > return type of wait_for_completion_timeout is unsigned long not int, this > > patch assigns the return value of wait_for_completion_timeout to an > > appropri

[PATCH 3/3] drm/msm: drop redundant debug output

2015-04-11 Thread Nicholas Mc Guire
wait_for_completion_timeout returns 0 in case of timeout and never return < 0 so there is no additional information in printing the value of time_left here as it will always be 0, thus it can be dropped. Signed-off-by: Nicholas Mc Guire --- This was compile tested with qcom_defcon

[PATCH 2/3] drm/msm: wait_for_completion_timeout return is never negative

2015-04-11 Thread Nicholas Mc Guire
wait_for_completion_timeout returns >= 0 but never negative - so the error check should be against equality to 0 not <= 0. Signed-off-by: Nicholas Mc Guire --- This was compile tested with qcom_defconfig + CONFIG_DRM=m (implies CONFIG_DRM_MSM=m) Patch is against 4.0-rc7 (localversion-n

[PATCH 1/3] drm/msm: match wait_for_completion_timeout return type

2015-04-11 Thread Nicholas Mc Guire
return type of wait_for_completion_timeout is unsigned long not int, this patch assigns the return value of wait_for_completion_timeout to an appropriately typed and named variable. Signed-off-by: Nicholas Mc Guire --- This was compile tested with qcom_defconfig + CONFIG_DRM=m (implies

[PATCH] drm/msm: fix build warning - missing prototype

2015-04-05 Thread Nicholas Mc Guire
On Sat, 04 Apr 2015, Rob Clark wrote: > On Fri, Apr 3, 2015 at 10:39 PM, Nicholas Mc Guire > wrote: > > fix build warning when building edp/edp_aux.o due to missing > > prototype for edp_aux_transfer. > > > > Signed-off-by: Nicholas Mc Guire > > --- >

[PATCH] drm/msm: fix build warning - missing prototype

2015-04-04 Thread Nicholas Mc Guire
fix build warning when building edp/edp_aux.o due to missing prototype for edp_aux_transfer. Signed-off-by: Nicholas Mc Guire --- building drivers/gpu/drm/msm/msm.ko gives the following warning: drivers/gpu/drm/msm/edp/edp_aux.c:118:9: warning: no previous prototype for 'edp_aux_tra

[PATCH 3/3] drm/msm: drop redundant output in debug message

2015-04-04 Thread Nicholas Mc Guire
wait_for_completion_timeout returns 0 in case of timeout so printing the return value here will always yield 0 and is therefor redundant - dropped. Signed-off-by: Nicholas Mc Guire --- This was compile tested with qcom_defconfig + CONFIG_DRM=m (implies CONFIG_DRM_MSM=m) Patch is against

[PATCH 2/3] drm/msm: fix HZ dependency of timeout

2015-04-04 Thread Nicholas Mc Guire
at other drm drivers (e.g. exynos_drm_dsi.c:356 300ms, tegra/dpaux.c:188 250ms) - this needs to be confirmed by someone who knows the details of the driver. Signed-off-by: Nicholas Mc Guire --- This was compile tested with qcom_defconfig + CONFIG_DRM=m (implies CONFIG_DRM_MSM=m) Patch is

[PATCH 1/3] drm/msm: fixup wait_for_completion_timeout handling

2015-04-04 Thread Nicholas Mc Guire
eems incorrect as it could return 0 (timeout) but checks of <= 0 to indicate error so the return probably should be -ETIMEDOUT in case wait_for_completion_timeout returns 0 (timeout occurred). Signed-off-by: Nicholas Mc Guire --- This was compile tested with qcom_defconfig + CONFIG_DR

[PATCH] gma500: condition with no effect

2015-02-09 Thread Nicholas Mc Guire
The if and the else branch code are identical - so the condition has no effect on the effective code - this patch removes the condition and the duplicated code. Signed-off-by: Nicholas Mc Guire --- Patch was only compile tested with x86_64_defconfig + CONFIG_DRM_GMA500=m Patch is against

[PATCH] drm/radeon: remove unreachable code

2015-01-20 Thread Nicholas Mc Guire
On Mon, 19 Jan 2015, Deucher, Alexander wrote: > > -Original Message- > > From: Nicholas Mc Guire [mailto:der.herr at hofr.at] > > Sent: Monday, January 19, 2015 8:11 AM > > To: Deucher, Alexander > > Cc: Koenig, Christian; David Airlie; dri-devel at lis

[PATCH] drm/radeon: remove unreachable code

2015-01-19 Thread Nicholas Mc Guire
Signed-off-by: Nicholas Mc Guire --- As the if (CISLAND_MINIMUM_ENGINE_CLOCK != CISLAND_MINIMUM_ENGINE_CLOCK) is never satisfied - the entire else branch is never going to be executed and could be removed - provided this is not simply a bug and needs to be fixed... Patch is against 3.19.0-rc5