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 AD55147A53; Mon, 1 Apr 2024 15:49:52 +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=1711986592; cv=none; b=NAYBPUCtXbAJcX2vyCSJuOSIe/xq/qwOr8aMP69wqgnxdKi6ISW7HCMDBdGKUwyUcitGCL5aFCcqD6fBeSX614KoxF3MwTE7JzGF527kVpirXq2Qrase9V4lXk3h8oT363Van0WY07vfOPoWYWXcqNg5+4QDikExmVsvVFYu7Eo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711986592; c=relaxed/simple; bh=oBStzQIkte9z6V7UafLBfWr7S4Ty2LX017FRm7u91fk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lRl2dLq5TyqnVnZtXvPq8fjYDNcnRDLnVemOCR5QtvARVCSqR4cdYQHs0++kevsezmuX22yiruzxmbiIFmSeq/BkILl1y0Hw2YZIudyhltQnWBe0AUvAQCMTOiRWssblDyyKB5I3b64YNl10U3WkOhSXTonlo29ftXsMHIu+uBQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MDH28BqU; 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="MDH28BqU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B3D7C433C7; Mon, 1 Apr 2024 15:49:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711986592; bh=oBStzQIkte9z6V7UafLBfWr7S4Ty2LX017FRm7u91fk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MDH28BqUVecwzUd9kIhCyZvi9nNcw89ckJrbsA8kiGdB7Z+ofq9FEaEBgXOdV6fN1 VttaOvh3FxTCzw7eq6gmaMxprsA4WndqS2a/6eqG0MLa3PdRAfnw+YFTiot1WvS6dw hcb68ZyEYB3LJG1Hk3+NWywJrkPjcx1hQKglnB1M= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Laurent Pinchart , Sakari Ailus , Hans Verkuil , Sasha Levin Subject: [PATCH 6.8 023/399] media: nxp: imx8-isi: Mark all crossbar sink pads as MUST_CONNECT Date: Mon, 1 Apr 2024 17:39:49 +0200 Message-ID: <20240401152549.854672360@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240401152549.131030308@linuxfoundation.org> References: <20240401152549.131030308@linuxfoundation.org> User-Agent: quilt/0.67 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.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Laurent Pinchart [ Upstream commit 9b71021b2ea537632b01e51e3f003df24a637858 ] All the sink pads of the crossbar switch require an active link if they're part of the pipeline. Mark them with the MEDIA_PAD_FL_MUST_CONNECT flag to fail pipeline validation if they're not connected. This allows removing a manual check when translating streams. Cc: stable@vger.kernel.org # 6.1 Signed-off-by: Laurent Pinchart Acked-by: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- .../media/platform/nxp/imx8-isi/imx8-isi-crossbar.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c index 1bb1334ec6f2b..93a55c97cd173 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c @@ -160,13 +160,6 @@ mxc_isi_crossbar_xlate_streams(struct mxc_isi_crossbar *xbar, } pad = media_pad_remote_pad_first(&xbar->pads[sink_pad]); - if (!pad) { - dev_dbg(xbar->isi->dev, - "no pad connected to crossbar input %u\n", - sink_pad); - return ERR_PTR(-EPIPE); - } - sd = media_entity_to_v4l2_subdev(pad->entity); if (!sd) { dev_dbg(xbar->isi->dev, @@ -475,7 +468,8 @@ int mxc_isi_crossbar_init(struct mxc_isi_dev *isi) } for (i = 0; i < xbar->num_sinks; ++i) - xbar->pads[i].flags = MEDIA_PAD_FL_SINK; + xbar->pads[i].flags = MEDIA_PAD_FL_SINK + | MEDIA_PAD_FL_MUST_CONNECT; for (i = 0; i < xbar->num_sources; ++i) xbar->pads[i + xbar->num_sinks].flags = MEDIA_PAD_FL_SOURCE; -- 2.43.0