Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4503052pxj; Tue, 22 Jun 2021 01:32:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzW0+bNxTG2K+5Yvo/yWlgYsF3m5XdPO9YmhFqEaVCr+ugiWpFsxDqrJ9XcCUjEUYFxA46f X-Received: by 2002:a02:9f8a:: with SMTP id a10mr2863131jam.136.1624350723221; Tue, 22 Jun 2021 01:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624350723; cv=none; d=google.com; s=arc-20160816; b=BSsHlxqbbQAxSPFzUxhNjh72Rp0do/CikqBnHgImdgXKN/CPa+41tTDGTYQRmNzzpv 4Q7aYwOjNyXL5ZpIznXvrVac7cDAq20nADaDrTyG6eIsYFOLEUtjOPtiZOu3hCj1ygI8 49paLUDiCPqaY/A7sYx4msC1f5iSUenG+Btk/iMEIC2rT8nNQ1uuHtW5gX5IRTdUOkaM A6Ksm3rDwUNEme4CGICyVrHYBcvEo7jmMG61ogOymGuBhw++tw9WOwgvayQnhdG9NkQq v3rSH4azbJLpIDHx0h58LyyE6NcU1GP5aH5rqHYdS+rqu/VbmJbQpO/JNLn4sOLGMOxl LgoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=WFk/37si8idg3ClT96Lw5kCjuMOj12cY147A1djQ0iU=; b=QEjM4S+woyxRLDreJmWEehwmCX/RrwuH0D0Oi8EdRfzlQdx4osIaM1xwyX6EBCOMKX IFniNPr66K3BffBPC8X/ETcPs38Rdflmt2J2Nqc71nJRp+TiYBgdc6plxbpbhLzUksQ7 SNQYR++psp0wpofTJIYvIjLLA4r8rUkbB4aFCztaV+taf3Vcc0TGTycZnN4OfCZf6sVx uxhDLP/NeSv6eKbJxpKTd8zKAUFdM5WQqEeb6oPoCSDOeuQPbsP8Aa53n0OKaXDdmBeJ Zjp+lxJkjMyFfBVA228McnQokz93dj0eewNoyVBUOOcmzqVHvBCpuKIVUJJ15v2EEUDJ YOKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pSDN5ID0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k40si6449189jav.33.2021.06.22.01.31.50; Tue, 22 Jun 2021 01:32:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pSDN5ID0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230298AbhFVIcJ (ORCPT + 99 others); Tue, 22 Jun 2021 04:32:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:46324 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbhFVIcJ (ORCPT ); Tue, 22 Jun 2021 04:32:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 02A5760C3E; Tue, 22 Jun 2021 08:29:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624350593; bh=COzimfgMz1afj8XdLcr3vdgxvcJ0o12svjbRCymcLjs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pSDN5ID0mABoH5DVe6bJVNEEOoGxe+cIgxlb9ec8CQe+Vo07LEeKL48SbF27+KHoY v+9QNlP6hxUPbx/kcuQUAuC0JdcMz1qgzX3j1bw2lrzVODrWubj4iGhDN/yIAQ0Czv 6vYxPFQG6g1HhlH9L/KjxnAVWNLbXNGpqEPsiDDnFEZTCAZf7pTkKaQHh+bS6LruJ9 xZ8q4mCNS0Ao4TPx/9gcJo9v9S//RkogZ+tQVkUodhvmqpLLG9m1S1xq5BP39tQzII lAIBKRWnGURJNPgqJOo8QCa7U0Ge6ppxGV0m+cXitsplbUHumMgY1jiTVX/WcjWgat /lgJrGVwC8HNA== Date: Tue, 22 Jun 2021 10:29:48 +0200 From: Mauro Carvalho Chehab To: Laurent Pinchart Cc: Linux Media Mailing List , linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: uvc: limit max bandwidth for HDMI capture Message-ID: <20210622102948.47b86fbe@coco.lan> In-Reply-To: References: X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, 21 Jun 2021 21:22:26 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > Thank you for the patch. Thanks for reviewing it! > > On Mon, Feb 01, 2021 at 08:08:59PM +0100, Mauro Carvalho Chehab wrote: > > This device: > > 534d:2109 MacroSilicon > > > > Announces that it supports several frame intervals for > > their resolutions for MJPEG compression: > > > > VideoStreaming Interface Descriptor: > > bLength 46 > > bDescriptorType 36 > > bDescriptorSubtype 7 (FRAME_MJPEG) > > bFrameIndex 1 > > bmCapabilities 0x00 > > Still image unsupported > > wWidth 1920 > > wHeight 1080 > > dwMinBitRate 768000 > > dwMaxBitRate 196608000 > > dwMaxVideoFrameBufferSize 4147200 > > dwDefaultFrameInterval 166666 > > bFrameIntervalType 5 > > dwFrameInterval( 0) 166666 > > dwFrameInterval( 1) 333333 > > dwFrameInterval( 2) 400000 > > dwFrameInterval( 3) 500000 > > dwFrameInterval( 4) 1000000 > > > > However, the highest frame interval (166666), which means 60 fps > > is not supported. For such resolution, the maximum interval > > is, instead 333333 (30 fps). > > What happens if you try to select it ? Basically, URBs get lost: they cause apps like qv4l2 to crash sometimes, with: v4l-convert: libjpeg error: Corrupt JPEG data: premature end of data segment The image keeps blinking, and part of the image is replaced by white noise. Clearly, it tries to send more data than the maximum available bandwidth on this chipset. Sent a v2 addressing the issues you pointed. Thanks, Mauro