mbox series

[GIT,PULL,v4,for,4.21] META_OUTPUT buffer type and the ipu3 staging driver

Message ID 20181213120340.2oakeelp2b5w7zzq@valkosipuli.retiisi.org.uk (mailing list archive)
State New, archived
Headers show
Series [GIT,PULL,v4,for,4.21] META_OUTPUT buffer type and the ipu3 staging driver | expand

Pull-request

ssh://linuxtv.org/git/sailus/media_tree.git tags/ipu3-v8-4.20-3-sign

Message

Sakari Ailus Dec. 13, 2018, 12:03 p.m. UTC
Hi Mauro,

Here's the ipu3 staging driver plus the META_OUTPUT buffer type needed to
pass the parameters for the device. If you think this there's still time to
get this to 4.21, then please pull. The non-staging patches have been
around for more than half a year and they're relatively simple.

Note: DO NOT WORRY about the documentation build warnings, they'll be
adderessed by commit fdf8298f7ff167e4e7522465a3c6e6b908cdb2af from the
documentation tree (already in linux-next).

Since the v1 pull request, this contains the content of the v9
patchset (since v8):

- Addressed most of Laurent's comments on the driver documentation. Some
  have been postponed and added to TODO.

- Added a MAINTAINERS entry.

- Removed uAPI definitions (formats etc.) added by the patches originally
  not intended to be merged (documentation outside the staging tree).

- Added a patch to fix a few compiler warnings (false positives) plus
  fixed the firmware location.

- checkpatch.pl warnings remain; those need to be fixed as well.

since v2 pull request:

- Use correct tag.

since v3 pull request:

- Remove extra Reviewed-by: tags.

Please pull.


The following changes since commit e159b6074c82fe31b79aad672e02fa204dbbc6d8:

  media: vimc: fix start stream when link is disabled (2018-12-07 13:08:41 -0500)

are available in the git repository at:

  ssh://linuxtv.org/git/sailus/media_tree.git tags/ipu3-v8-4.20-3-sign

for you to fetch changes up to 48acf4640e698334bfd9dc41a94b17b568a97b31:

  staging/ipu3-imgu: Add MAINTAINERS entry (2018-12-13 13:04:00 +0200)

----------------------------------------------------------------
imgu staging driver v9

----------------------------------------------------------------
Cao,Bing Bu (1):
      media: staging/intel-ipu3: Add dual pipe support

Rajmohan Mani (1):
      doc-rst: Add Intel IPU3 documentation

Sakari Ailus (6):
      v4l: Add support for V4L2_BUF_TYPE_META_OUTPUT
      docs-rst: v4l: Document V4L2_BUF_TYPE_META_OUTPUT interface
      ipu3-imgu: Fix compiler warnings
      ipu3-imgu: Fix firmware binary location
      staging/ipu3-imgu: Address documentation comments
      staging/ipu3-imgu: Add MAINTAINERS entry

Tomasz Figa (2):
      media: staging/intel-ipu3: mmu: Implement driver
      media: staging/intel-ipu3: Implement DMA mapping functions

Yong Zhi (12):
      media: staging/intel-ipu3: abi: Add register definitions and enum
      media: staging/intel-ipu3: abi: Add structs
      media: staging/intel-ipu3: css: Add dma buff pool utility functions
      media: staging/intel-ipu3: css: Add support for firmware management
      media: staging/intel-ipu3: css: Add static settings for image pipeline
      media: staging/intel-ipu3: css: Compute and program ccs
      media: staging/intel-ipu3: css: Initialize css hardware
      media: staging/intel-ipu3: Add css pipeline programming
      media: staging/intel-ipu3: Add v4l2 driver based on media framework
      media: staging/intel-ipu3: Add imgu top level pci device driver
      media: staging/intel-ipu3: Add Intel IPU3 meta data uAPI
      media: v4l: Add Intel IPU3 meta buffer formats

 Documentation/media/uapi/v4l/buffer.rst            |    3 +
 Documentation/media/uapi/v4l/dev-meta.rst          |   33 +-
 Documentation/media/uapi/v4l/meta-formats.rst      |    1 +
 .../media/uapi/v4l/pixfmt-meta-intel-ipu3.rst      |  178 +
 Documentation/media/uapi/v4l/vidioc-querycap.rst   |    3 +
 Documentation/media/v4l-drivers/index.rst          |    1 +
 Documentation/media/v4l-drivers/ipu3.rst           |  369 +
 Documentation/media/videodev2.h.rst.exceptions     |    2 +
 MAINTAINERS                                        |    8 +
 drivers/media/common/videobuf2/videobuf2-v4l2.c    |    1 +
 drivers/media/v4l2-core/v4l2-compat-ioctl32.c      |    2 +
 drivers/media/v4l2-core/v4l2-dev.c                 |   12 +-
 drivers/media/v4l2-core/v4l2-ioctl.c               |   23 +
 drivers/staging/media/Kconfig                      |    2 +
 drivers/staging/media/Makefile                     |    1 +
 drivers/staging/media/ipu3/Kconfig                 |   14 +
 drivers/staging/media/ipu3/Makefile                |   11 +
 drivers/staging/media/ipu3/TODO                    |   34 +
 drivers/staging/media/ipu3/include/intel-ipu3.h    | 2785 ++++++
 drivers/staging/media/ipu3/ipu3-abi.h              | 2011 ++++
 drivers/staging/media/ipu3/ipu3-css-fw.c           |  265 +
 drivers/staging/media/ipu3/ipu3-css-fw.h           |  188 +
 drivers/staging/media/ipu3/ipu3-css-params.c       | 2943 ++++++
 drivers/staging/media/ipu3/ipu3-css-params.h       |   28 +
 drivers/staging/media/ipu3/ipu3-css-pool.c         |  100 +
 drivers/staging/media/ipu3/ipu3-css-pool.h         |   55 +
 drivers/staging/media/ipu3/ipu3-css.c              | 2391 +++++
 drivers/staging/media/ipu3/ipu3-css.h              |  213 +
 drivers/staging/media/ipu3/ipu3-dmamap.c           |  270 +
 drivers/staging/media/ipu3/ipu3-dmamap.h           |   22 +
 drivers/staging/media/ipu3/ipu3-mmu.c              |  561 ++
 drivers/staging/media/ipu3/ipu3-mmu.h              |   35 +
 drivers/staging/media/ipu3/ipu3-tables.c           | 9609 ++++++++++++++++++++
 drivers/staging/media/ipu3/ipu3-tables.h           |   66 +
 drivers/staging/media/ipu3/ipu3-v4l2.c             | 1419 +++
 drivers/staging/media/ipu3/ipu3.c                  |  830 ++
 drivers/staging/media/ipu3/ipu3.h                  |  168 +
 include/media/v4l2-ioctl.h                         |   17 +
 include/uapi/linux/videodev2.h                     |    2 +
 39 files changed, 24659 insertions(+), 17 deletions(-)
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-intel-ipu3.rst
 create mode 100644 Documentation/media/v4l-drivers/ipu3.rst
 create mode 100644 drivers/staging/media/ipu3/Kconfig
 create mode 100644 drivers/staging/media/ipu3/Makefile
 create mode 100644 drivers/staging/media/ipu3/TODO
 create mode 100644 drivers/staging/media/ipu3/include/intel-ipu3.h
 create mode 100644 drivers/staging/media/ipu3/ipu3-abi.h
 create mode 100644 drivers/staging/media/ipu3/ipu3-css-fw.c
 create mode 100644 drivers/staging/media/ipu3/ipu3-css-fw.h
 create mode 100644 drivers/staging/media/ipu3/ipu3-css-params.c
 create mode 100644 drivers/staging/media/ipu3/ipu3-css-params.h
 create mode 100644 drivers/staging/media/ipu3/ipu3-css-pool.c
 create mode 100644 drivers/staging/media/ipu3/ipu3-css-pool.h
 create mode 100644 drivers/staging/media/ipu3/ipu3-css.c
 create mode 100644 drivers/staging/media/ipu3/ipu3-css.h
 create mode 100644 drivers/staging/media/ipu3/ipu3-dmamap.c
 create mode 100644 drivers/staging/media/ipu3/ipu3-dmamap.h
 create mode 100644 drivers/staging/media/ipu3/ipu3-mmu.c
 create mode 100644 drivers/staging/media/ipu3/ipu3-mmu.h
 create mode 100644 drivers/staging/media/ipu3/ipu3-tables.c
 create mode 100644 drivers/staging/media/ipu3/ipu3-tables.h
 create mode 100644 drivers/staging/media/ipu3/ipu3-v4l2.c
 create mode 100644 drivers/staging/media/ipu3/ipu3.c
 create mode 100644 drivers/staging/media/ipu3/ipu3.h

