stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2 1/2] media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect
Date: Tue, 8 Sep 2020 11:32:58 +0200	[thread overview]
Message-ID: <b393a148-12a4-e995-6ff2-a79104097776@redhat.com> (raw)
In-Reply-To: <20200728195818.GO13753@pendragon.ideasonboard.com>

Hi,

On 7/28/20 9:58 PM, Laurent Pinchart wrote:
> Hi Hans,
> 
> Thank you for the patch.
> 
> On Tue, Jul 28, 2020 at 01:22:08PM +0200, Hans de Goede wrote:
>> uvc_ctrl_add_info() calls uvc_ctrl_get_flags() which will override
>> the fixed-up flags set by uvc_ctrl_fixup_xu_info().
>>
>> uvc_ctrl_init_xu_ctrl() already calls uvc_ctrl_get_flags() before
>> calling uvc_ctrl_add_info(), so the uvc_ctrl_get_flags() call in
>> uvc_ctrl_add_info() is not necessary for xu ctrls.
>>
>> This commit moves the uvc_ctrl_get_flags() call for normal controls
>> from uvc_ctrl_add_info() to uvc_ctrl_init_ctrl(), so that we no longer
>> call uvc_ctrl_get_flags() twice for xu controls and so that we no longer
>> override the fixed-up flags set by uvc_ctrl_fixup_xu_info().
>>
>> This fixes the xu motor controls not working properly on a Logitech
>> 046d:08cc, and presumably also on the other Logitech models which have
>> a quirk for this in the uvc_ctrl_fixup_xu_info() function.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

The first patch in this series is a bug-fix for a real-world issue,
and I'm still not seeing this in -next, let alone in a fixed branch for Linus.

Can we get these 2 patches merged please?

Regards,

Hans



> 
>> ---
>> Changes in v2:
>> - Move the uvc_ctrl_get_flags() call for normal controls to uvc_ctrl_init_ctrl()
>> ---
>>   drivers/media/usb/uvc/uvc_ctrl.c | 14 +++++++-------
>>   1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
>> index e399b9fad757..b78aba991212 100644
>> --- a/drivers/media/usb/uvc/uvc_ctrl.c
>> +++ b/drivers/media/usb/uvc/uvc_ctrl.c
>> @@ -2024,13 +2024,6 @@ static int uvc_ctrl_add_info(struct uvc_device *dev, struct uvc_control *ctrl,
>>   		goto done;
>>   	}
>>   
>> -	/*
>> -	 * Retrieve control flags from the device. Ignore errors and work with
>> -	 * default flag values from the uvc_ctrl array when the device doesn't
>> -	 * properly implement GET_INFO on standard controls.
>> -	 */
>> -	uvc_ctrl_get_flags(dev, ctrl, &ctrl->info);
>> -
>>   	ctrl->initialized = 1;
>>   
>>   	uvc_trace(UVC_TRACE_CONTROL, "Added control %pUl/%u to device %s "
>> @@ -2253,6 +2246,13 @@ static void uvc_ctrl_init_ctrl(struct uvc_device *dev, struct uvc_control *ctrl)
>>   		if (uvc_entity_match_guid(ctrl->entity, info->entity) &&
>>   		    ctrl->index == info->index) {
>>   			uvc_ctrl_add_info(dev, ctrl, info);
>> +			/*
>> +			 * Retrieve control flags from the device. Ignore errors
>> +			 * and work with default flag values from the uvc_ctrl
>> +			 * array when the device doesn't properly implement
>> +			 * GET_INFO on standard controls.
>> +			 */
>> +			uvc_ctrl_get_flags(dev, ctrl, &ctrl->info);
>>   			break;
>>   		 }
>>   	}
> 


  reply	other threads:[~2020-09-08  9:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28 11:22 [PATCH v2 1/2] media: uvcvideo: Fix uvc_ctrl_fixup_xu_info() not having any effect Hans de Goede
2020-07-28 19:58 ` Laurent Pinchart
2020-09-08  9:32   ` Hans de Goede [this message]
2020-09-08 19:36     ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b393a148-12a4-e995-6ff2-a79104097776@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).