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] [day] [month] [year] [list]
Message-ID: <CANiDSCu_mFQQVkDb_gSyXeb1_Tu+DxSeHYvGsGp6XVDuOdPyjQ@mail.gmail.com>
Date: Tue, 17 Dec 2024 16:24:27 +0100
From: Ricardo Ribalda <ribalda@...omium.org>
To: Rob Herring <robh@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, 
	Conor Dooley <conor+dt@...nel.org>, Mauro Carvalho Chehab <mchehab@...nel.org>, 
	Jacopo Mondi <jacopo@...ndi.org>, Sakari Ailus <sakari.ailus@...ux.intel.com>, 
	linux-usb@...r.kernel.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-media@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: usb: usb-device: Add panel-location

Hi Rob

On Tue, 17 Dec 2024 at 16:02, Rob Herring <robh@...nel.org> wrote:
>
> On Thu, Dec 12, 2024 at 09:44:37PM +0000, Ricardo Ribalda wrote:
> > For some devices like cameras the system needs to know where they are
> > mounted.
>
> Why do you need this and why only this property and not the dozens
> others ACPI has?

Userspace needs that information to correctly show it in the UI. Eg;

- User facing camera needs to be mirrored during preview.
- The user facing camera is selected by default during videoconferences
- The world facing camera is selected by default when taking a photo
- User facing camera have different parameter defaults than world facing.

Right now, the only camera driver that expose the ACPI location
information is the IPU from intel
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/media/pci/intel/ipu-bridge.c#n258

And they are only using the panel.

If we need more information we can consider adding more parameters in
the future.


>
> >
> > ACPI has a property for this purpose, which is parsed by
> > acpi_get_physical_device_location():
> > https://uefi.org/htmlspecs/ACPI_Spec_6_4_html/06_Device_Configuration/Device_Configuration.html#pld-physical-location-of-device
> >
> > In DT we have similar property for video-interface-devices called
> > orientation, but it is limited to the requirements of video devices:
> > Documentation/devicetree/bindings/media/video-interface-devices.yaml
> >
> > Add a new property for usb-devices that matches the behavior of
> > ACPI's _PLD.
> >
> > Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> > ---
> >  Documentation/devicetree/bindings/usb/usb-device.yaml | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/usb-device.yaml b/Documentation/devicetree/bindings/usb/usb-device.yaml
> > index da890ee60ce6..1ce79c1c3b31 100644
> > --- a/Documentation/devicetree/bindings/usb/usb-device.yaml
> > +++ b/Documentation/devicetree/bindings/usb/usb-device.yaml
> > @@ -42,6 +42,20 @@ properties:
> >        port to which this device is attached. The range is 1-255.
> >      maxItems: 1
> >
> > +  panel-location:
> > +    description: Describes which panel surface of the system's housing the USB
> > +      device resides on. It has the same meaning as the `ACPI`'s `_PLD` Panel
> > +      object.
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    enum:
> > +      - 0 # Top.
> > +      - 1 # Bottom.
> > +      - 2 # Left.
> > +      - 3 # Right.
> > +      - 4 # Front (aka as User Facing).
> > +      - 5 # Back (aka as World Facing).
> > +      - 6 # Unknown.
> > +
> >    "#address-cells":
> >      description: should be 1 for hub nodes with device nodes,
> >        should be 2 for device nodes with interface nodes.
> >
> > ---
> > base-commit: eefa7a9c069908412f8f5d15833901d1b46ae1b2
> > change-id: 20241212-usb-orientation-8e3717ebb02a
> >
> > Best regards,
> > --
> > Ricardo Ribalda <ribalda@...omium.org>
> >



-- 
Ricardo Ribalda

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