Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp648875imm; Tue, 5 Jun 2018 02:02:38 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI+iDVfE8vT7/r+Sk21RkmRdz3/wSR7x32mgo/ofRel4TU08VEaQfyRZhdkt1vGWdLxFfcc X-Received: by 2002:a63:a74c:: with SMTP id w12-v6mr20327479pgo.374.1528189358815; Tue, 05 Jun 2018 02:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528189358; cv=none; d=google.com; s=arc-20160816; b=DDuMDz2ajs8EhsM9KeD6dl5ZT4volzbNzKRnAy/NoveiskzH1C/6QfghFjdbznyIjD cK3ML4Ez26MYe6YnZhxYqkQEf67x39IraoletzSEn3furZO2GwPNi3XwSi2k1Ui0CIed Y2palfTcugI5HrOxgNND3QuLMT8MMsCVVJhKRFxja7VEJY1q/rrlw/MhwFrbB89duYHY 4eFOcSFt597Er6Revlkn5zRqYOwPkzv1V2qT7GZehCzRFCKO2OKck+yR3Iatwo7K0JDM 5ZNjHXG7cKUwTWwUN/FUv4cmJHmth39vDVj9rZnk+3A24Ts/OHJoOMOnVjCALe3k32TP xrLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:openpgp:from:references:cc:to :subject:dkim-signature:arc-authentication-results; bh=0ekko8G5keEwLozcRl7TXxrgpsYh3WAG0/KfCSHprPU=; b=bK4qKalgU/7PmXm9HTLQGqCo52dWuigFcq4pXO9ABR4FvhmENs+tgR9o+vavysPx1j osnQ+8KQS+eMfSP0wIyHdjktCHbsWqDsGLi+7QAOzndqIZLbmHZJxL99xErQTlRMbQ8l k+DLCsSJkyoK+eiYMvazq7Pfsht8lt8Ost38dlfG0wkbeTiKvC8jCpGARa0gNtPD6R+8 Ufrw0eegs8Ih/3QxlicWFGlvbQpsr4zFMLZVfShKPhMdEChafzqPhyRrVQJfJWxx2cOS +tv0xMRdI5HQejZD8L/moa1ADPFdfm6kunUwUbLrCjdMqWIJ2Lv7IYmaPOJ658vXfoXy Knkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=J1Apy6Kp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3-v6si49052456pld.215.2018.06.05.02.02.24; Tue, 05 Jun 2018 02:02:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=J1Apy6Kp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751822AbeFEJBv (ORCPT + 99 others); Tue, 5 Jun 2018 05:01:51 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:34480 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751296AbeFEJBs (ORCPT ); Tue, 5 Jun 2018 05:01:48 -0400 Received: from [192.168.0.20] (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4F7111A87; Tue, 5 Jun 2018 11:01:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1528189306; bh=oGT0abXMwyjrtHAXdZo+mNW8VZGKVUhQqwpv8uRaJp8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=J1Apy6KpUKaSBAB6v1FZyULu0sKa1/dLWBrRdbpQ4ND43ntsh8sGBmL4YDa273dDn Ntf/ruvqyje0qOTlH/98XlGzaFgq3LLM8uISo8CS6wRsQ/xJg9/QmbCV1nz27CoLqa hM+9MjZdeBmzaWfvqYIg1Snw5UT4DY8w1i/fz1WA= Subject: Re: [RFC/RFT PATCH 0/6] Asynchronous UVC To: Troy Kisky , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com Cc: Olivier BRAUN , kieran.bingham@ideasonboard.com, Guennadi Liakhovetski , Laurent Pinchart References: From: Kieran Bingham Openpgp: preference=signencrypt Autocrypt: addr=kieran.bingham@ideasonboard.com; prefer-encrypt=mutual; keydata= xsFNBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat V/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC rRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C potzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ cSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf Kr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8 RXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko lPn1yMsVD0p+6i3DPvA/GPIksDC4owjnzVX9kM8Zc5Cx+XoAN0w5Eqo4t6qEVbuettxx55gq 8K8FieAjgjMSxngo/HST8TpFeqI5nVeq0/lqtBRQKumuIqDg+Bkr4L1V/PSB6XgQcOdhtd36 Oe9X9dXB8YSNt7VjOcO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nNDKnoY0f4U0z7eJv2NeF8xHMuiU RCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA JxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q sbsRB8KNNvVXBOVNwko86rQqF9drZuw= Organization: Ideas on Board Message-ID: <239ae307-9c8d-ab95-34c0-3a179d2899bd@ideasonboard.com> Date: Tue, 5 Jun 2018 10:01:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Troy On 03/01/18 21:13, Troy Kisky wrote: > On 1/3/2018 12:32 PM, Kieran Bingham wrote: >> From: Kieran Bingham >> >> The Linux UVC driver has long provided adequate performance capabilities for >> web-cams and low data rate video devices in Linux while resolutions were low. >> >> Modern USB cameras are now capable of high data rates thanks to USB3 with >> 1080p, and even 4k capture resolutions supported. >> >> Cameras such as the Stereolabs ZED or the Logitech Brio can generate more data >> than an embedded ARM core is able to process on a single core, resulting in >> frame loss. >> >> A large part of this performance impact is from the requirement to >> ‘memcpy’ frames out from URB packets to destination frames. This unfortunate >> requirement is due to the UVC protocol allowing a variable length header, and >> thus it is not possible to provide the target frame buffers directly. > > > I have a rather large patch that does provide frame buffers directly for bulk > cameras. It cannot be used with ISOC cameras. But it is currently for 4.1. > I'll be porting it to 4.9 in a few days if you'd like to see it. How did you get on with this porting activity? Is it possible to share any of this work with the mailing lists ? (If you have not ported to v4.9 - I think it would be useful even to post the v4.1 patch and we can look at what's needed for getting it ported to mainline) -- Regards Kieran > > BR > Troy > > >> >> Extra throughput is possible by moving the actual memcpy actions to a work >> queue, and moving the memcpy out of interrupt context and allowing work tasks >> to be scheduled across multiple cores. >> >> This series has been tested on both the ZED and Brio cameras on arm64 >> platforms, however due to the intrinsic changes in the driver I would like to >> see it tested with other devices and other platforms, so I'd appreciate if >> anyone can test this on a range of USB cameras. >> >> Kieran Bingham (6): >> uvcvideo: Refactor URB descriptors >> uvcvideo: Convert decode functions to use new context structure >> uvcvideo: Protect queue internals with helper >> uvcvideo: queue: Simplify spin-lock usage >> uvcvideo: queue: Support asynchronous buffer handling >> uvcvideo: Move decode processing to process context >> >> drivers/media/usb/uvc/uvc_isight.c | 4 +- >> drivers/media/usb/uvc/uvc_queue.c | 115 ++++++++++++++---- >> drivers/media/usb/uvc/uvc_video.c | 191 ++++++++++++++++++++++-------- >> drivers/media/usb/uvc/uvcvideo.h | 56 +++++++-- >> 4 files changed, 289 insertions(+), 77 deletions(-) >> >> base-commit: 6f0e5fd39143a59c22d60e7befc4f33f22aeed2f >> >