Re: [PATCH 1/4] ARM/omap1: switch to use dma_direct_set_offset for lbus DMA offsets

2020-09-19 Thread Janusz Krzysztofik
de and remove the now unused hooks. > > Looks nice to me :) I still can't test this probably for few more weeks > though but hopefully Aaro or Janusz (Added to Cc) can test it. Works for me on Amstrad Delta (tested with a USB ethernet adapter). Tested-by: Janusz Krzysztofik Thanks, J

[PATCH] mtd: rawnand: ams-delta: Fix non-OF build warning

2020-09-19 Thread Janusz Krzysztofik
lta: Add module device tables") Reported-by: kernel test robot Signed-off-by: Janusz Krzysztofik --- drivers/mtd/nand/raw/ams-delta.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/nand/raw/ams-delta.c b/drivers/mtd/nand/raw/ams-delta.c index fdba155416d2..0bf4cfc25147 1006

Re: [PATCH 6/6] media: ov6650: Fix arbitrary selection of master clock rate

2019-10-18 Thread Janusz Krzysztofik
Hi Sakari, On Friday, October 18, 2019 8:54:19 P.M. CEST Sakari Ailus wrote: > Hi Janusz, > > On Sun, Oct 13, 2019 at 02:50:50PM +0200, Janusz Krzysztofik wrote: > > A hardcoded 12 MHz master clock frequency has been assumed since > > conversion of the driver f

[PATCH 2/6] media: ov6650: Drop obsolete .pclk_limit attribute

2019-10-13 Thread Janusz Krzysztofik
hardcoded to an arbitrarily chosen pixel clock limit. Drop it. Host interfaces can limit frame rate if needed by calling .s_frame_interval(). Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/dri

[PATCH 4/6] media: ov6650: Don't reapply pixel clock divisor on format change

2019-10-13 Thread Janusz Krzysztofik
clock divisor in a single operation, will no longer be applied from ov6650_s_fmt(), apply it, still using a hardcoded value for now, from ov6650_prog_dflt() helper so hardware is still initialised correctly on device probe. Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 17

[PATCH 1/6] media: ov6650: Fix stored frame interval not in sync with hardware

2019-10-13 Thread Janusz Krzysztofik
, update the frame interval field of the device private structure with a new value only after it is successfully applied on hardware so it always reflects actual hardware state to the extent possible. Also, initialise the field with hardware default frame interval on device probe. Signed-off-by: Janusz

[PATCH 5/6] media: ov6650: Drop unused .pclk_max field

2019-10-13 Thread Janusz Krzysztofik
This field of the driver private structure is no longer used, drop it. Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index e95ea132ef06..f4723c0b5c70 100644

[PATCH 0/6] media: ov6650: Master and pixel clock handling fixes

2019-10-13 Thread Janusz Krzysztofik
Fix issues with handling of master and pixel clock, mostly those introduced as temporary workarounds when the driver was converted form soc_camera sensor to a standalone V4L2 subdevice driver. Janusz Krzysztofik (6): media: ov6650: Fix stored frame interval not in sync with hardware media

[PATCH 6/6] media: ov6650: Fix arbitrary selection of master clock rate

2019-10-13 Thread Janusz Krzysztofik
rates (fix misnamed symbol while being at it), then use v4l2_clk_get/set_rate() to obtain a clock rate matching one of those supported. On success, apply respective master clock hardware divisor provided by the matching element of the table. Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6

[PATCH 3/6] media: ov6650: Simplify clock divisor calculation

2019-10-13 Thread Janusz Krzysztofik
of to_clkrc() where possible - use the frame interval value directly. Furthermore, replace the to_clkrc() helper function with a simple macro and update its users to always use FRAME_RATE_MAX as frame interval denominator and pass only its numerator as an argument. Signed-off-by: Janusz Krzysztofik

[PATCH v3 8/9] media: ov6650: Fix stored frame format not in sync with hardware

2019-09-03 Thread Janusz Krzysztofik
ensor") Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index 4fd8ac8e3994..126a662be301 100644 --- a/drivers/media/i2c/ov6650.c +++ b/drivers

[PATCH v3 3/9] media: ov6650: Fix crop rectangle alignment not passed back

2019-09-03 Thread Janusz Krzysztofik
sed back to the user calling .set_selection() as it should be. Fix the issue by dropping the copy and replacing all references to it with references to the crop rectangle embedded in the user argument. Fixes: 10d5509c8d50 ("[media] v4l2: remove g/s_crop from video ops") Signed-off-by: Ja

[PATCH v3 2/9] media: ov6650: Fix control handler not freed on init error

2019-09-03 Thread Janusz Krzysztofik
ov6650: convert to the control framework") Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index 53550cae2353..cb2aa76cd6cc 100644 --- a/driv

