Linux-Media Archive on lore.kernel.org
 help / Atom feed
* [PATCH] vivid: do not implement VIDIOC_S_PARM for output streams
@ 2019-01-11 11:37 Hans Verkuil
  2019-01-11 20:13 ` Nicolas Dufresne
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2019-01-11 11:37 UTC (permalink / raw)
  To: Linux Media Mailing List

v4l2_compliance gave a warning for the S_PARM test for output streams:

warn: v4l2-test-formats.cpp(1235): S_PARM is supported for buftype 2, but not for ENUM_FRAMEINTERVALS

The reason is that vivid mapped s_parm for output streams to g_parm. But if
S_PARM doesn't actually change anything, then it shouldn't be enabled at all.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c
index c931f007e5b0..7da5720b47a2 100644
--- a/drivers/media/platform/vivid/vivid-core.c
+++ b/drivers/media/platform/vivid/vivid-core.c
@@ -371,7 +371,7 @@ static int vidioc_s_parm(struct file *file, void *fh,

 	if (vdev->vfl_dir == VFL_DIR_RX)
 		return vivid_vid_cap_s_parm(file, fh, parm);
-	return vivid_vid_out_g_parm(file, fh, parm);
+	return -ENOTTY;
 }

 static int vidioc_log_status(struct file *file, void *fh)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vivid: do not implement VIDIOC_S_PARM for output streams
  2019-01-11 11:37 [PATCH] vivid: do not implement VIDIOC_S_PARM for output streams Hans Verkuil
@ 2019-01-11 20:13 ` Nicolas Dufresne
  2019-01-11 20:16   ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Dufresne @ 2019-01-11 20:13 UTC (permalink / raw)
  To: Hans Verkuil, Linux Media Mailing List

Le vendredi 11 janvier 2019 à 12:37 +0100, Hans Verkuil a écrit :
> v4l2_compliance gave a warning for the S_PARM test for output streams:
> 
> warn: v4l2-test-formats.cpp(1235): S_PARM is supported for buftype 2, but not for ENUM_FRAMEINTERVALS
> 
> The reason is that vivid mapped s_parm for output streams to g_parm. But if
> S_PARM doesn't actually change anything, then it shouldn't be enabled at all.

Though now, a vivid output reflect even less an output HW, for which I
would expect S_PARM to be used to configure the HW transmission clock.

> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> ---
> diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c
> index c931f007e5b0..7da5720b47a2 100644
> --- a/drivers/media/platform/vivid/vivid-core.c
> +++ b/drivers/media/platform/vivid/vivid-core.c
> @@ -371,7 +371,7 @@ static int vidioc_s_parm(struct file *file, void *fh,
> 
>  	if (vdev->vfl_dir == VFL_DIR_RX)
>  		return vivid_vid_cap_s_parm(file, fh, parm);
> -	return vivid_vid_out_g_parm(file, fh, parm);
> +	return -ENOTTY;
>  }
> 
>  static int vidioc_log_status(struct file *file, void *fh)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vivid: do not implement VIDIOC_S_PARM for output streams
  2019-01-11 20:13 ` Nicolas Dufresne
@ 2019-01-11 20:16   ` Hans Verkuil
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2019-01-11 20:16 UTC (permalink / raw)
  To: Nicolas Dufresne, Linux Media Mailing List

On 1/11/19 9:13 PM, Nicolas Dufresne wrote:
> Le vendredi 11 janvier 2019 à 12:37 +0100, Hans Verkuil a écrit :
>> v4l2_compliance gave a warning for the S_PARM test for output streams:
>>
>> warn: v4l2-test-formats.cpp(1235): S_PARM is supported for buftype 2, but not for ENUM_FRAMEINTERVALS
>>
>> The reason is that vivid mapped s_parm for output streams to g_parm. But if
>> S_PARM doesn't actually change anything, then it shouldn't be enabled at all.
> 
> Though now, a vivid output reflect even less an output HW, for which I
> would expect S_PARM to be used to configure the HW transmission clock.

That's done via VIDIOC_S_STD or VIDIOC_S_DV_TIMINGS, not via VIDIOC_S_PARM.

S_PARM for an output really makes no sense. At least, I can't think of any.

Regards,

	Hans

> 
>>
>> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
>> ---
>> diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c
>> index c931f007e5b0..7da5720b47a2 100644
>> --- a/drivers/media/platform/vivid/vivid-core.c
>> +++ b/drivers/media/platform/vivid/vivid-core.c
>> @@ -371,7 +371,7 @@ static int vidioc_s_parm(struct file *file, void *fh,
>>
>>  	if (vdev->vfl_dir == VFL_DIR_RX)
>>  		return vivid_vid_cap_s_parm(file, fh, parm);
>> -	return vivid_vid_out_g_parm(file, fh, parm);
>> +	return -ENOTTY;
>>  }
>>
>>  static int vidioc_log_status(struct file *file, void *fh)
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 11:37 [PATCH] vivid: do not implement VIDIOC_S_PARM for output streams Hans Verkuil
2019-01-11 20:13 ` Nicolas Dufresne
2019-01-11 20:16   ` Hans Verkuil

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org linux-media@archiver.kernel.org
	public-inbox-index linux-media


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/ public-inbox