Message ID | 20240217185202.1754750-1-megi@xff.cz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-70023-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp463701dyc; Sat, 17 Feb 2024 10:52:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXJD2I8k5JivWlJisPb55/bnK9rAEXLxDvYcTXHIr94ggVH1Mmh4lDfQEFvaSsfxlVutO5mdxOwD/oNNLQHiKR5jxZVPg== X-Google-Smtp-Source: AGHT+IGB3TafFUf+gE0TnBA0xd4i+rFd8M8HdJt3A2boxP7GYjDuFN3IUdVjt3Umg0tWUfP2s+y2 X-Received: by 2002:aa7:864c:0:b0:6e0:f6eb:bc7d with SMTP id a12-20020aa7864c000000b006e0f6ebbc7dmr8064736pfo.29.1708195956356; Sat, 17 Feb 2024 10:52:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708195956; cv=pass; d=google.com; s=arc-20160816; b=KvmyEP9CDHyu9NKIesFs/Fg3YT+2aB0kI+3NpvE/HhoWuoqLiuwCSLMv34grl+/ODn ZAkZJ0OKdOEcZ5uR3EJu4+smrnVXWqKyT7LvFCfLGnwCijQ3z2cyaU6+i5MaexRfV6fS RKDnHtJifi4a48bW+RQeeqjXw9v/YPjSrB+JYSGjs+9V4ZXZ/GkpdBjmjrZPSYt9ssaw p9aRrzjSDwqdhYbtwklMq/ZJ96ZGl+Je658sPF30UKRtlfkhGkEFIQZH8rmePFCdgizW OBQ7gnEd/KQcm7/PKoJWhqr6biVEZcl8+6pI6DzKWkCViv8SfWXbmoOzYO1UzT/lGyMB QjLw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=7yfdpu/C6KHVh1D6TRzMxLqWT3VfTyuCr7jvN6JBL0E=; fh=WP11xh7Y1hOs+epPYUTt53ZxLfA0Iz5YKkl0TEu3NeE=; b=wWyTydnsayq6RO0b368kiVpVV0ZNvCtljnYFLAu/ASSRerIpBqwP81JaB/rXOaqejX TH7C1k2bwR0oT41IQpxpZ6rckpMBaiu9pnUTTd6ZrIg9EwTagsBju0jr93T/YeEFfnEo vZx7IazFPDT+bIAX3teZacEqPX845KkMm1J/jYez46856fp0xPwXrqpVrODooG8H9e5X CyV686FGCrtPkZPgrdBdGM+UX0P/dagjBKIJyS119lEQw5zXadU58sb0zDa3tqDW+YeD 60LY1sh3unQ5uVQFnA/NQtM0nMyq93XfVMGw9SYq5MG19sazwVaHkUBFi3HDk6XLtrt7 iLYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b="mWjyxl/s"; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-70023-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70023-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jw8-20020a056a00928800b006e0cfe7ad50si1878755pfb.102.2024.02.17.10.52.36 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 10:52:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70023-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xff.cz header.s=mail header.b="mWjyxl/s"; arc=pass (i=1 spf=pass spfdomain=xff.cz dkim=pass dkdomain=xff.cz dmarc=pass fromdomain=xff.cz); spf=pass (google.com: domain of linux-kernel+bounces-70023-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70023-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=xff.cz 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 35FAD2832A7 for <ouuuleilei@gmail.com>; Sat, 17 Feb 2024 18:52:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C13C37CF1E; Sat, 17 Feb 2024 18:52:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b="mWjyxl/s" Received: from vps.xff.cz (vps.xff.cz [195.181.215.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 987461C282; Sat, 17 Feb 2024 18:52:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.181.215.36 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708195928; cv=none; b=hzc63i2XN98WbIK8s69lAije0OrrvVZ1zY8QUovSlE+q+6PBN1F9Fv+dcMmzu4QawNpE2xpHGe1ZcUHYJ1x23T1rMomf/h2DnqTHvzATBiCCaoGd5ojgyVio9JQG1wewDl5OUKXd0JNTLCraPp2/dfK63qSRt3WjhNX+7qPKays= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708195928; c=relaxed/simple; bh=HRBsXHjOejmZlim4WFTvQhmTd/GTxXJaVN/xTbbQgG8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nPnMoegw11tHlChtB9byjJp+ak2IGRFFeQbjY4Ot2AB6EeQkU3W5xlclUvxQIERchAJx/TEciXX5xCmko8yQZkbRj/XnUuDKy4ugycxlDsNP111aSINWD8IMnaPJDKr6ICRVizAaXVRjrVhpu+Zh5ip1SQxpfPPJyXBqOBbpyXw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz; spf=pass smtp.mailfrom=xff.cz; dkim=pass (1024-bit key) header.d=xff.cz header.i=@xff.cz header.b=mWjyxl/s; arc=none smtp.client-ip=195.181.215.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=xff.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xff.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xff.cz; s=mail; t=1708195924; bh=HRBsXHjOejmZlim4WFTvQhmTd/GTxXJaVN/xTbbQgG8=; h=From:To:Cc:Subject:Date:From; b=mWjyxl/suWtNCVP3DS707u2Tlr9gLUP9/LtPcj2llvfo3lH+9+aeYKLqHZShBM5T5 957L5tTyBUBKzQxB4YD55mI5YEKXNuCcATMTQt9l+9JS4bWkBcMrEclljHWwZALfbh BeGTYyNq14AIq/q7ysXwb2L7h3h+on5ps075co30= From: =?utf-8?q?Ond=C5=99ej_Jirman?= <megi@xff.cz> To: linux-kernel@vger.kernel.org Cc: Ondrej Jirman <megi@xff.cz>, Dafna Hirschfeld <dafna@fastmail.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Heiko Stuebner <heiko@sntech.de>, linux-media@vger.kernel.org (open list:ROCKCHIP ISP V1 DRIVER), linux-rockchip@lists.infradead.org (open list:ROCKCHIP ISP V1 DRIVER), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC support) Subject: [PATCH] media: rkisp1: Allow higher input resolution Date: Sat, 17 Feb 2024 19:51:58 +0100 Message-ID: <20240217185202.1754750-1-megi@xff.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791173283096787161 X-GMAIL-MSGID: 1791173283096787161 |
Series |
media: rkisp1: Allow higher input resolution
|
|
Commit Message
Ondřej Jirman
Feb. 17, 2024, 6:51 p.m. UTC
From: Ondrej Jirman <megi@xff.cz> In BSP driver, it is allowed, and it works in practice. Tested on Pinephone Pro/RK3399 with IMX258 at full res. Signed-off-by: Ondrej Jirman <megi@xff.cz> --- drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Hi Ondrej, (CC'ing Paul and Umang) Thank you for the patch. On Sat, Feb 17, 2024 at 07:51:58PM +0100, Ondřej Jirman wrote: > From: Ondrej Jirman <megi@xff.cz> > > In BSP driver, it is allowed, and it works in practice. Tested on > Pinephone Pro/RK3399 with IMX258 at full res. Paul, Umang, do I recall correctly that you have a similar change ? Could you review and test this (especially on the i.MX8MP) ? > Signed-off-by: Ondrej Jirman <megi@xff.cz> > --- > drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > index 4b6b28c05b89..74098ddbeeb3 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > @@ -33,8 +33,8 @@ struct dentry; > #define RKISP1_ISP_SD_SINK BIT(1) > > /* min and max values for the widths and heights of the entities */ > -#define RKISP1_ISP_MAX_WIDTH 4032 > -#define RKISP1_ISP_MAX_HEIGHT 3024 > +#define RKISP1_ISP_MAX_WIDTH 4416 > +#define RKISP1_ISP_MAX_HEIGHT 3312 > #define RKISP1_ISP_MIN_WIDTH 32 > #define RKISP1_ISP_MIN_HEIGHT 32 >
On Sun, Feb 18, 2024 at 10:59:08PM +0200, Laurent Pinchart wrote: > Hi Ondrej, > > (CC'ing Paul and Umang) > > Thank you for the patch. > > On Sat, Feb 17, 2024 at 07:51:58PM +0100, Ondřej Jirman wrote: > > From: Ondrej Jirman <megi@xff.cz> > > > > In BSP driver, it is allowed, and it works in practice. Tested on > > Pinephone Pro/RK3399 with IMX258 at full res. > > Paul, Umang, do I recall correctly that you have a similar change ? > Could you review and test this (especially on the i.MX8MP) ? It's also a limit from the datasheet, so the change should not be that controversial: https://megous.com/dl/tmp/d2b333043ecebaf3.png (so that it doesn't sound like I just copied the BSP values) regards, o. > > Signed-off-by: Ondrej Jirman <megi@xff.cz> > > --- > > drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > index 4b6b28c05b89..74098ddbeeb3 100644 > > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > @@ -33,8 +33,8 @@ struct dentry; > > #define RKISP1_ISP_SD_SINK BIT(1) > > > > /* min and max values for the widths and heights of the entities */ > > -#define RKISP1_ISP_MAX_WIDTH 4032 > > -#define RKISP1_ISP_MAX_HEIGHT 3024 > > +#define RKISP1_ISP_MAX_WIDTH 4416 > > +#define RKISP1_ISP_MAX_HEIGHT 3312 > > #define RKISP1_ISP_MIN_WIDTH 32 > > #define RKISP1_ISP_MIN_HEIGHT 32 > > > > -- > Regards, > > Laurent Pinchart
On Sun, Feb 18, 2024 at 3:02 PM Ondřej Jirman <megi@xff.cz> wrote: > > On Sun, Feb 18, 2024 at 10:59:08PM +0200, Laurent Pinchart wrote: > > Hi Ondrej, > > > > (CC'ing Paul and Umang) > > > > Thank you for the patch. > > > > On Sat, Feb 17, 2024 at 07:51:58PM +0100, Ondřej Jirman wrote: > > > From: Ondrej Jirman <megi@xff.cz> > > > > > > In BSP driver, it is allowed, and it works in practice. Tested on > > > Pinephone Pro/RK3399 with IMX258 at full res. > > > > Paul, Umang, do I recall correctly that you have a similar change ? > > Could you review and test this (especially on the i.MX8MP) ? > > It's also a limit from the datasheet, so the change should not be that > controversial: > > https://megous.com/dl/tmp/d2b333043ecebaf3.png > > (so that it doesn't sound like I just copied the BSP values) > From what I see in the i.MX8M Plus reference manual, it has a max resolution of 4096x3072, so it might be necessary to move this off from a #define into a structure that varies by product family. adam > regards, > o. > > > > Signed-off-by: Ondrej Jirman <megi@xff.cz> > > > --- > > > drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > index 4b6b28c05b89..74098ddbeeb3 100644 > > > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > @@ -33,8 +33,8 @@ struct dentry; > > > #define RKISP1_ISP_SD_SINK BIT(1) > > > > > > /* min and max values for the widths and heights of the entities */ > > > -#define RKISP1_ISP_MAX_WIDTH 4032 > > > -#define RKISP1_ISP_MAX_HEIGHT 3024 > > > +#define RKISP1_ISP_MAX_WIDTH 4416 > > > +#define RKISP1_ISP_MAX_HEIGHT 3312 > > > #define RKISP1_ISP_MIN_WIDTH 32 > > > #define RKISP1_ISP_MIN_HEIGHT 32 > > > > > > > -- > > Regards, > > > > Laurent Pinchart >
Hi All, On 19/02/24 7:39 am, Adam Ford wrote: > On Sun, Feb 18, 2024 at 3:02 PM Ondřej Jirman <megi@xff.cz> wrote: >> On Sun, Feb 18, 2024 at 10:59:08PM +0200, Laurent Pinchart wrote: >>> Hi Ondrej, >>> >>> (CC'ing Paul and Umang) >>> >>> Thank you for the patch. >>> >>> On Sat, Feb 17, 2024 at 07:51:58PM +0100, Ondřej Jirman wrote: >>>> From: Ondrej Jirman <megi@xff.cz> >>>> >>>> In BSP driver, it is allowed, and it works in practice. Tested on >>>> Pinephone Pro/RK3399 with IMX258 at full res. >>> Paul, Umang, do I recall correctly that you have a similar change ? >>> Could you review and test this (especially on the i.MX8MP) ? >> It's also a limit from the datasheet, so the change should not be that >> controversial: >> >> https://megous.com/dl/tmp/d2b333043ecebaf3.png >> >> (so that it doesn't sound like I just copied the BSP values) >> > From what I see in the i.MX8M Plus reference manual, it has a max > resolution of 4096x3072, so it might be necessary to move this off This is what I (and I assume Paul too) have been working with on i.MX8M Plus. So it's the known and tested value of max ISP input from out side. > from a #define into a structure that varies by product family. Yeah! > > adam >> regards, >> o. >> >>>> Signed-off-by: Ondrej Jirman <megi@xff.cz> >>>> --- >>>> drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 4 ++-- >>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>> >>>> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h >>>> index 4b6b28c05b89..74098ddbeeb3 100644 >>>> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h >>>> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h >>>> @@ -33,8 +33,8 @@ struct dentry; >>>> #define RKISP1_ISP_SD_SINK BIT(1) >>>> >>>> /* min and max values for the widths and heights of the entities */ >>>> -#define RKISP1_ISP_MAX_WIDTH 4032 >>>> -#define RKISP1_ISP_MAX_HEIGHT 3024 >>>> +#define RKISP1_ISP_MAX_WIDTH 4416 >>>> +#define RKISP1_ISP_MAX_HEIGHT 3312 >>>> #define RKISP1_ISP_MIN_WIDTH 32 >>>> #define RKISP1_ISP_MIN_HEIGHT 32 >>>> >>> -- >>> Regards, >>> >>> Laurent Pinchart
On Mon, Feb 19, 2024 at 02:33:21PM +0530, Umang Jain wrote: > Hi All, > > On 19/02/24 7:39 am, Adam Ford wrote: > > On Sun, Feb 18, 2024 at 3:02 PM Ondřej Jirman <megi@xff.cz> wrote: > > > On Sun, Feb 18, 2024 at 10:59:08PM +0200, Laurent Pinchart wrote: > > > > Hi Ondrej, > > > > > > > > (CC'ing Paul and Umang) > > > > > > > > Thank you for the patch. > > > > > > > > On Sat, Feb 17, 2024 at 07:51:58PM +0100, Ondřej Jirman wrote: > > > > > From: Ondrej Jirman <megi@xff.cz> > > > > > > > > > > In BSP driver, it is allowed, and it works in practice. Tested on > > > > > Pinephone Pro/RK3399 with IMX258 at full res. > > > > Paul, Umang, do I recall correctly that you have a similar change ? > > > > Could you review and test this (especially on the i.MX8MP) ? > > > It's also a limit from the datasheet, so the change should not be that > > > controversial: > > > > > > https://megous.com/dl/tmp/d2b333043ecebaf3.png > > > > > > (so that it doesn't sound like I just copied the BSP values) > > > > > From what I see in the i.MX8M Plus reference manual, it has a max > > resolution of 4096x3072, so it might be necessary to move this off > > This is what I (and I assume Paul too) have been working with on i.MX8M > Plus. So it's the known and tested value of max ISP input from out side. > > from a #define into a structure that varies by product family. Yes, this is what needs to be done. Here's what I have in my notes: - The RK3399 TRM says 4416x3312 max input and output on main path, with 1920x1080 max output on self path. - The PX30 datasheet [1] says 3264x2448 max input and output on main path, with 1920x1080 max output on self path. - The RK3288 documentation [2] (under "Camera Interface and Image Processor") says 4416x3312 max input and output on main path, with 1920x1080 max output on self path. - The i.MX8MP reference manual (the open one) [3] (in table 13-1) says 4096x3072 max resolution in single ISP mode The i.MX8M Plus seems to indeed be limited to 4096x3072, but the TPG is capable of generating 4416x3312, and the ISP works fine in bypass (and therefore raw) mode, so technically it has different maximum sizes depending on the format which makes this more exciting. In any case, the PX30 (assuming the datasheet is correct) only supports up to 3264x2448, so the existing #define is incorrect anyway. I don't have a PX30 nor an RK3288 so I can't test those, and I haven't set up my OV64A40 yet which (I've heard) can be used to test even bigger resolutions. Paul [1] https://opensource.rock-chips.com/images/8/87/Rockchip_PX30_Datasheet_V1.4-20191227.pdf [2] https://opensource.rock-chips.com/images/4/49/Rockchip_RK3288_Datasheet_V2.7-20191227.pdf [3] (requires login) https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8m-plus-arm-cortex-a53-machine-learning-vision-multimedia-and-industrial-iot:IMX8MPLUS > > Yeah! > > > > adam > > > regards, > > > o. > > > > > > > > Signed-off-by: Ondrej Jirman <megi@xff.cz> > > > > > --- > > > > > drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 4 ++-- > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > index 4b6b28c05b89..74098ddbeeb3 100644 > > > > > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > @@ -33,8 +33,8 @@ struct dentry; > > > > > #define RKISP1_ISP_SD_SINK BIT(1) > > > > > > > > > > /* min and max values for the widths and heights of the entities */ > > > > > -#define RKISP1_ISP_MAX_WIDTH 4032 > > > > > -#define RKISP1_ISP_MAX_HEIGHT 3024 > > > > > +#define RKISP1_ISP_MAX_WIDTH 4416 > > > > > +#define RKISP1_ISP_MAX_HEIGHT 3312 > > > > > #define RKISP1_ISP_MIN_WIDTH 32 > > > > > #define RKISP1_ISP_MIN_HEIGHT 32 > > > > > > > > > -- > > > > Regards, > > > > > > > > Laurent Pinchart >
On Mon, Feb 19, 2024 at 07:11:20PM +0900, Paul Elder wrote: > On Mon, Feb 19, 2024 at 02:33:21PM +0530, Umang Jain wrote: > > On 19/02/24 7:39 am, Adam Ford wrote: > > > On Sun, Feb 18, 2024 at 3:02 PM Ondřej Jirman <megi@xff.cz> wrote: > > > > On Sun, Feb 18, 2024 at 10:59:08PM +0200, Laurent Pinchart wrote: > > > > > On Sat, Feb 17, 2024 at 07:51:58PM +0100, Ondřej Jirman wrote: > > > > > > From: Ondrej Jirman <megi@xff.cz> > > > > > > > > > > > > In BSP driver, it is allowed, and it works in practice. Tested on > > > > > > Pinephone Pro/RK3399 with IMX258 at full res. > > > > > > > > > > Paul, Umang, do I recall correctly that you have a similar change ? > > > > > Could you review and test this (especially on the i.MX8MP) ? > > > > > > > > It's also a limit from the datasheet, so the change should not be that > > > > controversial: > > > > > > > > https://megous.com/dl/tmp/d2b333043ecebaf3.png > > > > > > > > (so that it doesn't sound like I just copied the BSP values) > > > > > > > From what I see in the i.MX8M Plus reference manual, it has a max > > > resolution of 4096x3072, so it might be necessary to move this off > > > > This is what I (and I assume Paul too) have been working with on i.MX8M > > Plus. So it's the known and tested value of max ISP input from out side. > > > > > from a #define into a structure that varies by product family. > > Yes, this is what needs to be done. Here's what I have in my notes: > > - The RK3399 TRM says 4416x3312 max input and output on main path, with > 1920x1080 max output on self path. > - The PX30 datasheet [1] says 3264x2448 max input and output on main > path, with 1920x1080 max output on self path. > - The RK3288 documentation [2] (under "Camera Interface and Image > Processor") says 4416x3312 max input and output on main path, with > 1920x1080 max output on self path. > - The i.MX8MP reference manual (the open one) [3] (in table 13-1) says > 4096x3072 max resolution in single ISP mode > > The i.MX8M Plus seems to indeed be limited to 4096x3072, but the TPG is > capable of generating 4416x3312, and the ISP works fine in bypass (and > therefore raw) mode, so technically it has different maximum sizes > depending on the format which makes this more exciting. > > In any case, the PX30 (assuming the datasheet is correct) only supports > up to 3264x2448, so the existing #define is incorrect anyway. > > I don't have a PX30 nor an RK3288 so I can't test those, and I haven't > set up my OV64A40 yet which (I've heard) can be used to test even bigger > resolutions. Thanks for the summary Paul. Ondřej, would you be interested in implementing this ? > [1] https://opensource.rock-chips.com/images/8/87/Rockchip_PX30_Datasheet_V1.4-20191227.pdf > [2] https://opensource.rock-chips.com/images/4/49/Rockchip_RK3288_Datasheet_V2.7-20191227.pdf > [3] (requires login) https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8m-plus-arm-cortex-a53-machine-learning-vision-multimedia-and-industrial-iot:IMX8MPLUS > > > > > > > Signed-off-by: Ondrej Jirman <megi@xff.cz> > > > > > > --- > > > > > > drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 4 ++-- > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > > index 4b6b28c05b89..74098ddbeeb3 100644 > > > > > > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > > @@ -33,8 +33,8 @@ struct dentry; > > > > > > #define RKISP1_ISP_SD_SINK BIT(1) > > > > > > > > > > > > /* min and max values for the widths and heights of the entities */ > > > > > > -#define RKISP1_ISP_MAX_WIDTH 4032 > > > > > > -#define RKISP1_ISP_MAX_HEIGHT 3024 > > > > > > +#define RKISP1_ISP_MAX_WIDTH 4416 > > > > > > +#define RKISP1_ISP_MAX_HEIGHT 3312 > > > > > > #define RKISP1_ISP_MIN_WIDTH 32 > > > > > > #define RKISP1_ISP_MIN_HEIGHT 32 > > > > > >
On Mon, Feb 19, 2024 at 07:11:20PM +0900, Paul Elder wrote: > On Mon, Feb 19, 2024 at 02:33:21PM +0530, Umang Jain wrote: > > Hi All, > > > > On 19/02/24 7:39 am, Adam Ford wrote: > > > On Sun, Feb 18, 2024 at 3:02 PM Ondřej Jirman <megi@xff.cz> wrote: > > > > On Sun, Feb 18, 2024 at 10:59:08PM +0200, Laurent Pinchart wrote: > > > > > Hi Ondrej, > > > > > > > > > > (CC'ing Paul and Umang) > > > > > > > > > > Thank you for the patch. > > > > > > > > > > On Sat, Feb 17, 2024 at 07:51:58PM +0100, Ondřej Jirman wrote: > > > > > > From: Ondrej Jirman <megi@xff.cz> > > > > > > > > > > > > In BSP driver, it is allowed, and it works in practice. Tested on > > > > > > Pinephone Pro/RK3399 with IMX258 at full res. > > > > > Paul, Umang, do I recall correctly that you have a similar change ? > > > > > Could you review and test this (especially on the i.MX8MP) ? > > > > It's also a limit from the datasheet, so the change should not be that > > > > controversial: > > > > > > > > https://megous.com/dl/tmp/d2b333043ecebaf3.png > > > > > > > > (so that it doesn't sound like I just copied the BSP values) > > > > > > > From what I see in the i.MX8M Plus reference manual, it has a max > > > resolution of 4096x3072, so it might be necessary to move this off > > > > This is what I (and I assume Paul too) have been working with on i.MX8M > > Plus. So it's the known and tested value of max ISP input from out side. > > > from a #define into a structure that varies by product family. > > Yes, this is what needs to be done. Here's what I have in my notes: > > - The RK3399 TRM says 4416x3312 max input and output on main path, with > 1920x1080 max output on self path. > - The PX30 datasheet [1] says 3264x2448 max input and output on main > path, with 1920x1080 max output on self path. > - The RK3288 documentation [2] (under "Camera Interface and Image > Processor") says 4416x3312 max input and output on main path, with > 1920x1080 max output on self path. > - The i.MX8MP reference manual (the open one) [3] (in table 13-1) says > 4096x3072 max resolution in single ISP mode Yeah, RKISP1_RSZ_SP_SRC_MAX_HEIGHT in the driver also seems weird in this respect: #define RKISP1_RSZ_SP_SRC_MAX_WIDTH 1920 #define RKISP1_RSZ_SP_SRC_MAX_HEIGHT 1920 regards, o. > The i.MX8M Plus seems to indeed be limited to 4096x3072, but the TPG is > capable of generating 4416x3312, and the ISP works fine in bypass (and > therefore raw) mode, so technically it has different maximum sizes > depending on the format which makes this more exciting. > > In any case, the PX30 (assuming the datasheet is correct) only supports > up to 3264x2448, so the existing #define is incorrect anyway. > > I don't have a PX30 nor an RK3288 so I can't test those, and I haven't > set up my OV64A40 yet which (I've heard) can be used to test even bigger > resolutions. > > > Paul > > [1] https://opensource.rock-chips.com/images/8/87/Rockchip_PX30_Datasheet_V1.4-20191227.pdf > [2] https://opensource.rock-chips.com/images/4/49/Rockchip_RK3288_Datasheet_V2.7-20191227.pdf > [3] (requires login) https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8m-plus-arm-cortex-a53-machine-learning-vision-multimedia-and-industrial-iot:IMX8MPLUS > > > > > > Yeah! > > > > > > adam > > > > regards, > > > > o. > > > > > > > > > > Signed-off-by: Ondrej Jirman <megi@xff.cz> > > > > > > --- > > > > > > drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 4 ++-- > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > > index 4b6b28c05b89..74098ddbeeb3 100644 > > > > > > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > > @@ -33,8 +33,8 @@ struct dentry; > > > > > > #define RKISP1_ISP_SD_SINK BIT(1) > > > > > > > > > > > > /* min and max values for the widths and heights of the entities */ > > > > > > -#define RKISP1_ISP_MAX_WIDTH 4032 > > > > > > -#define RKISP1_ISP_MAX_HEIGHT 3024 > > > > > > +#define RKISP1_ISP_MAX_WIDTH 4416 > > > > > > +#define RKISP1_ISP_MAX_HEIGHT 3312 > > > > > > #define RKISP1_ISP_MIN_WIDTH 32 > > > > > > #define RKISP1_ISP_MIN_HEIGHT 32 > > > > > > > > > > > -- > > > > > Regards, > > > > > > > > > > Laurent Pinchart > >
Hello Laurent, On Mon, Feb 19, 2024 at 01:54:30PM +0200, Laurent Pinchart wrote: > On Mon, Feb 19, 2024 at 07:11:20PM +0900, Paul Elder wrote: > > On Mon, Feb 19, 2024 at 02:33:21PM +0530, Umang Jain wrote: > > > On 19/02/24 7:39 am, Adam Ford wrote: > > > > On Sun, Feb 18, 2024 at 3:02 PM Ondřej Jirman <megi@xff.cz> wrote: > > > > > On Sun, Feb 18, 2024 at 10:59:08PM +0200, Laurent Pinchart wrote: > > > > > > On Sat, Feb 17, 2024 at 07:51:58PM +0100, Ondřej Jirman wrote: > > > > > > > From: Ondrej Jirman <megi@xff.cz> > > > > > > > > > > > > > > In BSP driver, it is allowed, and it works in practice. Tested on > > > > > > > Pinephone Pro/RK3399 with IMX258 at full res. > > > > > > > > > > > > Paul, Umang, do I recall correctly that you have a similar change ? > > > > > > Could you review and test this (especially on the i.MX8MP) ? > > > > > > > > > > It's also a limit from the datasheet, so the change should not be that > > > > > controversial: > > > > > > > > > > https://megous.com/dl/tmp/d2b333043ecebaf3.png > > > > > > > > > > (so that it doesn't sound like I just copied the BSP values) > > > > > > > > > From what I see in the i.MX8M Plus reference manual, it has a max > > > > resolution of 4096x3072, so it might be necessary to move this off > > > > > > This is what I (and I assume Paul too) have been working with on i.MX8M > > > Plus. So it's the known and tested value of max ISP input from out side. > > > > > > > from a #define into a structure that varies by product family. > > > > Yes, this is what needs to be done. Here's what I have in my notes: > > > > - The RK3399 TRM says 4416x3312 max input and output on main path, with > > 1920x1080 max output on self path. > > - The PX30 datasheet [1] says 3264x2448 max input and output on main > > path, with 1920x1080 max output on self path. > > - The RK3288 documentation [2] (under "Camera Interface and Image > > Processor") says 4416x3312 max input and output on main path, with > > 1920x1080 max output on self path. > > - The i.MX8MP reference manual (the open one) [3] (in table 13-1) says > > 4096x3072 max resolution in single ISP mode > > > > The i.MX8M Plus seems to indeed be limited to 4096x3072, but the TPG is > > capable of generating 4416x3312, and the ISP works fine in bypass (and > > therefore raw) mode, so technically it has different maximum sizes > > depending on the format which makes this more exciting. > > > > In any case, the PX30 (assuming the datasheet is correct) only supports > > up to 3264x2448, so the existing #define is incorrect anyway. > > > > I don't have a PX30 nor an RK3288 so I can't test those, and I haven't > > set up my OV64A40 yet which (I've heard) can be used to test even bigger > > resolutions. > > Thanks for the summary Paul. > > Ondřej, would you be interested in implementing this ? Something like this? https://lore.kernel.org/lkml/20240220235720.3010608-1-megi@xff.cz/T/#u Only the first two SoCs are supported by rkisp1 driver upstream, yet. So I only have to deal with input and mainpath maximum ATM. So the patch is rather simple. kind regards, o. > > [1] https://opensource.rock-chips.com/images/8/87/Rockchip_PX30_Datasheet_V1.4-20191227.pdf > > [2] https://opensource.rock-chips.com/images/4/49/Rockchip_RK3288_Datasheet_V2.7-20191227.pdf > > [3] (requires login) https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors/i-mx-8m-plus-arm-cortex-a53-machine-learning-vision-multimedia-and-industrial-iot:IMX8MPLUS > > > > > > > > > Signed-off-by: Ondrej Jirman <megi@xff.cz> > > > > > > > --- > > > > > > > drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 4 ++-- > > > > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > > > > > > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > > > index 4b6b28c05b89..74098ddbeeb3 100644 > > > > > > > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > > > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h > > > > > > > @@ -33,8 +33,8 @@ struct dentry; > > > > > > > #define RKISP1_ISP_SD_SINK BIT(1) > > > > > > > > > > > > > > /* min and max values for the widths and heights of the entities */ > > > > > > > -#define RKISP1_ISP_MAX_WIDTH 4032 > > > > > > > -#define RKISP1_ISP_MAX_HEIGHT 3024 > > > > > > > +#define RKISP1_ISP_MAX_WIDTH 4416 > > > > > > > +#define RKISP1_ISP_MAX_HEIGHT 3312 > > > > > > > #define RKISP1_ISP_MIN_WIDTH 32 > > > > > > > #define RKISP1_ISP_MIN_HEIGHT 32 > > > > > > > > > -- > Regards, > > Laurent Pinchart
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h index 4b6b28c05b89..74098ddbeeb3 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h @@ -33,8 +33,8 @@ struct dentry; #define RKISP1_ISP_SD_SINK BIT(1) /* min and max values for the widths and heights of the entities */ -#define RKISP1_ISP_MAX_WIDTH 4032 -#define RKISP1_ISP_MAX_HEIGHT 3024 +#define RKISP1_ISP_MAX_WIDTH 4416 +#define RKISP1_ISP_MAX_HEIGHT 3312 #define RKISP1_ISP_MIN_WIDTH 32 #define RKISP1_ISP_MIN_HEIGHT 32