[Regression] DVBSky S960CI hard broken in 4.18

2018-09-30 Thread Oliver Freyermuth
Hi all,

sorry to bump this, but I wonder whether I could help by submitting a [PATCH] 
reverting the buggy change from 7d95fb7 ? 
As discussed in https://bugzilla.kernel.org/show_bug.cgi?id=199323 , the 
widespread card is unusable since 7d95fb7 . 

Please include me in any replies, I am not subscribed to the list. 

Cheers,
Oliver

Am 24.09.18 um 22:26 schrieb Oliver Freyermuth:
> Dear DVB experts,
> 
> commit:
> 7d95fb7 - media: dvbsky: use just one mutex for serializing device R/W ops
> hard breaks DVBSky cards. 
> Also the previous locking commits have caused several runtime issues. 
> 
> Since the bug tracker is not regularly checked, I'd love to make everybody 
> aware of the corresponding issue
> with much more detail: 
> https://bugzilla.kernel.org/show_bug.cgi?id=199323
> which has gotten large attention from several users. 
> 
> From my side, I can confirm that reverting 7d95fb7 makes the card work again 
> for me. on 4.18. 
> With 7d95fb7 applied, the card tunes fine, but does not deliver any data. 
> 
> Please include me in any replies, I am not subscribed to the list. 
> 
> Cheers and all the best,
>   Oliver
> 


Re: [PATCH] media: uvcvideo: Support UVC 1.5 video probe & commit controls

2018-09-30 Thread Greg KH
On Sun, Sep 30, 2018 at 01:38:16PM +0300, Laurent Pinchart wrote:
> From: ming_qian 
> 
> commit f620d1d7afc7db57ab59f35000752840c91f67e7 upstream.
> 
> The length of UVC 1.5 video control is 48, and it is 34 for UVC 1.1.
> Change it to 48 for UVC 1.5 device, and the UVC 1.5 device can be
> recognized.
> 
> More changes to the driver are needed for full UVC 1.5 compatibility.
> However, at least the UVC 1.5 Realtek RTS5847/RTS5852 cameras have been
> reported to work well.
> 
> [laurent.pinch...@ideasonboard.com: Factor out code to helper function, 
> update size checks]
> 
> Signed-off-by: ming_qian 
> Signed-off-by: Laurent Pinchart 
> Tested-by: Kai-Heng Feng 
> Tested-by: Ana Guerrero Lopez 
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  drivers/media/usb/uvc/uvc_video.c | 24 ++--
>  1 file changed, 18 insertions(+), 6 deletions(-)
> 
> Hello,
> 
> This patch was originally marked as a stable candidate, but a driver-wide
> switch from __u{8,16,32} to u{8,16,32} created conflicts that prevented
> backporting. This version fixes the conflicts and is otherwise not modified.
> 
> The decision to mark the patch as a stable candidate came after reports from
> distro users that their UVC 1.5 camera was otherwise unusable. A guide has
> even been published to tell Debian users how to patch their kernel to fix the
> problem. Including the fix in stable will make their life much easier.

Now queued up, thanks.

greg k-h


[PATCH] media: uvcvideo: Support UVC 1.5 video probe & commit controls

2018-09-30 Thread Laurent Pinchart
From: ming_qian 

commit f620d1d7afc7db57ab59f35000752840c91f67e7 upstream.

The length of UVC 1.5 video control is 48, and it is 34 for UVC 1.1.
Change it to 48 for UVC 1.5 device, and the UVC 1.5 device can be
recognized.

More changes to the driver are needed for full UVC 1.5 compatibility.
However, at least the UVC 1.5 Realtek RTS5847/RTS5852 cameras have been
reported to work well.

[laurent.pinch...@ideasonboard.com: Factor out code to helper function, update 
size checks]

Signed-off-by: ming_qian 
Signed-off-by: Laurent Pinchart 
Tested-by: Kai-Heng Feng 
Tested-by: Ana Guerrero Lopez 
Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/uvc/uvc_video.c | 24 ++--
 1 file changed, 18 insertions(+), 6 deletions(-)

Hello,

This patch was originally marked as a stable candidate, but a driver-wide
switch from __u{8,16,32} to u{8,16,32} created conflicts that prevented
backporting. This version fixes the conflicts and is otherwise not modified.

The decision to mark the patch as a stable candidate came after reports from
distro users that their UVC 1.5 camera was otherwise unusable. A guide has
even been published to tell Debian users how to patch their kernel to fix the
problem. Including the fix in stable will make their life much easier.

diff --git a/drivers/media/usb/uvc/uvc_video.c 
b/drivers/media/usb/uvc/uvc_video.c
index fb86d6af398d..a6d800291883 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -163,14 +163,27 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming 
*stream,
}
 }
 