Comments

Mauro Carvalho Chehab Dec. 13, 2018, 12:19 p.m. UTC | #1
Em Thu, 13 Dec 2018 14:03:40 +0200
sakari.ailus@iki.fi escreveu:

> Hi Mauro,
> 
> Here's the ipu3 staging driver plus the META_OUTPUT buffer type needed to
> pass the parameters for the device. If you think this there's still time to
> get this to 4.21, then please pull. The non-staging patches have been
> around for more than half a year and they're relatively simple.
> 
> Note: DO NOT WORRY about the documentation build warnings, they'll be
> adderessed by commit fdf8298f7ff167e4e7522465a3c6e6b908cdb2af from the
> documentation tree (already in linux-next).

I'm assuming you're talking about this patch:

3d9bfb19bd70 ("scripts/kernel-doc: Fix struct and struct field attribute processing")

Ok, I'll remind about that when pulling from it.

> 
> Since the v1 pull request, this contains the content of the v9
> patchset (since v8):
> 
> - Addressed most of Laurent's comments on the driver documentation. Some
>   have been postponed and added to TODO.
> 
> - Added a MAINTAINERS entry.
> 
> - Removed uAPI definitions (formats etc.) added by the patches originally
>   not intended to be merged (documentation outside the staging tree).
> 
> - Added a patch to fix a few compiler warnings (false positives) plus
>   fixed the firmware location.
> 
> - checkpatch.pl warnings remain; those need to be fixed as well.
> 
> since v2 pull request:
> 
> - Use correct tag.
> 
> since v3 pull request:
> 
> - Remove extra Reviewed-by: tags.
> 
> Please pull.
> 
> 
> The following changes since commit e159b6074c82fe31b79aad672e02fa204dbbc6d8:
> 
>   media: vimc: fix start stream when link is disabled (2018-12-07 13:08:41 -0500)
> 
> are available in the git repository at:
> 
>   ssh://linuxtv.org/git/sailus/media_tree.git tags/ipu3-v8-4.20-3-sign
> 
> for you to fetch changes up to 48acf4640e698334bfd9dc41a94b17b568a97b31:
> 
>   staging/ipu3-imgu: Add MAINTAINERS entry (2018-12-13 13:04:00 +0200)
> 
> ----------------------------------------------------------------
> imgu staging driver v9
> 
> ----------------------------------------------------------------
> Cao,Bing Bu (1):
>       media: staging/intel-ipu3: Add dual pipe support
> 
> Rajmohan Mani (1):
>       doc-rst: Add Intel IPU3 documentation
> 
> Sakari Ailus (6):
>       v4l: Add support for V4L2_BUF_TYPE_META_OUTPUT
>       docs-rst: v4l: Document V4L2_BUF_TYPE_META_OUTPUT interface
>       ipu3-imgu: Fix compiler warnings
>       ipu3-imgu: Fix firmware binary location
>       staging/ipu3-imgu: Address documentation comments
>       staging/ipu3-imgu: Add MAINTAINERS entry
> 
> Tomasz Figa (2):
>       media: staging/intel-ipu3: mmu: Implement driver
>       media: staging/intel-ipu3: Implement DMA mapping functions
> 
> Yong Zhi (12):
>       media: staging/intel-ipu3: abi: Add register definitions and enum
>       media: staging/intel-ipu3: abi: Add structs
>       media: staging/intel-ipu3: css: Add dma buff pool utility functions
>       media: staging/intel-ipu3: css: Add support for firmware management
>       media: staging/intel-ipu3: css: Add static settings for image pipeline
>       media: staging/intel-ipu3: css: Compute and program ccs
>       media: staging/intel-ipu3: css: Initialize css hardware
>       media: staging/intel-ipu3: Add css pipeline programming
>       media: staging/intel-ipu3: Add v4l2 driver based on media framework
>       media: staging/intel-ipu3: Add imgu top level pci device driver
>       media: staging/intel-ipu3: Add Intel IPU3 meta data uAPI
>       media: v4l: Add Intel IPU3 meta buffer formats
> 
>  Documentation/media/uapi/v4l/buffer.rst            |    3 +
>  Documentation/media/uapi/v4l/dev-meta.rst          |   33 +-
>  Documentation/media/uapi/v4l/meta-formats.rst      |    1 +
>  .../media/uapi/v4l/pixfmt-meta-intel-ipu3.rst      |  178 +
>  Documentation/media/uapi/v4l/vidioc-querycap.rst   |    3 +
>  Documentation/media/v4l-drivers/index.rst          |    1 +
>  Documentation/media/v4l-drivers/ipu3.rst           |  369 +
>  Documentation/media/videodev2.h.rst.exceptions     |    2 +
>  MAINTAINERS                                        |    8 +
>  drivers/media/common/videobuf2/videobuf2-v4l2.c    |    1 +
>  drivers/media/v4l2-core/v4l2-compat-ioctl32.c      |    2 +
>  drivers/media/v4l2-core/v4l2-dev.c                 |   12 +-
>  drivers/media/v4l2-core/v4l2-ioctl.c               |   23 +
>  drivers/staging/media/Kconfig                      |    2 +
>  drivers/staging/media/Makefile                     |    1 +
>  drivers/staging/media/ipu3/Kconfig                 |   14 +
>  drivers/staging/media/ipu3/Makefile                |   11 +
>  drivers/staging/media/ipu3/TODO                    |   34 +
>  drivers/staging/media/ipu3/include/intel-ipu3.h    | 2785 ++++++
>  drivers/staging/media/ipu3/ipu3-abi.h              | 2011 ++++
>  drivers/staging/media/ipu3/ipu3-css-fw.c           |  265 +
>  drivers/staging/media/ipu3/ipu3-css-fw.h           |  188 +
>  drivers/staging/media/ipu3/ipu3-css-params.c       | 2943 ++++++
>  drivers/staging/media/ipu3/ipu3-css-params.h       |   28 +
>  drivers/staging/media/ipu3/ipu3-css-pool.c         |  100 +
>  drivers/staging/media/ipu3/ipu3-css-pool.h         |   55 +
>  drivers/staging/media/ipu3/ipu3-css.c              | 2391 +++++
>  drivers/staging/media/ipu3/ipu3-css.h              |  213 +
>  drivers/staging/media/ipu3/ipu3-dmamap.c           |  270 +
>  drivers/staging/media/ipu3/ipu3-dmamap.h           |   22 +
>  drivers/staging/media/ipu3/ipu3-mmu.c              |  561 ++
>  drivers/staging/media/ipu3/ipu3-mmu.h              |   35 +
>  drivers/staging/media/ipu3/ipu3-tables.c           | 9609 ++++++++++++++++++++
>  drivers/staging/media/ipu3/ipu3-tables.h           |   66 +
>  drivers/staging/media/ipu3/ipu3-v4l2.c             | 1419 +++
>  drivers/staging/media/ipu3/ipu3.c                  |  830 ++
>  drivers/staging/media/ipu3/ipu3.h                  |  168 +
>  include/media/v4l2-ioctl.h                         |   17 +
>  include/uapi/linux/videodev2.h                     |    2 +
>  39 files changed, 24659 insertions(+), 17 deletions(-)
>  create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-intel-ipu3.rst
>  create mode 100644 Documentation/media/v4l-drivers/ipu3.rst
>  create mode 100644 drivers/staging/media/ipu3/Kconfig
>  create mode 100644 drivers/staging/media/ipu3/Makefile
>  create mode 100644 drivers/staging/media/ipu3/TODO
>  create mode 100644 drivers/staging/media/ipu3/include/intel-ipu3.h
>  create mode 100644 drivers/staging/media/ipu3/ipu3-abi.h
>  create mode 100644 drivers/staging/media/ipu3/ipu3-css-fw.c
>  create mode 100644 drivers/staging/media/ipu3/ipu3-css-fw.h
>  create mode 100644 drivers/staging/media/ipu3/ipu3-css-params.c
>  create mode 100644 drivers/staging/media/ipu3/ipu3-css-params.h
>  create mode 100644 drivers/staging/media/ipu3/ipu3-css-pool.c
>  create mode 100644 drivers/staging/media/ipu3/ipu3-css-pool.h
>  create mode 100644 drivers/staging/media/ipu3/ipu3-css.c
>  create mode 100644 drivers/staging/media/ipu3/ipu3-css.h
>  create mode 100644 drivers/staging/media/ipu3/ipu3-dmamap.c
>  create mode 100644 drivers/staging/media/ipu3/ipu3-dmamap.h
>  create mode 100644 drivers/staging/media/ipu3/ipu3-mmu.c
>  create mode 100644 drivers/staging/media/ipu3/ipu3-mmu.h
>  create mode 100644 drivers/staging/media/ipu3/ipu3-tables.c
>  create mode 100644 drivers/staging/media/ipu3/ipu3-tables.h
>  create mode 100644 drivers/staging/media/ipu3/ipu3-v4l2.c
>  create mode 100644 drivers/staging/media/ipu3/ipu3.c
>  create mode 100644 drivers/staging/media/ipu3/ipu3.h
> 



