From nobody Fri Oct 3 21:02:28 2025 Received: from fllvem-ot04.ext.ti.com (fllvem-ot04.ext.ti.com [198.47.19.246]) (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 4C3E32FD7A0; Mon, 25 Aug 2025 14:26:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.246 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756131970; cv=none; b=E8CV8XlrDHbixu3FMgGr7t8uuM+vU7VXj/d2VnnvPGkMg2YOmij8Ctr9++T+MCYtsfp1xu/SaGxYSSw8yE8L5Pys3vH25ADlIPiSml5jg4YBT7Z2000d8xRUPunGxDe1iaHwb0pS1lmwfX0PyWRL2ImGrSCpFubBffdLXZOoRy8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756131970; c=relaxed/simple; bh=Mld5ISGPALxOyvJoKBqf92b21BuUd63ks+esurEOXDM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=plS2yLzhIvkhVdIbxYvocj5IoDWX9IoTqahvm5QzeoY06jQ36mRXQi6ojG/exqLR0kyx7WO8Xpsl7DBXt1usNLhk+MiVAzfQpj+pjOPS9NEIxYqA1AsRRLnoX/cSBkyxVrjQzBxj48gLkdcMScDyHcW25o5DgtlRSe6YrF2MxlU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=PJ5bwJVm; arc=none smtp.client-ip=198.47.19.246 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="PJ5bwJVm" Received: from lelvem-sh01.itg.ti.com ([10.180.77.71]) by fllvem-ot04.ext.ti.com (8.15.2/8.15.2) with ESMTP id 57PEPaaw1294844; Mon, 25 Aug 2025 09:25:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1756131936; bh=/361XwHSvb122WZ867+lIgKqVCIqjCFUgdsiMSQZtRU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=PJ5bwJVm94QOpXdzcUBV8NUgHM7d91iabhEYHIGNWmreM/Rb5VotSclIr0lx8rjN4 yaeqkHVn10BMk29Zv4uwDjTQ0o2pWO6qT8AFHmVjxOmqyhwCQYDeenXu4stqZWzGJQ /3zCnnA06nMPCQlkH9SvULAZlQOSH+wmKDLIm+QU= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelvem-sh01.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 57PEPahP668976 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Mon, 25 Aug 2025 09:25:36 -0500 Received: from DFLE102.ent.ti.com (10.64.6.23) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Mon, 25 Aug 2025 09:25:35 -0500 Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55 via Frontend Transport; Mon, 25 Aug 2025 09:25:35 -0500 Received: from ws.dhcp.ti.com (ws.dhcp.ti.com [172.24.233.149]) by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 57PEPN3o3747540; Mon, 25 Aug 2025 09:25:30 -0500 From: Rishikesh Donadkar To: , , CC: , , , , , , , , , , , , , , , , , , Subject: [PATCH v5 01/14] media: ti: j721e-csi2rx: Remove word size alignment on frame width Date: Mon, 25 Aug 2025 19:55:09 +0530 Message-ID: <20250825142522.1826188-2-r-donadkar@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250825142522.1826188-1-r-donadkar@ti.com> References: <20250825142522.1826188-1-r-donadkar@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" j721e-csi2rx driver has a limitation of frame width being a multiple word size. However, there is no such limitation imposed by the hardware [1]. Remove this limitation from the driver. Link: https://www.ti.com/lit/pdf/spruj16 Signed-off-by: Rishikesh Donadkar Reviewed-by: Yemike Abhilash Chandra --- .../platform/ti/j721e-csi2rx/j721e-csi2rx.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/driver= s/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c index 3992f8b754b7..b3a27f4c3210 100644 --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c @@ -260,9 +260,6 @@ static void ti_csi2rx_fill_fmt(const struct ti_csi2rx_f= mt *csi_fmt, MAX_WIDTH_BYTES * 8 / csi_fmt->bpp); pix->height =3D clamp_t(unsigned int, pix->height, 1, MAX_HEIGHT_LINES); =20 - /* Width should be a multiple of transfer word-size */ - pix->width =3D rounddown(pix->width, pixels_in_word); - v4l2_fmt->type =3D V4L2_BUF_TYPE_VIDEO_CAPTURE; pix->pixelformat =3D csi_fmt->fourcc; pix->bytesperline =3D pix->width * (csi_fmt->bpp / 8); @@ -360,23 +357,15 @@ static int ti_csi2rx_enum_framesizes(struct file *fil= e, void *fh, struct v4l2_frmsizeenum *fsize) { const struct ti_csi2rx_fmt *fmt; - unsigned int pixels_in_word; =20 fmt =3D find_format_by_fourcc(fsize->pixel_format); if (!fmt || fsize->index !=3D 0) return -EINVAL; =20 - /* - * Number of pixels in one PSI-L word. The transfer happens in multiples - * of PSI-L word sizes. - */ - pixels_in_word =3D PSIL_WORD_SIZE_BYTES * 8 / fmt->bpp; - fsize->type =3D V4L2_FRMSIZE_TYPE_STEPWISE; - fsize->stepwise.min_width =3D pixels_in_word; - fsize->stepwise.max_width =3D rounddown(MAX_WIDTH_BYTES * 8 / fmt->bpp, - pixels_in_word); - fsize->stepwise.step_width =3D pixels_in_word; + fsize->stepwise.min_width =3D 1; + fsize->stepwise.max_width =3D MAX_WIDTH_BYTES * 8 / fmt->bpp; + fsize->stepwise.step_width =3D 1; fsize->stepwise.min_height =3D 1; fsize->stepwise.max_height =3D MAX_HEIGHT_LINES; fsize->stepwise.step_height =3D 1; --=20 2.34.1