Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1041193rdb; Mon, 19 Feb 2024 02:12:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU/IgNIXYiJmUun9skI2oeoyhJtSKcawDlDgt61LQ9Fsybg++kKw/5xCOK6n3ZLAuL8vHFlE+mLnSE3ipF8YdmkFlfVMyj1YAclMKMSXA== X-Google-Smtp-Source: AGHT+IHKV1ojGyZNVJpEv8z2nVL1MYohFhJNR8i8hLa4uaHzQl3RZX9voqgXqK4S6J8Xt08GAMCL X-Received: by 2002:a17:906:ce50:b0:a3e:55db:767d with SMTP id se16-20020a170906ce5000b00a3e55db767dmr2277562ejb.14.1708337556736; Mon, 19 Feb 2024 02:12:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708337556; cv=pass; d=google.com; s=arc-20160816; b=V7xhZpnEhPQxC1tEcYrMQeCPArGUzh57lG8Y9QRqEOiWx1fSOLH9zJn5kuf+0nzklZ Rhqx39N3ZlFFSSS6QhpjzJTAYXIyF69MNfC20ilpS6mUzHMRCdm1O31lwkKp8tDitpyy km39EtQU4jVosIjBeXiuVejlCD04zA3j33RyMz8kRncpVuq0X5EL2/zndMZE5x3iB5SS CvYgo872o5dPYEbcT+VtjkBIQpZh3m3FCM32VlOVTLxgFKZ2K9O/AWBCJ94eEVwjju98 Zr05rOI8r6rWB+8ynGY8MrvfK7xdU68MGTTkb4MtNxXsAAYUnyPle/z/7uarxxj9op9M arbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Yl5iDlgmk/XDS9CZojdPX01qcu9plm5qHOhaXGQ3nXI=; fh=vvp5mzXfLZhEATma4pQEeAv6+iDm6fklPWyp1BslMcE=; b=sT38XBNmDrt7xM7uCT/MFC1a2ifBfCtP7UP+xwzoA/kQAwWYOu6i2U0CG+w0e0s24j yKtC5noG/NC/NuGXtcLYibLYavAwBFkG2NYtS1NeJiyggH8GjN619LdaGx9t4i2ooWtw xCgTx057p7CdhyJ/xNIrcM3AvrPQw0FaZsiTj/6yJ2BInseg/K4+0NoxBAvS+dYRJQB1 LrtpXXaMJ3Jdn9cxNLs9kqAAdd97y/2vlPAkkGivStT5wOL6/EKcPvem3ffSLOpPjTbD ZTySwcwxunXziwnRTPoykunzU1215nuvBpt//gzP3xj+tIPPdGsoq1FB7ErwcA6Qp72F r+ZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Ktb2AKDD; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-71101-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71101-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ji6-20020a170907980600b00a3e473bf9cesi1700591ejc.887.2024.02.19.02.12.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 02:12:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71101-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Ktb2AKDD; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-71101-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71101-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B05181F22E02 for ; Mon, 19 Feb 2024 10:11:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4E2B2561A; Mon, 19 Feb 2024 10:11:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Ktb2AKDD" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (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 EB97725574; Mon, 19 Feb 2024 10:11:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708337498; cv=none; b=Hq57erwGzYQVmOEovQ0RzcvUdIaFFOialzT/kvBrQ12hObCjD1pXzoxIFyE9RIeo8+F+ZfDJyLbJHqVOVJYJfmRYSkzRdn4B9OSPyMYaefbRtZCVFQi0w5qLzcEGRXdX0Fp/TX0lqZ9WTCOnBk3ByXnBzo6kcfUGD40fLOOdcGw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708337498; c=relaxed/simple; bh=BMkkhuKdON4JFZpecVwN90mUFXfKmOeyHVVeBOHZJbg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jg+sEYGiDETrqXTzaxUsO/1ECY4Oq925KZfKaUG1bSLpHbWYtEIlFEQO3bAuF2MzB1x8arjwooF2VSLBZFUmZovDLiMxWDztI2jsQjhDu/Pcxh7z1Fn7+gSOb9rhe5WjpojkJc1xb6OAOM37LC6PDT8s/Wx2wzP3yrj3nXsQaSo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=Ktb2AKDD; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from pyrite.rasen.tech (h175-177-049-156.catv02.itscom.jp [175.177.49.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A388866F; Mon, 19 Feb 2024 11:11:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1708337484; bh=BMkkhuKdON4JFZpecVwN90mUFXfKmOeyHVVeBOHZJbg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ktb2AKDDnf4Nc5TQ3VpTXsQcoDku1HYDQBbS+0isGB9Udu8nvhda1xBdmctkDrp4a VmGyqVI11UIIAb/H/tkS11uvD0ZWxB2RA2+XThOuOfpHlaYRiVeXkfIzVgB2vwXmNP /qa8fXlpP2+Qb9Ym2nVtBiMZa8U+re/XvP7HYPvQ= Date: Mon, 19 Feb 2024 19:11:20 +0900 From: Paul Elder To: Umang Jain Cc: Adam Ford , =?utf-8?Q?Ond=C5=99ej?= Jirman , Laurent Pinchart , linux-kernel@vger.kernel.org, Dafna Hirschfeld , Mauro Carvalho Chehab , Heiko Stuebner , "open list:ROCKCHIP ISP V1 DRIVER" , "open list:ROCKCHIP ISP V1 DRIVER" , "moderated list:ARM/Rockchip SoC support" Subject: Re: [PATCH] media: rkisp1: Allow higher input resolution Message-ID: References: <20240217185202.1754750-1-megi@xff.cz> <20240218205908.GA12766@pendragon.ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 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 > > > > > > > > > > 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 > > > > > --- > > > > > 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 >