Linux Media Controller development
 help / color / mirror / Atom feed
From: Dan Scally <dan.scally@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>, linux-media@vger.kernel.org
Cc: antti.laakso@intel.com, Lixu Zhang <lixu.zhang@intel.com>,
	Miguel Vadillo <miguel.vadillo@intel.com>,
	Hans de Goede <hansg@kernel.org>,
	"Sapre, Sarang" <sarang.sapre@intel.com>
Subject: Re: [PATCH v2 1/3] media: ipu-bridge: Add ipu_bridge_get_ipu6()
Date: Wed, 9 Sep 2026 15:24:22 +0100	[thread overview]
Message-ID: <edd88b99-b440-4514-b0ae-2ca2c1965fdf@ideasonboard.com> (raw)
In-Reply-To: <20260909081953.3089179-2-sakari.ailus@linux.intel.com>

Hi Sakari

On 09/09/2026 09:19, Sakari Ailus wrote:
> Add ipu_bridge_get_ipu6() for obtaining the IPU 6 (or soon later) PCI
> device. This isn't technically a job of the IPU bridge, but the
> functionality is required in conjunction with the firmware definitions
> that necessitate the use of the IPU bridge on many systems.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---

Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>

>   drivers/media/pci/intel/ipu-bridge.c | 14 ++++++++++++++
>   include/media/ipu-bridge.h           |  2 ++
>   2 files changed, 16 insertions(+)
> 
> diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
> index 7e65491faf6d..67a1f233c4c6 100644
> --- a/drivers/media/pci/intel/ipu-bridge.c
> +++ b/drivers/media/pci/intel/ipu-bridge.c
> @@ -8,6 +8,7 @@
>   #include <linux/dmi.h>
>   #include <linux/i2c.h>
>   #include <linux/mei_cl_bus.h>
> +#include <linux/pci.h>
>   #include <linux/platform_device.h>
>   #include <linux/pm_runtime.h>
>   #include <linux/property.h>
> @@ -15,6 +16,7 @@
>   #include <linux/workqueue.h>
>   
>   #include <media/ipu-bridge.h>
> +#include <media/ipu6-pci-table.h>
>   #include <media/v4l2-fwnode.h>
>   
>   #define ADEV_DEV(adev) ACPI_PTR(&((adev)->dev))
> @@ -950,6 +952,18 @@ static int ipu_bridge_check_fwnode_graph(struct fwnode_handle *fwnode)
>   	return ipu_bridge_check_fwnode_graph(fwnode->secondary);
>   }
>   
> +struct pci_dev *ipu_bridge_get_ipu6(void)
> +{
> +	struct pci_dev *ipu = NULL;
> +
> +	for (unsigned int i = 0; !ipu && ipu6_pci_tbl[i].vendor; i++)
> +		ipu = pci_get_device(ipu6_pci_tbl[i].vendor,
> +				     ipu6_pci_tbl[i].device, NULL);
> +
> +	return ipu;
> +}
> +EXPORT_SYMBOL_NS_GPL(ipu_bridge_get_ipu6, "INTEL_IPU_BRIDGE");
> +
>   static DEFINE_MUTEX(ipu_bridge_mutex);
>   
>   int ipu_bridge_init(struct device *dev,
> diff --git a/include/media/ipu-bridge.h b/include/media/ipu-bridge.h
> index 16fac765456e..b46b6693f856 100644
> --- a/include/media/ipu-bridge.h
> +++ b/include/media/ipu-bridge.h
> @@ -169,11 +169,13 @@ struct ipu_bridge {
>   };
>   
>   #if IS_ENABLED(CONFIG_IPU_BRIDGE)
> +struct pci_dev *ipu_bridge_get_ipu6(void);
>   int ipu_bridge_init(struct device *dev,
>   		    ipu_parse_sensor_fwnode_t parse_sensor_fwnode);
>   int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor);
>   int ipu_bridge_instantiate_vcm(struct device *sensor);
>   #else
> +static inline struct pci_dev *ipu_bridge_get_ipu6(void) { return NULL; }
>   /* Use a define to avoid the @parse_sensor_fwnode argument getting evaluated */
>   #define ipu_bridge_init(dev, parse_sensor_fwnode)	(0)
>   static inline int ipu_bridge_instantiate_vcm(struct device *s) { return 0; }


  parent reply	other threads:[~2026-09-09 14:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09  8:19 [PATCH 0/3] Rework IPU6 PCI table Sakari Ailus
2026-09-09  8:19 ` [PATCH v2 1/3] media: ipu-bridge: Add ipu_bridge_get_ipu6() Sakari Ailus
2026-09-09  9:18   ` Antti Laakso
2026-09-09 14:24   ` Dan Scally [this message]
2026-09-09  8:19 ` [PATCH v2 2/3] media: cvs: Use ipu_bridge_get_ipu6() Sakari Ailus
2026-09-09  9:19   ` Antti Laakso
2026-09-09 14:24   ` Dan Scally
2026-09-09  8:19 ` [PATCH v2 3/3] media: ivsc: " Sakari Ailus
2026-09-09  9:20   ` Antti Laakso
2026-09-09 14:24   ` Dan Scally

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=edd88b99-b440-4514-b0ae-2ca2c1965fdf@ideasonboard.com \
    --to=dan.scally@ideasonboard.com \
    --cc=antti.laakso@intel.com \
    --cc=hansg@kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=lixu.zhang@intel.com \
    --cc=miguel.vadillo@intel.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sarang.sapre@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox