Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1412461pxv; Fri, 25 Jun 2021 12:19:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn95ioIiyb72dNOekUochyjPOsjFUEEqGArivmTim+eshAMeXD9g+391IUtPNqiViAyzv7 X-Received: by 2002:a05:6402:c92:: with SMTP id cm18mr17074287edb.29.1624648773819; Fri, 25 Jun 2021 12:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624648773; cv=none; d=google.com; s=arc-20160816; b=w11zjOnJQbQ076stvuvprw8f+9iZfKqyeunO7XsEK/KAuKwPMG2is+wbhZPMOLLHcA f+Rz049XllP9b/kQAx8RVvfkNqHaQofBIkDrQ6M4tvSo/BxKJVQyY8TjfKWxFI/KN/Q7 VIealVClsOONRXTEFB/lOgq4utQSlgm/9/zlFWlkQanEmu7f+bXVmLoLbbDpK0p0+9Hh qSqpZKlyHtdJ2AUzcTh7ut+1RXg6nXfIAK/5NQiABbLpcWzYZQSzAe5fOXOCU4H+tM77 YNZXQToDW2jXaEgppzfC4/FwTc9GSPM8xOlyIcJkyUEt2TJcOJOYb3ZtqYHkSe+dti/X F3Kw== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=8+KjGlQXDp1DON4loL8+NNiLFcog4PhK3R6OgOdGdTI=; b=yhlECp3P39ajjnFn0ecj7eHMvV/RaoM2gfHZcs8dWc54TVEniL/wJ3ZZsCnFFkZgAU 8N8/tmYCfNLR53CGvuPK1ilCNJ8DQe5aZY+2TRIj09x9ehgtmR57VwS2A/g8zMy9dPrj P9rA74r6G3cKK04/BZMfqKG2vF1722MaChbgf1Whd9XoNySPEXLdaKOyQ2TeSLsOuo17 dPoOxAa23RKi8ilKtCBwQNNKpPJIyFc/80dXtvv9GKqdGYi9Yaew9XqyaQ8DeAZO5gMz bwjfUmNsPg5KbySSLFD4dK4ZoO/Q++clh+I6CmLjxRuEikckKri3xC7ovcg6rG6i6Kh1 wAwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=wE9u87UE; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hz14si6465591ejc.533.2021.06.25.12.19.09; Fri, 25 Jun 2021 12:19:33 -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=@ndufresne-ca.20150623.gappssmtp.com header.s=20150623 header.b=wE9u87UE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229816AbhFYTUj (ORCPT + 99 others); Fri, 25 Jun 2021 15:20:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbhFYTUj (ORCPT ); Fri, 25 Jun 2021 15:20:39 -0400 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF49DC061574 for ; Fri, 25 Jun 2021 12:18:17 -0700 (PDT) Received: by mail-qt1-x832.google.com with SMTP id w26so8262388qto.13 for ; Fri, 25 Jun 2021 12:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ndufresne-ca.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=8+KjGlQXDp1DON4loL8+NNiLFcog4PhK3R6OgOdGdTI=; b=wE9u87UEdrnhb7k9MI0rUCRn4ce3qpkqOIiCj8Y4WetGAi1hxWd9u9teRhilyoHer7 zPpfiWsLu7xz6Ut6xP96iyi4k+TNMdw7t6DIzkUs4WVHB7pJ/6hlKjxZzhenLibjrrQT xU9ei8NNvhyYrHuA9PXfSmuKqLXs7PeuI1iAaV15W858V7FjP/Qses/LVcSwcmaehCs1 4D0bXjhu6SHXPFB+mLnELih13rdOHuBiTvbvxUFhtFd8HoAgu4NWbCNT0PhF05uylJ9u yyUZ3XLlgVkiomxVzdkylr9Z/iW9/m6c+KVmBldK+dLrYH5BWLKS6pwQI6jU7xl10eOw l44A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=8+KjGlQXDp1DON4loL8+NNiLFcog4PhK3R6OgOdGdTI=; b=Km9792zMEuF4DARtmKfG72hNRZEmyxVjkz83/LvuAMNs3QWSC4Pew3i5weQpxxNP7t Bcgc4pQn9KLb6+W1GwKoAXzk4ghub6IWGLIyYcUyWwvcYA9dlR2uznwUQNod55unfsRX 6gUakJyP4ZQIkK+k8AnsvBYgkfIKIMonRBxUaGycu3TyUL9vGm8CaZIPb24zGE5MoN4R awW6qAf+8+brP45IIYcGwj3FpRjnTiyp1UZnm1RdZ7NCo5mPE+G6yyULCP9wCzXtxlkY upvEEFRcTCuv0V13K2PVakwaeII39i9StFR8fjOh/FC6s5q3Xu44UGejx9c7aYaxSY8E Ljtg== X-Gm-Message-State: AOAM532sx9H4gkvnqAzOyKsK3m+szU4bwwqyq5xU1OHsMBXuu0gp5De+ zP/Yv5bcA9u8qG8bMKpqpaPiVA== X-Received: by 2002:a05:622a:11cd:: with SMTP id n13mr11010873qtk.233.1624648696968; Fri, 25 Jun 2021 12:18:16 -0700 (PDT) Received: from nicolas-tpx395.localdomain (173-246-12-168.qc.cable.ebox.net. [173.246.12.168]) by smtp.gmail.com with ESMTPSA id 202sm4030603qki.83.2021.06.25.12.18.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Jun 2021 12:18:16 -0700 (PDT) Message-ID: <0d5ce46a81ca02a9cf2a01175818846fba802194.camel@ndufresne.ca> Subject: Re: [PATCH] media: uvc: limit max bandwidth for HDMI capture From: Nicolas Dufresne To: Mauro Carvalho Chehab , Laurent Pinchart Cc: Linux Media Mailing List , linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , linux-kernel@vger.kernel.org Date: Fri, 25 Jun 2021 15:18:15 -0400 In-Reply-To: <20210622102948.47b86fbe@coco.lan> References: <20210622102948.47b86fbe@coco.lan> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.1 (3.40.1-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mardi 22 juin 2021 à 10:29 +0200, Mauro Carvalho Chehab a écrit : > 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 This is the emulated format handler that decodes jpeg behind application back that is broken. The converter should implement this in a nicer way. E.g. it could return ERROR buffer with payload = 0 in that case. > > 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