Re: [PATCH 2/3] media: staging: atomisp: Fix an error handling path in 'lm3554_probe()'

2018-05-11 Thread Alan Cox
On Fri, 2018-05-11 at 17:09 +0200, Julia Lawall wrote: > > On Fri, 11 May 2018, Christophe JAILLET wrote: > > > The use of 'fail1' and 'fail2' is not correct. Reorder these calls > > to > > branch at the right place of the error handling path. > > Maybe it would be good to improve the names at

atomisp: drop from staging ?

2018-04-28 Thread Alan Cox
I think this is going to be the best option. When I started cleaning up the atomisp code I had time to work on it. Then spectre/meltdown happened (which btw is why the updating suddenly and mysteriously stopped last summer). I no longer have time to work on it and it's becoming evident that the

Re: [BUG] atomisp_ov2680 not initializing correctly

2018-01-17 Thread Alan Cox
> Maybe we need start over, i.e. find a (presumable old) kernel with > driver _and_ corresponding firmware _and_ hardware it supports to > start > with... You can do that with Intel aero and then in theory port the relevant headers into the updated driver. I've actually been closely comparing

Re: [PATCH 2/2] media: staging: atomisp: cleanup whitespaces

2018-01-08 Thread Alan Cox
On Mon, 8 Jan 2018 16:21:21 +0200 Sakari Ailus wrote: > Hi Mauro, > > On Thu, Jan 04, 2018 at 02:44:41PM -0500, Mauro Carvalho Chehab wrote: > > There are lots of bad whitespaces at atomisp driver. > > > > Fix them. > > > > Signed-off-by: Mauro Carvalho Chehab

Re: [PATCH 00/18] prevent bounds-check bypass via speculative execution

2018-01-08 Thread Alan Cox
On Mon, 8 Jan 2018 11:08:36 +0100 Peter Zijlstra wrote: > On Fri, Jan 05, 2018 at 10:30:16PM -0800, Dan Williams wrote: > > On Fri, Jan 5, 2018 at 6:22 PM, Eric W. Biederman > > wrote: > > > In at least one place (mpls) you are patching a fast

Re: [BUG] atomisp_ov2680 not initializing correctly

2018-01-02 Thread Alan Cox
> Patch 0003-atomisp_gmin_platform-tweak-to-drive-axp288.patch gives a > little confusion. > The PMIC driver should work via ACPI OpRegion macro (and should be > enabled in kernel configuration). That's how it supposed to work. > The patch seems redundant. I am fairly sure it is meant to work

Re: [BUG] atomisp_ov2680 not initializing correctly

2017-12-30 Thread Alan Cox
> AFAIR Alan has CHT hardware he is developing / testing on. I have a loaned board from the company Vincent (who did the intial patches) works for. At the moment it's loading firmware, finding cameras doing power management but not transferring images. Unfortunately because of the design of the

Re: [BUG] atomisp_ov2680 not initializing correctly

2017-12-30 Thread Alan Cox
On Tue, 19 Dec 2017 22:37:01 +0200 Andy Shevchenko wrote: > On Tue, 2017-12-19 at 14:00 +0200, Sakari Ailus wrote: > > Cc Alan and Andy. > > > > On Sat, Dec 16, 2017 at 04:50:04PM +0100, Kristian Beilke wrote: > > > Dear all, > > > > > > I am trying to get

Re: [PATCH 1/3] atomisp: Fix up the open v load race

2017-12-12 Thread Alan Cox
On Tue, 12 Dec 2017 09:03:50 -0200 Mauro Carvalho Chehab wrote: > Em Mon, 06 Nov 2017 23:36:36 + > Alan escreveu: > > > This isn't the ideal final solution but it stops the main problem for now > > where an open (often from udev) races the

Re: [PATCH v2 2/3] media: atomisp: delete zero-valued struct members.

2017-12-01 Thread Alan Cox
> --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h > +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h > @@ -152,14 +152,6 @@ struct ia_css_pipe_config { > }; > Thani you that's a really good cleanup. Alan

Re: [PATCH v2 1/3] media: staging: atomisp: fix for sparse "using plain integer as NULL pointer" warnings.

2017-11-29 Thread Alan Cox
> There are 35 defaults defined by macros like this, most of them much > more complicated that IA_CSS_DEFAULT_ISP_MEM_PARAMS, and a few members > are initialized to non-zero values. My plan, therefore, is to convert > everything to use designated initializers, and then start removing the > zeroes