Thanks,
Mauro
Mauro Carvalho Chehab Dec. 14, 2018, 11:18 a.m. UTC | #2
Hi Sakari,

Em Thu, 13 Dec 2018 10:19:05 -0200
Mauro Carvalho Chehab <mchehab+samsung@kernel.org> escreveu:

> Em Thu, 13 Dec 2018 14:03:40 +0200
> sakari.ailus@iki.fi escreveu:
> 
> > Hi Mauro,
> > 
> > Here's the ipu3 staging driver plus the META_OUTPUT buffer type needed to
> > pass the parameters for the device. If you think this there's still time to
> > get this to 4.21, then please pull. The non-staging patches have been
> > around for more than half a year and they're relatively simple.
> > 
> > Note: DO NOT WORRY about the documentation build warnings, they'll be
> > adderessed by commit fdf8298f7ff167e4e7522465a3c6e6b908cdb2af from the
> > documentation tree (already in linux-next).  
> 
> I'm assuming you're talking about this patch:
> 
> 3d9bfb19bd70 ("scripts/kernel-doc: Fix struct and struct field attribute processing")
> 
> Ok, I'll remind about that when pulling from it.

Pulled, thanks.

After reviewing the patchset (considering that it is for staging), I
opted to merge it on a separate topic branch. On one ot the builds,
I got this:

	WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno ./include/uapi/linux/intel-ipu3.h' failed with return code 1

Maybe it is related to the troubles with parsing __attribute, so
I'll wait until upstream pulls from docs-next, in order to run
a test and be sure that it won't break documentation build nor
produce the warnings.

Also, for 4.21, all documentation files now have either a SPDX tag
or a dual-license text (for stuff under Documentation/media/uapi).

The IPU3 doc files added by this series doesn't have it - and one
of the new doc files still have a encoding line like:

	.. -*- coding: utf-8; mode: rst -*-

Please remove it, and be sure that all new doc files under
Documentation/media/v4l-drivers will have a SPDX tag compatible
with GPL 2.0.

Ah, I made a notice about some gotos to some code that it is
inside a for() loop. That's very ugly and weird (and not sure if this
is correct according with C spec). Please fix that too.

Thanks!
Mauro


> 
> > 
> > Since the v1 pull request, this contains the content of the v9
> > patchset (since v8):
> > 
> > - Addressed most of Laurent's comments on the driver documentation. Some
> >   have been postponed and added to TODO.
> > 
> > - Added a MAINTAINERS entry.
> > 
> > - Removed uAPI definitions (formats etc.) added by the patches originally
> >   not intended to be merged (documentation outside the staging tree).
> > 
> > - Added a patch to fix a few compiler warnings (false positives) plus
> >   fixed the firmware location.
> > 
> > - checkpatch.pl warnings remain; those need to be fixed as well.
> > 
> > since v2 pull request:
> > 
> > - Use correct tag.
> > 
> > since v3 pull request:
> > 
> > - Remove extra Reviewed-by: tags.
> > 
> > Please pull.
> > 
> > 
> > The following changes since commit e159b6074c82fe31b79aad672e02fa204dbbc6d8:
> > 
> >   media: vimc: fix start stream when link is disabled (2018-12-07 13:08:41 -0500)
> > 
> > are available in the git repository at:
> > 
> >   ssh://linuxtv.org/git/sailus/media_tree.git tags/ipu3-v8-4.20-3-sign
> > 
> > for you to fetch changes up to 48acf4640e698334bfd9dc41a94b17b568a97b31:
> > 
> >   staging/ipu3-imgu: Add MAINTAINERS entry (2018-12-13 13:04:00 +0200)
> > 
> > ----------------------------------------------------------------
> > imgu staging driver v9
> > 
> > ----------------------------------------------------------------
> > Cao,Bing Bu (1):
> >       media: staging/intel-ipu3: Add dual pipe support
> > 
> > Rajmohan Mani (1):
> >       doc-rst: Add Intel IPU3 documentation
> > 
> > Sakari Ailus (6):
> >       v4l: Add support for V4L2_BUF_TYPE_META_OUTPUT
> >       docs-rst: v4l: Document V4L2_BUF_TYPE_META_OUTPUT interface
> >       ipu3-imgu: Fix compiler warnings
> >       ipu3-imgu: Fix firmware binary location
> >       staging/ipu3-imgu: Address documentation comments
> >       staging/ipu3-imgu: Add MAINTAINERS entry
> > 
> > Tomasz Figa (2):
> >       media: staging/intel-ipu3: mmu: Implement driver
> >       media: staging/intel-ipu3: Implement DMA mapping functions
> > 
> > Yong Zhi (12):
> >       media: staging/intel-ipu3: abi: Add register definitions and enum
> >       media: staging/intel-ipu3: abi: Add structs
> >       media: staging/intel-ipu3: css: Add dma buff pool utility functions
> >       media: staging/intel-ipu3: css: Add support for firmware management
> >       media: staging/intel-ipu3: css: Add static settings for image pipeline
> >       media: staging/intel-ipu3: css: Compute and program ccs
> >       media: staging/intel-ipu3: css: Initialize css hardware
> >       media: staging/intel-ipu3: Add css pipeline programming
> >       media: staging/intel-ipu3: Add v4l2 driver based on media framework
> >       media: staging/intel-ipu3: Add imgu top level pci device driver
> >       media: staging/intel-ipu3: Add Intel IPU3 meta data uAPI
> >       media: v4l: Add Intel IPU3 meta buffer formats
> > 
> >  Documentation/media/uapi/v4l/buffer.rst            |    3 +
> >  Documentation/media/uapi/v4l/dev-meta.rst          |   33 +-
> >  Documentation/media/uapi/v4l/meta-formats.rst      |    1 +
> >  .../media/uapi/v4l/pixfmt-meta-intel-ipu3.rst      |  178 +
> >  Documentation/media/uapi/v4l/vidioc-querycap.rst   |    3 +
> >  Documentation/media/v4l-drivers/index.rst          |    1 +
> >  Documentation/media/v4l-drivers/ipu3.rst           |  369 +
> >  Documentation/media/videodev2.h.rst.exceptions     |    2 +
> >  MAINTAINERS                                        |    8 +
> >  drivers/media/common/videobuf2/videobuf2-v4l2.c    |    1 +
> >  drivers/media/v4l2-core/v4l2-compat-ioctl32.c      |    2 +
> >  drivers/media/v4l2-core/v4l2-dev.c                 |   12 +-
> >  drivers/media/v4l2-core/v4l2-ioctl.c               |   23 +
> >  drivers/staging/media/Kconfig                      |    2 +
> >  drivers/staging/media/Makefile                     |    1 +
> >  drivers/staging/media/ipu3/Kconfig                 |   14 +
> >  drivers/staging/media/ipu3/Makefile                |   11 +
> >  drivers/staging/media/ipu3/TODO                    |   34 +
> >  drivers/staging/media/ipu3/include/intel-ipu3.h    | 2785 ++++++
> >  drivers/staging/media/ipu3/ipu3-abi.h              | 2011 ++++
> >  drivers/staging/media/ipu3/ipu3-css-fw.c           |  265 +
> >  drivers/staging/media/ipu3/ipu3-css-fw.h           |  188 +
> >  drivers/staging/media/ipu3/ipu3-css-params.c       | 2943 ++++++
> >  drivers/staging/media/ipu3/ipu3-css-params.h       |   28 +
> >  drivers/staging/media/ipu3/ipu3-css-pool.c         |  100 +
> >  drivers/staging/media/ipu3/ipu3-css-pool.h         |   55 +
> >  drivers/staging/media/ipu3/ipu3-css.c              | 2391 +++++
> >  drivers/staging/media/ipu3/ipu3-css.h              |  213 +
> >  drivers/staging/media/ipu3/ipu3-dmamap.c           |  270 +
> >  drivers/staging/media/ipu3/ipu3-dmamap.h           |   22 +
> >  drivers/staging/media/ipu3/ipu3-mmu.c              |  561 ++
> >  drivers/staging/media/ipu3/ipu3-mmu.h              |   35 +
> >  drivers/staging/media/ipu3/ipu3-tables.c           | 9609 ++++++++++++++++++++
> >  drivers/staging/media/ipu3/ipu3-tables.h           |   66 +
> >  drivers/staging/media/ipu3/ipu3-v4l2.c             | 1419 +++
> >  drivers/staging/media/ipu3/ipu3.c                  |  830 ++
> >  drivers/staging/media/ipu3/ipu3.h                  |  168 +
> >  include/media/v4l2-ioctl.h                         |   17 +
> >  include/uapi/linux/videodev2.h                     |    2 +
> >  39 files changed, 24659 insertions(+), 17 deletions(-)
> >  create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-intel-ipu3.rst
> >  create mode 100644 Documentation/media/v4l-drivers/ipu3.rst
> >  create mode 100644 drivers/staging/media/ipu3/Kconfig
> >  create mode 100644 drivers/staging/media/ipu3/Makefile
> >  create mode 100644 drivers/staging/media/ipu3/TODO
> >  create mode 100644 drivers/staging/media/ipu3/include/intel-ipu3.h
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-abi.h
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-css-fw.c
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-css-fw.h
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-css-params.c
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-css-params.h
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-css-pool.c
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-css-pool.h
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-css.c
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-css.h
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-dmamap.c
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-dmamap.h
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-mmu.c
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-mmu.h
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-tables.c
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-tables.h
> >  create mode 100644 drivers/staging/media/ipu3/ipu3-v4l2.c
> >  create mode 100644 drivers/staging/media/ipu3/ipu3.c
> >  create mode 100644 drivers/staging/media/ipu3/ipu3.h
> >   
> 
> 
> 
> Thanks,
> Mauro



