[v1,2/3] controls: rpi: Add ControlId control
diff mbox series

Message ID 20260324151714.3345-3-david.plowman@raspberrypi.com
State Superseded
Headers show
Series
  • Atomic control lists on Raspberry Pi
Related show

Commit Message

David Plowman March 24, 2026, 2:32 p.m. UTC
The ControlId identifies the sequence number of the request whose
controls have been applied to the images in this request for the first
time.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
---
 src/libcamera/control_ids_rpi.yaml | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Naushir Patuck March 26, 2026, 9:16 a.m. UTC | #1
Hi David,

Thank you for the patch.

On Tue, 24 Mar 2026 at 15:17, David Plowman
<david.plowman@raspberrypi.com> wrote:
>
> The ControlId identifies the sequence number of the request whose
> controls have been applied to the images in this request for the first
> time.
>
> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
> ---
>  src/libcamera/control_ids_rpi.yaml | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml
> index a8615112..aca023d7 100644
> --- a/src/libcamera/control_ids_rpi.yaml
> +++ b/src/libcamera/control_ids_rpi.yaml
> @@ -183,4 +183,14 @@ controls:
>          \sa SyncMode
>          \sa SyncReady
>          \sa SyncTimer
> +
> +  - ControlId:
> +      type: int64_t
> +      direction: out
> +      description: |
> +        This is the sequence number of the request whose control list has
> +        just been applied. Controls normally take several frames to apply,
> +        so the number here will refer to a request submitted a number of
> +        frames earlier.

This name, while it makes sense, is a bit unfortunate as we have class
ControlId in the public libcamera API.  Maybe a bit confusing for
users? Maybe ControlReference or ControlRef?

Regards,
Naush

> +
>  ...
> --
> 2.47.3
>
David Plowman March 27, 2026, 11:43 a.m. UTC | #2
Hi Naush

Thanks for the review.

On Thu, 26 Mar 2026 at 09:17, Naushir Patuck <naush@raspberrypi.com> wrote:
>
> Hi David,
>
> Thank you for the patch.
>
> On Tue, 24 Mar 2026 at 15:17, David Plowman
> <david.plowman@raspberrypi.com> wrote:
> >
> > The ControlId identifies the sequence number of the request whose
> > controls have been applied to the images in this request for the first
> > time.
> >
> > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
> > ---
> >  src/libcamera/control_ids_rpi.yaml | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> > diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml
> > index a8615112..aca023d7 100644
> > --- a/src/libcamera/control_ids_rpi.yaml
> > +++ b/src/libcamera/control_ids_rpi.yaml
> > @@ -183,4 +183,14 @@ controls:
> >          \sa SyncMode
> >          \sa SyncReady
> >          \sa SyncTimer
> > +
> > +  - ControlId:
> > +      type: int64_t
> > +      direction: out
> > +      description: |
> > +        This is the sequence number of the request whose control list has
> > +        just been applied. Controls normally take several frames to apply,
> > +        so the number here will refer to a request submitted a number of
> > +        frames earlier.
>
> This name, while it makes sense, is a bit unfortunate as we have class
> ControlId in the public libcamera API.  Maybe a bit confusing for
> users? Maybe ControlReference or ControlRef?
>
> Regards,
> Naush

Happy to rename, of course the billion dollar question is... to what?
Some more ideas:

ControlListRef
ControlListId
ControlListSequence

In the absence of strong screams to the contrary, I shall make a
pseudo-random choice...

Actually, I think I like ControlListSequence best? It is, after all,
the sequence number (of the request) where the control list came
from...

Thanks
David

>
> > +
> >  ...
> > --
> > 2.47.3
> >
Naushir Patuck March 27, 2026, 11:45 a.m. UTC | #3
On Fri, 27 Mar 2026 at 11:43, David Plowman
<david.plowman@raspberrypi.com> wrote:
>
> Hi Naush
>
> Thanks for the review.
>
> On Thu, 26 Mar 2026 at 09:17, Naushir Patuck <naush@raspberrypi.com> wrote:
> >
> > Hi David,
> >
> > Thank you for the patch.
> >
> > On Tue, 24 Mar 2026 at 15:17, David Plowman
> > <david.plowman@raspberrypi.com> wrote:
> > >
> > > The ControlId identifies the sequence number of the request whose
> > > controls have been applied to the images in this request for the first
> > > time.
> > >
> > > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
> > > ---
> > >  src/libcamera/control_ids_rpi.yaml | 10 ++++++++++
> > >  1 file changed, 10 insertions(+)
> > >
> > > diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml
> > > index a8615112..aca023d7 100644
> > > --- a/src/libcamera/control_ids_rpi.yaml
> > > +++ b/src/libcamera/control_ids_rpi.yaml
> > > @@ -183,4 +183,14 @@ controls:
> > >          \sa SyncMode
> > >          \sa SyncReady
> > >          \sa SyncTimer
> > > +
> > > +  - ControlId:
> > > +      type: int64_t
> > > +      direction: out
> > > +      description: |
> > > +        This is the sequence number of the request whose control list has
> > > +        just been applied. Controls normally take several frames to apply,
> > > +        so the number here will refer to a request submitted a number of
> > > +        frames earlier.
> >
> > This name, while it makes sense, is a bit unfortunate as we have class
> > ControlId in the public libcamera API.  Maybe a bit confusing for
> > users? Maybe ControlReference or ControlRef?
> >
> > Regards,
> > Naush
>
> Happy to rename, of course the billion dollar question is... to what?
> Some more ideas:
>
> ControlListRef
> ControlListId
> ControlListSequence
>
> In the absence of strong screams to the contrary, I shall make a
> pseudo-random choice...
>
> Actually, I think I like ControlListSequence best? It is, after all,
> the sequence number (of the request) where the control list came
> from...

That works for me!

Naush

>
> Thanks
> David
>
> >
> > > +
> > >  ...
> > > --
> > > 2.47.3
> > >

Patch
diff mbox series

diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml
index a8615112..aca023d7 100644
--- a/src/libcamera/control_ids_rpi.yaml
+++ b/src/libcamera/control_ids_rpi.yaml
@@ -183,4 +183,14 @@  controls:
         \sa SyncMode
         \sa SyncReady
         \sa SyncTimer
+
+  - ControlId:
+      type: int64_t
+      direction: out
+      description: |
+        This is the sequence number of the request whose control list has
+        just been applied. Controls normally take several frames to apply,
+        so the number here will refer to a request submitted a number of
+        frames earlier.
+
 ...