Re: [PATCH v2 3/3] media: staging: atomisp: fixed some checkpatch integer type warnings.

2017-11-27 Thread Alan Cox
On Mon, 27 Nov 2017 12:44:50 + Jeremy Sowden wrote: > Changed the types of some arrays from int16_t to s16W Which are the same type, except int16_t is the standard form. No point. Alan

Re: [PATCH v2] [media] staging: atomisp: convert timestamps to ktime_t

2017-11-27 Thread Alan Cox
of those problems. > > In case of ov2680, we don't seem to use the timestamp at > all, so I just remove it. > > Signed-off-by: Arnd Bergmann <a...@arndb.de> Reviewed-by: Alan Cox <a...@linux.intel.com>

Re: [PATCH 23/30] [media] atomisp: deprecate pci_get_bus_and_slot()

2017-11-22 Thread Alan Cox
On Wed, 2017-11-22 at 00:31 -0500, Sinan Kaya wrote: > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 > as > where a PCI device is present. This restricts the device drivers to > be > reused for other domain numbers. The ISP v2 will always been in domain 0. Alan

Re: [PATCH 2/3] atomisp: fix vfree of bogus data on unload

2017-11-13 Thread Alan Cox
g a vfree() on the pointers into the firmware. > > > > Signed-off-by: Alan Cox <a...@linux.intel.com> > > --- > > .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c |2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git > > a/drivers/st

Re: 32bit userland cannot work with DVB drivers in 64bit kernel, design issue

2017-11-02 Thread Alan Cox
On Thu, 2 Nov 2017 12:16:39 +0100 Menion wrote: > Hi all > I am investigating for Armbian, the feasability of running 32bit > userland on single board computers based on arm64 SoC, where only 64 > bit kernel is available, for reducing the memory footprint. > I have discovered

Re: [PATCH v4] staging: atomisp: add a driver for ov5648 camera sensor

2017-10-10 Thread Alan Cox
> Would it make sense to first get the other drivers to upstream and > then see what's the status of atomisp? Agreed > the board specific information from firmware is conveyed to the > sensor drivers will change to what the rest of the sensor drivers are > using. I think a most straightforward

Re: [PATCH 0/2] staging: atomisp: activate ATOMISP2401 support

2017-09-11 Thread Alan Cox
On Mon, 11 Sep 2017 20:49:27 +0200 Vincent Hervieux wrote: > Currently atomisp module supports Intel's Baytrail SoC and contains > some compilation switches to support Intel's Cherrytrail SoC instead. > The patchset aims to : > - 1/2: activate ATOMISP2400 or

Re: [PATCH] staging: media: atomisp: use kvmalloc/kvzalloc

2017-08-08 Thread Alan Cox
On Mon, 2017-08-07 at 21:44 +0800, Geliang Tang wrote: > Use kvmalloc()/kvzalloc() instead of atomisp_kernel_malloc() > /atomisp_kernel_zalloc(). > > Signed-off-by: Geliang Tang Definitely better now we have kvmalloc/kvzalloc. Thanks Alan

Re: [PATCH] staging: atomisp: replace kmalloc & memcpy with kmemdup

2017-07-07 Thread Alan Cox
On Fri, 2017-07-07 at 17:20 +0530, Hari Prasath wrote: > kmemdup can be used to replace kmalloc followed by a memcpy.This was > pointed out by the coccinelle tool. And kstrdup could do the job even better I think ? Alan

Re: [PATCH] staging: atomisp: gc0310: constify acpi_device_id.