Thanks,
Mauro
Mauro Carvalho Chehab Jan. 7, 2019, 6:01 p.m. UTC | #3
Hi Sakari/Bingbu,

Em Thu, 13 Dec 2018 14:03:40 +0200
sakari.ailus@iki.fi escreveu:

> Hi Mauro,
> 
> Here's the ipu3 staging driver plus the META_OUTPUT buffer type needed to
> pass the parameters for the device. If you think this there's still time to
> get this to 4.21, then please pull. The non-staging patches have been
> around for more than half a year and they're relatively simple.

I'm now getting a lot of new warnings when building it:

drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:97:6:  warning: symbol 'ipu3_dmamap_alloc' was not declared. Should it be static?
drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:166:6:  warning: symbol 'ipu3_dmamap_unmap' was not declared. Should it be static?
drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:184:6:  warning: symbol 'ipu3_dmamap_free' was not declared. Should it be static?
drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:204:5:  warning: symbol 'ipu3_dmamap_map_sg' was not declared. Should it be static?
drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:251:5:  warning: symbol 'ipu3_dmamap_init' was not declared. Should it be static?
drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:266:6:  warning: symbol 'ipu3_dmamap_exit' was not declared. Should it be static?
In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
                 from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3.h:14,
                 from drivers/staging/media/ipu3/ipu3-css-pool.c:6:
drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
  struct ipu3_uapi_awb_fr_config_s awb_fr;
                                   ^~~~~~
In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3.h:14,
                 from drivers/staging/media/ipu3/ipu3-css-pool.c:6:
drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
 } __packed;
 ^
drivers/staging/media/ipu3/ipu3-mmu.c:247: warning: Function parameter or member 'pgsize_bitmap' not described in 'ipu3_mmu_pgsize'
drivers/staging/media/ipu3/ipu3-mmu.c:247: warning: Function parameter or member 'addr_merge' not described in 'ipu3_mmu_pgsize'
drivers/staging/media/ipu3/ipu3-mmu.c:247: warning: Function parameter or member 'size' not described in 'ipu3_mmu_pgsize'
drivers/staging/media/ipu3/ipu3-mmu.c:452: warning: Function parameter or member 'parent' not described in 'ipu3_mmu_init'
drivers/staging/media/ipu3/ipu3-mmu.c:528: warning: Function parameter or member 'info' not described in 'ipu3_mmu_exit'
drivers/staging/media/ipu3/ipu3-mmu.c:528: warning: Excess function parameter 'mmu' description in 'ipu3_mmu_exit'
In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
                 from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3-css-fw.c:9:
drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
  struct ipu3_uapi_awb_fr_config_s awb_fr;
                                   ^~~~~~
In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3-css-fw.c:9:
drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
 } __packed;
 ^
