lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ecdac806-364e-42db-a238-a71b1b2d8624@kernel.org>
Date: Mon, 14 Jul 2025 15:11:44 +0200
From: Hans de Goede <hansg@...nel.org>
To: Ricardo Ribalda <ribalda@...omium.org>,
 Laurent Pinchart <laurent.pinchart@...asonboard.com>,
 Mauro Carvalho Chehab <mchehab@...nel.org>, Hans Verkuil
 <hverkuil@...all.nl>, Sakari Ailus <sakari.ailus@...ux.intel.com>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Linus Walleij
 <linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>,
 "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
 linux-gpio@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [PATCH v2 04/12] media: ipu-bridge: Use v4l2_fwnode_device_parse
 helper

Hi,

On 5-Jun-25 19:52, Ricardo Ribalda wrote:
> v4l2_fwnode_device_parse now supports acpi devices as well. Use the
> helper instead of re-implement the logic.
> 
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
>  drivers/media/pci/intel/ipu-bridge.c | 32 ++++++--------------------------
>  1 file changed, 6 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c
> index 83e682e1a4b77d9d97b2988750732d0b7c9087b3..020aa52f590d66b6d333adc56ebfb9ab0561db51 100644
> --- a/drivers/media/pci/intel/ipu-bridge.c
> +++ b/drivers/media/pci/intel/ipu-bridge.c
> @@ -253,36 +253,16 @@ static u32 ipu_bridge_parse_rotation(struct acpi_device *adev,
>  
>  static enum v4l2_fwnode_orientation ipu_bridge_parse_orientation(struct acpi_device *adev)
>  {

In patch 5/12 you add a "struct v4l2_fwnode_device_properties *props" parameter
to this function and move the calling of v4l2_fwnode_device_parse() to
ipu_bridge_parse_ssdb().

You might just as well do this here so that there is a bit less churn in
the series.

Regards,

Hans


> -	enum v4l2_fwnode_orientation orientation;
> -	struct acpi_pld_info *pld = NULL;
> +	struct v4l2_fwnode_device_properties props;
> +	int ret;
>  
> -	if (!acpi_get_physical_device_location(ACPI_PTR(adev->handle), &pld)) {
> -		dev_warn(ADEV_DEV(adev), "_PLD call failed, using default orientation\n");
> +	ret = v4l2_fwnode_device_parse(ADEV_DEV(adev), &props);
> +	if (!ret || props.rotation == V4L2_FWNODE_PROPERTY_UNSET) {
> +		dev_warn(ADEV_DEV(adev), "Using default orientation\n");
>  		return V4L2_FWNODE_ORIENTATION_EXTERNAL;
>  	}
>  
> -	switch (pld->panel) {
> -	case ACPI_PLD_PANEL_FRONT:
> -		orientation = V4L2_FWNODE_ORIENTATION_FRONT;
> -		break;
> -	case ACPI_PLD_PANEL_BACK:
> -		orientation = V4L2_FWNODE_ORIENTATION_BACK;
> -		break;
> -	case ACPI_PLD_PANEL_TOP:
> -	case ACPI_PLD_PANEL_LEFT:
> -	case ACPI_PLD_PANEL_RIGHT:
> -	case ACPI_PLD_PANEL_UNKNOWN:
> -		orientation = V4L2_FWNODE_ORIENTATION_EXTERNAL;
> -		break;
> -	default:
> -		dev_warn(ADEV_DEV(adev), "Unknown _PLD panel val %d\n",
> -			 pld->panel);
> -		orientation = V4L2_FWNODE_ORIENTATION_EXTERNAL;
> -		break;
> -	}
> -
> -	ACPI_FREE(pld);
> -	return orientation;
> +	return props.orientation;
>  }
>  
>  int ipu_bridge_parse_ssdb(struct acpi_device *adev, struct ipu_sensor *sensor)
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