2017-07-07 Thread Alan Cox
return ret; >  } >   > -static struct acpi_device_id gc0310_acpi_match[] = { > +static const struct acpi_device_id gc0310_acpi_match[] = { >   {"XXGC0310"}, >   {}, >  }; (All four) Acked-by: Alan Cox <a...@linux.intel.com>

Re: [PATCH v3 1/3] videodev2.h, v4l2-ioctl: add IPU3 raw10 color format

2017-06-14 Thread Alan Cox
On Tue, 13 Jun 2017 15:17:14 -0500 Yong Zhi wrote: > Add IPU3 specific formats: > > V4L2_PIX_FMT_IPU3_SBGGR10 > V4L2_PIX_FMT_IPU3_SGBRG10 > V4L2_PIX_FMT_IPU3_SGRBG10 > V4L2_PIX_FMT_IPU3_SRGGB10 As I said before these are just more bitpacked bayer

Re: [PATCH v2 2/3] [media] doc-rst: add IPU3 raw10 bayer pixel format definitions

2017-06-07 Thread Alan Cox
> + > +10-bit Bayer formats > + > +Description > +=== > + > +These four pixel formats are used by Intel IPU3 driver, Are the same formats present in IPUv2, will they ever be present in other hardware. If so (and I think it is so...) then it's not a good idea to encode ipu3 in the name.

Re: [PATCH 03/12] intel-ipu3: Add DMA API implementation

2017-06-07 Thread Alan Cox
> > + struct ipu3_mmu *mmu = to_ipu3_mmu(dev); > > + dma_addr_t daddr = iommu_iova_to_phys(mmu->domain, dma_handle); > > + > > + clflush_cache_range(phys_to_virt(daddr), size); > > You might need to consider another IOMMU on the way here. Generally, > given that daddr is your

Re: [PATCH 00/12] Intel IPU3 ImgU patchset

2017-06-05 Thread Alan Cox
> data structures used by the firmware and the hardware. On top of that, > the algorithms require highly specialized user space to make meaningful > use of them. For these reasons it has been chosen video buffers to pass > the parameters to the device. You should provide a pointer to the relevant

Re: [PATCH 01/12] videodev2.h, v4l2-ioctl: add IPU3 meta buffer format

2017-06-05 Thread Alan Cox
On Mon, 5 Jun 2017 15:39:06 -0500 Yong Zhi wrote: > Add the IPU3 specific processing parameter format > V4L2_META_FMT_IPU3_PARAMS and metadata formats > for 3A and other statistics: > > V4L2_META_FMT_IPU3_PARAMS > V4L2_META_FMT_IPU3_STAT_3A >

Re: Firmware for staging atomisp driver

2017-06-05 Thread Alan Cox
> I'm asking because that is hard to believe given e.g. the recursion bug > I've just fixed. It was kind of working yes (with libxcam and a simple test tool). The recursion one was my fault. I didn't mean that one to go upstream as I was still debugging it. The older code handled it right until

Re: Firmware for staging atomisp driver

2017-05-30 Thread Alan Cox
On Sun, 2017-05-28 at 14:30 +0200, Hans de Goede wrote: > I started with an Asus T100TA after fixing 2 oopses in the sensor > driver there I found out that the BIOS does not allow to put the > ISP in PCI mode and that there is no code to drive it in ACPI > enumerated mode. In ACPI mode it's

Re: [PATCH v5 2/7] staging: atomisp: Do not call dev_warn with a NULL device

2017-05-28 Thread Alan Cox
> The code for the special v1p8 / v2p8 gpios is ugly as sin, it operates on > a global v2p8_gpio value rather then storing info in the gmin_subdev struct, > as such passing the subdev->dev pointer would be simply wrong. AFAICT the > v1p8 / v2p8 gpio code is the only caller passing in a NULL

Re: [PATCH] staging: atomisp: lm3554: fix sparse warnings(was not declared. Should it be static?)

2017-05-28 Thread Alan Cox
On Mon, 29 May 2017 02:06:41 +0800 Chen Guanqiao <chen.chencha...@foxmail.com> wrote: > Fix "symbol 'xxx' was not declared. Should it be static?" sparse warnings. > > Signed-off-by: Chen Guanqiao <chen.chencha...@foxmail.com> > --- Reviewed-by: Alan Cox <a...@linux.intel.com>

[2/7/] staging: atomisp: Do not call dev_warn with a NULL device

2017-05-28 Thread Alan Cox
>On Sun, May 28, 2017 at 3:31 PM, Hans de Goede wrote: >> Do not call dev_warn with a NULL device, this silence the following 2 >> warnings: >> >> [ 14.392194] (NULL device *): Failed to find gmin variable gmin_V2P8GPIO >> [ 14.392257] (NULL device *): Failed to find gmin

[PATCH 10/11] atomisp: remove sh_css_irq - it contains nothing

2017-05-26 Thread Alan Cox
We won't be adding abstractions or moving them here so kill it. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../staging/media/atomisp/pci/atomisp2/Makefile|1 - .../atomisp/pci/atomisp2/css2400/sh_css_irq.c | 16 2 files changed, 17 deletions(-)

[PATCH 11/11] atomisp: de-duplicate sh_css_mmu_set_page_table_base_index

2017-05-26 Thread Alan Cox
Between the ISP2400 and ISP2401 code base this function moved file. The merge of the drivers left us with two version in ifdefs. Resolve this down to a single copy. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../pci/atomisp2/css2400/ia_css_mmu_private.h |2 -- .../media/a

[PATCH 09/11] atomisp: Unify lut free logic

2017-05-26 Thread Alan Cox
ISP2401 introduced a helper for this which we can use just as well on the ISP2400 and remove some more noise differences. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c|7 --- .../atomisp/pci/atomisp2/css2400/sh_css_pa

[PATCH 08/11] atomisp: Unify load_preview_binaries for the most part

2017-05-26 Thread Alan Cox
ISP2401 introduced a rather sensible change to cut through the structure spaghetti. Adopt that for the ISP2400 as well. It makes no difference to the actual code other than readability. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c

[PATCH 07/11] atomisp: unify sh_css_hmm_buffer_record_acquire

2017-05-26 Thread Alan Cox
The ISP2401 version of this function returns a pointer to the buffer, whilst the ISP2400 version returns a boolean if a slot is found. We can trivially unify the code to use the ISP2401 version. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/css2400/sh

[PATCHv2 06/11] atomisp: eliminate dead code under HAS_RES_MGR

2017-05-26 Thread Alan Cox
This define is never set and these code paths are never used so they can go away. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../css2400/isp/modes/interface/isp_const.h| 16 - .../css2400/isp/modes/interface/isp_exprs.h| 23 -- .../atomisp2/c

[PATCHv2 04/11] atomisp2: tidy up confused ifdefs

2017-05-26 Thread Alan Cox
The two drivers were machine merged and in this case the machine output was to say the least not optimal. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 26 1 file changed, 5 insertions(+), 21 deletions(-)

[PATCH 05/11] atomisp2: off by one in atomisp_s_input()

2017-05-26 Thread Alan Cox
itialized elements are zeroed out so we will end up returning -EINVAL a few lines later because the .camera pointer is NULL. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_ioctl.c

[PATCHv2 03/11] atomisp2: remove HRT_UNSCHED

2017-05-26 Thread Alan Cox
HRT_UNSCHED is never defined or set in the driver, so this is dead code that can be retired, simplifying the code a bit further. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../css2400/runtime/debug/src/ia_css_debug.c |7 --- .../atomisp2/css2400/runtime/spctrl/src/sp

[PATCHv2 02/11] atomisp: remove NUM_OF_BLS

2017-05-26 Thread Alan Cox
With the removal of the HAS_BL bootloader code the value of NUM_OF_BLS is an invariant zero. So let's get rid of it. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[PATCHv2 01/11] atompisp: HAS_BL is never defined so lose it

2017-05-26 Thread Alan Cox
Kill off the HAS_BL define and the code and includes it brackets. We never define HAS_BL or use that functionality. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 101 .../atomisp/pci/atomisp2/c

[PATCH 05/12] hdlcdrv: Fix division by zero when bitrate is unset

2017-05-26 Thread Alan Cox
The code attempts to check for out of range calibration. What it forgets to do is check for the 0 bitrate case. As a result the range check itself oopses the kernel. Found by Andrey Konovalov using Syzkaller. Signed-off-by: Alan Cox <a...@linux.intel.com> --- drivers/net/hamradio/hdl

[PATCH 04/12] atomisp2: tidy up confused ifdefs

2017-05-26 Thread Alan Cox
The two drivers were machine merged and in this case the machine output was to say the least not optimal. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 26 1 file changed, 5 insertions(+), 21 deletions(-)

[PATCH 03/12] atomisp2: remove HRT_UNSCHED

2017-05-26 Thread Alan Cox
HRT_UNSCHED is never defined or set in the driver, so this is dead code that can be retired, simplifying the code a bit further. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../css2400/runtime/debug/src/ia_css_debug.c |7 --- .../atomisp2/css2400/runtime/spctrl/src/sp

[PATCH 02/12] atomisp: remove NUM_OF_BLS

2017-05-26 Thread Alan Cox
With the removal of the HAS_BL bootloader code the value of NUM_OF_BLS is an invariant zero. So let's get rid of it. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[PATCH 01/12] atompisp: HAS_BL is never defined so lose it

2017-05-26 Thread Alan Cox
Kill off the HAS_BL define and the code and includes it brackets. We never define HAS_BL or use that functionality. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 101 .../atomisp/pci/atomisp2/c

Re: [PATCH 00/13] staging: media: atomisp queued up patches

2017-05-18 Thread Alan Cox
On Thu, 2017-05-18 at 11:10 -0300, Mauro Carvalho Chehab wrote: > Em Thu, 18 May 2017 15:50:09 +0200 > Greg Kroah-Hartman escreveu: > > > > > Hi Mauro, > > > > Here's the set of accumulated atomisp staging patches that I had in > > my > > to-review mailbox.  After

Re: [PATCH] Staging: media: fix missing blank line coding style issue in atomisp_tpg.c

2017-05-18 Thread Alan Cox
On Wed, 2017-05-17 at 21:48 -0400, Manny Vindiola wrote: > This is a patch to the atomisp_tpg.c file that fixes up a missing > blank line warning found by the checkpatch.pl tool > > Signed-off-by: Manny Vindiola > --- >  drivers/staging/media/atomisp/pci/atomisp2/atomisp_tpg.c

[PATCH 6/8] staging: atomisp: satm include directory is gone

2017-04-28 Thread Alan Cox
Werror=missing-include-dirs] Fixes: 184f8e0981ef ("atomisp: remove satm kernel") Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../staging/media/atomisp/pci/atomisp2/Makefile|1 - 1 file changed, 1 deletion(-) diff --git a/d

