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: <aG2t4cxwXKJ9MSQX@kekkonen.localdomain>
Date: Tue, 8 Jul 2025 23:46:41 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Ricardo Ribalda <ribalda@...omium.org>
Cc: Hans de Goede <hdegoede@...hat.com>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Hans Verkuil <hverkuil@...all.nl>,
	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>, 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 05/12] media: ipu-bridge: Use v4l2_fwnode for unknown
 rotations

On Tue, Jul 08, 2025 at 04:58:25PM +0200, Ricardo Ribalda wrote:
> On Tue, 8 Jul 2025 at 14:21, Sakari Ailus <sakari.ailus@...ux.intel.com> wrote:
> >
> > Hi Ricardo,
> >
> > On Tue, Jul 08, 2025 at 02:09:28PM +0200, Ricardo Ribalda wrote:
> > > On Tue, 8 Jul 2025 at 11:22, Sakari Ailus <sakari.ailus@...ux.intel.com> wrote:
> > > >
> > > > Hi Ricardo,
> > > >
> > > > On Tue, Jul 08, 2025 at 11:16:25AM +0200, Ricardo Ribalda wrote:
> > > > > Hi Sakari
> > > > >
> > > > > Thanks for your review
> > > > >
> > > > > On Mon, 7 Jul 2025 at 23:45, Sakari Ailus <sakari.ailus@...ux.intel.com> wrote:
> > > > > >
> > > > > > Hi Ricardo,
> > > > > >
> > > > > > On Thu, Jun 05, 2025 at 05:52:58PM +0000, Ricardo Ribalda wrote:
> > > > > > > The v4l2_fwnode_device_properties contains information about the
> > > > > > > rotation. Use it if the ssdb data is inconclusive.
> > > > > >
> > > > > > As SSDB and _PLD provide the same information, are they always aligned? Do
> > > > > > you have any experience on how is this actually in firmware?
> > > > >
> > > > > Not really, in ChromeOS we are pretty lucky to control the firmware.
> > > > >
> > > > > @HdG Do you have some experience/opinion here?
> > > > >
> > > > > >
> > > > > > _PLD is standardised so it would seem reasonable to stick to that -- if it
> > > > > > exists. Another approach could be to pick the one that doesn't translate to
> > > > > > a sane default (0°).
> > > > >
> > > > > I'd rather stick to the current prioritization unless there is a
> > > > > strong argument against it. Otherwise there is a chance that we will
> > > > > have regressions (outside CrOS)
> > > >
> > > > My point was rather there are no such rules currently for rotation: only
> > > > SSDB was being used by the IPU bridge to obtain the rotation value,
> > > > similarly only _PLD is consulted when it comes to orientation.
> > >
> > > So something like this:?
> > >
> > > static u32 ipu_bridge_parse_rotation(struct acpi_device *adev,
> > >                                      struct ipu_sensor_ssdb *ssdb,
> > >                                      struct
> > > v4l2_fwnode_device_properties *props)
> > > {
> > >         if (props->rotation != V4L2_FWNODE_PROPERTY_UNSET)
> > >                 return props->rotation;
> > >
> > >         switch (ssdb->degree) {
> > >         case IPU_SENSOR_ROTATION_NORMAL:
> > >                 return 0;
> > >         case IPU_SENSOR_ROTATION_INVERTED:
> > >                 return 180;
> > >         }
> > >
> > >         dev_warn(ADEV_DEV(adev),
> > >                  "Unknown rotation %d. Assume 0 degree rotation\n",
> > >                  ssdb->degree);
> >
> > Maybe:
> >
> >         acpi_handle_warn(acpi_device_handle(adev), ...);
> >
> > ?
> >
> > >         return 0;
> > > }
> >
> > Looks good to me. Maybe something similar for orientation?
> 
> Do you mean using ssdb also for orientation or using acpi_handle_warn?
> 
> 
> I cannot find anything related to orientation for SSDB
> https://github.com/coreboot/coreboot/blob/main/src/drivers/intel/mipi_camera/chip.h#L150
> 
> Am I looking in the right place?

Ah, maybe SSDB has only rotation? At least it's less duplicated information
in different format, so that's a good thing. So this just applies to
rotation, it seems.

-- 
Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