* [PATCH] uvcvideo: check minimum border of control
@ 2010-01-26 21:37 Németh Márton
2010-01-29 16:09 ` Mauro Carvalho Chehab
2010-02-03 0:17 ` Laurent Pinchart
0 siblings, 2 replies; 7+ messages in thread
From: Németh Márton @ 2010-01-26 21:37 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: V4L Mailing List
Check also the minimum border of a value before setting it
to a control value.
See also http://bugzilla.kernel.org/show_bug.cgi?id=12824 .
Signed-off-by: Márton Németh <nm127@freemail.hu>
---
drivers/media/video/uvc/uvc_ctrl.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c
--- a/drivers/media/video/uvc/uvc_ctrl.c
+++ b/drivers/media/video/uvc/uvc_ctrl.c
@@ -1068,6 +1068,8 @@ int uvc_ctrl_set(struct uvc_video_chain *chain,
uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES));
xctrl->value = min + (xctrl->value - min + step/2) / step * step;
+ if (xctrl->value < min)
+ xctrl->value = min;
if (xctrl->value > max)
xctrl->value = max;
value = xctrl->value;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] uvcvideo: check minimum border of control
2010-01-26 21:37 [PATCH] uvcvideo: check minimum border of control Németh Márton
@ 2010-01-29 16:09 ` Mauro Carvalho Chehab
2010-01-29 17:03 ` Németh Márton
2010-02-03 0:17 ` Laurent Pinchart
1 sibling, 1 reply; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2010-01-29 16:09 UTC (permalink / raw)
To: Németh Márton; +Cc: Laurent Pinchart, V4L Mailing List
Németh Márton wrote:
> Check also the minimum border of a value before setting it
> to a control value.
>
> See also http://bugzilla.kernel.org/show_bug.cgi?id=12824 .
Patch didn't apply. Had you generated against our -git tree?
http://git.linuxtv.org/v4l-dvb.git
Cheers,
Mauro.
>
> Signed-off-by: Márton Németh <nm127@freemail.hu>
> ---
> drivers/media/video/uvc/uvc_ctrl.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c
> --- a/drivers/media/video/uvc/uvc_ctrl.c
> +++ b/drivers/media/video/uvc/uvc_ctrl.c
> @@ -1068,6 +1068,8 @@ int uvc_ctrl_set(struct uvc_video_chain *chain,
> uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES));
>
> xctrl->value = min + (xctrl->value - min + step/2) / step * step;
> + if (xctrl->value < min)
> + xctrl->value = min;
> if (xctrl->value > max)
> xctrl->value = max;
> value = xctrl->value;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] uvcvideo: check minimum border of control
2010-01-29 16:09 ` Mauro Carvalho Chehab
@ 2010-01-29 17:03 ` Németh Márton
2010-01-29 17:06 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 7+ messages in thread
From: Németh Márton @ 2010-01-29 17:03 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Laurent Pinchart, V4L Mailing List
Mauro Carvalho Chehab wrote:
> Németh Márton wrote:
>> Check also the minimum border of a value before setting it
>> to a control value.
>>
>> See also http://bugzilla.kernel.org/show_bug.cgi?id=12824 .
>
> Patch didn't apply. Had you generated against our -git tree?
> http://git.linuxtv.org/v4l-dvb.git
No, this is against http://git.linuxtv.org/pinchartl/uvcvideo.git .
The latest patch which tried to fix http://bugzilla.kernel.org/show_bug.cgi?id=12824
missed to check the minimum border.
Regards,
Márton Németh
>> Signed-off-by: Márton Németh <nm127@freemail.hu>
>> ---
>> drivers/media/video/uvc/uvc_ctrl.c | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c
>> --- a/drivers/media/video/uvc/uvc_ctrl.c
>> +++ b/drivers/media/video/uvc/uvc_ctrl.c
>> @@ -1068,6 +1068,8 @@ int uvc_ctrl_set(struct uvc_video_chain *chain,
>> uvc_ctrl_data(ctrl, UVC_CTRL_DATA_RES));
>>
>> xctrl->value = min + (xctrl->value - min + step/2) / step * step;
>> + if (xctrl->value < min)
>> + xctrl->value = min;
>> if (xctrl->value > max)
>> xctrl->value = max;
>> value = xctrl->value;
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] uvcvideo: check minimum border of control
2010-01-29 17:03 ` Németh Márton
@ 2010-01-29 17:06 ` Mauro Carvalho Chehab
2010-01-29 17:12 ` Németh Márton
0 siblings, 1 reply; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2010-01-29 17:06 UTC (permalink / raw)
To: Németh Márton; +Cc: Laurent Pinchart, V4L Mailing List
Németh Márton wrote:
> Mauro Carvalho Chehab wrote:
>> Németh Márton wrote:
>>> Check also the minimum border of a value before setting it
>>> to a control value.
>>>
>>> See also http://bugzilla.kernel.org/show_bug.cgi?id=12824 .
>> Patch didn't apply. Had you generated against our -git tree?
>> http://git.linuxtv.org/v4l-dvb.git
>
> No, this is against http://git.linuxtv.org/pinchartl/uvcvideo.git .
> The latest patch which tried to fix http://bugzilla.kernel.org/show_bug.cgi?id=12824
> missed to check the minimum border.
Ah, ok. Please specify on the subject when you're writing patches against
a different tree. This helps me to tag accordingly at Patchwork,
saving me some time.
>
> Regards,
>
> Márton Németh
>
>>> Signed-off-by: Márton Németh <nm127@freemail.hu>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] uvcvideo: check minimum border of control
2010-01-29 17:06 ` Mauro Carvalho Chehab
@ 2010-01-29 17:12 ` Németh Márton
2010-01-29 17:20 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 7+ messages in thread
From: Németh Márton @ 2010-01-29 17:12 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Laurent Pinchart, V4L Mailing List
Mauro Carvalho Chehab wrote:
> Németh Márton wrote:
>> Mauro Carvalho Chehab wrote:
>>> Németh Márton wrote:
>>>> Check also the minimum border of a value before setting it
>>>> to a control value.
>>>>
>>>> See also http://bugzilla.kernel.org/show_bug.cgi?id=12824 .
>>> Patch didn't apply. Had you generated against our -git tree?
>>> http://git.linuxtv.org/v4l-dvb.git
>> No, this is against http://git.linuxtv.org/pinchartl/uvcvideo.git .
>> The latest patch which tried to fix http://bugzilla.kernel.org/show_bug.cgi?id=12824
>> missed to check the minimum border.
>
> Ah, ok. Please specify on the subject when you're writing patches against
> a different tree. This helps me to tag accordingly at Patchwork,
Could you please give me an example what do you mean? For example in
this case.
Regards,
Márton Németh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] uvcvideo: check minimum border of control
2010-01-29 17:12 ` Németh Márton
@ 2010-01-29 17:20 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 7+ messages in thread
From: Mauro Carvalho Chehab @ 2010-01-29 17:20 UTC (permalink / raw)
To: Németh Márton; +Cc: Laurent Pinchart, V4L Mailing List
Németh Márton wrote:
> Mauro Carvalho Chehab wrote:
>> Németh Márton wrote:
>>> Mauro Carvalho Chehab wrote:
>>>> Németh Márton wrote:
>>>>> Check also the minimum border of a value before setting it
>>>>> to a control value.
>>>>>
>>>>> See also http://bugzilla.kernel.org/show_bug.cgi?id=12824 .
>>>> Patch didn't apply. Had you generated against our -git tree?
>>>> http://git.linuxtv.org/v4l-dvb.git
>>> No, this is against http://git.linuxtv.org/pinchartl/uvcvideo.git .
>>> The latest patch which tried to fix http://bugzilla.kernel.org/show_bug.cgi?id=12824
>>> missed to check the minimum border.
>> Ah, ok. Please specify on the subject when you're writing patches against
>> a different tree. This helps me to tag accordingly at Patchwork,
>
> Could you please give me an example what do you mean? For example in
> this case.
You could for example, use at the subject:
[PATCH uvc tree] <patch description>
This helps me to not assume that it is against the upstream tree.
--
Cheers,
Mauro
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] uvcvideo: check minimum border of control
2010-01-26 21:37 [PATCH] uvcvideo: check minimum border of control Németh Márton
2010-01-29 16:09 ` Mauro Carvalho Chehab
@ 2010-02-03 0:17 ` Laurent Pinchart
1 sibling, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2010-02-03 0:17 UTC (permalink / raw)
To: Németh Márton; +Cc: V4L Mailing List
Hi Márton,
On Tuesday 26 January 2010 22:37:52 Németh Márton wrote:
> Check also the minimum border of a value before setting it
> to a control value.
>
> See also http://bugzilla.kernel.org/show_bug.cgi?id=12824 .
>
> Signed-off-by: Márton Németh <nm127@freemail.hu>
I've updated the previous patch in the uvcvideo git repository, could you
please test it ?
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-02-03 0:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-26 21:37 [PATCH] uvcvideo: check minimum border of control Németh Márton
2010-01-29 16:09 ` Mauro Carvalho Chehab
2010-01-29 17:03 ` Németh Márton
2010-01-29 17:06 ` Mauro Carvalho Chehab
2010-01-29 17:12 ` Németh Márton
2010-01-29 17:20 ` Mauro Carvalho Chehab
2010-02-03 0:17 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox