From patchwork Fri May 9 10:07:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Ha=C5=82asa?= X-Patchwork-Id: 889226 Received: from ni.piap.pl (ni.piap.pl [195.187.100.5]) (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 1D731222576; Fri, 9 May 2025 10:07:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.187.100.5 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746785226; cv=none; b=R80PFjwvVUDJrgEORDyZXRadCIGieDHBVIbdDfsWKvVw6JKIEDoKotF6U+GjphB/5O4Oiiraj1vfixrJKYK9CB0Ik5K+j3BNKx69+TBdl/yXgewqLK/Ei8HycipazgfjWmwtHM6AYtcCJ4pMnPckd43yJOs2wZEVbGskPv2eK2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746785226; c=relaxed/simple; bh=pZd/znGo/jxzEhRwIHo1wRIwFkzcN7UFQTeOMVaIPRI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=rPyZLNrXhkUWMkzh/g4Cf+bmDnxPCvJ1w0UL3tbRJtD2fvfyo/IQLWS54Gah3y7ZJT6Sz99QA7HELlHBGSGjE/Xbe6eCEMLra6fJV+uEfgp/xU1UDDPzVCGv3lQtwPI82lOGBqbNKa+c9+4jT0anSSxebw1E9fRMjHvYF2gyFN4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=piap.pl; spf=pass smtp.mailfrom=piap.pl; arc=none smtp.client-ip=195.187.100.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=piap.pl Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=piap.pl Received: from t19.piap.pl (OSB1819.piap.pl [10.0.9.19]) by ni.piap.pl (Postfix) with ESMTPS id 5E851C405A46; Fri, 9 May 2025 12:07:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl 5E851C405A46 From: =?utf-8?q?Krzysztof_Ha=C5=82asa?= To: Rui Miguel Silva , Laurent Pinchart , Martin Kepplinger Cc: Purism Kernel Team , Mauro Carvalho Chehab , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] Enable MIPI filtering by DT on i.MX8M* Sender: khalasa@piap.pl Date: Fri, 09 May 2025 12:07:01 +0200 Message-ID: Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In addition to raw image data, certain MIPI sensors send additional information like NULL packets or "embedded 8-bit non-image data". Without DT (data type) filtering, these packets end up in the frame buffer, corrupting it. Tested on i.MX8MP with IMX290 sensor. Signed-off-by: Krzysztof HaƂasa diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c index 29523bb84d95..d53a4262b63d 100644 --- a/drivers/media/platform/nxp/imx-mipi-csis.c +++ b/drivers/media/platform/nxp/imx-mipi-csis.c @@ -654,8 +654,7 @@ static void mipi_csis_set_params(struct mipi_csis_device *csis, val = mipi_csis_read(csis, MIPI_CSIS_CMN_CTRL); val &= ~MIPI_CSIS_CMN_CTRL_LANE_NR_MASK; val |= (lanes - 1) << MIPI_CSIS_CMN_CTRL_LANE_NR_OFFSET; - if (csis->info->version == MIPI_CSIS_V3_3) - val |= MIPI_CSIS_CMN_CTRL_INTER_MODE; + val |= MIPI_CSIS_CMN_CTRL_INTER_MODE; /* enable filtering by DT */ mipi_csis_write(csis, MIPI_CSIS_CMN_CTRL, val); __mipi_csis_set_format(csis, format, csis_fmt);