drivers/staging/media/ipu3/ipu3-css-fw.c: In function 'ipu3_css_fw_init':
drivers/staging/media/ipu3/ipu3-css-fw.c:203:39: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
    if (bi->info.isp.output_formats[j] < 0 ||
                                       ^
drivers/staging/media/ipu3/ipu3-css-fw.c:208:35: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
    if (bi->info.isp.vf_formats[j] < 0 ||
                                   ^
drivers/staging/media/ipu3/ipu3-css.c: drivers/staging/media/ipu3/ipu3-css.c:1831 ipu3_css_fmt_try() warn: unsigned 'css->pipes[pipe].bindex' is never less than zero.
In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
                 from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3.h:14,
                 from drivers/staging/media/ipu3/ipu3-dmamap.c:12:
drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
  struct ipu3_uapi_awb_fr_config_s awb_fr;
                                   ^~~~~~
In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3.h:14,
                 from drivers/staging/media/ipu3/ipu3-dmamap.c:12:
drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
 } __packed;
 ^
drivers/staging/media/ipu3/ipu3-dmamap.c:97:7: warning: no previous prototype for 'ipu3_dmamap_alloc' [-Wmissing-prototypes]
 void *ipu3_dmamap_alloc(struct imgu_device *imgu, struct ipu3_css_map *map,
       ^~~~~~~~~~~~~~~~~
drivers/staging/media/ipu3/ipu3-dmamap.c:166:6: warning: no previous prototype for 'ipu3_dmamap_unmap' [-Wmissing-prototypes]
 void ipu3_dmamap_unmap(struct imgu_device *imgu, struct ipu3_css_map *map)
      ^~~~~~~~~~~~~~~~~
drivers/staging/media/ipu3/ipu3-dmamap.c:184:6: warning: no previous prototype for 'ipu3_dmamap_free' [-Wmissing-prototypes]
 void ipu3_dmamap_free(struct imgu_device *imgu, struct ipu3_css_map *map)
      ^~~~~~~~~~~~~~~~
drivers/staging/media/ipu3/ipu3-dmamap.c:204:5: warning: no previous prototype for 'ipu3_dmamap_map_sg' [-Wmissing-prototypes]
 int ipu3_dmamap_map_sg(struct imgu_device *imgu, struct scatterlist *sglist,
     ^~~~~~~~~~~~~~~~~~
drivers/staging/media/ipu3/ipu3-dmamap.c:251:5: warning: no previous prototype for 'ipu3_dmamap_init' [-Wmissing-prototypes]
 int ipu3_dmamap_init(struct imgu_device *imgu)
     ^~~~~~~~~~~~~~~~
drivers/staging/media/ipu3/ipu3-dmamap.c:266:6: warning: no previous prototype for 'ipu3_dmamap_exit' [-Wmissing-prototypes]
 void ipu3_dmamap_exit(struct imgu_device *imgu)
      ^~~~~~~~~~~~~~~~
In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
                 from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3-css.c:7:
drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
  struct ipu3_uapi_awb_fr_config_s awb_fr;
                                   ^~~~~~
In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3-css.c:7:
drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
 } __packed;
 ^
drivers/staging/media/ipu3/ipu3-css.c: In function 'ipu3_css_fmt_try':
drivers/staging/media/ipu3/ipu3-css.c:1831:30: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
  if (css->pipes[pipe].bindex < 0) {
                              ^
In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
                 from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3.h:14,
                 from drivers/staging/media/ipu3/ipu3.c:15:
drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
  struct ipu3_uapi_awb_fr_config_s awb_fr;
                                   ^~~~~~
In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3.h:14,
                 from drivers/staging/media/ipu3/ipu3.c:15:
drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
 } __packed;
 ^
In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
                 from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3.h:14,
                 from drivers/staging/media/ipu3/ipu3-v4l2.c:10:
drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
  struct ipu3_uapi_awb_fr_config_s awb_fr;
                                   ^~~~~~
In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3.h:14,
                 from drivers/staging/media/ipu3/ipu3-v4l2.c:10:
drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
 } __packed;
 ^
drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:1947:5:  warning: symbol 'ipu3_css_cfg_acc' was not declared. Should it be static?
drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:2725:5:  warning: symbol 'ipu3_css_cfg_vmem0' was not declared. Should it be static?
drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:2804:5:  warning: symbol 'ipu3_css_cfg_dmem0' was not declared. Should it be static?
drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:2856:6:  warning: symbol 'ipu3_css_cfg_gdc_table' was not declared. Should it be static?
In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
                 from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3-css-params.c:6:
drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
  struct ipu3_uapi_awb_fr_config_s awb_fr;
                                   ^~~~~~
In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
                 from drivers/staging/media/ipu3/ipu3-css-params.c:6:
drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
 } __packed;
 ^