[PATCH v3 6/9] media: ov6650: Fix .get_fmt() V4L2_SUBDEV_FORMAT_TRY support

2019-09-03 Thread Janusz Krzysztofik
s trivial, go for it. Fixes: da298c6d98d5 ("[media] v4l2: replace video op g_mbus_fmt by pad op get_fmt") Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/m

[PATCH v3 4/9] media: ov6650: Fix incorrect use of JPEG colorspace

2019-09-03 Thread Janusz Krzysztofik
it to always select V4L2_COLORSPACE_SRGB. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/dri

[PATCH v3 5/9] media: ov6650: Fix some format attributes not under control

2019-09-03 Thread Janusz Krzysztofik
e response with the default frame format updated with resulting pad config format code and frame size. Fixes: 11ff030c7365 ("[media] v4l2-mediabus: improve colorspace support") Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 51 +- 1 file ch

[PATCH v3 7/9] media: ov6650: Fix default format not applied on device probe

2019-09-03 Thread Janusz Krzysztofik
. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index b6

[PATCH v3 0/9] media: ov6650: A collection of fixes

2019-09-03 Thread Janusz Krzysztofik
Janusz Krzysztofik (9): media: ov6650: Fix MODULE_DESCRIPTION media: ov6650: Fix control handler not freed on init error media: ov6650: Fix crop rectangle alignment not passed back media: ov6650: Fix incorrect use of JPEG colorspace media: ov6650: Fix some format attributes not under

[PATCH v3 1/9] media: ov6650: Fix MODULE_DESCRIPTION

2019-09-03 Thread Janusz Krzysztofik
the module author. Fixes: 23a52386fabe ("media: ov6650: convert to standalone v4l2 subdevice") Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.

[PATCH v3 9/9] media: ov6650: Fix stored crop rectangle not in sync with hardware

2019-09-03 Thread Janusz Krzysztofik
on hardware so the stored values always reflect actual hardware state to the extent possible. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dri

Re: [RFC PATCH] iommu/vt-d: Fix IOMMU field not populated on device hot re-plug

2019-09-03 Thread Janusz Krzysztofik
Hi Baolu, On Tuesday, September 3, 2019 3:29:40 AM CEST Lu Baolu wrote: > Hi Janusz, > > On 9/2/19 4:37 PM, Janusz Krzysztofik wrote: > >> I am not saying that keeping data is not acceptable. I just want to > >> check whether there are any other solutions. >

[RFC PATCH] iommu/vt-d: Fix IOMMU field not populated on device hot re-plug

2019-08-22 Thread Janusz Krzysztofik
off-by: Janusz Krzysztofik --- drivers/iommu/intel-iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 12d094d08c0a..7cdcd0595408 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -2477,6 +247

[PATCH for v5.3] ARM: OMAP1: ams-delta-fiq: Fix missing irq_ack

2019-08-11 Thread Janusz Krzysztofik
ion inside the base FIQ handler. Should another dependency - irq_unmask() - be ever removed from the OMAP GPIO driver, WARN once if missing. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/ams-delta-fiq-handler.S | 3 ++- arch/arm/mach-omap1/ams-delta-fiq.c | 4 +--- 2 files

[RFC PATCH 3/6] drm/i915: Propagate "_release" function name suffix down

2019-07-10 Thread Janusz Krzysztofik
ce files have been suffixed with "_driver_release" to avoid ambiguity with other possible .release entry points. Suggested-by: Chris Wilson Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/i915_drv.c | 33 + drivers/gpu/drm/i915/i915_drv.h |

[RFC PATCH 5/6] drm/i915: Propagate "_probe" function name suffix down

2019-07-10 Thread Janusz Krzysztofik
Similar to the "_release" and "_remove" cases, consequently replace "_init" components of names of functions called from i915_driver_probe() with "_probe" suffixes for better code readability. Signed-off-by: Janusz Krzysztofik -

[PATCH] media: ov6650: Fix device node exposed without proper locking

2019-06-02 Thread Janusz Krzysztofik
of IOCTLs. Fix it by dropping the flag assignment. Fixes: c62b96050bee ("media: ov6650: Register with asynchronous subdevice framework") Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/i2c/ov6650.c b/driver

[PATCH] ASoC: ti: Fix SDMA users not providing channel names

2019-06-02 Thread Janusz Krzysztofik
The same probably applies to McASP (not tested), hence the patch fixes both. Fixes: 642aafea8889 ("ASoC: ti: remove compat dma probing") Signed-off-by: Janusz Krzysztofik --- sound/soc/ti/davinci-mcasp.c | 2 +- sound/soc/ti/omap-mcbsp.c| 2 +- 2 files changed, 2 insertions(+),

