public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bod@kernel.org>
To: Luca Weiss <luca.weiss@fairphone.com>,
	Jordan Crouse <jorcrous@amazon.com>,
	linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Robert Foss <rfoss@kernel.org>, Todor Tomov <todor.too@gmail.com>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] media: camss: Increase the maximum frame size
Date: Mon, 7 Apr 2025 16:59:15 +0100	[thread overview]
Message-ID: <c3284c33-4a8e-4150-b40a-05cd3af39def@kernel.org> (raw)
In-Reply-To: <D64PAIXELZ6A.37ZSFBIRPE6MT@fairphone.com>

On 06/12/2024 14:51, Luca Weiss wrote:
> On Fri Aug 2, 2024 at 5:24 PM CEST, Jordan Crouse wrote:
>> Commit 35493d653a2d
>> ("media: camss: add support for vidioc_enum_framesizes ioctl") added a
>> maximum frame width and height but the values selected seemed to have
>> been arbitrary. In reality the cam hardware doesn't seem to have a maximum
>> size restriction so double up the maximum reported width and height to
>> allow for larger frames.
>>
>> Also increase the maximum size checks at each point in the pipeline so
>> the increased sizes are allowed all the way down to the sensor.
> 
> Hi Jordan,
> 
> Looks like this hasn't landed yet, do you plan on resending this?
> 
> Just wanted to try a 8192x6144 format but csid limiting the size to 8191
> is a bit in the way.
> 
> Regards
> Luca
> 
>>
>> Signed-off-by: Jordan Crouse <jorcrous@amazon.com>
>> ---
>>
>>   drivers/media/platform/qcom/camss/camss-csid.c   | 8 ++++----
>>   drivers/media/platform/qcom/camss/camss-csiphy.c | 4 ++--
>>   drivers/media/platform/qcom/camss/camss-ispif.c  | 4 ++--
>>   drivers/media/platform/qcom/camss/camss-vfe.c    | 4 ++--
>>   drivers/media/platform/qcom/camss/camss-video.c  | 6 +++---
>>   5 files changed, 13 insertions(+), 13 deletions(-)
>>
>> diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c
>> index 858db5d4ca75..886c42c82612 100644
>> --- a/drivers/media/platform/qcom/camss/camss-csid.c
>> +++ b/drivers/media/platform/qcom/camss/camss-csid.c
>> @@ -752,8 +752,8 @@ static void csid_try_format(struct csid_device *csid,
>>   		if (i >= csid->res->formats->nformats)
>>   			fmt->code = MEDIA_BUS_FMT_UYVY8_1X16;
>>   
>> -		fmt->width = clamp_t(u32, fmt->width, 1, 8191);
>> -		fmt->height = clamp_t(u32, fmt->height, 1, 8191);
>> +		fmt->width = clamp_t(u32, fmt->width, 1, 16383);
>> +		fmt->height = clamp_t(u32, fmt->height, 1, 16383);
>>   
>>   		fmt->field = V4L2_FIELD_NONE;
>>   		fmt->colorspace = V4L2_COLORSPACE_SRGB;
>> @@ -781,8 +781,8 @@ static void csid_try_format(struct csid_device *csid,
>>   			if (i >= csid->res->formats->nformats)
>>   				fmt->code = MEDIA_BUS_FMT_UYVY8_1X16;
>>   
>> -			fmt->width = clamp_t(u32, fmt->width, 1, 8191);
>> -			fmt->height = clamp_t(u32, fmt->height, 1, 8191);
>> +			fmt->width = clamp_t(u32, fmt->width, 1, 16383);
>> +			fmt->height = clamp_t(u32, fmt->height, 1, 16383);
>>   
>>   			fmt->field = V4L2_FIELD_NONE;
>>   		}
>> diff --git a/drivers/media/platform/qcom/camss/camss-csiphy.c b/drivers/media/platform/qcom/camss/camss-csiphy.c
>> index 2f7361dfd461..43c35ad6ac84 100644
>> --- a/drivers/media/platform/qcom/camss/camss-csiphy.c
>> +++ b/drivers/media/platform/qcom/camss/camss-csiphy.c
>> @@ -368,8 +368,8 @@ static void csiphy_try_format(struct csiphy_device *csiphy,
>>   		if (i >= csiphy->res->formats->nformats)
>>   			fmt->code = MEDIA_BUS_FMT_UYVY8_1X16;
>>   
>> -		fmt->width = clamp_t(u32, fmt->width, 1, 8191);
>> -		fmt->height = clamp_t(u32, fmt->height, 1, 8191);
>> +		fmt->width = clamp_t(u32, fmt->width, 1, 16383);
>> +		fmt->height = clamp_t(u32, fmt->height, 1, 16383);
>>   
>>   		fmt->field = V4L2_FIELD_NONE;
>>   		fmt->colorspace = V4L2_COLORSPACE_SRGB;
>> diff --git a/drivers/media/platform/qcom/camss/camss-ispif.c b/drivers/media/platform/qcom/camss/camss-ispif.c
>> index a12dcc7ff438..01e2ded8da0b 100644
>> --- a/drivers/media/platform/qcom/camss/camss-ispif.c
>> +++ b/drivers/media/platform/qcom/camss/camss-ispif.c
>> @@ -912,8 +912,8 @@ static void ispif_try_format(struct ispif_line *line,
>>   		if (i >= line->nformats)
>>   			fmt->code = MEDIA_BUS_FMT_UYVY8_1X16;
>>   
>> -		fmt->width = clamp_t(u32, fmt->width, 1, 8191);
>> -		fmt->height = clamp_t(u32, fmt->height, 1, 8191);
>> +		fmt->width = clamp_t(u32, fmt->width, 1, 16383);
>> +		fmt->height = clamp_t(u32, fmt->height, 1, 16383);
>>   
>>   		fmt->field = V4L2_FIELD_NONE;
>>   		fmt->colorspace = V4L2_COLORSPACE_SRGB;
>> diff --git a/drivers/media/platform/qcom/camss/camss-vfe.c b/drivers/media/platform/qcom/camss/camss-vfe.c
>> index 83c5a36d071f..826c0fb31785 100644
>> --- a/drivers/media/platform/qcom/camss/camss-vfe.c
>> +++ b/drivers/media/platform/qcom/camss/camss-vfe.c
>> @@ -1049,8 +1049,8 @@ static void vfe_try_format(struct vfe_line *line,
>>   		if (i >= line->nformats)
>>   			fmt->code = MEDIA_BUS_FMT_UYVY8_1X16;
>>   
>> -		fmt->width = clamp_t(u32, fmt->width, 1, 8191);
>> -		fmt->height = clamp_t(u32, fmt->height, 1, 8191);
>> +		fmt->width = clamp_t(u32, fmt->width, 1, 16383);
>> +		fmt->height = clamp_t(u32, fmt->height, 1, 16383);
>>   
>>   		fmt->field = V4L2_FIELD_NONE;
>>   		fmt->colorspace = V4L2_COLORSPACE_SRGB;
>> diff --git a/drivers/media/platform/qcom/camss/camss-video.c b/drivers/media/platform/qcom/camss/camss-video.c
>> index cd72feca618c..5fee3733da8e 100644
>> --- a/drivers/media/platform/qcom/camss/camss-video.c
>> +++ b/drivers/media/platform/qcom/camss/camss-video.c
>> @@ -19,10 +19,10 @@
>>   #include "camss.h"
>>   
>>   #define CAMSS_FRAME_MIN_WIDTH		1
>> -#define CAMSS_FRAME_MAX_WIDTH		8191
>> +#define CAMSS_FRAME_MAX_WIDTH		16833
>>   #define CAMSS_FRAME_MIN_HEIGHT		1
>> -#define CAMSS_FRAME_MAX_HEIGHT_RDI	8191
>> -#define CAMSS_FRAME_MAX_HEIGHT_PIX	4096
>> +#define CAMSS_FRAME_MAX_HEIGHT_RDI	16833
>> +#define CAMSS_FRAME_MAX_HEIGHT_PIX	8192
>>   
>>   /* -----------------------------------------------------------------------------
>>    * Helper functions
> 

Ping Jordan !

Will buy you beer for a v2 of this series.

---
bod

  reply	other threads:[~2025-04-07 15:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02 15:24 [PATCH v1 0/2] media: camss: Fixups for large capture frames Jordan Crouse
2024-08-02 15:24 ` [PATCH v1 1/2] media: camss: Increase the maximum frame size Jordan Crouse
2024-08-06 23:09   ` Bryan O'Donoghue
2024-08-07  8:16     ` Bryan O'Donoghue
2024-12-06 14:51   ` Luca Weiss
2025-04-07 15:59     ` Bryan O'Donoghue [this message]
2024-08-02 15:24 ` [PATCH v1 2/2] media: camss: Avoid overwriting vfe clock rates for 8250 Jordan Crouse
2024-08-02 22:20   ` Bryan O'Donoghue
2024-08-06 22:38     ` Jordan Crouse

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=c3284c33-4a8e-4150-b40a-05cd3af39def@kernel.org \
    --to=bod@kernel.org \
    --cc=jorcrous@amazon.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca.weiss@fairphone.com \
    --cc=mchehab@kernel.org \
    --cc=rfoss@kernel.org \
    --cc=todor.too@gmail.com \
    /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