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 3F1001DE8AE; Wed, 19 Feb 2025 08:49:47 +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=1739954987; cv=none; b=QKe9GpgDe6qk3zzegERxet/3fDalA28oRD0HFJ2bwe1XWHYnJ78VoVLb8YziB9/dqURH41LPTm1KOcvvXV31oQZwiSc9eZwMHVoYMIWi2hLqXUtxqvi6zs5QeVmcH7/fk8dmPIItQ6bwTljCwCKTdqzeIeBZ1rXeFjt27v98QMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739954987; c=relaxed/simple; bh=gXZqU8Dte7ANQ1pveeI4crInpVbP5HSihwansS+cUJ8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LEvA55jDMApUrVkEWKnbZyjDdhVxeHgkQLiyXK35/4bRseYkCF0mxQ8tK5nxXlMR8KT6AihqFuaPu88JwJy/FYf7hmLcZ2t0t1d3v6v0TdvdjM3VNd2QKE//BM5EhLGVz6qkYZdgDmPzH6CfDd4KYamTcVmCfZey5TyVvrlY1Ek= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=P7fu7+6q; 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="P7fu7+6q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 842A0C4CED1; Wed, 19 Feb 2025 08:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739954987; bh=gXZqU8Dte7ANQ1pveeI4crInpVbP5HSihwansS+cUJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P7fu7+6qSxlzdEaiwu0gVA9UMr6ssqNfWfANTx4ZyW7yMxe2C2qPcE4c/48K8MJd5 2a7YbhSxTKhzYNW+gkc3TnFSU9xcOltqVsJ9Gp7AasFZq4D4/gXSU2Bmd8knsiDqhj HjGewAd7qRMa4CHGA38wwezJOoZUttK+C84yF54A= 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.12 067/230] media: bcm2835-unicam: Disable trigger mode operation Date: Wed, 19 Feb 2025 09:26:24 +0100 Message-ID: <20250219082604.331066423@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250219082601.683263930@linuxfoundation.org> References: <20250219082601.683263930@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-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 a1d93c14553d8..9f81e1582a300 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