Re: [RFC PATCH 4/5] media: ov6650: Fix frame scaling not reset on crop

2019-06-02 Thread Janusz Krzysztofik
Hi Sakari, On Sunday, June 2, 2019 12:37:55 AM CEST Sakari Ailus wrote: > > ... I realised that the subtle effect of "media: > ov6650: Register with asynchronous subdevice framework" is that the driver > is now responsible for serialising the access to its own data structures > now. Indeed, I

Re: [RFC PATCH 4/5] media: ov6650: Fix frame scaling not reset on crop

2019-05-31 Thread Janusz Krzysztofik
Hi Sakari, On Friday, May 31, 2019 1:42:58 PM CEST Sakari Ailus wrote: > Hi Janusz, > > On Sun, May 26, 2019 at 10:47:57PM +0200, Janusz Krzysztofik wrote: > > According to V4L2 subdevice interface specification, frame scaling > > factors should be reset to default v

[RFC PATCH 4/5] media: ov6650: Fix frame scaling not reset on crop

2019-05-26 Thread Janusz Krzysztofik
not respect it. The KEEP_CONFIG case is already implemented, fix the other path. Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index 47590cd51190..cc70d8952999

[RFC PATCH 1/5] media: ov6650: Fix V4L2_SEL_FLAG_KEEP_CONFIG handling

2019-05-26 Thread Janusz Krzysztofik
to .set_selection(). Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index c728f718716b..1b02479b616f 100644 --- a/drivers/media/i2c/ov6650.c +++ b/drivers/media/i2c/ov6650.c

[RFC PATCH 2/5] media: ov6650: Refactor ov6650_s_fmt() helper

2019-05-26 Thread Janusz Krzysztofik
scaling flag. In order to avoid passing full struct v4l2_mbus_framefmt argument to it when called from functions other than .set_fmt(), also accept a target pixel code as an argument and make the struct v4l2_mbus_framefmt used for crop rectangle modification optional. Signed-off-by: Janusz Krzysztofik

[RFC PATCH 5/5] media: ov6650: Add .init_cfg() pad operation callback

2019-05-26 Thread Janusz Krzysztofik
modified, host interface drivers should call .init_cfg() on a pad config before passing it to V4L2_SUBDEV_FORMAT_TRY operations. Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/media/i2c/ov6650.c b

[RFC PATCH 3/5] media: ov6650: Fix active crop rectangle affected by .set_fmt()

2019-05-26 Thread Janusz Krzysztofik
). Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 32 ++-- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index 8cb30f3e4851..47590cd51190 100644 --- a/drivers/media/i2c/ov6650.c +++ b

[RFC PATCH 0/5] media: ov6650: V4L2 subdev compliance fixes

2019-05-26 Thread Janusz Krzysztofik
An attepmt to make the driver more compliant with V4L2 subdevice interface specification. Non-compliant frame half scaling is kept in .set_fmt() until composing is implemented. Janusz Krzysztofik (5): media: ov6650: Fix V4L2_SEL_FLAG_KEEP_CONFIG handling media: ov6650: Refactor ov6650_s_fmt

Re: [PATCH v2 1/9] media: ov6650: Fix MODDULE_DESCRIPTION

2019-05-21 Thread Janusz Krzysztofik
On Tuesday, May 21, 2019 7:15:37 AM CEST Greg KH wrote: > On Tue, May 21, 2019 at 12:49:59AM +0200, Janusz Krzysztofik wrote: > > Commit 23a52386fabe ("media: ov6650: convert to standalone v4l2 > > subdevice") converted the driver from a soc_camera sensor to a > >

[PATCH v2 6/9] media: ov6650: Fix .get_fmt() V4L2_SUBDEV_FORMAT_TRY support

2019-05-20 Thread Janusz Krzysztofik
s trivial, go for it. Fixes: da298c6d98d5 ("[media] v4l2: replace video op g_mbus_fmt by pad op get_fmt") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org --- drivers/media/i2c/ov6650.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drive

[PATCH v2 2/9] media: ov6650: Fix control handler not freed on init error

2019-05-20 Thread Janusz Krzysztofik
ov6650: convert to the control framework") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org --- drivers/media/i2c/ov6650.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index a3d00afcb0c8.

[PATCH v2 4/9] media: ov6650: Fix incorrect use of JPEG colorspace

2019-05-20 Thread Janusz Krzysztofik
it to always select V4L2_COLORSPACE_SRGB. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org --- drivers/media/i2c/ov6650.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers

[PATCH v2 9/9] media: ov6650: Fix stored crop rectangle not in sync with hardware

2019-05-20 Thread Janusz Krzysztofik
on hardware so the stored values always reflect actual hardware state to the extent possible. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org --- drivers/media/i2c/ov6650.c | 2 ++ 1 file changed, 2