[PATCH 5/8] atomisp: remove some more unused files

2017-04-28 Thread Alan Cox
The extra list contains some which are used and some which are not. At this point I think we can safely remove those that are simply not used. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../staging/media/atomisp/pci/atomisp2/Makefile| 11 - .../media/atomisp/pci/atomis

[PATCH 8/8] staging: media: atomisp: kmap() can't fail

2017-04-28 Thread Alan Cox
ed-off-by: Fabian Frederick <f...@skynet.be> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c

[PATCH 7/8] staging: atomisp: remove #ifdef for runtime PM functions

2017-04-28 Thread Alan Cox
ing/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_v4l2.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/d

[PATCH 4/8] atomisp: remove hmm_load/store/clear indirections

2017-04-28 Thread Alan Cox
We have a layer of un-needed wrapping here that can go. In addition there are some functions that don't exist and one that isn't used which can also go. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c |4 +-- .../media/atomi

[PATCH 2/8] atomisp: clean up the hmm init/cleanup indirections

2017-04-28 Thread Alan Cox
We don't need any of these indirections as we only support one MMU type. Start by getting rid of the init/clear/free ones. The init ordering check we already pushed down in a previous patch. The allocation side is more complicated so leave it for now. Signed-off-by: Alan Cox

[PATCH 1/8] atomisp: handle allocation calls before init in the hmm layer

