OSDN Git Service

uclinux-h8/linux.git
3 years agomedia: ccs: Make hwcfg part of the device specific struct
Sakari Ailus [Tue, 11 Feb 2020 21:41:39 +0000 (22:41 +0100)]
media: ccs: Make hwcfg part of the device specific struct

There's no need to allocate the hardware configuration struct separately.
Put it in struct ccs_sensor.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ccs: Remove remaining support for platform data
Sakari Ailus [Tue, 11 Feb 2020 21:35:40 +0000 (22:35 +0100)]
media: ccs: Remove remaining support for platform data

No need to support platform data; remove support for conveying hardware
configuration that way.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ccs: Remove the I²C ID table
Sakari Ailus [Tue, 11 Feb 2020 21:32:36 +0000 (22:32 +0100)]
media: ccs: Remove the I²C ID table

The I²C ID table is no longer needed; remove it.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ccs: Add CCS ACPI device ID
Sakari Ailus [Mon, 3 Feb 2020 11:44:35 +0000 (12:44 +0100)]
media: ccs: Add CCS ACPI device ID

The CCS compliant sensors use device ID "MIPI0200". Use this id for ACPI
device matching.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ccs: Add device compatible identifiers for telling SMIA and CCS apart
Sakari Ailus [Mon, 21 Sep 2020 16:04:47 +0000 (18:04 +0200)]
media: ccs: Add device compatible identifiers for telling SMIA and CCS apart

Add device data specific to DT compatible ID to tell SMIA and CCS devices
apart already in power-up.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ccs: Add MIPI CCS compatible strings
Sakari Ailus [Tue, 11 Feb 2020 21:31:51 +0000 (22:31 +0100)]
media: ccs: Add MIPI CCS compatible strings

Add "mipi-ccs-1.0" and "mipi-ccs-1.1" compatible strings to the CCS
driver.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: Documentation: ccs: Reorder SPDX and copyright notice lines
Sakari Ailus [Wed, 2 Dec 2020 14:18:19 +0000 (15:18 +0100)]
media: Documentation: ccs: Reorder SPDX and copyright notice lines

Move the SPDX tag to the top, placing the copyright notice after that.
This aligns the file with existing practices.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: Documentation: ccs: Rename ccs-regs.txt as ccs-regs.asc
Sakari Ailus [Wed, 2 Dec 2020 14:16:57 +0000 (15:16 +0100)]
media: Documentation: ccs: Rename ccs-regs.txt as ccs-regs.asc

As documentation used to be in .txt files before converting to ReST,
rename ccs-regs.txt to avoid it being taken as documentation that
pre-dates ReST conversion and so target for further conversion to ReST.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: rockchip: rkisp1: remove useless debugfs checks
Dan Carpenter [Tue, 1 Dec 2020 14:30:58 +0000 (15:30 +0100)]
media: rockchip: rkisp1: remove useless debugfs checks

The debugfs_create_dir() function never returns NULLs so this code will
never be executed.  It's not intended that callers will check for
debugfs errors in the normal case and it's not necessary in this driver,
so we can just delete this code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: stop pretending to maintain cafe and ov7670
Jonathan Corbet [Mon, 30 Nov 2020 22:52:21 +0000 (23:52 +0100)]
media: stop pretending to maintain cafe and ov7670

It's been a long time since I could credibly claim to be maintaining these
drivers; I'm not even sure my hardware works anymore.  Mark them orphan.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: saa7146: switch from 'pci_' to 'dma_' API
Christophe JAILLET [Sun, 29 Nov 2020 12:30:11 +0000 (13:30 +0100)]
media: saa7146: switch from 'pci_' to 'dma_' API

The wrappers in include/linux/pci-dma-compat.h should go away.

The patch has been generated with the coccinelle script below and has been
hand modified to replace GFP_ with a correct flag.
It has been compile tested.

When memory is allocated in 'saa7146_pgtable_alloc()' GFP_KERNEL can be
used because the callers are either .buf_prepare functions or function that
already use GFP_KERNEL (hidden in a 'vmalloc_32()' call).

When memory is allocated in 'saa7146_init_one()' GFP_KERNEL can be used
because it is probe function and no lock is taken in the between.

When memory is allocated in 'saa7146_vv_init()' GFP_KERNEL can be used
because this function already uses GFP_KERNEL and no lock is taken in the
between.

When memory is allocated in 'vbi_workaround()' GFP_KERNEL can be used
because it is only called from a .open function.

@@
@@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@
@@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@
@@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
@@
-    PCI_DMA_NONE
+    DMA_NONE