[PATCH v2 1/9] media: ov6650: Fix MODDULE_DESCRIPTION

2019-05-20 Thread Janusz Krzysztofik
the module author. Fixes: 23a52386fabe ("media: ov6650: convert to standalone v4l2 subdevice") Signed-off-by: Janusz Krzysztofik cc: sta...@vger.kernel.org --- drivers/media/i2c/ov6650.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov6650.c

[PATCH v2 7/9] media: ov6650: Fix default format not applied on device probe

2019-05-20 Thread Janusz Krzysztofik
. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org --- drivers/media/i2c/ov6650.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2

[PATCH v2 3/9] media: ov6650: Fix crop rectangle alignment not passed back

2019-05-20 Thread Janusz Krzysztofik
sed back to the user calling .set_selection() as it should be. Fix the issue by dropping the copy and replacing all references to it with references to the crop rectangle embedded in the user argument. Fixes: 10d5509c8d50 ("[media] v4l2: remove g/s_crop from video ops") Signed-off-b

[PATCH v2 0/9] media: ov6650: A collection of fixes

2019-05-20 Thread Janusz Krzysztofik
Janusz Krzysztofik (9): media: ov6650: Fix MODDULE_DESCRIPTION media: ov6650: Fix control handler not freed on init error media: ov6650: Fix crop rectangle alignment not passed back media: ov6650: Fix incorrect use of JPEG colorspace media: ov6650: Fix some format attributes not under

[PATCH v2 8/9] media: ov6650: Fix stored frame format not in sync with hardware

2019-05-20 Thread Janusz Krzysztofik
ensor") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org --- drivers/media/i2c/ov6650.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2c/ov6650.c index b199332f62d7..65d43390dbeb 100644 --- a/drivers/media/i2

[PATCH v2 5/9] media: ov6650: Fix some format attributes not under control

2019-05-20 Thread Janusz Krzysztofik
e response with the default frame format updated with updated pad config format code and frame size. Fixes: 11ff030c7365 ("[media] v4l2-mediabus: improve colorspace support") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org --- drivers/media/i2c/ov6650.c | 51 ++