2017-04-28 Thread Alan Cox
Currently the code handles this in the abstraction above. We want to remove that abstraction so begin by pushing down the sanity check. Unfortunately at this point we can't simply fix the init order. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../staging/media/atomisp/pci/atomis

[PATCH 3/8] atomisp: kill off mmgr_free

2017-04-28 Thread Alan Cox
This is just another wrapper layer around hmm_free that servers no purpose in this driver. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_acc.c |6 +++--- .../atomisp2/css2400/base/refcount/src/refcount.c |8 .../memory_

Re: [PATCH] staging/media: make atomisp vlv2_plat_clock explicitly non-modular

2017-04-14 Thread Alan Cox
> I'm pretty sure we want this code to be built as a module, so maybe a > Kconfig change would resolve the issue instead? > > Alan, any thoughts? It's a tiny chunk of platform helper code. It probably ultimately belongs in arch/x86 somewhere or folded into the driver. At the moment it won't

[PATCH 14/14] atomisp: remove UDS kernel code

2017-04-12 Thread Alan Cox
UDS is another layer which actually boils down to some trivial assignments so remove it so inline the code. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../ia_css_isp_params.c| 12 --- .../ia_css_isp_params.c

[PATCH 13/14] atomisp: remove xnr3_0_5 and xnr3_0_11

2017-04-12 Thread Alan Cox
These are not used in the driver so can go away. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../staging/media/atomisp/pci/atomisp2/Makefile|4 - .../kernels/xnr/xnr3_0_11/ia_css_xnr3_0_11.host.c | 155 .../kernels/xnr/xnr3_0_11/ia_css_xnr3_0_11.

