From patchwork Tue Feb 13 13:08:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 772556 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 3EDC950A6F for ; Tue, 13 Feb 2024 13:08:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707829714; cv=none; b=mUF9oPX1CzzlP88yO5vNHz+Mh69R/XLhduDEL+d895iNUvYI/a7lp6hb0upxffS3Kej6LMPAeGqmCookyPVhVG5nwKlme0j64vaU/9j6UAcyH97VNKGAYI2J88kYObEok1a31mjbTzYdFcMrIlUyx7vzTm7JF0PPi+6oFhgBqqY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707829714; c=relaxed/simple; bh=dOhCsLh7yVfNpfTWyJKGunc8t7LfAL+lYrcSkF0ZIdM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mOFGqm6hi/0NOTUw623bf68+8zKqRMPk+0XyEMdIlcyQaMW1vm9mkt1PX8+9Sbyf2xPuhM2WAA6dxWpgbJ2QPWhN+aQaFSbDU7nlsJwY7Yxwy6jDrhHAuvzUz/j9ZmArPbn8TAxeDyZswfeuCcwpn5vICeZM/Hm0Ef+eRMapUQo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=bi8eVLqG; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="bi8eVLqG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707829713; x=1739365713; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dOhCsLh7yVfNpfTWyJKGunc8t7LfAL+lYrcSkF0ZIdM=; b=bi8eVLqGiW017ywTU4LItFpjhvkpLRQn/AGKE88vsNokI550/Az5vUuQ sU7nD0oM8qyR+J31UqzP0dSSsIUTqNYMit/xRiuU6FZYmidhkh/29b2O/ KKG+01kxx8daR133tNnk5gxHMEmZfKfUkWhImYqvTGcyZNFGfx0fezuwU Qu6hcit3Cub1LahIHgmSPJ/09twRfH7oNgAJ3QQbmP6f1+ZLU23vnNHAR AfSUP0kP+5pkfN5K7P+iuoDsH+zFHJuvcwixp304C1qpt92SrRrKkiqRt fHmD99NS1S6/r3qQ1OZoTUPbsDjirISev7mRVb2pb2D9YzB7TKwfVzofB Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="1739940" X-IronPort-AV: E=Sophos;i="6.06,157,1705392000"; d="scan'208";a="1739940" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 05:08:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,157,1705392000"; d="scan'208";a="26061687" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 05:08:20 -0800 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 2AE1E11F855; Tue, 13 Feb 2024 15:08:17 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: Hans de Goede , Daniel Scally , Bingbu Cao Subject: [PATCH v2 1/4] media: ipu-bridge: Add ov01a10 in Dell XPS 9315 Date: Tue, 13 Feb 2024 15:08:12 +0200 Message-Id: <20240213130815.382792-2-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240213130815.382792-1-sakari.ailus@linux.intel.com> References: <20240213130815.382792-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add Omnivision ov01a10 sensor used in Dell XPS 9315, and use the driver default frequency. Signed-off-by: Sakari Ailus Reviewed-by: Daniel Scally --- drivers/media/pci/intel/ipu-bridge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index f980e3125a7b..b2cf80d62ba2 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -60,6 +60,8 @@ static const struct ipu_sensor_config ipu_supported_sensors[] = { IPU_SENSOR_CONFIG("OVTIDB10", 1, 560000000), /* GalaxyCore GC0310 */ IPU_SENSOR_CONFIG("INT0310", 0), + /* Omnivision ov01a10 */ + IPU_SENSOR_CONFIG("OVTI01A0", 1, 400000000), }; static const struct ipu_property_names prop_names = { From patchwork Tue Feb 13 13:08:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 772555 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 DC9A251020 for ; Tue, 13 Feb 2024 13:08:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707829716; cv=none; b=t8hTwdCjSqlk2yb/5vya/jTT1DyUejyL/vnUYGqFWFOXbPVFZ6t4e/M9bZnCu7tE5AzoM1rSSv559d6AlcgjhiB391onIl8HHr6BnztKCKqvG2gFKdfGTVdZqVdns6JhfRgxVkuDUUDjXz2J2OR+unZ9f42yDUKP+KYIBXjimKo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707829716; c=relaxed/simple; bh=Uhh3mxWZGmejQJ96IaMaKBX24BqSqQCwgOvIMSvGj3Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WOgkxq2EzhV9CsZplbUVmGpLEFGF54vXr2+Gber5md4+zBJeEe4vLyNcaEjvvkTFYidHU97mldYDAOrgpB/AHfj3kAGZpzoPLZIgBcgGIRqTyrK+D2v40Icq+bhVeRth4tmmFs+gS++9mP/2XlepmN6n/BVQ4oRh/ZRusGAEhKE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=i2zu4E5A; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="i2zu4E5A" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707829715; x=1739365715; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Uhh3mxWZGmejQJ96IaMaKBX24BqSqQCwgOvIMSvGj3Y=; b=i2zu4E5ABZ7bB58M55MXtbI1J4bS3KTr9tCuHeCHL0g4RVWXvomq4hWL yDFLdEyrnSM3iBblnHe8cbjjRtm6S/2/QLygZFkDxpLf38nI32k7VLQ3l l39pNeqJB/Lt99tdP+VapsUIBHF3E8oG5j7Kydi/KTJT+e8iBEkfXk+ha tryhP+LmWeugkKnwAQgPziJ3cLdkTXc3PxEDsSikj58jeNDJJ3xVzhaU0 +OY7YGN1D7obNLaZR0tswyPC45ql0J663qg/l30hXJHDqQH1rSa+LaXZa +x9/oz3GYuLW5lWz+Q55ptMtpI5WjEUuWa3HzcoI+0do/6hUIQdKPDrJd A==; X-IronPort-AV: E=McAfee;i="6600,9927,10982"; a="1739950" X-IronPort-AV: E=Sophos;i="6.06,157,1705392000"; d="scan'208";a="1739950" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 05:08:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,157,1705392000"; d="scan'208";a="26061694" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2024 05:08:21 -0800 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id 73A0C11FA58; Tue, 13 Feb 2024 15:08:18 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: Hans de Goede , Daniel Scally , Bingbu Cao Subject: [PATCH v2 3/4] media: ipu-bridge: Serialise calls to IPU bridge init Date: Tue, 13 Feb 2024 15:08:14 +0200 Message-Id: <20240213130815.382792-4-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240213130815.382792-1-sakari.ailus@linux.intel.com> References: <20240213130815.382792-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The IPU bridge initialisation will be called from multiple locations in the future. Serialise the access to devices' fwnodes in this context. Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu-bridge.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index 735c62c37c22..e994db4f4d91 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -766,6 +766,8 @@ static int ipu_bridge_check_fwnode_graph(struct fwnode_handle *fwnode) return ipu_bridge_check_fwnode_graph(fwnode->secondary); } +static DEFINE_MUTEX(ipu_bridge_mutex); + int ipu_bridge_init(struct device *dev, ipu_parse_sensor_fwnode_t parse_sensor_fwnode) { @@ -774,6 +776,8 @@ int ipu_bridge_init(struct device *dev, unsigned int i; int ret; + guard(mutex)(&ipu_bridge_mutex); + if (!ipu_bridge_check_fwnode_graph(dev_fwnode(dev))) return 0;