From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9C1AA1C5F29; Wed, 19 Feb 2025 08:34:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739954047; cv=none; b=g5SnNIOvih9oPtPdOaMSan+Ak16EpEAbZd37Hzpsdj4C5ruXEoX+v+8qWYvPsVd7OdvzcPSomtUgSWEO+RfUClUTBvFyVc6h1DaBdbOzpMObZ6abdZ20zkGIRSpjKyVCLyVLmOZ+sZIabwrtiMSYDYDvF4qnVhIyw2EGoz8IA9U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739954047; c=relaxed/simple; bh=o+DsA2a2gu4iO+DDyWFPDDxUNE/sd48P5B1g2USkXIM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=S6HrnOLZ4UFFw51z5ylw22ctn3D8LSWOnjhN4cOrqYCYCUQAMYNMWp8M0vg5OwadZfYZRyH/ww0HUwVqGsBoogA5pe0OgprwbPaGC3SX9KHCkScDXHOWfSY3cKAmcoGIkyFffP6crO0kahirvwIiYE+/6jc66YjDs2kflbky1gE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VWKre/OX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VWKre/OX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BEF8C4CED1; Wed, 19 Feb 2025 08:34:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739954047; bh=o+DsA2a2gu4iO+DDyWFPDDxUNE/sd48P5B1g2USkXIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VWKre/OXAT5R67Y5nZTssZGolEU+r6d1a8EjO0/vu7xoNYbQ+a50Ah5jVod4pRWNO LWctJNue3+H9RUfglLJ4NClWDKHqzJ8L/IdPKCP7eWhjku3rhP+4yZCDTNOlmIpaa1 KQv8+9qzJ0NraadxLNfuF3R14Ua8c/ngkxCgUOsU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Naushir Patuck , Jacopo Mondi , Sakari Ailus , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 6.13 080/274] media: bcm2835-unicam: Disable trigger mode operation Date: Wed, 19 Feb 2025 09:25:34 +0100 Message-ID: <20250219082612.753907761@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250219082609.533585153@linuxfoundation.org> References: <20250219082609.533585153@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Naushir Patuck [ Upstream commit 697a252bb2ea414cc1c0b4cf4e3d94a879eaf162 ] The imx219/imx708 sensors frequently generate a single corrupt frame (image or embedded data) when the sensor first starts. This can either be a missing line, or invalid samples within the line. This only occurrs using the upstream Unicam kernel driver. Disabling trigger mode elimiates this corruption. Since trigger mode is a legacy feature copied from the firmware driver and not expected to be needed, remove it. Tested on the Raspberry Pi cameras and shows no ill effects. Signed-off-by: Naushir Patuck Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/broadcom/bcm2835-unicam.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index 3aed0e493c81f..4090a8e477402 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -816,11 +816,6 @@ static irqreturn_t unicam_isr(int irq, void *dev) } } - if (unicam_reg_read(unicam, UNICAM_ICTL) & UNICAM_FCM) { - /* Switch out of trigger mode if selected */ - unicam_reg_write_field(unicam, UNICAM_ICTL, 1, UNICAM_TFC); - unicam_reg_write_field(unicam, UNICAM_ICTL, 0, UNICAM_FCM); - } return IRQ_HANDLED; } @@ -984,8 +979,7 @@ static void unicam_start_rx(struct unicam_device *unicam, unicam_reg_write_field(unicam, UNICAM_ANA, 0, UNICAM_DDL); - /* Always start in trigger frame capture mode (UNICAM_FCM set) */ - val = UNICAM_FSIE | UNICAM_FEIE | UNICAM_FCM | UNICAM_IBOB; + val = UNICAM_FSIE | UNICAM_FEIE | UNICAM_IBOB; line_int_freq = max(fmt->height >> 2, 128); unicam_set_field(&val, line_int_freq, UNICAM_LCIE_MASK); unicam_reg_write(unicam, UNICAM_ICTL, val); -- 2.39.5