[PATCH 12/14] atomisp: remove fixedbds kernel code

2017-04-12 Thread Alan Cox
This is a whole pile of code that wraps a single assignment. Remove it and put the assignment in the caller. Once we have the kernels sorted we should revisit these and remove all the pointless 1 item structs that go with it. Signed-off-by: Alan Cox <a...@linux.intel.

[PATCH 11/14] atomisp: remove satm kernel

2017-04-12 Thread Alan Cox
This isn't used so it can go in the bitbucket. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../staging/media/atomisp/pci/atomisp2/Makefile|1 - .../css2400/isp/kernels/satm/ia_css_satm.host.c| 27 --- .../css2400/isp/kernels/satm/ia_css_satm.host.h

[PATCH 09/14] atomisp: remove sh_css_malloc indirections where we can

2017-04-12 Thread Alan Cox
Where we know the buffer size is reasonably constrained we can just use kmalloc, and where it will be large vmalloc. This still leaves a pile in the middle. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c

[PATCH 06/14] atomisp: remove most of the uses of atomisp_kernel_malloc

2017-04-12 Thread Alan Cox
They can be replaced by kmalloc. There are a few that do need to pick kmalloc or vmalloc. Those we leave for the moment. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../atomisp/pci/atomisp2/atomisp_compat_css20.c|4 -- .../media/atomisp/pci/atomisp2/hmm/hmm_bo.c

[PATCH 10/14] atomisp: remove contiguous handling

2017-04-12 Thread Alan Cox
Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../pci/atomisp2/css2400/ia_css_memory_access.c| 31 ++-- .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.c | 11 --- .../atomisp/pci/atomisp2/hrt/hive_isp_css_mm_hrt.h |3 -- .../media/atomisp/pci/atomis

[PATCH 08/14] atomisp: remove indirection from sh_css_malloc

2017-04-12 Thread Alan Cox
We have one hard coded set of behaviour so unpick the indirection and function pointers. This isn't the whole story. A lot of the callers are known sizes and use cases so we can switch them directly to kmalloc later on. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../atomisp/pci/at

[PATCH 07/14] atomisp: unwrap the _ex malloc/free functions

2017-04-12 Thread Alan Cox
We are not using these for debugging or debug logging so remove the defines, trim and rename the functions. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 15 +++ .../atomisp/pci/atomisp2/css2400/sh_css_internal.h

[PATCH 05/14] staging: atomisp: move mipi_info assignment to next line in __get_asd_from_port()

2017-04-12 Thread Alan Cox
From: Daeseok Youn <daeseok.y...@gmail.com> The line which is initializing mipi_info variable is too long to read. It would be placed in next line. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/at

[PATCH 03/14] staging: atomisp: remove enable_isp_irq function and add disable_isp_irq

2017-04-12 Thread Alan Cox
e enable_isp_irq() function and add disable_isp_irq function only. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 36 +--- 1 file changed, 9 insertions(+), 27 deleti

[PATCH 04/14] staging: atomisp: replace ">asd[i]" with "asd" in __get_asd_from_port()

2017-04-12 Thread Alan Cox
From: Daeseok Youn <daeseok.y...@gmail.com> The address of isp->asd[i] is already assigned to local "asd" variable. ">asd[i]" would be replaced with just "asd". Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> Signed-off-by: Alan Cox <a...@l

[PATCH 02/14] staging/atomisp: fix spelling mistake: "falied" -> "failed"

2017-04-12 Thread Alan Cox
From: Colin Ian King <colin.k...@canonical.com> trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King <colin.k...@canonical.com> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/hmm/hmm_bo_dev.c|2 +-

[PATCH 01/14] staging: atomisp: use local variable to reduce number of references

2017-04-12 Thread Alan Cox
From: Daeseok Youn <daeseok.y...@gmail.com> Define new local variable to reduce the number of reference. The new local variable is added to save the addess of dfs and used in atomisp_freq_scaling() function. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> Signed-off-

Re: [PATCH 1/3] staging: atomisp: remove enable_isp_irq function and add disable_isp_irq

2017-04-07 Thread Alan Cox
On Fri, 2017-04-07 at 14:56 +0900, Daeseok Youn wrote: > Enable/Disable ISP irq is switched with "enable" parameter of > enable_isp_irq(). It would be better splited to two such as > enable_isp_irq()/disable_isp_irq(). > > But the enable_isp_irq() is no use in atomisp_cmd.c file. > So remove the

