Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1870314lqe; Tue, 9 Apr 2024 02:58:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV21fkJgiHADEUPOSeWqrjDlxsQn8Yu08rjJew7NxNDyZ+M9XLgNm4qWGkaSQrFW7pW1tJIyk8ZluZUi09omyTcc5458+hW5Zw5+PqLlw== X-Google-Smtp-Source: AGHT+IH3DzGAnk+8FpQE9pWZ25QZCZH4X1FlgIiLZXCTwCgDi4Qwe9TNPerGXAgEmquQff74QiSO X-Received: by 2002:a05:6a20:9782:b0:1a7:52db:6711 with SMTP id hx2-20020a056a20978200b001a752db6711mr2812850pzc.2.1712656682299; Tue, 09 Apr 2024 02:58:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712656682; cv=pass; d=google.com; s=arc-20160816; b=Ig7QIcqIoUPq5YSLAmm1y4hGNjUL3PxVyxvRXf5EPui/ted1aJjKt/ignU985SiAkV 1oExPH26/b5zcHu12VS6ekN4KRJMU+dMeCFeIe8PzMupKC4s6qHZ6tBvawkp7rg3QDZr ud7btzRm4fJNxK2OUr3MenDty8LNwgTB56xIeTzi/R4d0ZEi6g0lAnb9OEwCn1J3MY6E buWDD5jaZwOmyZNIDos/wafT1Zce2udXhkJM/YCGngpVnBZ/mHAVI042Hi2S8ZoLEmje +KtZwKo0OiDjW/c4ph+BHDeOB4TKr8RbFDpP5Z6qE12y1vJiIc3tR6ehNJ+zNeNKGs1r gqdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=sqlMEFMoP8zbagNCWIpn+307MFAqZSHC+0yK6z9R2eI=; fh=nVSrgl35C0UVW0TlbdsdioLn87SRWj5OV3ZZdH2MvwM=; b=baSAeYQfRM2pTjH/SHjyK6ves3mza7FYO+5NN/d8by/SScaU3EQR+J9eoPQ0umW3Na PrhQXagyMLI9KKPh7nHX+9fZPdhrBE4PwpAR9LNwYmmQKMiusQUdPWi1mXAX2Lkx1z78 d8xn1DgPQNmvxV6iRttLHbj/mh6uAkNcHa23+bqo8TUV23VfVRKbkfJ/xsHwlxIVIKaK hBvwoz6/q3lbtL7W73f594OJAs1kqhdCkHrIP8xehpo6MuoDs8uD61No2dunozhCinza R6E/lSGXSVfrcPkCVJzHfctoZzHOT5JY0495t24Ajm15ijKIYJbRpCEskw5jg9jhUPY9 pg5g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gpxsee.org); spf=pass (google.com: domain of linux-kernel+bounces-136608-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136608-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h28-20020a63385c000000b005e857e42aa7si8362355pgn.55.2024.04.09.02.58.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 02:58:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136608-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gpxsee.org); spf=pass (google.com: domain of linux-kernel+bounces-136608-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136608-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F0E8328489E for ; Tue, 9 Apr 2024 09:58:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FB968563F; Tue, 9 Apr 2024 09:57:08 +0000 (UTC) Received: from mx.gpxsee.org (mx.gpxsee.org [37.205.14.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2A5F81727; Tue, 9 Apr 2024 09:57:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=37.205.14.76 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712656627; cv=none; b=nUiVB8sc7HwWO2Yeq3JzYs1HwOcRGXn3Kbm5KYo6RceJuhpLrDtLlh8/N1ryDlvEplNgEusz+J+gZDxBfvgAX70Jwynj1h23XA7RuCM7WD1qVr6DKq6BRjZYMI/67gOhcTjJjb/zwRJSHkWVgWt3H5FxUOQNvdieb+26YY5ItMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712656627; c=relaxed/simple; bh=Nev6clutsLuoZ3tdEcecuIJhvQs7KonqvYFmWzWrYno=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VihqYpVVtyOTKtv89JMyGJ9oueK5rtViTVOibys4PaKQtK63OlwU42lmO6JAXju+nFqC/u4larHc9B9IAMwSusmuiNxBAsUdze98IMHSnXLsWT+qybV7Nisk59qJ3o1qTU3CCkJLhbyCNNu8rjAUWRUZ51rnOoeS6cdI0Go7SA8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gpxsee.org; spf=pass smtp.mailfrom=gpxsee.org; arc=none smtp.client-ip=37.205.14.76 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gpxsee.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gpxsee.org Received: from [192.168.4.14] (unknown [62.77.71.229]) by mx.gpxsee.org (Postfix) with ESMTPSA id 4A437440C7; Tue, 9 Apr 2024 11:57:02 +0200 (CEST) Message-ID: <36d9063f-0133-4a88-8120-f41e5fd85d89@gpxsee.org> Date: Tue, 9 Apr 2024 11:57:02 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 3/3] media: mgb4: Fixed signal frame rate limit handling To: Hans Verkuil , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Martin_T=C5=AFma?= References: <20240322151005.3499-1-tumic@gpxsee.org> <20240322151005.3499-4-tumic@gpxsee.org> <8a0cf515-e450-41b8-950c-4356f2fb9879@xs4all.nl> Content-Language: en-US From: =?UTF-8?Q?Martin_T=C5=AFma?= In-Reply-To: <8a0cf515-e450-41b8-950c-4356f2fb9879@xs4all.nl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 08. 04. 24 12:47, Hans Verkuil wrote: >> diff --git a/Documentation/admin-guide/media/mgb4.rst b/Documentation/admin-guide/media/mgb4.rst >> index 2977f74d7e26..6fff886003e2 100644 >> --- a/Documentation/admin-guide/media/mgb4.rst >> +++ b/Documentation/admin-guide/media/mgb4.rst >> @@ -228,8 +228,12 @@ Common FPDL3/GMSL output parameters >> open.* >> >> **frame_rate** (RW): >> - Output video frame rate in frames per second. The default frame rate is >> - 60Hz. >> + Output video signal frame rate limit in frames per second. Due to >> + the limited output pixel clock steps, the card can not always generate >> + a frame rate perfectly matching the value required by the connected display. >> + Using this parameter one can limit the frame rate by "crippling" the signal >> + so that the lines are not equal but the signal appears like having the exact >> + frame rate to the connected display. The default frame rate limit is 60Hz. > > It's not clear what is meant with 'crippling'. Normally when dealing with video > framerates the driver will pick the closest video timing to the requested framerate. > It is understood that you can't always get the exact framerate, so drivers can > make adjustments. > By "crippling" I mean the signal is modified in a obscure way so that a frame has not all lines equal. The HW somehow (the exact way is not known to me, the documentation is very sparse on this - before my investigation it stated only "frames per second" which was very confusing and the reason this patch exists) modifies the last line(lines?) so that the overall clock ticks per frame is the desired value. Some blanking stuff (the porches?) you have set are not equal for all the frame lines. What I'm trying to do is to change the original documentation which is definitely wrong (the users are confused how you can set the timings AND the frame rate with different values at the same time) without saying too much about the exact algorithm as it is not exactly known and may even slightly change in different FW versions. Does that all make sense to you now?