From patchwork Tue Jan 30 16:41:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13537710 X-Patchwork-Delegate: kieran@bingham.xyz Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E87A12839B; Tue, 30 Jan 2024 16:41:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706632898; cv=none; b=oe1OcYTCmqycqysqhXqJW+wcyvVPA45OgPBdMod2yNT1aWre1BVHwwyTSXUaPrRZn6jFbuScBku0ZDwQhw8db+84woUk12j9I8PwtsLvUxTt2zv6RFQw0y6JhCUQzYczTJArPKVaV2MKUEVwYvjlyHXEfByvpzXpKgF18gp64k4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706632898; c=relaxed/simple; bh=IghZs2bbWXVfJqQHcH/5+KZwhwJf5cgD6WVbZzRE/XU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Lxb9vGhpxecbGGCyBJf8MHu9T8eoB/5sANc2h9Mz0OERUTxo8mr/FirtK9RuUjpdErDHyjBbUVSnBNoD3bhSHO3gQsCjpn78YIVNn/5ghG8uZP7QcAVrM/ppsJlns/2XXFGWYsJH95tyn/LXQ+pVKZqAEnVcxbaAEUXN4rL3IHM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.05,230,1701097200"; d="scan'208";a="196171782" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 31 Jan 2024 01:41:34 +0900 Received: from localhost.localdomain (unknown [10.226.92.244]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id E8D8A4004BAC; Wed, 31 Jan 2024 01:41:30 +0900 (JST) From: Biju Das To: Mauro Carvalho Chehab Cc: Biju Das , Hans Verkuil , Sakari Ailus , Laurent Pinchart , =?utf-8?q?Uwe_Kleine-?= =?utf-8?q?K=C3=B6nig?= , Rob Herring , Lad Prabhakar , linux-media@vger.kernel.org, Geert Uytterhoeven , Biju Das , linux-renesas-soc@vger.kernel.org, Laurent Pinchart Subject: [PATCH v2 RESEND 3/4] media: platform: rzg2l-cru: rzg2l-video: Fix image processing initialization Date: Tue, 30 Jan 2024 16:41:14 +0000 Message-Id: <20240130164115.116613-4-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240130164115.116613-1-biju.das.jz@bp.renesas.com> References: <20240130164115.116613-1-biju.das.jz@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 As per section 35.3.1 Starting Reception for the MIPI CSI-2 Input on the latest hardware manual (R01UH0914EJ0140 Rev.1.40) it is mentioned that initialize the AXI master first and then initialize the image processing. Fix the start procedure as per the hardware manual. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart --- v1->v2: * Added Rb tag from Laurent. * Added a blank space after manual in commit description. --- .../media/platform/renesas/rzg2l-cru/rzg2l-video.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c index d0ffa90bc656..a7d6fe831d54 100644 --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c @@ -430,13 +430,6 @@ int rzg2l_cru_start_image_processing(struct rzg2l_cru_dev *cru) spin_lock_irqsave(&cru->qlock, flags); - /* Initialize image convert */ - ret = rzg2l_cru_initialize_image_conv(cru, fmt); - if (ret) { - spin_unlock_irqrestore(&cru->qlock, flags); - return ret; - } - /* Select a video input */ rzg2l_cru_write(cru, CRUnCTRL, CRUnCTRL_VINSEL(0)); @@ -450,6 +443,13 @@ int rzg2l_cru_start_image_processing(struct rzg2l_cru_dev *cru) /* Initialize the AXI master */ rzg2l_cru_initialize_axi(cru); + /* Initialize image convert */ + ret = rzg2l_cru_initialize_image_conv(cru, fmt); + if (ret) { + spin_unlock_irqrestore(&cru->qlock, flags); + return ret; + } + /* Enable interrupt */ rzg2l_cru_write(cru, CRUnIE, CRUnIE_EFE);