@@
expression e1, e2, e3;
@@
-    pci_alloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3;
@@
-    pci_zalloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3, e4;
@@
-    pci_free_consistent(e1, e2, e3, e4)
+    dma_free_coherent(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_single(e1, e2, e3, e4)
+    dma_map_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_single(e1, e2, e3, e4)
+    dma_unmap_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4, e5;
@@
-    pci_map_page(e1, e2, e3, e4, e5)
+    dma_map_page(&e1->dev, e2, e3, e4, e5)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_page(e1, e2, e3, e4)
+    dma_unmap_page(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_sg(e1, e2, e3, e4)
+    dma_map_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_sg(e1, e2, e3, e4)
+    dma_unmap_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
+    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_device(e1, e2, e3, e4)
+    dma_sync_single_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
+    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
+    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_dma_mask(e1, e2)
+    dma_set_mask(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_consistent_dma_mask(e1, e2)
+    dma_set_coherent_mask(&e1->dev, e2)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ttpci: switch from 'pci_' to 'dma_' API
Christophe JAILLET [Fri, 27 Nov 2020 20:58:01 +0000 (21:58 +0100)]
media: ttpci: switch from 'pci_' to 'dma_' API

The wrappers in include/linux/pci-dma-compat.h should go away.

The patch has been generated with the coccinelle script below and has been
hand modified to replace GFP_ with a correct flag.
It has been compile tested.

When memory is allocated in 'av7110_attach()' GFP_KERNEL can be used
because this flag is already used above in the same function and no lock is
taken in the between.

@@
@@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@
@@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@
@@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
@@
-    PCI_DMA_NONE
+    DMA_NONE

@@
expression e1, e2, e3;
@@
-    pci_alloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3;
@@
-    pci_zalloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3, e4;
@@
-    pci_free_consistent(e1, e2, e3, e4)
+    dma_free_coherent(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_single(e1, e2, e3, e4)
+    dma_map_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_single(e1, e2, e3, e4)
+    dma_unmap_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4, e5;
@@
-    pci_map_page(e1, e2, e3, e4, e5)
+    dma_map_page(&e1->dev, e2, e3, e4, e5)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_page(e1, e2, e3, e4)
+    dma_unmap_page(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_sg(e1, e2, e3, e4)
+    dma_map_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_sg(e1, e2, e3, e4)
+    dma_unmap_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
+    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_device(e1, e2, e3, e4)
+    dma_sync_single_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
+    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
+    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_dma_mask(e1, e2)
+    dma_set_mask(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_consistent_dma_mask(e1, e2)
+    dma_set_coherent_mask(&e1->dev, e2)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: solo6x10: switch from 'pci_' to 'dma_' API
Christophe JAILLET [Fri, 27 Nov 2020 20:34:40 +0000 (21:34 +0100)]
media: solo6x10: switch from 'pci_' to 'dma_' API

The wrappers in include/linux/pci-dma-compat.h should go away.

The patch has been generated with the coccinelle script below and has been
hand modified to replace GFP_ with a correct flag.
It has been compile tested.

When memory is allocated in 'snd_solo_pcm_open()' (solo6x10-g723.c)
GFP_KERNEL can be used because this flag is already used jew a few lines
above.

When memory is allocated in 'solo_enc_alloc()' (solo6x10-v4l2-enc.c)
GFP_KERNEL can be used because this flag is already used jew a few lines
above.

When memory is allocated in 'solo_enc_v4l2_init()' (solo6x10-v4l2-enc.c)
GFP_KERNEL can be used because calls 'solo_enc_alloc()' which already uses
this flag.

@@
@@
-    PCI_DMA_BIDIRECTIONAL
+    DMA_BIDIRECTIONAL

@@
@@
-    PCI_DMA_TODEVICE
+    DMA_TO_DEVICE

@@
@@
-    PCI_DMA_FROMDEVICE
+    DMA_FROM_DEVICE

@@
@@
-    PCI_DMA_NONE
+    DMA_NONE

@@
expression e1, e2, e3;
@@
-    pci_alloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3;
@@
-    pci_zalloc_consistent(e1, e2, e3)
+    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)

@@
expression e1, e2, e3, e4;
@@
-    pci_free_consistent(e1, e2, e3, e4)
+    dma_free_coherent(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_single(e1, e2, e3, e4)
+    dma_map_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_single(e1, e2, e3, e4)
+    dma_unmap_single(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4, e5;
@@
-    pci_map_page(e1, e2, e3, e4, e5)
+    dma_map_page(&e1->dev, e2, e3, e4, e5)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_page(e1, e2, e3, e4)
+    dma_unmap_page(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_map_sg(e1, e2, e3, e4)
+    dma_map_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_unmap_sg(e1, e2, e3, e4)
+    dma_unmap_sg(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
+    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_single_for_device(e1, e2, e3, e4)
+    dma_sync_single_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
+    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)

@@
expression e1, e2, e3, e4;
@@
-    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
+    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)

@@
expression e1, e2;
@@
-    pci_dma_mapping_error(e1, e2)
+    dma_mapping_error(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_dma_mask(e1, e2)
+    dma_set_mask(&e1->dev, e2)

@@
expression e1, e2;
@@
-    pci_set_consistent_dma_mask(e1, e2)
+    dma_set_coherent_mask(&e1->dev, e2)

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: si4713: remove trailing semicolon in macro definition
Tom Rix [Fri, 27 Nov 2020 16:44:08 +0000 (17:44 +0100)]
media: si4713: remove trailing semicolon in macro definition

The macro use will already have a semicolon.

[hverkuil: also add () around p in the macro]

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: staging/imx: Increase IMX_MEDIA_EOF_TIMEOUT
Fabio Estevam [Fri, 27 Nov 2020 16:09:45 +0000 (17:09 +0100)]
media: staging/imx: Increase IMX_MEDIA_EOF_TIMEOUT

When trying to capture video on a imx6dl-based board with an ADV7280,
the following timeout error is observed:

v4l2-ctl --stream-mmap -d /dev/video2
[   22.792049] ipu1_csi1: EOF timeout
VIDIOC_DQBUF: failed: Input/output error

Increase the IMX_MEDIA_EOF_TIMEOUT to avoid such problem.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: camss: Make use of V4L2_CAP_IO_MC
Andrey Konovalov [Thu, 26 Nov 2020 15:01:57 +0000 (16:01 +0100)]
media: camss: Make use of V4L2_CAP_IO_MC

Implement mbus_code filtering for format enumeration.

Without this patch libcamera errors out with:
"ERROR V4L2 v4l2_videodevice.cpp:982 /dev/video0[cap]: Media bus code
filtering not supported by the device"

This is the second version of this change which handles the case of
several pixel formats corresponding to one media bus format correctly.

Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: Revert "media: camss: Make use of V4L2_CAP_IO_MC"
Andrey Konovalov [Thu, 26 Nov 2020 15:01:56 +0000 (16:01 +0100)]
media: Revert "media: camss: Make use of V4L2_CAP_IO_MC"

This reverts commit c90f1178dcac30dee5ddd29ec0513e7589aa866e.

The assumption of "Each entry in formats[] table has unique mbus_code"
is valid for the RDI entities, but not for the PIX ones.

Reverting this patch and creating a new one which handles the PIX entities
correctly results in smaller and more straightforward patch than doing the
changes on top of the current version.

Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: rockchip: rkisp1: Fix typos in comments and macro definitions
Peilin Ye [Thu, 26 Nov 2020 12:21:48 +0000 (13:21 +0100)]
media: rockchip: rkisp1: Fix typos in comments and macro definitions

Fix 4 typos under drivers/media/platform/rockchip/rkisp1/ found by
checkpatch, including the RKISP1_CIF_MI_{M,S}P_PINGPONG_ENABLE macro
definitions.

Signed-off-by: Peilin Ye <yepeilin.cs@gmail.com>
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: rcar-vin: Remove unused macro
Jacopo Mondi [Thu, 26 Nov 2020 07:47:56 +0000 (08:47 +0100)]
media: rcar-vin: Remove unused macro

The VNCSI_IFMD_CSI_CHSEL_MASK is not used: remove it.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: fsl-viu: Use the ioread/write32be() accessors
Fabio Estevam [Wed, 25 Nov 2020 12:04:47 +0000 (13:04 +0100)]
media: fsl-viu: Use the ioread/write32be() accessors

Since commit 29d750686331 ("media: fsl-viu: allow building it with
COMPILE_TEST") there were several attempts to fix build failures on
PPC, MICROBLAZE and M68K.

However, such errors are still present as reported by kbuild robot.

Fix the problem by using the ioread/write32be() accessors, which build
fine on all platforms.

Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: platform: exynos4-is: remove all references to physical addresses
Marek Szyprowski [Tue, 24 Nov 2020 08:41:28 +0000 (09:41 +0100)]
media: platform: exynos4-is: remove all references to physical addresses

This driver always operates on the DMA/IOVA addresses, so calling them
physical addresses is misleading, although when no IOMMU is used they
equal each other. Fix this by renaming all such entries to 'addr' and
adjusting comments.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: adv748x: Configure device when resuming from sleep
Niklas Söderlund [Sun, 22 Nov 2020 16:36:37 +0000 (17:36 +0100)]
media: adv748x: Configure device when resuming from sleep

If the device is powered off (for example during system suspend to ram)
the devices loses its configuration, especially the slave i2c mappings
and other configuration set at probe time. This renders the device
unusable and the only way to recover is to unbind and rebind the device
to the driver to run the probe setup again.

Add an early resume callback that reinitializes the device and setup the
slave i2c address mappings and other probe time configuration.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: adv748x: csi2: Set virtual channel when device is reset
Niklas Söderlund [Sun, 22 Nov 2020 16:36:36 +0000 (17:36 +0100)]
media: adv748x: csi2: Set virtual channel when device is reset

It's not enough to set the CSI-2 virtual channel for TXA and TXB during
probe: it also needs to be set when the device is reset. Move the virtual
channel selection to adv748x_reset() that is called during probe and
when the device needs to be reset.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: adv748x: afe: Select input port when device is reset
Niklas Söderlund [Sun, 22 Nov 2020 16:36:35 +0000 (17:36 +0100)]
media: adv748x: afe: Select input port when device is reset

It's not enough to select the AFE input port during probe: it also needs
to be set when the device is reset. Move the port selection to
adv748x_reset() that is called during probe and when the device needs to
be reset.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: adv748x: Only set i2c addresses once during probe
Niklas Söderlund [Sun, 22 Nov 2020 16:30:48 +0000 (17:30 +0100)]
media: adv748x: Only set i2c addresses once during probe

During probe the i2c slave addresses are set two times in a row, once in
adv748x_initialise_clients() and once directly after in adv748x_reset().
Remove the call to adv748x_set_slave_addresses() in
adv748x_initialise_clients() as it's only called during probe while
adv748x_reset() is called during probe and normal operation.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: saa7146: fix array overflow in vidioc_s_audio()
Dan Carpenter [Tue, 17 Nov 2020 07:23:40 +0000 (08:23 +0100)]
media: saa7146: fix array overflow in vidioc_s_audio()

The "a->index" value comes from the user via the ioctl.  The problem is
that the shift can wrap resulting in setting "mxb->cur_audinput" to an
invalid value, which later results in an array overflow.

Fixes: 6680427791c9 ("[media] mxb: fix audio handling")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: meson: vdec: add G12/SM1 to module description
Christian Hewitt [Mon, 16 Nov 2020 04:30:55 +0000 (05:30 +0100)]
media: meson: vdec: add G12/SM1 to module description

The meson vdec driver also supports Amlogic G12/SM1 hardware.

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: s5p-jpeg: handle error condition in s5p_jpeg_probe
Baskov Evgeniy [Fri, 13 Nov 2020 16:06:25 +0000 (17:06 +0100)]
media: s5p-jpeg: handle error condition in s5p_jpeg_probe

If an error happens in jpeg_get_drv_data(), i.e. match fails,
jpeg->variant field is NULL, so we cannot access it.

Consider device probe failed if jpeg->variant is NULL.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Baskov Evgeniy <baskov@ispras.ru>
Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: cedrus: Add support for VP8 decoding
Jernej Skrabec [Tue, 10 Nov 2020 22:35:40 +0000 (23:35 +0100)]
media: cedrus: Add support for VP8 decoding

VP8 in Cedrus shares same engine as H264.

Note that it seems necessary to call bitstream parsing functions,
to parse frame header, otherwise decoded image is garbage. This is
contrary to what is driver supposed to do. However, values are not
really used, so this might be acceptable. It's possible that bitstream
parsing functions set some internal VPU state, which is later necessary
for proper decoding. Biggest suspect is "VP8 probs update" trigger.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: hantro: Use VP8 lengths defined in uapi
Emmanuel Gil Peyrot [Mon, 9 Nov 2020 16:22:44 +0000 (17:22 +0100)]
media: hantro: Use VP8 lengths defined in uapi

Use the new defines instead of hardcoding the VP8 lengths.

[hverkuil: add commit log]

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: uapi: Expose VP8 probability lengths as defines
Emmanuel Gil Peyrot [Mon, 9 Nov 2020 16:22:43 +0000 (17:22 +0100)]
media: uapi: Expose VP8 probability lengths as defines

These values will be used by various drivers implementing the VP8
stateless API.

This had been suggested by Ezequiel Garcia for the Cedrus VP8 driver.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: mtk-vpu: dump VPU status when IPI times out
Irui Wang [Thu, 29 Oct 2020 01:17:21 +0000 (02:17 +0100)]
media: mtk-vpu: dump VPU status when IPI times out

when IPI time out, dump VPU status to get more debug information

Signed-off-by: Irui Wang <irui.wang@mediatek.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: mtk-vpu: VPU should be in idle state before system is suspended
Irui Wang [Thu, 29 Oct 2020 01:17:20 +0000 (02:17 +0100)]
media: mtk-vpu: VPU should be in idle state before system is suspended

VPU should be in idle state before system is suspended
or it will work abnormally like VPU program counter not
in a correct address or VPU reset

Signed-off-by: Irui Wang <irui.wang@mediatek.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: coda: Convert the driver to DT-only
Fabio Estevam [Wed, 2 Dec 2020 14:13:26 +0000 (15:13 +0100)]
media: coda: Convert the driver to DT-only

Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code
by removing the unused non-DT support.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: tvp5150: Fix wrong return value of tvp5150_parse_dt()
Zhang Xiaoxu [Mon, 16 Nov 2020 14:18:01 +0000 (15:18 +0100)]
media: tvp5150: Fix wrong return value of tvp5150_parse_dt()

If of_graph_get_endpoint_by_regs() return NULL, it will return 0 rather
than an errno, because we doesn't initialize the return value.

Fixes: 0556f1d580d4 ("media: tvp5150: add input source selection of_graph support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: cx88: use ARRAY_SIZE
Xu Wang [Fri, 13 Nov 2020 07:21:11 +0000 (08:21 +0100)]
media: cx88: use ARRAY_SIZE

Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: cedrus: Add support for V3s
Martin Cerveny [Mon, 16 Nov 2020 12:56:15 +0000 (13:56 +0100)]
media: cedrus: Add support for V3s

V3s video engine runs at lower speed and support video decoder
for H.264 and JPEG/MJPEG only.

Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: dt-bindings: media: cedrus: Add V3s compatible
Martin Cerveny [Mon, 16 Nov 2020 12:56:16 +0000 (13:56 +0100)]
media: dt-bindings: media: cedrus: Add V3s compatible

Allwinner V3s SoC contains video engine. Add compatible for it.

Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: cedrus: Register all codecs as capability
Martin Cerveny [Mon, 16 Nov 2020 12:56:12 +0000 (13:56 +0100)]
media: cedrus: Register all codecs as capability

All codecs should have capabilities.
For example "Allwinner V3s" does not support "MPEG2".

Signed-off-by: Martin Cerveny <m.cerveny@computer.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: cx23885: add more quirks for reset DMA on some AMD IOMMU
Daniel Lee Kruse [Wed, 30 Sep 2020 03:36:35 +0000 (05:36 +0200)]
media: cx23885: add more quirks for reset DMA on some AMD IOMMU

On AMD Family 15h (Models 30h-3fh), I/O Memory Management Unit
RiSC engine sometimes stalls, requiring a reset.

As result, MythTV and w-scan won't scan channels on the AMD Kaveri
APU with the Hauppauge QuadHD TV tuner card.

For the solution I added the Input/Output Memory Management Unit's PCI
Identity of 0x1423 to the broken_dev_id[] array, which is used by
a quirks logic meant to fix similar problems with other AMD
chipsets.

Signed-off-by: Daniel Lee Kruse <daniel.lee.kruse@protonmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: rockchip: rkisp1: Constify static structs
Rikard Falkeborn [Thu, 19 Nov 2020 22:18:49 +0000 (23:18 +0100)]
media: rockchip: rkisp1: Constify static structs

These 'ops' structs are never modified, so make them const to allow the
compiler to put them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: i2c: imx219: Selection compliance fixes
Hans Verkuil [Wed, 5 Aug 2020 10:57:21 +0000 (12:57 +0200)]
media: i2c: imx219: Selection compliance fixes

To comply with the intended usage of the V4L2 selection target when
used to retrieve a sensor image properties, adjust the rectangles
returned by the imx219 driver.

The top/left crop coordinates of the TGT_CROP rectangle were set to
(0, 0) instead of (8, 8) which is the offset from the larger physical
pixel array rectangle. This was also a mismatch with the default values
crop rectangle value, so this is corrected. Found with v4l2-compliance.

While at it, add V4L2_SEL_TGT_CROP_BOUNDS support: CROP_DEFAULT and
CROP_BOUNDS have the same size as the non-active pixels are not readable
using the selection API. Found with v4l2-compliance.

[reword commit message, use macros for pixel offsets]

Fixes: e6d4ef7d58aa7 ("media: i2c: imx219: Implement get_selection")
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: dt-bindings: media: Use OF graph schema
Rob Herring [Tue, 17 Nov 2020 01:39:47 +0000 (02:39 +0100)]
media: dt-bindings: media: Use OF graph schema

Now that we have a graph schema, rework the media related schemas to
use it. Mostly this is adding a reference to graph.yaml and dropping
duplicate parts from schemas.

Cc: Maxime Ripard <mripard@kernel.org>
Cc: Jacopo Mondi <jacopo@jmondi.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: rdacm20: Enable GPIO1 explicitly
Jacopo Mondi [Fri, 20 Nov 2020 16:15:29 +0000 (17:15 +0100)]
media: rdacm20: Enable GPIO1 explicitly

The MAX9271 GPIO1 line that controls the sensor reset is by default
enabled after a serializer chip reset.

As rdacm20 does not go through an explicit serializer reset, make sure
GPIO1 is enabled to make the camera module driver more robust.

Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver")
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: max9271: Fix GPIO enable/disable
Jacopo Mondi [Fri, 20 Nov 2020 16:15:28 +0000 (17:15 +0100)]
media: max9271: Fix GPIO enable/disable

Fix GPIO enable/disable operations which wrongly read the 0x0f register
to obtain the current mask of the enabled lines instead of using
the correct 0x0e register.

Also fix access to bit 0 of the register which is marked as reserved.

Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver")
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: v4l2-fwnode: Remove v4l2_async_notifier_parse_fwnode_endpoints_by_port()
Niklas Söderlund [Wed, 25 Nov 2020 16:44:50 +0000 (17:44 +0100)]
media: v4l2-fwnode: Remove v4l2_async_notifier_parse_fwnode_endpoints_by_port()

There are no users left of this helper and as it implements an
undesirable and too simple behaviour that should instead be implemented
directly by drivers remove it to prevent future uses of it.

Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: rcar-vin: Rework CSI-2 firmware parsing
Niklas Söderlund [Wed, 25 Nov 2020 16:44:49 +0000 (17:44 +0100)]
media: rcar-vin: Rework CSI-2 firmware parsing

Rework the CSI-2 firmware parsing code to not use the soon to be
removed v4l2_async_notifier_parse_fwnode_endpoints_by_port() helper. The
change only aims to prepare for the removing of the old helper and there
are no functional change.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: rcar-vin: Use v4l2_async_subdev instead of fwnode_handle to match subdevices
Niklas Söderlund [Wed, 25 Nov 2020 16:44:48 +0000 (17:44 +0100)]
media: rcar-vin: Use v4l2_async_subdev instead of fwnode_handle to match subdevices

In preparation of removing the usage of the old helper
v4l2_async_notifier_parse_fwnode_endpoints_by_port() use the
v4l2_async_subdev instead of fwnode_handle to match subdevices.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: rcar-vin: Rework parallel firmware parsing
Niklas Söderlund [Wed, 25 Nov 2020 16:44:47 +0000 (17:44 +0100)]
media: rcar-vin: Rework parallel firmware parsing

Rework the parallel firmware parsing code to not use the soon to be
removed v4l2_async_notifier_parse_fwnode_endpoints_by_port() helper. The
change only aims to prepare for the removing of the old helper and there
are no functional change.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: rcar-vin: Only dynamically allocate v4l2_async_subdev
Niklas Söderlund [Wed, 25 Nov 2020 16:44:46 +0000 (17:44 +0100)]
media: rcar-vin: Only dynamically allocate v4l2_async_subdev

In preparation of removing the usage of the old helper
v4l2_async_notifier_parse_fwnode_endpoints_by_port() do not dynamically
allocate the whole structure containing the parameters for the parallel
interface, instead only allocate the v4l2_async_subdev structure. There
is no functional change.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ov2740: fix dereference before null check on pointer nvm
Colin Ian King [Thu, 26 Nov 2020 11:49:32 +0000 (12:49 +0100)]
media: ov2740: fix dereference before null check on pointer nvm

Currently pointer nvm is being dereferenced before it is being null
checked.  Fix this by moving the assignments of pointers client and
ov2740 so that are after the null check hence avoiding any potential
null pointer dereferences on pointer nvm.

Fixes: 5e6fd339b68d ("media: ov2740: allow OTP data access during streaming")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: i2c: add OV02A10 image sensor driver
Dongchun Zhu [Wed, 25 Nov 2020 14:17:56 +0000 (15:17 +0100)]
media: i2c: add OV02A10 image sensor driver

Add a V4L2 sub-device driver for OmniVision OV02A10 image sensor.

Signed-off-by: Dongchun Zhu <dongchun.zhu@mediatek.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: dt-bindings: media: i2c: document OV02A10 DT bindings
Dongchun Zhu [Wed, 25 Nov 2020 14:17:55 +0000 (15:17 +0100)]
media: dt-bindings: media: i2c: document OV02A10 DT bindings

Add device-tree binding documentation for OV02A10 image sensor driver,
and the relevant MAINTAINERS entries.

Signed-off-by: Dongchun Zhu <dongchun.zhu@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ov9734: hold lock to check streaming state
Bingbu Cao [Fri, 27 Nov 2020 03:48:12 +0000 (04:48 +0100)]
media: ov9734: hold lock to check streaming state

The lock in ov9734 is used to protect the streaming state and
serialize the stream on and off callbacks, it should be hold before
checking the streaming state in ov9734_set_stream().

Reported-by: Tomasz Figa <tfiga@chromium.org>
Reported-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: v4l: subdev: Set sd->devnode before registering the subdev
Sakari Ailus [Thu, 15 Aug 2019 07:36:49 +0000 (09:36 +0200)]
media: v4l: subdev: Set sd->devnode before registering the subdev

The subdev's video device node was only assigned after registering the
device node in the system. While it is unlikely that a driver needed to
use this field in handling system calls to its file handle, there remains
a slim chance the devnode field remains NULL while the driver expects to
find a video node there.

Assign the devnode field before registering the device, and assign it back
to NULL if the registration failed.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: omap3isp: Remove misleading comment
Thomas Gleixner [Fri, 13 Nov 2020 14:28:31 +0000 (15:28 +0100)]
media: omap3isp: Remove misleading comment

in_interrupt() covers hard and soft interrupt servicing and bottom half
disabled contexts, which is semantically undefined and useless.

The comment for __ccdc_lsc_configure() "Context: in_interrupt()" is
therefore as useful as "Context: unknown'. Remove it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ccs: Request for "reset" GPIO
Sakari Ailus [Thu, 18 Jun 2020 11:12:51 +0000 (13:12 +0200)]
media: ccs: Request for "reset" GPIO

The DT bindings documented "reset-gpios" property but the driver never
made use of it. Instead it used a GPIO called "xshutdown", with apprently
wrong polarity.

Fix this by requesting "reset" GPIO with the right polarity first, and if
that fails, then request "xshutdown" GPIO with the old polarity. This way
it works for new users as expected while if someone, somewhere, depended
on "xshutdown" GPIO, that continues to work as well.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: dt-bindings: mipi-ccs: Add bus-type for C-PHY support
Sakari Ailus [Tue, 29 Sep 2020 12:51:29 +0000 (14:51 +0200)]
media: dt-bindings: mipi-ccs: Add bus-type for C-PHY support

The bus-type property is required for C-PHY support. Add it, including
values for CCP2 and CSI-2 D-PHY.

Also require the bus-type property. Effectively all new sensors are MIPI
D-PHY or C-PHY that cannot be told apart without the bus-type property.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support
Sakari Ailus [Tue, 11 Feb 2020 21:26:25 +0000 (22:26 +0100)]
media: dt-bindings: nokia,smia: Amend SMIA bindings with MIPI CCS support

Amend the existing SMIA bindings by adding MIPI CCS support, with separate
compatible strings for CCS 1.0 and CCS 1.1. Rename the old bindings
accordingly as CCS is the current standard.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: dt-bindings: nokia,smia: Use better active polarity for reset
Sakari Ailus [Tue, 29 Sep 2020 12:40:40 +0000 (14:40 +0200)]
media: dt-bindings: nokia,smia: Use better active polarity for reset

Generally reset signal is active low on camera sensors. The example had it
high. Make it low, and use GPIO_ACTIVE_LOW in gpio.h for that.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: dt-bindings: nokia,smia: Convert to YAML
Sakari Ailus [Tue, 29 Sep 2020 11:32:17 +0000 (13:32 +0200)]
media: dt-bindings: nokia,smia: Convert to YAML

Convert nokia,smia DT bindings to YAML.

Also add explicit license to bindings.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: dt-bindings: nokia,smia: Remove nokia,nvm-size property
Sakari Ailus [Thu, 1 Oct 2020 11:50:44 +0000 (13:50 +0200)]
media: dt-bindings: nokia,smia: Remove nokia,nvm-size property

nokia,nvm-size property was removed from the bindings but it was left in
the example. Remove it from the example, too.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: dt-bindings: nokia,smia: Make vana-supply optional
Sakari Ailus [Tue, 29 Sep 2020 11:28:28 +0000 (13:28 +0200)]
media: dt-bindings: nokia,smia: Make vana-supply optional

vana-supply is optional in the spec, therefore make it optional in
bindings, too.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: dt-bindings: nokia,smia: Fix link-frequencies documentation
Sakari Ailus [Tue, 29 Sep 2020 11:14:00 +0000 (13:14 +0200)]
media: dt-bindings: nokia,smia: Fix link-frequencies documentation

The link-frequencies property belongs to the endpoint, not to the node
representing the device.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ccs: Give all subdevs a function
Sakari Ailus [Tue, 11 Feb 2020 21:01:14 +0000 (22:01 +0100)]
media: ccs: Give all subdevs a function

This removes a warning at driver probe time telling that one or two
entities have no function set. The function used for both the binner and
scaler is the scaler.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ccs: Remove profile concept
Sakari Ailus [Tue, 11 Feb 2020 19:22:26 +0000 (20:22 +0100)]
media: ccs: Remove profile concept

The driver doesn't do anything tangible with profiles. Remove the notion,
and use the capabilities directly.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Rename as "ccs"
Sakari Ailus [Tue, 11 Feb 2020 18:05:57 +0000 (19:05 +0100)]
media: smiapp: Rename as "ccs"

Rename the "smiapp" driver as "ccs". MIPI CCS is the contemporary standard
for raw Bayer camera sensors. The driver retains support for the SMIA++
and SMIA compliant camera sensors. A module alias is added for old user
space using "smiapp" module name.

Add Intel copyright while at it.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Differentiate CCS sensors from SMIA in subdev naming
Sakari Ailus [Wed, 2 Sep 2020 13:51:29 +0000 (15:51 +0200)]
media: smiapp: Differentiate CCS sensors from SMIA in subdev naming

Call CCS compliant sensors as "ccs" instead of "smiapp" in absence of a
device specific name. This is done based on the value of the manufacturer
ID register that is only present in CCS.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Internal rename to CCS
Sakari Ailus [Tue, 11 Feb 2020 13:19:13 +0000 (14:19 +0100)]
media: smiapp: Internal rename to CCS

Rename internal names to reflect the driver's new reference. The module
name remains the same.

Also fix trivial coding style issues on the way related to e.g. alignment
changes due to the rename.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Rename register access functions
Sakari Ailus [Tue, 11 Feb 2020 11:16:14 +0000 (12:16 +0100)]
media: smiapp: Rename register access functions

Rename register access functions by changing smiapp to ccs.

The functions operating on register addresses have "addr" appended to the
name.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Remove quirk function for writing a single 8-bit register
Sakari Ailus [Tue, 11 Feb 2020 10:14:10 +0000 (11:14 +0100)]
media: smiapp: Remove quirk function for writing a single 8-bit register

This function is no longer needed as the smiapp_write() function can be
used to write 8-bit registers with plain register addresses.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Use CCS registers
Sakari Ailus [Tue, 11 Feb 2020 09:18:31 +0000 (10:18 +0100)]
media: smiapp: Use CCS registers

Switch to CCS standard registers where they exist. The still relevant SMIA
registers are left as-is and the redundant ones are removed.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Use CCS limits in reading binning capabilities
Sakari Ailus [Tue, 11 Feb 2020 09:37:47 +0000 (10:37 +0100)]
media: smiapp: Use CCS limits in reading binning capabilities

Use CCS limits for obtaining binning capabilities and subtypes.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Use CCS limits in reading data format descriptors
Sakari Ailus [Mon, 10 Feb 2020 14:02:32 +0000 (15:02 +0100)]
media: smiapp: Use CCS limits in reading data format descriptors

The CCS limits have the information so use it instead.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Obtain frame descriptor from CCS limits
Sakari Ailus [Mon, 10 Feb 2020 11:53:14 +0000 (12:53 +0100)]
media: smiapp: Obtain frame descriptor from CCS limits

Obtain the frame descriptor from the CCS limits, instead of reading them
directly from the frame descriptor registers.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Switch to CCS limits
Sakari Ailus [Mon, 10 Feb 2020 09:09:03 +0000 (10:09 +0100)]
media: smiapp: Switch to CCS limits

Use the CCS limit definitions instead of the SMIA ones. This allows
accessing CCS capabilities where needed as well as dropping the old SMIA
limits.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Read CCS limit values
Sakari Ailus [Thu, 6 Feb 2020 14:06:12 +0000 (15:06 +0100)]
media: smiapp: Read CCS limit values

Read limit and capability values into a driver allocated buffer. This will
later replace (most of) the existing SMIA limits.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Use MIPI CCS version and manufacturer ID information
Sakari Ailus [Mon, 3 Feb 2020 14:54:53 +0000 (15:54 +0100)]
media: smiapp: Use MIPI CCS version and manufacturer ID information

Read MIPI CCS manufacturer and version information, and use the CCS IDs
over SMIA whenever they are set.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Add macros for accessing CCS registers
Sakari Ailus [Mon, 3 Feb 2020 13:48:48 +0000 (14:48 +0100)]
media: smiapp: Add macros for accessing CCS registers

Add two helper macros for reading and writing the CCS registers as defined
in ccs-regs.h.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Remove macros for defining registers, merge definitions
Sakari Ailus [Thu, 28 May 2020 09:39:00 +0000 (11:39 +0200)]
media: smiapp: Remove macros for defining registers, merge definitions

Remove macros for defining new SMIA registers, instead put the register
flags to the register definition itself. Also move the register flags to
the same file.

This is not expected to be updated but rather left there as a reference.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Calculate CCS limit offsets and limit buffer size
Sakari Ailus [Wed, 5 Feb 2020 14:21:06 +0000 (15:21 +0100)]
media: smiapp: Calculate CCS limit offsets and limit buffer size

Calculate the limit offsets and the size of the limit buffer. CCS limits
are read into this buffer, and the offsets are helpful in accessing the
information in it.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Use CCS register flags
Sakari Ailus [Mon, 3 Feb 2020 11:38:42 +0000 (12:38 +0100)]
media: smiapp: Use CCS register flags

Use the CCS register flags instead of the old smia flags. The
new flags include the register width information that was separate from
the register flags previously.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: smiapp: Import CCS definitions
Sakari Ailus [Thu, 22 Oct 2020 06:57:04 +0000 (08:57 +0200)]
media: smiapp: Import CCS definitions

Import CCS register and limit definitions. These files are generated by a
Perl script based on a text-based register definition file. The generator
was added on
commit 1ec0b899c2b7 ("media: ccs: Add the generator for CCS register definitions and limits")

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: Documentation: ccs: Add CCS driver documentation
Sakari Ailus [Thu, 5 Nov 2020 16:08:23 +0000 (17:08 +0100)]
media: Documentation: ccs: Add CCS driver documentation

Document the MIPI CCS driver and the C register definition generator.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agomedia: ccs: Add the generator for CCS register definitions and limits
Sakari Ailus [Mon, 3 Feb 2020 09:39:24 +0000 (10:39 +0100)]
media: ccs: Add the generator for CCS register definitions and limits

Add register definitions of the MIPI CCS 1.1 standard.

The CCS driver makes extended use of device's capability registers that
are dependent on CCS version. This involves having an in-memory data
structure for limit and capability information, creating that data
structure and accessing it.

The register definitions as well as the definitions of this data structure
are generated from a text file using a Perl script. Add the generator
script to make it easy to update the generated files.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
3 years agoMerge tag 'v5.10-rc6' into patchwork
Mauro Carvalho Chehab [Tue, 1 Dec 2020 15:21:40 +0000 (16:21 +0100)]
Merge tag 'v5.10-rc6' into patchwork

Linux 5.10-rc6

* tag 'v5.10-rc6': (1815 commits)
  Linux 5.10-rc6
  sock: set sk_err to ee_errno on dequeue from errq
  mptcp: fix NULL ptr dereference on bad MPJ
  net: openvswitch: fix TTL decrement action netlink message format
  perf probe: Change function definition check due to broken DWARF
  perf probe: Fix to die_entrypc() returns error correctly
  perf stat: Use proper cpu for shadow stats
  perf record: Synthesize cgroup events only if needed
  perf diff: Fix error return value in __cmd_diff()
  perf tools: Update copy of libbpf's hashmap.c
  x86/mce: Do not overwrite no_way_out if mce_end() fails
  kvm: x86/mmu: Fix get_mmio_spte() on CPUs supporting 5-level PT
  KVM: x86: Fix split-irqchip vs interrupt injection window request
  KVM: x86: handle !lapic_in_kernel case in kvm_cpu_*_extint
  usb: typec: stusb160x: fix power-opmode property with typec-power-opmode
  printk: finalize records with trailing newlines
  can: af_can: can_rx_unregister(): remove WARN() statement from list operation sanity check
  can: m_can: m_can_dev_setup(): add support for bosch mcan version 3.3.0
  can: m_can: fix nominal bitiming tseg2 min for version >= 3.1
  can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq()'s flags
  ...

3 years agoLinux 5.10-rc6
Linus Torvalds [Sun, 29 Nov 2020 23:50:50 +0000 (15:50 -0800)]
Linux 5.10-rc6

3 years agoMerge tag 'locking-urgent-2020-11-29' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 29 Nov 2020 19:19:26 +0000 (11:19 -0800)]
Merge tag 'locking-urgent-2020-11-29' of git://git./linux/kernel/git/tip/tip

Pull locking fixes from Thomas Gleixner:
 "Two more places which invoke tracing from RCU disabled regions in the
  idle path.

  Similar to the entry path the low level idle functions have to be
  non-instrumentable"

* tag 'locking-urgent-2020-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  intel_idle: Fix intel_idle() vs tracing
  sched/idle: Fix arch_cpu_idle() vs tracing

3 years agoMerge tag 'irq-urgent-2020-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 29 Nov 2020 19:06:57 +0000 (11:06 -0800)]
Merge tag 'irq-urgent-2020-11-29' of git://git./linux/kernel/git/tip/tip

Pull irq fixes from Thomas Gleixner:
 "Two fixes for irqchip drivers:

   - Save and restore the GICV3 ITS state unconditionally on
     suspend/resume to handle firmware which fails to do so.

   - Use the correct index into the fwspec parameters to read the irq
     trigger type in the EXIU chip driver"

* tag 'irq-urgent-2020-11-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/gic-v3-its: Unconditionally save/restore the ITS state on suspend
  irqchip/exiu: Fix the index of fwspec for IRQ type

3 years agoMerge tag 'efi-urgent-for-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 29 Nov 2020 18:18:53 +0000 (10:18 -0800)]
Merge tag 'efi-urgent-for-v5.10-rc5' of git://git./linux/kernel/git/tip/tip

Pull EFI fixes from Borislav Petkov:
 "More EFI fixes forwarded from Ard Biesheuvel:

   - revert efivarfs kmemleak fix again - it was a false positive

   - make CONFIG_EFI_EARLYCON depend on CONFIG_EFI explicitly so it does
     not pull in other dependencies unnecessarily if CONFIG_EFI is not
     set

   - defer attempts to load SSDT overrides from EFI vars until after the
     efivar layer is up"

* tag 'efi-urgent-for-v5.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi: EFI_EARLYCON should depend on EFI
  efivarfs: revert "fix memory leak in efivarfs_create()"
  efi/efivars: Set generic ops before loading SSDT

3 years agoMerge tag 'x86_urgent_for_v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 29 Nov 2020 18:08:17 +0000 (10:08 -0800)]
Merge tag 'x86_urgent_for_v5.10-rc6' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Borislav Petkov:
 "A couple of urgent fixes which accumulated this last week:

   - Two resctrl fixes to prevent refcount leaks when manipulating the
     resctrl fs (Xiaochen Shen)

   - Correct prctl(PR_GET_SPECULATION_CTRL) reporting (Anand K Mistry)

   - A fix to not lose already seen MCE severity which determines
     whether the machine can recover (Gabriele Paoloni)"

* tag 'x86_urgent_for_v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mce: Do not overwrite no_way_out if mce_end() fails
  x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb
  x86/resctrl: Add necessary kernfs_put() calls to prevent refcount leak
  x86/resctrl: Remove superfluous kernfs_get() calls to prevent refcount leak

3 years agoMerge tag 'riscv-for-linus-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 28 Nov 2020 23:53:30 +0000 (15:53 -0800)]
Merge tag 'riscv-for-linus-5.10-rc6' of git://git./linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:
 "I've collected a handful of fixes over the past few weeks:

   - A fix to un-break the build-id argument to the vDSO build, which is
     necessary for the LLVM linker.

   - A fix to initialize the jump label subsystem, without which it (and
     all the stuff that uses it) doesn't actually function.

   - A fix to include <asm/barrier.h> from <vdso/processor.h>, without
     which some drivers won't compile"

* tag 'riscv-for-linus-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  RISC-V: fix barrier() use in <vdso/processor.h>
  RISC-V: Add missing jump label initialization
  riscv: Explicitly specify the build id style in vDSO Makefile again

3 years agoMerge tag 'kbuild-fixes-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masah...
Linus Torvalds [Sat, 28 Nov 2020 18:42:30 +0000 (10:42 -0800)]
Merge tag 'kbuild-fixes-v5.10' of git://git./linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Remove unused OBJSIZE variable.

 - Fix rootless deb-pkg build in a setgid directory.

* tag 'kbuild-fixes-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  builddeb: Fix rootless build in setuid/setgid directory
  kbuild: remove unused OBJSIZE

3 years agoMerge tag 'perf-tools-fixes-for-v5.10-2020-11-28' of git://git.kernel.org/pub/scm...
Linus Torvalds [Sat, 28 Nov 2020 18:35:05 +0000 (10:35 -0800)]
Merge tag 'perf-tools-fixes-for-v5.10-2020-11-28' of git://git./linux/kernel/git/acme/linux

Pull perf tool fixes from Arnaldo Carvalho de Melo:

 - Fix die_entrypc() when DW_AT_ranges DWARF attribute not available

 - Cope with broken DWARF (missing DW_AT_declaration) generated by some
   recent gcc versions

 - Do not generate CGROUP metadata events when not asked to in 'perf
   record'

 - Use proper CPU for shadow stats in 'perf stat'

 - Update copy of libbpf's hashmap.c, silencing tools/perf build warning

 - Fix return value in 'perf diff'

* tag 'perf-tools-fixes-for-v5.10-2020-11-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf probe: Change function definition check due to broken DWARF
  perf probe: Fix to die_entrypc() returns error correctly
  perf stat: Use proper cpu for shadow stats
  perf record: Synthesize cgroup events only if needed
  perf diff: Fix error return value in __cmd_diff()
  perf tools: Update copy of libbpf's hashmap.c

3 years agoMerge tag 'usb-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sat, 28 Nov 2020 18:09:38 +0000 (10:09 -0800)]
Merge tag 'usb-5.10-rc6' of git://git./linux/kernel/git/gregkh/usb

Pull USB / PHY driver fixes from Greg KH:
 "Here are a few small USB and PHY driver fixes for 5.10-rc6. They
  include:

   - small PHY driver fixes to resolve reported issues

   - USB quirks added for "broken" devices

   - typec fixes for reported problems

   - USB gadget fixes for small issues

  Full details are in the shortlog, nothing major in here and all have
  been in linux-next with no reported issues"

* tag 'usb-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: typec: stusb160x: fix power-opmode property with typec-power-opmode
  USB: core: Change %pK for __user pointers to %px
  USB: core: Fix regression in Hercules audio card
  usb: gadget: Fix memleak in gadgetfs_fill_super
  usb: gadget: f_midi: Fix memleak in f_midi_alloc
  USB: quirks: Add USB_QUIRK_DISCONNECT_SUSPEND quirk for Lenovo A630Z TIO built-in usb-audio card
  usb: typec: qcom-pmic-typec: fix builtin build errors
  phy: mediatek: fix spelling mistake in Kconfig "veriosn" -> "version"
  phy: qualcomm: Fix 28 nm Hi-Speed USB PHY OF dependency
  phy: qualcomm: usb: Fix SuperSpeed PHY OF dependency
  phy: intel: PHY_INTEL_KEEMBAY_EMMC should depend on ARCH_KEEMBAY
  usb: cdns3: gadget: calculate TD_SIZE based on TD
  usb: cdns3: gadget: initialize link_trb as NULL
  phy: cpcap-usb: Use IRQF_ONESHOT
  phy: qcom-qmp: Initialize another pointer to NULL
  phy: tegra: xusb: Fix dangling pointer on probe failure
  phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211

3 years agoMerge tag 'char-misc-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Sat, 28 Nov 2020 18:04:36 +0000 (10:04 -0800)]
Merge tag 'char-misc-5.10-rc6' of git://git./linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are some small misc driver fixes for 5.10-rc6.  They include:

   - interconnect fixes for reported problems

   - habanalabs bugfix for found issue when doing the switch fallthrough
     patches

   - MAINTAINERS file update for coresight reviewers/maintainers

  All have been in linux-next with no reported issues"

* tag 'char-misc-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  MAINTAINERS: Adding help for coresight subsystem
  habanalabs/gaudi: fix missing code in ECC handling
  interconnect: fix memory trashing in of_count_icc_providers()
  interconnect: qcom: qcs404: Remove GPU and display RPM IDs
  interconnect: qcom: msm8916: Remove rpm-ids from non-RPM nodes
  interconnect: qcom: msm8974: Don't boost the NoC rate during boot
  interconnect: qcom: msm8974: Prevent integer overflow in rate

3 years agoMerge tag 'asm-generic-fixes-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 27 Nov 2020 23:00:35 +0000 (15:00 -0800)]
Merge tag 'asm-generic-fixes-5.10-2' of git://git./linux/kernel/git/arnd/asm-generic

Pull asm-generic fix from Arnd Bergmann:
 "Add correct MAX_POSSIBLE_PHYSMEM_BITS setting to asm-generic.

  This is a single bugfix for a bug that Stefan Agner found on 32-bit
  Arm, but that exists on several other architectures"

* tag 'asm-generic-fixes-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
  arch: pgtable: define MAX_POSSIBLE_PHYSMEM_BITS where needed

3 years agoMerge tag 'arm-soc-fixes-v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 27 Nov 2020 22:48:03 +0000 (14:48 -0800)]
Merge tag 'arm-soc-fixes-v5.10-3' of git://git./linux/kernel/git/soc/soc

Pull ARM SoC fixes from Arnd Bergmann:
 "Another set of patches for devicetree files and Arm SoC specific
  drivers:

   - A fix for OP-TEE shared memory on non-SMP systems

   - multiple code fixes for the OMAP platform, including one regression
     for the CPSW network driver and a few runtime warning fixes

   - Some DT patches for the Rockchip RK3399 platform, in particular
     fixing the MMC device ordering that recently became
     nondeterministic with async probe.

   - Multiple DT fixes for the Tegra platform, including a regression
     fix for suspend/resume on TX2

   - A regression fix for a user-triggered fault in the NXP dpio driver

   - A regression fix for a bug caused by an earlier bug fix in the
     xilinx firmware driver

   - Two more DTC warning fixes

   - Sylvain Lemieux steps down as maintainer for the NXP LPC32xx
     platform"

* tag 'arm-soc-fixes-v5.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (24 commits)
  arm64: tegra: Fix Tegra234 VDK node names
  arm64: tegra: Wrong AON HSP reg property size
  arm64: tegra: Fix USB_VBUS_EN0 regulator on Jetson TX1
  arm64: tegra: Correct the UART for Jetson Xavier NX
  arm64: tegra: Disable the ACONNECT for Jetson TX2
  optee: add writeback to valid memory type
  firmware: xilinx: Use hash-table for api feature check
  firmware: xilinx: Fix SD DLL node reset issue
  soc: fsl: dpio: Get the cpumask through cpumask_of(cpu)
  ARM: dts: dra76x: m_can: fix order of clocks
  bus: ti-sysc: suppress err msg for timers used as clockevent/source
  MAINTAINERS: Remove myself as LPC32xx maintainers
  arm64: dts: qcom: clear the warnings caused by empty dma-ranges
  arm64: dts: broadcom: clear the warnings caused by empty dma-ranges
  ARM: dts: am437x-l4: fix compatible for cpsw switch dt node
  arm64: dts: rockchip: Reorder LED triggers from mmc devices on rk3399-roc-pc.
  arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.
  arm64: dts: rockchip: Remove system-power-controller from pmic on Odroid Go Advance
  arm64: dts: rockchip: fix NanoPi R2S GMAC clock name
  ARM: OMAP2+: Manage MPU state properly for omap_enter_idle_coupled()
  ...

3 years agoMerge tag 'net-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Linus Torvalds [Fri, 27 Nov 2020 22:38:02 +0000 (14:38 -0800)]
Merge tag 'net-5.10-rc6' of git://git./linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Networking fixes for 5.10-rc6, including fixes from the WiFi driver,
  and CAN subtrees.

  Current release - regressions:

   - gro_cells: reduce number of synchronize_net() calls

   - ch_ktls: release a lock before jumping to an error path

  Current release - always broken:

   - tcp: Allow full IP tos/IPv6 tclass to be reflected in L3 header

  Previous release - regressions:

   - net/tls: fix missing received data after fast remote close

   - vsock/virtio: discard packets only when socket is really closed

   - sock: set sk_err to ee_errno on dequeue from errq

   - cxgb4: fix the panic caused by non smac rewrite

  Previous release - always broken:

   - tcp: fix corner cases around setting ECN with BPF selection of
     congestion control

   - tcp: fix race condition when creating child sockets from syncookies
     on loopback interface

   - usbnet: ipheth: fix connectivity with iOS 14

   - tun: honor IOCB_NOWAIT flag

   - net/packet: fix packet receive on L3 devices without visible hard
     header

   - devlink: Make sure devlink instance and port are in same net
     namespace

   - net: openvswitch: fix TTL decrement action netlink message format

   - bonding: wait for sysfs kobject destruction before freeing struct
     slave

   - net: stmmac: fix upstream patch applied to the wrong context

   - bnxt_en: fix return value and unwind in probe error paths

  Misc:

   - devlink: add extra layer of categorization to the reload stats uAPI
     before it's released"

* tag 'net-5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (68 commits)
  sock: set sk_err to ee_errno on dequeue from errq
  mptcp: fix NULL ptr dereference on bad MPJ
  net: openvswitch: fix TTL decrement action netlink message format
  can: af_can: can_rx_unregister(): remove WARN() statement from list operation sanity check
  can: m_can: m_can_dev_setup(): add support for bosch mcan version 3.3.0
  can: m_can: fix nominal bitiming tseg2 min for version >= 3.1
  can: m_can: m_can_open(): remove IRQF_TRIGGER_FALLING from request_threaded_irq()'s flags
  can: mcp251xfd: mcp251xfd_probe(): bail out if no IRQ was given
  can: gs_usb: fix endianess problem with candleLight firmware
  ch_ktls: lock is not freed
  net/tls: Protect from calling tls_dev_del for TLS RX twice
  devlink: Make sure devlink instance and port are in same net namespace
  devlink: Hold rtnl lock while reading netdev attributes
  ptp: clockmatrix: bug fix for idtcm_strverscmp
  enetc: Let the hardware auto-advance the taprio base-time of 0
  gro_cells: reduce number of synchronize_net() calls
  net: stmmac: fix incorrect merge of patch upstream
  ipv6: addrlabel: fix possible memory leak in ip6addrlbl_net_init
  Documentation: netdev-FAQ: suggest how to post co-dependent series
  ibmvnic: enhance resetting status check during module exit
  ...

3 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Fri, 27 Nov 2020 22:06:23 +0000 (14:06 -0800)]
Merge tag 'scsi-fixes' of git://git./linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Three small fixes in the UFS driver: two are for power management
  issues and the third is to fix a slew of problem in the sysfs code"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: ufs: Fix race between shutdown and runtime resume flow
  scsi: ufs: Make sure clk scaling happens only when HBA is runtime ACTIVE
  scsi: ufs: Fix unexpected values from ufshcd_read_desc_param()