+static size_t uvc_video_ctrl_size(struct uvc_streaming *stream)
+{
+   /*
+* Return the size of the video probe and commit controls, which depends
+* on the protocol version.
+*/
+   if (stream->dev->uvc_version < 0x0110)
+   return 26;
+   else if (stream->dev->uvc_version < 0x0150)
+   return 34;
+   else
+   return 48;
+}
+
 static int uvc_get_video_ctrl(struct uvc_streaming *stream,
struct uvc_streaming_control *ctrl, int probe, __u8 query)
 {
+   __u16 size = uvc_video_ctrl_size(stream);
__u8 *data;
-   __u16 size;
int ret;
 
-   size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
if ((stream->dev->quirks & UVC_QUIRK_PROBE_DEF) &&
query == UVC_GET_DEF)
return -EIO;
@@ -225,7 +238,7 @@ static int uvc_get_video_ctrl(struct uvc_streaming *stream,
ctrl->dwMaxVideoFrameSize = get_unaligned_le32(&data[18]);
ctrl->dwMaxPayloadTransferSize = get_unaligned_le32(&data[22]);
 
-   if (size == 34) {
+   if (size >= 34) {
ctrl->dwClockFrequency = get_unaligned_le32(&data[26]);
ctrl->bmFramingInfo = data[30];
ctrl->bPreferedVersion = data[31];
@@ -254,11 +267,10 @@ static int uvc_get_video_ctrl(struct uvc_streaming 
*stream,
 static int uvc_set_video_ctrl(struct uvc_streaming *stream,
struct uvc_streaming_control *ctrl, int probe)
 {
+   __u16 size = uvc_video_ctrl_size(stream);
__u8 *data;
-   __u16 size;
int ret;
 
-   size = stream->dev->uvc_version >= 0x0110 ? 34 : 26;
data = kzalloc(size, GFP_KERNEL);
if (data == NULL)
return -ENOMEM;
@@ -275,7 +287,7 @@ static int uvc_set_video_ctrl(struct uvc_streaming *stream,
put_unaligned_le32(ctrl->dwMaxVideoFrameSize, &data[18]);
put_unaligned_le32(ctrl->dwMaxPayloadTransferSize, &data[22]);
 
-   if (size == 34) {
+   if (size >= 34) {
put_unaligned_le32(ctrl->dwClockFrequency, &data[26]);
data[30] = ctrl->bmFramingInfo;
data[31] = ctrl->bPreferedVersion;
-- 
Regards,

Laurent Pinchart



Re: [PATCH] MAINTAINERS: Remove stale file entry for the Atmel ISI driver

2018-09-30 Thread Joe Perches
On Sun, 2018-09-30 at 06:30 -0300, Mauro Carvalho Chehab wrote:
> Em Sun, 30 Sep 2018 09:54:48 +0300
> Laurent Pinchart  escreveu:
> 
> > include/media/atmel-isi got removed three years ago without the
> > MAINTAINERS file being updated. Remove the stale entry.
> > 
> > Fixes: 40a78f36fc92 ("[media] v4l: atmel-isi: Remove support for platform 
> > data")
> > Reported-by: Joe Perches 
> > Signed-off-by: Laurent Pinchart 
> > ---
> >  MAINTAINERS | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > 
> > diff --git a/MAINTAINERS b/MAINTAINERS
[]
> > @@ -2497,7 +2497,6 @@ M:Ludovic Desroches 
> > 
> >  L: linux-media@vger.kernel.org
> >  S: Supported
> >  F: drivers/media/platform/atmel/atmel-isi.c
> > -F: include/media/atmel-isi.h
> 
> I guess the right fix would be to replace it by:
> 
> F: drivers/media/platform/atmel/atmel-isi.h

Or replace both F entries with:

F:  drivers/media/platform/atmel/atmel-isi.*

Or combine the 2 MICROCHIP sections into one

MICROCHIP ISC DRIVER
M:  Eugen Hristev 
L:  linux-media@vger.kernel.org
S:  Supported
F:  drivers/media/platform/atmel/atmel-isc.c
F:  drivers/media/platform/atmel/atmel-isc-regs.h
F:  devicetree/bindings/media/atmel-isc.txt

MICROCHIP ISI DRIVER
M:  Eugen Hristev 
L:  linux-media@vger.kernel.org
S:  Supported
F:  drivers/media/platform/atmel/atmel-isi.c
F:  include/media/atmel-isi.h

and maybe use something like:

MICROCHIP MEDIA DRIVERS
M:  Eugen Hristev 
L:  
linux-media@vger.kernel.org
S:  Supported
F:  drivers/media/platform/atmel/
F:  devicetree/bindings/media/atmel-isc.txt




Re: [PATCH] MAINTAINERS: Remove stale file entry for the Atmel ISI driver

2018-09-30 Thread Mauro Carvalho Chehab
Em Sun, 30 Sep 2018 09:54:48 +0300
Laurent Pinchart  escreveu:

> include/media/atmel-isi got removed three years ago without the
> MAINTAINERS file being updated. Remove the stale entry.
> 
> Fixes: 40a78f36fc92 ("[media] v4l: atmel-isi: Remove support for platform 
> data")
> Reported-by: Joe Perches 
> Signed-off-by: Laurent Pinchart 
> ---
>  MAINTAINERS | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 9989925f658d..1f5da095aff7 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2497,7 +2497,6 @@ M:  Ludovic Desroches 
> 
>  L:   linux-media@vger.kernel.org
>  S:   Supported
>  F:   drivers/media/platform/atmel/atmel-isi.c
> -F:   include/media/atmel-isi.h

I guess the right fix would be to replace it by:

F: drivers/media/platform/atmel/atmel-isi.h

>  
>  ATMEL LCDFB DRIVER
>  M:   Nicolas Ferre 



Thanks,
Mauro