Re: [PATCH 1/2] staging: atomisp: simplify the if condition in atomisp_freq_scaling()

2017-03-30 Thread Alan Cox
On Thu, 2017-03-30 at 15:24 +0900, Daeseok Youn wrote: > The condition line in if-statement is needed to be shorthen to > improve readability. > > Signed-off-by: Daeseok Youn > --- How about a define for ATOMISP_IS_CHT(isp) instead - as we will need these tests in other

Re: [PATCH v2] staging: media: atomisp: Fix style. remove space before ',' and convert to tabs.

2017-03-29 Thread Alan Cox
On Wed, 2017-03-29 at 09:57 -0700, Daniel Cashman wrote: > From: Dan Cashman > > Signed-off-by: Dan Cashman As the TODO asks - please no whitespace cleanups yet. They make it harder to keep other cleanups that fix (or mostly remove) code

[PATCH 3/5] atomisp: kill another define

2017-03-27 Thread Alan Cox
We don't need an ifdef for the sake of 8-12 bytes. Avoid the ifdef added by fde469701c7efabebf885e785edf367bfb1a8f3f. Instead turn it into a single const string array at a fixed location thereby saving even more memory. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../staging/media/a

[PATCH 4/5] drivers/staging/media: atomisp: Removing redundant information from dev_err

2017-03-27 Thread Alan Cox
From: Pushkar Jambhlekar <pushkar@gmail.com> Removing hardcoded function name as code is already using __func__ Signed-off-by: Pushkar Jambhlekar <pushkar@gmail.com> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/hmm/hmm_bo.c

[PATCH 2/5] atomisp: Remove another dead define

2017-03-27 Thread Alan Cox
HAS_TNR3 is never defined so we can remove it. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c b/drivers/staging

[PATCH 5/5] Staging: atomisp - octal permissions, style fix

2017-03-27 Thread Alan Cox
From: Derek Robson <robso...@gmail.com> Changed permissions to octal style Found using checkpatch Signed-off-by: Derek Robson <robso...@gmail.com> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_drvfs.c |9 +++-- .../sta

[PATCH 1/5] atomisp: remove dead code

2017-03-27 Thread Alan Cox
HAS_SEC_ISP is never defined so we can scrub all the code that is within the defines for it. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../atomisp2/css2400/runtime/spctrl/src/spctrl.c |5 - .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 110 .../a

Re: [PATCH] staging: media: atomisp: remove ifdef around HMM_BO_ION

2017-03-27 Thread Alan Cox
> > 2 -- > >  1 file changed, 2 deletions(-) > > Ugh, Alan, what's going on here, I thought you fixed this? I sent you a patch that removed the arrays entirely and turned it into a single string as well as removing the define. Not quite sure what happened but I've resynched to -next and I'll

Re: [PATCH] staging: media: atomisp: fix build error

2017-03-23 Thread Alan Cox
On Thu, 2017-03-23 at 21:12 +0800, Geliang Tang wrote: > Fix the following build error: > >   CC  drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.o > drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c:52:2: >  error: excess elements in array initializer [-Werror] >   "i", /* ion */ >  

[PATCH 08/24] atomisp/imx: Fix locking bug on error path

2017-03-20 Thread Alan Cox
This was reported by Dan Carpenter. When we error with an IMX 227 we don't release the lock and the sensor would then hang. Signed-off-by: Alan Cox <a...@linux.intel.com> --- drivers/staging/media/atomisp/i2c/imx/imx.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH 12/24] staging: media: atomisp: select REGMAP_I2C needed by ap1302.c

2017-03-20 Thread Alan Cox
From: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> REGMAP_I2C should be enabled to build the driver ap1302 because it uses regmap functions. Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> Signed-off-by: Alan Cox <a...@linux.intel.com> --- drivers/staging/media/a

[PATCH 06/24] atomisp: kill another define

2017-03-20 Thread Alan Cox
We don't need an ifdef for the sake of 8-12 bytes. This undoes the ifdef added by fde469701c7efabebf885e785edf367bfb1a8f3f. Instead turn it into a single const string array at a fixed location thereby saving even more memory. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../staging

[PATCH 07/24] ov5693: remove unused function