[PATCH v7 0/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()

2019-05-20 Thread Janusz Krzysztofik
while calling subdevice operations, move those parameter checks from subdev_do_ioctl() to v4l2_subdev_call(). Also, add check for non-NULL pointers, including pad config if V4L2_SUBDEV_FORMAT_TRY is requested. Having that done, we can avoid taking care of those checks inside drivers. Janusz

[PATCH v7 2/3] media: v4l2-subdev: Verify v4l2_subdev_call() pointer arguments

2019-05-20 Thread Janusz Krzysztofik
Parameters passed to check helpers are now obtained by dereferencing unverified pointer arguments. Check validity of those pointers first. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 27 +++ 1 file changed, 27 insertions(+) diff --git

[PATCH v7 1/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()

2019-05-20 Thread Janusz Krzysztofik
structure so the v4l2_subdev_call() macro can find them easy if provided. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 238 -- include/media/v4l2-subdev.h | 6 + 2 files changed, 152 insertions(+), 92 deletions(-) diff --git

[PATCH v7 3/3] media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument

2019-05-20 Thread Janusz Krzysztofik
Extend parameter checks performed by v4l2_subdev_call() with a check for a non-NULL pad config pointer if V4L2_SUBDEV_FORMAT_TRY format type is requested so drivers don't need to care. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 27

[PATCH v7 0/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()

2019-05-20 Thread Janusz Krzysztofik
() macro while calling subdevice operations, move those parameter checks from subdev_do_ioctl() to v4l2_subdev_call(). Also, add check for non-NULL pointers, including pad config if V4L2_SUBDEV_FORMAT_TRY is requested. Having that done, we can avoid taking care of those checks inside drivers. Janusz

Re: [PATCH v6 1/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()

2019-05-17 Thread Janusz Krzysztofik
On Friday, May 17, 2019 5:58:40 PM CEST Sakari Ailus wrote: > Hi Janusz, > > On Wed, May 15, 2019 at 10:56:36PM +0200, Janusz Krzysztofik wrote: > > Hi Sakari, > > > > On Wednesday, May 15, 2019 9:16:02 AM CEST Sakari Ailus wrote: > > > Hi Janusz, > > &

Re: [PATCH v6 1/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()

2019-05-15 Thread Janusz Krzysztofik
Hi Sakari, On Wednesday, May 15, 2019 9:16:02 AM CEST Sakari Ailus wrote: > Hi Janusz, > > On Wed, May 15, 2019 at 12:48:21AM +0200, Janusz Krzysztofik wrote: > > -static int check_crop(struct v4l2_subdev *sd, struct v4l2_subdev_crop *crop) > > +static inline int check_p

[PATCH v6 2/3] media: v4l2-subdev: Verify v4l2_subdev_call() pointer arguments

2019-05-14 Thread Janusz Krzysztofik
Parameters passed to check helpers are now obtained by dereferencing unverified pointer arguments. Check validity of those pointers first. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 27 +++ 1 file changed, 27 insertions(+) diff --git

[PATCH v6 3/3] media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument

2019-05-14 Thread Janusz Krzysztofik
Extend parameter checks performed by v4l2_subdev_call() with a check for a non-NULL pad config pointer if V4L2_SUBDEV_FORMAT_TRY format type is requested so drivers don't need to care. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 27

[PATCH v6 1/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()

2019-05-14 Thread Janusz Krzysztofik
structure so the v4l2_subdev_call() macro can find them easy if provided. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 232 -- include/media/v4l2-subdev.h | 6 + 2 files changed, 146 insertions(+), 92 deletions(-) diff --git

[PATCH v6 0/3] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()

2019-05-14 Thread Janusz Krzysztofik
() macro while calling subdevice operations, move those parameter checks from subdev_do_ioctl() to v4l2_subdev_call(). Also, add check for non-NULL pointers, including pad config if V4L2_SUBDEV_FORMAT_tRY is requested. Having that done, we can avoid taking care of those checks inside drivers. Janusz

[PATCH v5 3/4] media: v4l2-subdev: Verify v4l2_subdev_call() pointer arguments

2019-05-12 Thread Janusz Krzysztofik
Parameters passed to check helpers are now obtained by dereferencing unverified pointer arguments. Check validity of those pointers first. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 27 +++ 1 file changed, 27 insertions(+) diff --git

[PATCH v5 2/4] media: v4l2-subdev: WARN_ON invalid v4l2_subdev_call() arguments

2019-05-12 Thread Janusz Krzysztofik
Invalid arguments passed to v4l2_subdev_call generally mean bugs. Be noisy if that happens. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers

[PATCH v5 4/4] media: v4l2-subdev: Verify v4l2_subdev_call() pad config argument

2019-05-12 Thread Janusz Krzysztofik
Extend parameter checks performed by v4l2_subdev_call() with a check for a non-NULL pad config pointer if V4L2_SUBDEV_FORMAT_TRY format type is requested so drivers don't need to care. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 27

[PATCH v5 1/4] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()

2019-05-12 Thread Janusz Krzysztofik
so the v4l2_subdev_call() macro can find them easy if provided. Move reusable code to helpers. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 227 -- include/media/v4l2-subdev.h | 6 + 2 files changed, 143 insertions(+), 90

[PATCH v5 0/4] media: v4l2-subdev: Verify arguments in v4l2_subdev_call()

2019-05-12 Thread Janusz Krzysztofik
, we can avoid taking care of those checks inside drivers. Janusz Krzysztofik (4): media: v4l2-subdev: Verify arguments in v4l2_subdev_call() media: v4l2-subdev: WARN_ON invalid v4l2_subdev_call() arguments media: v4l2-subdev: Verify v4l2_subdev_call() pointer arguments media: v4l2-subdev

[PATCH v4 2/2] media: v4l2-subdev: Verify pad config argument

2019-05-11 Thread Janusz Krzysztofik
Extend parameter checks performed by v4l2_subdev_call() with a check for a non-NULL pad config pointer if V4L2_SUBDEV_FORMAT_TRY format type is requested so drivers don't need to care. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 30

[PATCH v4 0/2] media: v4l2-subdev: Verify arguments of v4l2_subdev_call()

2019-05-11 Thread Janusz Krzysztofik
v4l2_subdev_call() macro while calling subdevice operations, move those parameter checks from subdev_do_ioctl() to v4l2_subdev_call(). Also, add a check for a non-NULL pad config pointer if V4L2_SUBDEV_FORMAT_tRY is requested. This way we can avoid taking care of those checks inside drivers. Janusz Krzysztofik

[PATCH v4 1/2] media: v4l2-subdev: Verify arguments of v4l2_subdev_call()

2019-05-11 Thread Janusz Krzysztofik
() macro while calling subdevice operations, move those parameter checks from subdev_do_ioctl() to v4l2_subdev_call() so we can avoid taking care of those checks inside drivers. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 222 +++--- include

[PATCH v3 1/2] media: v4l2-subdev: Verify arguments of v4l2_subdev_call()

2019-05-11 Thread Janusz Krzysztofik
() macro while calling subdevice operations, move those parameter checks from subdev_do_ioctl() to v4l2_subdev_call() so we can avoid taking care of those checks inside drivers. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 222 +++--- include

[PATCH v3 2/2] media: v4l2-subdev: Verify pad config argument

2019-05-11 Thread Janusz Krzysztofik
Extend parameter checks performed by v4l2_subdev_call() with a check for a non-NULL pad config pointer if V4L2_SUBDEV_FORMAT_TRY format type is requested so drivers don't need to care. Signed-off-by: Janusz Krzysztofik --- drivers/media/v4l2-core/v4l2-subdev.c | 30

[PATCH v3 0/2] media: v4l2-subdev: Verify arguments of v4l2_subdev_call()

2019-05-11 Thread Janusz Krzysztofik
v4l2_subdev_call() macro while calling subdevice operations, move those parameter checks from subdev_do_ioctl() to v4l2_subdev_call(). Also, add a check for a non-NULL pad config pointer if V4L2_SUBDEV_FORMAT_tRY is requested. This way we can avoid taking care of those checks inside drivers. Janusz Krzysztofik

[PATCH v2] media: v4l2-subdev: Verify arguments of v4l2_subdev_call()

2019-05-10 Thread Janusz Krzysztofik
() macro while calling subdevice operations, move those parameter checks from subdev_do_ioctl() to v4l2_subdev_call() so we can avoid reimplementing those checks inside drivers. Signed-off-by: Janusz Krzysztofik --- Changelog: v1->v2: - replace the horrible macro with a structure of wrapper functi

Re: [PATCH 03/14] media: ov6650: Fix unverified arguments used in .set_fmt()

2019-05-07 Thread Janusz Krzysztofik
Hi Sakari, Sorry for late answer, I've just found your message in Gmail spam folder. On Tuesday, April 30, 2019 3:58:09 PM CEST Sakari Ailus wrote: > Hi Janusz, > > On Mon, Apr 08, 2019 at 11:42:31PM +0200, Janusz Krzysztofik wrote: > > Commit 717fd5b4907ad ("[media] v4l2:

Re: [PATCH v3] mtd: rawnand: ams-delta: Drop board specific partition info

2019-04-25 Thread Janusz Krzysztofik
Hi Ladislav, On Thursday, April 25, 2019 12:14:28 AM CEST Ladislav Michl wrote: > Hi Janusz, > > On Wed, Apr 24, 2019 at 08:02:12PM +0200, Janusz Krzysztofik wrote: > > After recent modifications, only a hardcoded partition info makes > > the driver device specific. Other

[PATCH v3] mtd: rawnand: ams-delta: Drop board specific partition info

2019-04-24 Thread Janusz Krzysztofik
(PBL_reserved) For their convenience, that information is added to the board Kconfig entry help text, as well as CONFIG_MTD_CMDLINE_PARTS symbol is selected automatically from the board Kconfig entry if the NAND driver is also selected. Signed-off-by: Janusz Krzysztofik Cc: Tony Lindgren Cc: Aaro

Re: [PATCH v2] mtd: rawnand: ams-delta: Drop board specific partition info

2019-04-18 Thread Janusz Krzysztofik
that be acceptable from the MTD subsystem point of view? Thanks, Janusz On Thursday, April 18, 2019 8:49:29 AM CEST Miquel Raynal wrote: > Hi Janusz, > > Janusz Krzysztofik wrote on Thu, 18 Apr 2019 > 01:09:59 +0200: > > > Hi Aaro, Tony, > > > > On Wednesday, April 17, 20

Re: [PATCH v2] mtd: rawnand: ams-delta: Drop board specific partition info

2019-04-17 Thread Janusz Krzysztofik
Hi Aaro, Tony, On Wednesday, April 17, 2019 11:40:10 AM CEST Miquel Raynal wrote: > Hi Janusz, > > Janusz Krzysztofik wrote on Sun, 24 Mar 2019 > 23:33:44 +0100: > > > After recent modifications, only a hardcoded partition info makes > > the driver device specific.

[PATCH 09/14] media: ov6650: Fix incorrect use of JPEG colorspace

2019-04-08 Thread Janusz Krzysztofik
it to always select V4L2_COLORSPACE_SRGB. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org --- drivers/media/i2c/ov6650.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers

[PATCH 12/14] media: ov6650: Fix default format not applied on device probe

2019-04-08 Thread Janusz Krzysztofik
. Fixes: 2f6e2404799a ("[media] SoC Camera: add driver for OV6650 sensor") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org --- drivers/media/i2c/ov6650.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media/i2

Re: [PATCH] drm/i915: Use drm_dev_unplug()

2019-04-05 Thread Janusz Krzysztofik
On Fri, 2019-04-05 at 09:24 +0100, Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-04-05 09:11:54) > > On Fri, 2019-04-05 at 08:41 +0100, Chris Wilson wrote: > > > Quoting Janusz Krzysztofik (2019-04-05 08:26:57) > > > > From: Janusz Krzysztofik &g

[PATCH v3 0/2] media: ov6650: Add V4L2 asynchronous subdevice support

2019-03-29 Thread Janusz Krzysztofik
Janusz Krzysztofik (2): media: ov6650: Move v4l2_clk_get() to ov6650_video_probe() helper media: ov6650: Register with asynchronous subdevice framework ov6650.c | 44 1 file changed, 28 insertions(+), 16 deletions(-) Changelog: v2->

[PATCH v3 2/2] media: ov6650: Register with asynchronous subdevice framework

2019-03-29 Thread Janusz Krzysztofik
Register V4L2 subdevice implemented by the driver to the V4L2 asynchronous subdevice framework. Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/ov6650.c b/drivers/media

[PATCH v3 1/2] media: ov6650: Move v4l2_clk_get() to ov6650_video_probe() helper

2019-03-29 Thread Janusz Krzysztofik
to be converted to v4l2_subdev_internal_ops.registered() callback, executed only when the bridge driver is ready. Signed-off-by: Janusz Krzysztofik --- drivers/media/i2c/ov6650.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/media/i2c/ov6650

[PATCH v2] mtd: rawnand: ams-delta: Drop board specific partition info

2019-03-24 Thread Janusz Krzysztofik
(PBL_reserved). For their convenience, CONFIG_MTD_CMDLINE_PARTS symbol is selected automatically from that board Kconfig if this NAND driver is also selected. Signed-off-by: Janusz Krzysztofik Cc: Tony Lindgren --- CHangelog: v1->v2: - fix a typo poined out by Aaro - thanks! - fix device_n

Re: [PATCH] mtd: rawnand: ams-delta: Drop board specific partition info

2019-03-24 Thread Janusz Krzysztofik
Hi, On Sunday, March 24, 2019 8:24:48 PM CET H. Nikolaus Schaller wrote: > Hi, > > > Am 24.03.2019 um 19:59 schrieb Aaro Koskinen : > > > > Hi, > > > > On Sun, Mar 24, 2019 at 05:48:22PM +0100, Janusz Krzysztofik wrote: > >> Hi Aaro, > >>

Re: [PATCH] mtd: rawnand: ams-delta: Drop board specific partition info

2019-03-24 Thread Janusz Krzysztofik
Hi, On Sunday, March 24, 2019 7:59:32 PM CET Aaro Koskinen wrote: > Hi, > > On Sun, Mar 24, 2019 at 05:48:22PM +0100, Janusz Krzysztofik wrote: > > Hi Aaro, > > > > Thanks for your review. > > > > On Wednesday, March 20, 2019 2:16:30 AM CET Aaro Koskinen

Re: [PATCH] mtd: rawnand: ams-delta: Drop board specific partition info

2019-03-24 Thread Janusz Krzysztofik
Hi Aaro, Thanks for your review. On Wednesday, March 20, 2019 2:16:30 AM CET Aaro Koskinen wrote: > On Tue, Mar 19, 2019 at 11:37:18PM +0100, Janusz Krzysztofik wrote: > > After recent modifications, only a hardcoded partition info makes > > the driver device specif

[PATCH] mtd: rawnand: ams-delta: Drop board specific partition info

2019-03-19 Thread Janusz Krzysztofik
symbol from that board Kconfig automatically if this NAND driver is also selected. Signed-off-by: Janusz Krzysztofik Cc: Tony Lindgren --- arch/arm/mach-omap1/Kconfig | 1 + drivers/mtd/nand/raw/ams-delta.c | 28 +--- 2 files changed, 2 insertions(+), 27 deletions

[PATCH] ARM: OMAP1: ams-delta: Fix broken GPIO ID allocation

2019-03-19 Thread Janusz Krzysztofik
cated GPIO IDs for Amstrad Delta latches, making their IDs overlapping with those already assigned to OMAP GPIO devices. Fix it. Fixes: 771e53c4d1a1 ("ARM: OMAP1: ams-delta: Drop board specific global GPIO numbers") Signed-off-by: Janusz Krzysztofik Cc: sta...@vger.kernel.org --- arch/

Re: [PATCH 2/5 v7] regulator: fixed/gpio: Pull inversion/OD into gpiolib

2018-11-29 Thread Janusz Krzysztofik
depending on how the platform is configured: if the line > is active low, it deals with that, if the line is open drain, > it deals with that too. > > Cc: Janusz Krzysztofik # OMAP1 Tested-by: Janusz Krzysztofik #OMAP1 Amstrad Delta Thanks, Janusz

Re: [PATCH 2/5 v7] regulator: fixed/gpio: Pull inversion/OD into gpiolib

2018-11-29 Thread Janusz Krzysztofik
depending on how the platform is configured: if the line > is active low, it deals with that, if the line is open drain, > it deals with that too. > > Cc: Janusz Krzysztofik # OMAP1 Tested-by: Janusz Krzysztofik #OMAP1 Amstrad Delta Thanks, Janusz

[PATCH] ARM: OMAP1: ams-delta: Fix audio permanently muted

2018-11-23 Thread Janusz Krzysztofik
trol. For now, rename the pin to "audio_mute" to reflect its function and, as a quick fix, hogg it as output low so on-board audio can produce audible sound again. Fixes: 1137ceee76ba ("ARM: OMAP1: ams-delta: Don't request unused GPIOs") Signed-off-by: Janusz Krzysztof

[PATCH] ARM: OMAP1: ams-delta: Fix audio permanently muted

2018-11-23 Thread Janusz Krzysztofik
trol. For now, rename the pin to "audio_mute" to reflect its function and, as a quick fix, hogg it as output low so on-board audio can produce audible sound again. Fixes: 1137ceee76ba ("ARM: OMAP1: ams-delta: Don't request unused GPIOs") Signed-off-by: Janusz Krzysztof

[PATCH v4 1/4] ARM: OMAP1: ams-delta: Provide GPIO lookup table for NAND data port

2018-11-21 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij --- arch/arm/mach-omap1/board-ams-delta.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index

[PATCH v4 1/4] ARM: OMAP1: ams-delta: Provide GPIO lookup table for NAND data port

2018-11-21 Thread Janusz Krzysztofik
-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij --- arch/arm/mach-omap1/board-ams-delta.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index

[PATCH v4 3/4] mtd: rawnand: ams-delta: Use GPIO API for data I/O

2018-11-21 Thread Janusz Krzysztofik
Don't readw()/writew() data directly from/to GPIO port which is under control of gpio-omap driver, use GPIO consumer API instead. The driver should now work with any 8-bit bidirectional GPIO port, not only OMAP. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij --- drivers/mtd/nand

[PATCH v4 2/4] mtd: rawnand: ams-delta: Request data port GPIO resource

2018-11-21 Thread Janusz Krzysztofik
accessing the port pins by requesting an array of its GPIO descriptors. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij --- drivers/mtd/nand/raw/ams-delta.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw

[PATCH v4 3/4] mtd: rawnand: ams-delta: Use GPIO API for data I/O

2018-11-21 Thread Janusz Krzysztofik
Don't readw()/writew() data directly from/to GPIO port which is under control of gpio-omap driver, use GPIO consumer API instead. The driver should now work with any 8-bit bidirectional GPIO port, not only OMAP. Signed-off-by: Janusz Krzysztofik Reviewed-by: Linus Walleij --- drivers/mtd/nand

[PATCH v4 2/4] mtd: rawnand: ams-delta: Request data port GPIO resource

2018-11-21 Thread Janusz Krzysztofik
accessing the port pins by requesting an array of its GPIO descriptors. Signed-off-by: Janusz Krzysztofik Reviewed-by: Boris Brezillon Reviewed-by: Linus Walleij --- drivers/mtd/nand/raw/ams-delta.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw

[PATCH v4 4/4] ARM: OMAP1: ams-delta: Drop obsolete NAND resources

2018-11-21 Thread Janusz Krzysztofik
Amstrad Delta NAND driver now uses GPIO API for data I/O so there is no need to assign memory I/O resource to the device any longer. Drop it. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/arch/arm

Subject: [PATCH v4 0/4] mtd: rawnand: ams-delta: Use GPIO API for data I/O

2018-11-21 Thread Janusz Krzysztofik
Finalize implementation of the idea suggested by Artem Bityutskiy and Tony Lindgren, described in commit b027274d2e3a ("mtd: ams-delta: fix request_mem_region() failure"). Use pure GPIO consumer API, as reqested by Boris Brezillon. Janusz Krzysztofik (4): ARM: OMAP1: ams-delt

[PATCH v4 4/4] ARM: OMAP1: ams-delta: Drop obsolete NAND resources

2018-11-21 Thread Janusz Krzysztofik
Amstrad Delta NAND driver now uses GPIO API for data I/O so there is no need to assign memory I/O resource to the device any longer. Drop it. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/arch/arm

Subject: [PATCH v4 0/4] mtd: rawnand: ams-delta: Use GPIO API for data I/O

2018-11-21 Thread Janusz Krzysztofik
Finalize implementation of the idea suggested by Artem Bityutskiy and Tony Lindgren, described in commit b027274d2e3a ("mtd: ams-delta: fix request_mem_region() failure"). Use pure GPIO consumer API, as reqested by Boris Brezillon. Janusz Krzysztofik (4): ARM: OMAP1: ams-delt

  1   2   3   4   >