drivers/staging/media/ipu3/ipu3-css-params.c:1947:5: warning: no previous prototype for 'ipu3_css_cfg_acc' [-Wmissing-prototypes]
 int ipu3_css_cfg_acc(struct ipu3_css *css, unsigned int pipe,
     ^~~~~~~~~~~~~~~~
drivers/staging/media/ipu3/ipu3-css-params.c:2725:5: warning: no previous prototype for 'ipu3_css_cfg_vmem0' [-Wmissing-prototypes]
 int ipu3_css_cfg_vmem0(struct ipu3_css *css, unsigned int pipe,
     ^~~~~~~~~~~~~~~~~~
drivers/staging/media/ipu3/ipu3-css-params.c:2804:5: warning: no previous prototype for 'ipu3_css_cfg_dmem0' [-Wmissing-prototypes]
 int ipu3_css_cfg_dmem0(struct ipu3_css *css, unsigned int pipe,
     ^~~~~~~~~~~~~~~~~~
drivers/staging/media/ipu3/ipu3-css-params.c:2856:6: warning: no previous prototype for 'ipu3_css_cfg_gdc_table' [-Wmissing-prototypes]
 void ipu3_css_cfg_gdc_table(struct imgu_abi_gdc_warp_param *gdc,
      ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
                 from drivers/staging/media/ipu3/ipu3-tables.h:7,
                 from drivers/staging/media/ipu3/ipu3-tables.c:4:
drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
  struct ipu3_uapi_awb_fr_config_s awb_fr;
                                   ^~~~~~
In file included from drivers/staging/media/ipu3/ipu3-tables.h:7,
                 from drivers/staging/media/ipu3/ipu3-tables.c:4:
drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
 } __packed;
 ^

Could you please send ASAP a patch series fixing them?

Thanks,
Mauro
Mauro Carvalho Chehab Jan. 7, 2019, 6:11 p.m. UTC | #4
Em Mon, 7 Jan 2019 16:01:07 -0200
Mauro Carvalho Chehab <mchehab+samsung@kernel.org> escreveu:

> Hi Sakari/Bingbu,
> 
> Em Thu, 13 Dec 2018 14:03:40 +0200
> sakari.ailus@iki.fi escreveu:
> 
> > Hi Mauro,
> > 
> > Here's the ipu3 staging driver plus the META_OUTPUT buffer type needed to
> > pass the parameters for the device. If you think this there's still time to
> > get this to 4.21, then please pull. The non-staging patches have been
> > around for more than half a year and they're relatively simple.  
> 
> I'm now getting a lot of new warnings when building it:
> 
> drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:97:6:  warning: symbol 'ipu3_dmamap_alloc' was not declared. Should it be static?
> drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:166:6:  warning: symbol 'ipu3_dmamap_unmap' was not declared. Should it be static?
> drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:184:6:  warning: symbol 'ipu3_dmamap_free' was not declared. Should it be static?
> drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:204:5:  warning: symbol 'ipu3_dmamap_map_sg' was not declared. Should it be static?
> drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:251:5:  warning: symbol 'ipu3_dmamap_init' was not declared. Should it be static?
> drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:266:6:  warning: symbol 'ipu3_dmamap_exit' was not declared. Should it be static?
> In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
>                  from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3.h:14,
>                  from drivers/staging/media/ipu3/ipu3-css-pool.c:6:
> drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
>   struct ipu3_uapi_awb_fr_config_s awb_fr;
>                                    ^~~~~~
> In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3.h:14,
>                  from drivers/staging/media/ipu3/ipu3-css-pool.c:6:
> drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
>  } __packed;
>  ^
> drivers/staging/media/ipu3/ipu3-mmu.c:247: warning: Function parameter or member 'pgsize_bitmap' not described in 'ipu3_mmu_pgsize'
> drivers/staging/media/ipu3/ipu3-mmu.c:247: warning: Function parameter or member 'addr_merge' not described in 'ipu3_mmu_pgsize'
> drivers/staging/media/ipu3/ipu3-mmu.c:247: warning: Function parameter or member 'size' not described in 'ipu3_mmu_pgsize'
> drivers/staging/media/ipu3/ipu3-mmu.c:452: warning: Function parameter or member 'parent' not described in 'ipu3_mmu_init'
> drivers/staging/media/ipu3/ipu3-mmu.c:528: warning: Function parameter or member 'info' not described in 'ipu3_mmu_exit'
> drivers/staging/media/ipu3/ipu3-mmu.c:528: warning: Excess function parameter 'mmu' description in 'ipu3_mmu_exit'
> In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
>                  from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3-css-fw.c:9:
> drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
>   struct ipu3_uapi_awb_fr_config_s awb_fr;
>                                    ^~~~~~
> In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3-css-fw.c:9:
> drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
>  } __packed;
>  ^
> drivers/staging/media/ipu3/ipu3-css-fw.c: In function 'ipu3_css_fw_init':
> drivers/staging/media/ipu3/ipu3-css-fw.c:203:39: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
>     if (bi->info.isp.output_formats[j] < 0 ||
>                                        ^
> drivers/staging/media/ipu3/ipu3-css-fw.c:208:35: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
>     if (bi->info.isp.vf_formats[j] < 0 ||
>                                    ^
> drivers/staging/media/ipu3/ipu3-css.c: drivers/staging/media/ipu3/ipu3-css.c:1831 ipu3_css_fmt_try() warn: unsigned 'css->pipes[pipe].bindex' is never less than zero.
> In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
>                  from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3.h:14,
>                  from drivers/staging/media/ipu3/ipu3-dmamap.c:12:
> drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
>   struct ipu3_uapi_awb_fr_config_s awb_fr;
>                                    ^~~~~~
> In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3.h:14,
>                  from drivers/staging/media/ipu3/ipu3-dmamap.c:12:
> drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
>  } __packed;
>  ^
> drivers/staging/media/ipu3/ipu3-dmamap.c:97:7: warning: no previous prototype for 'ipu3_dmamap_alloc' [-Wmissing-prototypes]
>  void *ipu3_dmamap_alloc(struct imgu_device *imgu, struct ipu3_css_map *map,
>        ^~~~~~~~~~~~~~~~~
> drivers/staging/media/ipu3/ipu3-dmamap.c:166:6: warning: no previous prototype for 'ipu3_dmamap_unmap' [-Wmissing-prototypes]
>  void ipu3_dmamap_unmap(struct imgu_device *imgu, struct ipu3_css_map *map)
>       ^~~~~~~~~~~~~~~~~
> drivers/staging/media/ipu3/ipu3-dmamap.c:184:6: warning: no previous prototype for 'ipu3_dmamap_free' [-Wmissing-prototypes]
>  void ipu3_dmamap_free(struct imgu_device *imgu, struct ipu3_css_map *map)
>       ^~~~~~~~~~~~~~~~
> drivers/staging/media/ipu3/ipu3-dmamap.c:204:5: warning: no previous prototype for 'ipu3_dmamap_map_sg' [-Wmissing-prototypes]
>  int ipu3_dmamap_map_sg(struct imgu_device *imgu, struct scatterlist *sglist,
>      ^~~~~~~~~~~~~~~~~~
> drivers/staging/media/ipu3/ipu3-dmamap.c:251:5: warning: no previous prototype for 'ipu3_dmamap_init' [-Wmissing-prototypes]
>  int ipu3_dmamap_init(struct imgu_device *imgu)
>      ^~~~~~~~~~~~~~~~
> drivers/staging/media/ipu3/ipu3-dmamap.c:266:6: warning: no previous prototype for 'ipu3_dmamap_exit' [-Wmissing-prototypes]
>  void ipu3_dmamap_exit(struct imgu_device *imgu)
>       ^~~~~~~~~~~~~~~~
> In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
>                  from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3-css.c:7:
> drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
>   struct ipu3_uapi_awb_fr_config_s awb_fr;
>                                    ^~~~~~
> In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3-css.c:7:
> drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
>  } __packed;
>  ^
> drivers/staging/media/ipu3/ipu3-css.c: In function 'ipu3_css_fmt_try':
> drivers/staging/media/ipu3/ipu3-css.c:1831:30: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
>   if (css->pipes[pipe].bindex < 0) {
>                               ^
> In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
>                  from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3.h:14,
>                  from drivers/staging/media/ipu3/ipu3.c:15:
> drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
>   struct ipu3_uapi_awb_fr_config_s awb_fr;
>                                    ^~~~~~
> In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3.h:14,
>                  from drivers/staging/media/ipu3/ipu3.c:15:
> drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
>  } __packed;
>  ^
> In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
>                  from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3.h:14,
>                  from drivers/staging/media/ipu3/ipu3-v4l2.c:10:
> drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
>   struct ipu3_uapi_awb_fr_config_s awb_fr;
>                                    ^~~~~~
> In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3.h:14,
>                  from drivers/staging/media/ipu3/ipu3-v4l2.c:10:
> drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
>  } __packed;
>  ^
> drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:1947:5:  warning: symbol 'ipu3_css_cfg_acc' was not declared. Should it be static?
> drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:2725:5:  warning: symbol 'ipu3_css_cfg_vmem0' was not declared. Should it be static?
> drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:2804:5:  warning: symbol 'ipu3_css_cfg_dmem0' was not declared. Should it be static?
> drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:2856:6:  warning: symbol 'ipu3_css_cfg_gdc_table' was not declared. Should it be static?
> In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
>                  from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3-css-params.c:6:
> drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
>   struct ipu3_uapi_awb_fr_config_s awb_fr;
>                                    ^~~~~~
> In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
>                  from drivers/staging/media/ipu3/ipu3-css-params.c:6:
> drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
>  } __packed;
>  ^
> drivers/staging/media/ipu3/ipu3-css-params.c:1947:5: warning: no previous prototype for 'ipu3_css_cfg_acc' [-Wmissing-prototypes]
>  int ipu3_css_cfg_acc(struct ipu3_css *css, unsigned int pipe,
>      ^~~~~~~~~~~~~~~~
> drivers/staging/media/ipu3/ipu3-css-params.c:2725:5: warning: no previous prototype for 'ipu3_css_cfg_vmem0' [-Wmissing-prototypes]
>  int ipu3_css_cfg_vmem0(struct ipu3_css *css, unsigned int pipe,
>      ^~~~~~~~~~~~~~~~~~
> drivers/staging/media/ipu3/ipu3-css-params.c:2804:5: warning: no previous prototype for 'ipu3_css_cfg_dmem0' [-Wmissing-prototypes]
>  int ipu3_css_cfg_dmem0(struct ipu3_css *css, unsigned int pipe,
>      ^~~~~~~~~~~~~~~~~~
> drivers/staging/media/ipu3/ipu3-css-params.c:2856:6: warning: no previous prototype for 'ipu3_css_cfg_gdc_table' [-Wmissing-prototypes]
>  void ipu3_css_cfg_gdc_table(struct imgu_abi_gdc_warp_param *gdc,
>       ^~~~~~~~~~~~~~~~~~~~~~
> In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
>                  from drivers/staging/media/ipu3/ipu3-tables.h:7,
>                  from drivers/staging/media/ipu3/ipu3-tables.c:4:
> drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
>   struct ipu3_uapi_awb_fr_config_s awb_fr;
>                                    ^~~~~~
> In file included from drivers/staging/media/ipu3/ipu3-tables.h:7,
>                  from drivers/staging/media/ipu3/ipu3-tables.c:4:
> drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
>  } __packed;
>  ^
> 
> Could you please send ASAP a patch series fixing them?
> 
> Thanks,
> Mauro

In time, I fixed a few really trivial warnings there, due to the
lack of an #include directive.

As this patch is trivial enough, I'll go ahead and just apply it.
I'll let the others for you to handle.

Thanks,
Mauro

[PATCH] ipu3: add missing #include

Lots of warning due to non-static functions are generated because
the headers with define them were not included.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

diff --git a/drivers/staging/media/ipu3/ipu3-css-params.c b/drivers/staging/media/ipu3/ipu3-css-params.c
index 776206ded83b..053edce54b71 100644
--- a/drivers/staging/media/ipu3/ipu3-css-params.c
+++ b/drivers/staging/media/ipu3/ipu3-css-params.c
@@ -6,6 +6,7 @@
 #include "ipu3-css.h"
 #include "ipu3-css-fw.h"
 #include "ipu3-tables.h"
+#include "ipu3-css-params.h"
 
 #define DIV_ROUND_CLOSEST_DOWN(a, b)	(((a) + ((b) / 2) - 1) / (b))
 #define roundclosest_down(a, b)		(DIV_ROUND_CLOSEST_DOWN(a, b) * (b))
diff --git a/drivers/staging/media/ipu3/ipu3-dmamap.c b/drivers/staging/media/ipu3/ipu3-dmamap.c
index 93a393d4e15e..5bed01d5b8df 100644
--- a/drivers/staging/media/ipu3/ipu3-dmamap.c
+++ b/drivers/staging/media/ipu3/ipu3-dmamap.c
@@ -12,6 +12,7 @@
 #include "ipu3.h"
 #include "ipu3-css-pool.h"
 #include "ipu3-mmu.h"
+#include "ipu3-dmamap.h"
 
 /*
  * Free a buffer allocated by ipu3_dmamap_alloc_buffer()
Sakari Ailus Jan. 7, 2019, 10:51 p.m. UTC | #5
Hi Mauro,

On Mon, Jan 07, 2019 at 04:11:34PM -0200, Mauro Carvalho Chehab wrote:
> Em Mon, 7 Jan 2019 16:01:07 -0200
> Mauro Carvalho Chehab <mchehab+samsung@kernel.org> escreveu:
> 
> > Hi Sakari/Bingbu,
> > 
> > Em Thu, 13 Dec 2018 14:03:40 +0200
> > sakari.ailus@iki.fi escreveu:
> > 
> > > Hi Mauro,
> > > 
> > > Here's the ipu3 staging driver plus the META_OUTPUT buffer type needed to
> > > pass the parameters for the device. If you think this there's still time to
> > > get this to 4.21, then please pull. The non-staging patches have been
> > > around for more than half a year and they're relatively simple.  
> > 
> > I'm now getting a lot of new warnings when building it:
> > 
> > drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:97:6:  warning: symbol 'ipu3_dmamap_alloc' was not declared. Should it be static?
> > drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:166:6:  warning: symbol 'ipu3_dmamap_unmap' was not declared. Should it be static?
> > drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:184:6:  warning: symbol 'ipu3_dmamap_free' was not declared. Should it be static?
> > drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:204:5:  warning: symbol 'ipu3_dmamap_map_sg' was not declared. Should it be static?
> > drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:251:5:  warning: symbol 'ipu3_dmamap_init' was not declared. Should it be static?
> > drivers/staging/media/ipu3/ipu3-dmamap.c:drivers/staging/media/ipu3/ipu3-dmamap.c:266:6:  warning: symbol 'ipu3_dmamap_exit' was not declared. Should it be static?
> > In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
> >                  from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3.h:14,
> >                  from drivers/staging/media/ipu3/ipu3-css-pool.c:6:
> > drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
> >   struct ipu3_uapi_awb_fr_config_s awb_fr;
> >                                    ^~~~~~
> > In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3.h:14,
> >                  from drivers/staging/media/ipu3/ipu3-css-pool.c:6:
> > drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
> >  } __packed;
> >  ^
> > drivers/staging/media/ipu3/ipu3-mmu.c:247: warning: Function parameter or member 'pgsize_bitmap' not described in 'ipu3_mmu_pgsize'
> > drivers/staging/media/ipu3/ipu3-mmu.c:247: warning: Function parameter or member 'addr_merge' not described in 'ipu3_mmu_pgsize'
> > drivers/staging/media/ipu3/ipu3-mmu.c:247: warning: Function parameter or member 'size' not described in 'ipu3_mmu_pgsize'
> > drivers/staging/media/ipu3/ipu3-mmu.c:452: warning: Function parameter or member 'parent' not described in 'ipu3_mmu_init'
> > drivers/staging/media/ipu3/ipu3-mmu.c:528: warning: Function parameter or member 'info' not described in 'ipu3_mmu_exit'
> > drivers/staging/media/ipu3/ipu3-mmu.c:528: warning: Excess function parameter 'mmu' description in 'ipu3_mmu_exit'
> > In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
> >                  from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3-css-fw.c:9:
> > drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
> >   struct ipu3_uapi_awb_fr_config_s awb_fr;
> >                                    ^~~~~~
> > In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3-css-fw.c:9:
> > drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
> >  } __packed;
> >  ^
> > drivers/staging/media/ipu3/ipu3-css-fw.c: In function 'ipu3_css_fw_init':
> > drivers/staging/media/ipu3/ipu3-css-fw.c:203:39: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
> >     if (bi->info.isp.output_formats[j] < 0 ||
> >                                        ^
> > drivers/staging/media/ipu3/ipu3-css-fw.c:208:35: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
> >     if (bi->info.isp.vf_formats[j] < 0 ||
> >                                    ^
> > drivers/staging/media/ipu3/ipu3-css.c: drivers/staging/media/ipu3/ipu3-css.c:1831 ipu3_css_fmt_try() warn: unsigned 'css->pipes[pipe].bindex' is never less than zero.
> > In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
> >                  from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3.h:14,
> >                  from drivers/staging/media/ipu3/ipu3-dmamap.c:12:
> > drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
> >   struct ipu3_uapi_awb_fr_config_s awb_fr;
> >                                    ^~~~~~
> > In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3.h:14,
> >                  from drivers/staging/media/ipu3/ipu3-dmamap.c:12:
> > drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
> >  } __packed;
> >  ^
> > drivers/staging/media/ipu3/ipu3-dmamap.c:97:7: warning: no previous prototype for 'ipu3_dmamap_alloc' [-Wmissing-prototypes]
> >  void *ipu3_dmamap_alloc(struct imgu_device *imgu, struct ipu3_css_map *map,
> >        ^~~~~~~~~~~~~~~~~
> > drivers/staging/media/ipu3/ipu3-dmamap.c:166:6: warning: no previous prototype for 'ipu3_dmamap_unmap' [-Wmissing-prototypes]
> >  void ipu3_dmamap_unmap(struct imgu_device *imgu, struct ipu3_css_map *map)
> >       ^~~~~~~~~~~~~~~~~
> > drivers/staging/media/ipu3/ipu3-dmamap.c:184:6: warning: no previous prototype for 'ipu3_dmamap_free' [-Wmissing-prototypes]
> >  void ipu3_dmamap_free(struct imgu_device *imgu, struct ipu3_css_map *map)
> >       ^~~~~~~~~~~~~~~~
> > drivers/staging/media/ipu3/ipu3-dmamap.c:204:5: warning: no previous prototype for 'ipu3_dmamap_map_sg' [-Wmissing-prototypes]
> >  int ipu3_dmamap_map_sg(struct imgu_device *imgu, struct scatterlist *sglist,
> >      ^~~~~~~~~~~~~~~~~~
> > drivers/staging/media/ipu3/ipu3-dmamap.c:251:5: warning: no previous prototype for 'ipu3_dmamap_init' [-Wmissing-prototypes]
> >  int ipu3_dmamap_init(struct imgu_device *imgu)
> >      ^~~~~~~~~~~~~~~~
> > drivers/staging/media/ipu3/ipu3-dmamap.c:266:6: warning: no previous prototype for 'ipu3_dmamap_exit' [-Wmissing-prototypes]
> >  void ipu3_dmamap_exit(struct imgu_device *imgu)
> >       ^~~~~~~~~~~~~~~~
> > In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
> >                  from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3-css.c:7:
> > drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
> >   struct ipu3_uapi_awb_fr_config_s awb_fr;
> >                                    ^~~~~~
> > In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3-css.c:7:
> > drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
> >  } __packed;
> >  ^
> > drivers/staging/media/ipu3/ipu3-css.c: In function 'ipu3_css_fmt_try':
> > drivers/staging/media/ipu3/ipu3-css.c:1831:30: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
> >   if (css->pipes[pipe].bindex < 0) {
> >                               ^
> > In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
> >                  from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3.h:14,
> >                  from drivers/staging/media/ipu3/ipu3.c:15:
> > drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
> >   struct ipu3_uapi_awb_fr_config_s awb_fr;
> >                                    ^~~~~~
> > In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3.h:14,
> >                  from drivers/staging/media/ipu3/ipu3.c:15:
> > drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
> >  } __packed;
> >  ^
> > In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
> >                  from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3.h:14,
> >                  from drivers/staging/media/ipu3/ipu3-v4l2.c:10:
> > drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
> >   struct ipu3_uapi_awb_fr_config_s awb_fr;
> >                                    ^~~~~~
> > In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3.h:14,
> >                  from drivers/staging/media/ipu3/ipu3-v4l2.c:10:
> > drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
> >  } __packed;
> >  ^
> > drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:1947:5:  warning: symbol 'ipu3_css_cfg_acc' was not declared. Should it be static?
> > drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:2725:5:  warning: symbol 'ipu3_css_cfg_vmem0' was not declared. Should it be static?
> > drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:2804:5:  warning: symbol 'ipu3_css_cfg_dmem0' was not declared. Should it be static?
> > drivers/staging/media/ipu3/ipu3-css-params.c:drivers/staging/media/ipu3/ipu3-css-params.c:2856:6:  warning: symbol 'ipu3_css_cfg_gdc_table' was not declared. Should it be static?
> > In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
> >                  from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3-css-params.c:6:
> > drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
> >   struct ipu3_uapi_awb_fr_config_s awb_fr;
> >                                    ^~~~~~
> > In file included from drivers/staging/media/ipu3/ipu3-css.h:10,
> >                  from drivers/staging/media/ipu3/ipu3-css-params.c:6:
> > drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
> >  } __packed;
> >  ^
> > drivers/staging/media/ipu3/ipu3-css-params.c:1947:5: warning: no previous prototype for 'ipu3_css_cfg_acc' [-Wmissing-prototypes]
> >  int ipu3_css_cfg_acc(struct ipu3_css *css, unsigned int pipe,
> >      ^~~~~~~~~~~~~~~~
> > drivers/staging/media/ipu3/ipu3-css-params.c:2725:5: warning: no previous prototype for 'ipu3_css_cfg_vmem0' [-Wmissing-prototypes]
> >  int ipu3_css_cfg_vmem0(struct ipu3_css *css, unsigned int pipe,
> >      ^~~~~~~~~~~~~~~~~~
> > drivers/staging/media/ipu3/ipu3-css-params.c:2804:5: warning: no previous prototype for 'ipu3_css_cfg_dmem0' [-Wmissing-prototypes]
> >  int ipu3_css_cfg_dmem0(struct ipu3_css *css, unsigned int pipe,
> >      ^~~~~~~~~~~~~~~~~~
> > drivers/staging/media/ipu3/ipu3-css-params.c:2856:6: warning: no previous prototype for 'ipu3_css_cfg_gdc_table' [-Wmissing-prototypes]
> >  void ipu3_css_cfg_gdc_table(struct imgu_abi_gdc_warp_param *gdc,
> >       ^~~~~~~~~~~~~~~~~~~~~~
> > In file included from drivers/staging/media/ipu3/ipu3-abi.h:7,
> >                  from drivers/staging/media/ipu3/ipu3-tables.h:7,
> >                  from drivers/staging/media/ipu3/ipu3-tables.c:4:
> > drivers/staging/media/ipu3/include/intel-ipu3.h:2481:35: warning: 'awb_fr' offset 36756 in 'struct ipu3_uapi_acc_param' isn't aligned to 32 [-Wpacked-not-aligned]
> >   struct ipu3_uapi_awb_fr_config_s awb_fr;
> >                                    ^~~~~~
> > In file included from drivers/staging/media/ipu3/ipu3-tables.h:7,
> >                  from drivers/staging/media/ipu3/ipu3-tables.c:4:
> > drivers/staging/media/ipu3/ipu3-abi.h:1250:1: warning: alignment 1 of 'struct imgu_abi_awb_fr_config' is less than 32 [-Wpacked-not-aligned]
> >  } __packed;
> >  ^
> > 
> > Could you please send ASAP a patch series fixing them?
> > 
> > Thanks,
> > Mauro
> 
> In time, I fixed a few really trivial warnings there, due to the
> lack of an #include directive.
> 
> As this patch is trivial enough, I'll go ahead and just apply it.
> I'll let the others for you to handle.

Interestingly enough, I haven't seen these warnings here. I presume you use
W=1 when compiling? Some of these are worth more attention than just trying
to squash them by including the necessary headers. On others I'm surprised
that compiling without W=1 didn't cause the same warnings.

> 
> Thanks,
> Mauro
> 
> [PATCH] ipu3: add missing #include
> 
> Lots of warning due to non-static functions are generated because
> the headers with define them were not included.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

Feel free to add:

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

> 
> diff --git a/drivers/staging/media/ipu3/ipu3-css-params.c b/drivers/staging/media/ipu3/ipu3-css-params.c
> index 776206ded83b..053edce54b71 100644
> --- a/drivers/staging/media/ipu3/ipu3-css-params.c
> +++ b/drivers/staging/media/ipu3/ipu3-css-params.c
> @@ -6,6 +6,7 @@
>  #include "ipu3-css.h"
>  #include "ipu3-css-fw.h"
>  #include "ipu3-tables.h"
> +#include "ipu3-css-params.h"
>  
>  #define DIV_ROUND_CLOSEST_DOWN(a, b)	(((a) + ((b) / 2) - 1) / (b))
>  #define roundclosest_down(a, b)		(DIV_ROUND_CLOSEST_DOWN(a, b) * (b))
> diff --git a/drivers/staging/media/ipu3/ipu3-dmamap.c b/drivers/staging/media/ipu3/ipu3-dmamap.c
> index 93a393d4e15e..5bed01d5b8df 100644
> --- a/drivers/staging/media/ipu3/ipu3-dmamap.c
> +++ b/drivers/staging/media/ipu3/ipu3-dmamap.c
> @@ -12,6 +12,7 @@
>  #include "ipu3.h"
>  #include "ipu3-css-pool.h"
>  #include "ipu3-mmu.h"
> +#include "ipu3-dmamap.h"
>  
>  /*
>   * Free a buffer allocated by ipu3_dmamap_alloc_buffer()
>
Mauro Carvalho Chehab Jan. 8, 2019, 12:27 p.m. UTC | #6
Em Tue, 8 Jan 2019 00:51:25 +0200
Sakari Ailus <sakari.ailus@iki.fi> escreveu:

> Hi Mauro,
> 
> On Mon, Jan 07, 2019 at 04:11:34PM -0200, Mauro Carvalho Chehab wrote:
> > Em Mon, 7 Jan 2019 16:01:07 -0200
> > Mauro Carvalho Chehab <mchehab+samsung@kernel.org> escreveu:
> >   
> > > Hi Sakari/Bingbu,
> > > 
> > > Em Thu, 13 Dec 2018 14:03:40 +0200
> > > sakari.ailus@iki.fi escreveu:
> > >   
> > > > Hi Mauro,
> > > > 
> > > > Here's the ipu3 staging driver plus the META_OUTPUT buffer type needed to
> > > > pass the parameters for the device. If you think this there's still time to
> > > > get this to 4.21, then please pull. The non-staging patches have been
> > > > around for more than half a year and they're relatively simple.    
> > > 
> > > I'm now getting a lot of new warnings when building it:
> > > 

<snip>

> > > Could you please send ASAP a patch series fixing them?
> > > 
> > > Thanks,
> > > Mauro  
> > 
> > In time, I fixed a few really trivial warnings there, due to the
> > lack of an #include directive.
> > 
> > As this patch is trivial enough, I'll go ahead and just apply it.
> > I'll let the others for you to handle.  
> 
> Interestingly enough, I haven't seen these warnings here. I presume you use
> W=1 when compiling? 

Yes, that's the case. I always build here with:

	W=1 CF=-D__CHECK_ENDIAN__ CONFIG_DEBUG_SECTION_MISMATCH=y

Most of the time, I use ARCH=i386 on my builds, in order to get errors
about div64() stuff (also, gcc warnings seem to work better on x86).

Btw, are you compiling against 5.0-rc1 and using an updated gcc compiler?

Please notice that there were a patchset merged recently changing
the enabled warning flags for W=0 and W=1. Those got merged (I think)
on 5.0-rc1.

Here, As I use Fedora, with gets updated every 6 months, I'm usually
not far behind gcc upstream. Right now (Fedora 29), I'm using gcc
version 8.2.1:

	gcc (GCC) 8.2.1 20181215 (Red Hat 8.2.1-6)

> Some of these are worth more attention than just trying
> to squash them by including the necessary headers. 

Agreed. Several of them are not trivial to solve, yet seem relevant
enough to be fixed.

Thanks,
Mauro