2017-03-20 Thread Alan Cox
It's commented out in the tree with a note saying to remove it. So let's remove it. Signed-off-by: Alan Cox <a...@linux.intel.com> --- drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 23 - 1 file changed, 23 deletions(-) diff --git a/drivers/staging/media/atomi

[PATCH 24/24] staging: atomisp: simplify if statement in atomisp_get_sensor_fps()

2017-03-20 Thread Alan Cox
ed-off-by: Daeseok Youn <daeseok.y...@gmail.com> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 22 +--- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp

[PATCH 23/24] atomisp: remove a sysfs error message that can be used to log spam

2017-03-20 Thread Alan Cox
Instead of logging this just report ERANGE as an error, which will give something close to the right user space report. The others of these were already removed by Dan Carpenter's patch. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_d

[PATCH 05/24] atomisp: ia_css_bh_hmem_encode is a no-op so remove it

2017-03-20 Thread Alan Cox
This is a do nothing function so we can replace it with nothing and eliminate it entirely. Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../ia_css_isp_params.c|6 -- .../ia_css_isp_params.c

[PATCH 22/24] staging: atomisp: remove redudant condition in if-statement

2017-03-20 Thread Alan Cox
From: Daeseok Youn <daeseok.y...@gmail.com> The V4L2_FIELD_ANY is zero, so the (!field) is same meaning with (field == V4L2_FIELD_ANY) in if-statement. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/at

[PATCH 21/24] staging: atomisp: remove else statement after return

2017-03-20 Thread Alan Cox
From: Daeseok Youn <daeseok.y...@gmail.com> It doesn't need to have else statement after return. Signed-off-by: Daeseok Youn <daeseok.y...@gmail.com> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c |6 +++--- 1 file cha

[PATCH 16/24] stating/atomisp: fix -Wold-style-definition warning

2017-03-20 Thread Alan Cox
rams.c:3728:6: error: old-style function definition [-Werror=old-style-definition] This adds a 'void' keywork to silence the warning. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Alan Cox

[PATCH 13/24] staging: media: atomisp: add missing dependencies in Kconfig

2017-03-20 Thread Alan Cox
to use efivar_entry_get: drivers/built-in.o: In function `gmin_get_config_var': (.text+0xe062b): undefined reference to `efivar_entry_get' Signed-off-by: Jérémy Lefaure <jeremy.lefa...@lse.epita.fr> Signed-off-by: Alan Cox <a...@linux.intel.com> --- drivers/staging/media/atomisp/Kconfig

[PATCH 17/24] staging/atomisp: remove sh_css_lace_stat code

2017-03-20 Thread Alan Cox
..@arndb.de> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../staging/media/atomisp/pci/atomisp2/Makefile|1 - .../media/atomisp/pci/atomisp2/css2400/ia_css.h|1 - .../atomisp/pci/atomisp2/css2400/ia_css_buffer.h |1 - .../pci/atomisp2/css2400/ia_c

[PATCH 09/24] atomisp: remove another pair of 2400/2401 differences

2017-03-20 Thread Alan Cox
The first of these checks the PCI identifier in order to decide what to do so needs no ifdef. The other is simply a variation on what is dumped for debug - so favour dumping the most. Signed-off-by Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c

[PATCH 14/24] staging/atomisp: include linux/io.h where needed

2017-03-20 Thread Alan Cox
/clock/vlv2_plat_clock.c:209:2: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration] This includes the required header file. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann <a...@arndb.de> S

[PATCH 20/24] staging/atomisp: add ACPI dependency

2017-03-20 Thread Alan Cox
n <a...@arndb.de> Signed-off-by: Alan Cox <a...@linux.intel.com> --- drivers/staging/media/atomisp/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/Kconfig b/drivers/staging/media/atomisp/Kconfig index 8b172ed..8eb13c3 100644

[PATCH 10/24] Staging: atomisp: fix locking in alloc_user_pages()

2017-03-20 Thread Alan Cox
; Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/hmm/hmm_bo.c|1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c index fd3bd5

[PATCH 18/24] staging/atomisp: add VIDEO_V4L2_SUBDEV_API dependency

2017-03-20 Thread Alan Cox
tomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: Alan Cox <a...@linux.intel.com> --- drivers/staging/media/atomisp/pci/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/at

[PATCH 11/24] Staging: atomisp: fix an uninitialized variable bug

2017-03-20 Thread Alan Cox
gned-off-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Alan Cox <a...@linux.intel.com> --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/driv

  1   2   >