[libcamera-devel] cam: kms_sink: select valid crtc
diff mbox series

Message ID 20211201164413.95396-1-ecurtin@redhat.com
State Superseded
Headers show
Series
  • [libcamera-devel] cam: kms_sink: select valid crtc
Related show

Commit Message

Eric Curtin Dec. 1, 2021, 4:44 p.m. UTC
When looping through possibleCrtcs on my machine, the only valid crtc is
actually the first one. This can be identified by checking if the clock
variable is non-zero.

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
---
 src/cam/drm.cpp      | 2 +-
 src/cam/drm.h        | 2 ++
 src/cam/kms_sink.cpp | 4 ++++
 3 files changed, 7 insertions(+), 1 deletion(-)

Comments

Laurent Pinchart Dec. 1, 2021, 5:13 p.m. UTC | #1
Hi Eric,

Thank you for the patch, and welcome to libcamera.

On Wed, Dec 01, 2021 at 04:44:13PM +0000, Eric Curtin wrote:
> When looping through possibleCrtcs on my machine, the only valid crtc is
> actually the first one. This can be identified by checking if the clock
> variable is non-zero.
> 
> Signed-off-by: Eric Curtin <ecurtin@redhat.com>
> ---
>  src/cam/drm.cpp      | 2 +-
>  src/cam/drm.h        | 2 ++
>  src/cam/kms_sink.cpp | 4 ++++
>  3 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
> index f2530091..808e5a87 100644
> --- a/src/cam/drm.cpp
> +++ b/src/cam/drm.cpp
> @@ -128,7 +128,7 @@ std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
>  }
>  
>  Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
> -	: Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
> +	: Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
>  {
>  }
>  
> diff --git a/src/cam/drm.h b/src/cam/drm.h
> index de57e445..d05e6d13 100644
> --- a/src/cam/drm.h
> +++ b/src/cam/drm.h
> @@ -149,12 +149,14 @@ public:
>  	Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
>  
>  	unsigned int index() const { return index_; }
> +	uint32_t clock() const { return crtc_->mode.clock; }
>  	const std::vector<const Plane *> &planes() const { return planes_; }
>  
>  private:
>  	friend Device;
>  
>  	unsigned int index_;
> +	const drmModeCrtc *crtc_;
>  	std::vector<const Plane *> planes_;
>  };
>  
> diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> index d30fba78..aa0b7a3c 100644
> --- a/src/cam/kms_sink.cpp
> +++ b/src/cam/kms_sink.cpp
> @@ -166,6 +166,10 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
>  	 */
>  	for (const DRM::Encoder *encoder : connector_->encoders()) {
>  		for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
> +			if (!crtc->clock()) {
> +				continue;
> +			}

I don't think this is quite right. When the Crtc instance is created,
drmModeCrtc.mode contains the currently configured mode. Any CRTC that
is not enabled when the cam application is started will thus be skipped,
even if it can be used.

On a side note, no need for curly braces.

> +
>  			for (const DRM::Plane *plane : crtc->planes()) {
>  				if (plane->type() != DRM::Plane::TypePrimary)
>  					continue;
Eric Curtin Dec. 1, 2021, 6:03 p.m. UTC | #2
Hi Laurent,

Thanks for welcoming me.

Another suggested solution would be welcome, let me describe
what happens, it's been reproduced on multiple machines.

So here the the CRTCs output of modetest on my machine:

CRTCs:
id      fb      pos     size
98      256     (0,0)   (1920x1080)
  #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
flags: nhsync, nvsync; type: preferred, driver
...
167     0       (0,0)   (0x0)
  #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
...
236     0       (0,0)   (0x0)
  #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:

So these lines are executed 3 times:

if (plane->supportsFormat(format)) {
    crtc_ = crtc;

crtc_ = 98, break out of loop, crtc_ = 167, break out of loop, crtc_ =
236, break out of loop.

So crtc_ is set in the end to be the one with an id of 236, which doesn't
display anything on my machine but 98 does.

A alternative to fix this would be apprecitaion!

I run like this:

build/src/cam/cam -c1 -DeDP-1 -spixelformat=YUYV -C0

Is mise le meas/Regards,

Eric Curtin



On Wed, 1 Dec 2021 at 17:14, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Eric,
>
> Thank you for the patch, and welcome to libcamera.
>
> On Wed, Dec 01, 2021 at 04:44:13PM +0000, Eric Curtin wrote:
> > When looping through possibleCrtcs on my machine, the only valid crtc is
> > actually the first one. This can be identified by checking if the clock
> > variable is non-zero.
> >
> > Signed-off-by: Eric Curtin <ecurtin@redhat.com>
> > ---
> >  src/cam/drm.cpp      | 2 +-
> >  src/cam/drm.h        | 2 ++
> >  src/cam/kms_sink.cpp | 4 ++++
> >  3 files changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
> > index f2530091..808e5a87 100644
> > --- a/src/cam/drm.cpp
> > +++ b/src/cam/drm.cpp
> > @@ -128,7 +128,7 @@ std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
> >  }
> >
> >  Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
> > -     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
> > +     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
> >  {
> >  }
> >
> > diff --git a/src/cam/drm.h b/src/cam/drm.h
> > index de57e445..d05e6d13 100644
> > --- a/src/cam/drm.h
> > +++ b/src/cam/drm.h
> > @@ -149,12 +149,14 @@ public:
> >       Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
> >
> >       unsigned int index() const { return index_; }
> > +     uint32_t clock() const { return crtc_->mode.clock; }
> >       const std::vector<const Plane *> &planes() const { return planes_; }
> >
> >  private:
> >       friend Device;
> >
> >       unsigned int index_;
> > +     const drmModeCrtc *crtc_;
> >       std::vector<const Plane *> planes_;
> >  };
> >
> > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> > index d30fba78..aa0b7a3c 100644
> > --- a/src/cam/kms_sink.cpp
> > +++ b/src/cam/kms_sink.cpp
> > @@ -166,6 +166,10 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
> >        */
> >       for (const DRM::Encoder *encoder : connector_->encoders()) {
> >               for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
> > +                     if (!crtc->clock()) {
> > +                             continue;
> > +                     }
>
> I don't think this is quite right. When the Crtc instance is created,
> drmModeCrtc.mode contains the currently configured mode. Any CRTC that
> is not enabled when the cam application is started will thus be skipped,
> even if it can be used.
>
> On a side note, no need for curly braces.
>
> > +
> >                       for (const DRM::Plane *plane : crtc->planes()) {
> >                               if (plane->type() != DRM::Plane::TypePrimary)
> >                                       continue;
>
> --
> Regards,
>
> Laurent Pinchart
>
Laurent Pinchart Dec. 1, 2021, 6:31 p.m. UTC | #3
Hi Eric,

On Wed, Dec 01, 2021 at 06:03:43PM +0000, Eric Curtin wrote:
> Hi Laurent,
> 
> Thanks for welcoming me.
> 
> Another suggested solution would be welcome, let me describe
> what happens, it's been reproduced on multiple machines.
> 
> So here the the CRTCs output of modetest on my machine:
> 
> CRTCs:
> id      fb      pos     size
> 98      256     (0,0)   (1920x1080)
>   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> flags: nhsync, nvsync; type: preferred, driver
> ...
> 167     0       (0,0)   (0x0)
>   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> ...
> 236     0       (0,0)   (0x0)
>   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> 
> So these lines are executed 3 times:
> 
> if (plane->supportsFormat(format)) {
>     crtc_ = crtc;
> 
> crtc_ = 98, break out of loop, crtc_ = 167, break out of loop, crtc_ =
> 236, break out of loop.
> 
> So crtc_ is set in the end to be the one with an id of 236, which doesn't
> display anything on my machine but 98 does.

The issue isn't so much the selected CRTC I believe, but the selected
connector (of course the CRTC plays a role there). Could you share the
full DRM device topology (CRTCs, encoders, connectors) ?

> A alternative to fix this would be apprecitaion!
> 
> I run like this:
> 
> build/src/cam/cam -c1 -DeDP-1 -spixelformat=YUYV -C0
> 
> On Wed, 1 Dec 2021 at 17:14, Laurent Pinchart wrote:
> >
> > Hi Eric,
> >
> > Thank you for the patch, and welcome to libcamera.
> >
> > On Wed, Dec 01, 2021 at 04:44:13PM +0000, Eric Curtin wrote:
> > > When looping through possibleCrtcs on my machine, the only valid crtc is
> > > actually the first one. This can be identified by checking if the clock
> > > variable is non-zero.
> > >
> > > Signed-off-by: Eric Curtin <ecurtin@redhat.com>
> > > ---
> > >  src/cam/drm.cpp      | 2 +-
> > >  src/cam/drm.h        | 2 ++
> > >  src/cam/kms_sink.cpp | 4 ++++
> > >  3 files changed, 7 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
> > > index f2530091..808e5a87 100644
> > > --- a/src/cam/drm.cpp
> > > +++ b/src/cam/drm.cpp
> > > @@ -128,7 +128,7 @@ std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
> > >  }
> > >
> > >  Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
> > > -     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
> > > +     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
> > >  {
> > >  }
> > >
> > > diff --git a/src/cam/drm.h b/src/cam/drm.h
> > > index de57e445..d05e6d13 100644
> > > --- a/src/cam/drm.h
> > > +++ b/src/cam/drm.h
> > > @@ -149,12 +149,14 @@ public:
> > >       Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
> > >
> > >       unsigned int index() const { return index_; }
> > > +     uint32_t clock() const { return crtc_->mode.clock; }
> > >       const std::vector<const Plane *> &planes() const { return planes_; }
> > >
> > >  private:
> > >       friend Device;
> > >
> > >       unsigned int index_;
> > > +     const drmModeCrtc *crtc_;
> > >       std::vector<const Plane *> planes_;
> > >  };
> > >
> > > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> > > index d30fba78..aa0b7a3c 100644
> > > --- a/src/cam/kms_sink.cpp
> > > +++ b/src/cam/kms_sink.cpp
> > > @@ -166,6 +166,10 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
> > >        */
> > >       for (const DRM::Encoder *encoder : connector_->encoders()) {
> > >               for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
> > > +                     if (!crtc->clock()) {
> > > +                             continue;
> > > +                     }
> >
> > I don't think this is quite right. When the Crtc instance is created,
> > drmModeCrtc.mode contains the currently configured mode. Any CRTC that
> > is not enabled when the cam application is started will thus be skipped,
> > even if it can be used.
> >
> > On a side note, no need for curly braces.
> >
> > > +
> > >                       for (const DRM::Plane *plane : crtc->planes()) {
> > >                               if (plane->type() != DRM::Plane::TypePrimary)
> > >                                       continue;
> >
Eric Curtin Dec. 1, 2021, 6:43 p.m. UTC | #4
$ sudo modetest
trying to open device 'i915'...done
Encoders:
id crtc type possible crtcs possible clones
238 98 TMDS 0x00000007 0x00000001
246 0 TMDS 0x00000007 0x00000002

Connectors:
id encoder status name size (mm) modes encoders
239 238 connected eDP-1          340x190 1 238
  modes:
index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
  #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
flags: nhsync, nvsync; type: preferred, driver
  props:
1 EDID:
flags: immutable blob
blobs:

value:
00ffffffffffff0030e45a0600000000
001d0104a5221378e238d5975e598e27
1c505400000001010101010101010101
010101010101243680a070381f403020
350058c2100000190000000000000000
00000000000000000000000000fe004c
4720446973706c61790a2020000000fe
004c503135365746432d5350443500e3
2 DPMS:
flags: enum
enums: On=0 Standby=1 Suspend=2 Off=3
value: 0
5 link-status:
flags: enum
enums: Good=0 Bad=1
value: 0
6 non-desktop:
flags: immutable range
values: 0 1
value: 0
4 TILE:
flags: immutable blob
blobs:

value:
240 panel orientation:
flags: immutable enum
enums: Normal=0 Upside Down=1 Left Side Up=2 Right Side Up=3
value: 0
242 Broadcast RGB:
flags: enum
enums: Automatic=0 Full=1 Limited 16:235=2
value: 0
243 max bpc:
flags: range
values: 6 12
value: 12
244 Colorspace:
flags: enum
enums: Default=0 RGB_Wide_Gamut_Fixed_Point=13
RGB_Wide_Gamut_Floating_Point=14 opRGB=7 DCI-P3_RGB_D65=11
BT2020_RGB=9 BT601_YCC=15 BT709_YCC=2 XVYCC_601=3 XVYCC_709=4
SYCC_601=5 opYCC_601=6 BT2020_CYCC=8 BT2020_YCC=10
value: 0
7 HDR_OUTPUT_METADATA:
flags: blob
blobs:

value:
245 scaling mode:
flags: enum
enums: Full=1 Center=2 Full aspect=3
value: 3
247 0 disconnected HDMI-A-1        0x0 0 246
  props:
1 EDID:
flags: immutable blob
blobs:

value:
2 DPMS:
flags: enum
enums: On=0 Standby=1 Suspend=2 Off=3
value: 3
5 link-status:
flags: enum
enums: Good=0 Bad=1
value: 0
6 non-desktop:
flags: immutable range
values: 0 1
value: 0
4 TILE:
flags: immutable blob
blobs:

value:
248 audio:
flags: enum
enums: force-dvi=18446744073709551614 off=18446744073709551615 auto=0 on=1
value: 0
242 Broadcast RGB:
flags: enum
enums: Automatic=0 Full=1 Limited 16:235=2
value: 0
249 aspect ratio:
flags: enum
enums: Automatic=0 4:3=1 16:9=2
value: 0
250 Colorspace:
flags: enum
enums: Default=0 SMPTE_170M_YCC=1 BT709_YCC=2 XVYCC_601=3 XVYCC_709=4
SYCC_601=5 opYCC_601=6 opRGB=7 BT2020_CYCC=8 BT2020_RGB=9
BT2020_YCC=10 DCI-P3_RGB_D65=11 DCI-P3_RGB_Theater=12
value: 0
251 content type:
flags: enum
enums: No Data=0 Graphics=1 Photo=2 Cinema=3 Game=4
value: 0
7 HDR_OUTPUT_METADATA:
flags: blob
blobs:

value:
252 max bpc:
flags: range
values: 8 12
value: 12
253 Content Protection:
flags: enum
enums: Undesired=0 Desired=1 Enabled=2
value: 0
254 HDCP Content Type:
flags: enum
enums: HDCP Type0=0 HDCP Type1=1
value: 0

CRTCs:
id fb pos size
98 259 (0,0) (1920x1080)
  #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
flags: nhsync, nvsync; type: preferred, driver
  props:
24 VRR_ENABLED:
flags: range
values: 0 1
value: 0
99 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
25 DEGAMMA_LUT:
flags: blob
blobs:

value:
26 DEGAMMA_LUT_SIZE:
flags: immutable range
values: 0 4294967295
value: 33
27 CTM:
flags: blob
blobs:

value:
28 GAMMA_LUT:
flags: blob
blobs:

value:
29 GAMMA_LUT_SIZE:
flags: immutable range
values: 0 4294967295
value: 262145
167 0 (0,0) (0x0)
  #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
  props:
24 VRR_ENABLED:
flags: range
values: 0 1
value: 0
168 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
25 DEGAMMA_LUT:
flags: blob
blobs:

value:
26 DEGAMMA_LUT_SIZE:
flags: immutable range
values: 0 4294967295
value: 33
27 CTM:
flags: blob
blobs:

value:
28 GAMMA_LUT:
flags: blob
blobs:

value:
29 GAMMA_LUT_SIZE:
flags: immutable range
values: 0 4294967295
value: 262145
236 0 (0,0) (0x0)
  #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
  props:
24 VRR_ENABLED:
flags: range
values: 0 1
value: 0
237 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
25 DEGAMMA_LUT:
flags: blob
blobs:

value:
26 DEGAMMA_LUT_SIZE:
flags: immutable range
values: 0 4294967295
value: 33
27 CTM:
flags: blob
blobs:

value:
28 GAMMA_LUT:
flags: blob
blobs:

value:
29 GAMMA_LUT_SIZE:
flags: immutable range
values: 0 4294967295
value: 262145

Planes:
id crtc fb CRTC x,y x,y gamma size possible crtcs
31 98 259 0,0 0,0 0        0x00000001
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 XR4H XB4H
AR4H AB4H YUYV YVYU UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV
XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001d00000018000000
06000000900000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
58523448584234484152344841423448
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fec33f06000000000000000000000000
0300000000000001ffffff1f00000000
00000000000000000200000000000001
ffffff1f000000000000000000000000
0100000000000001ffffff1f00000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
33 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
34 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
35 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
36 alpha:
flags: range
values: 0 65535
value: 65535
37 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
38 zpos:
flags: immutable range
values: 0 0
value: 0
39 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
40 0 0 0,0 0,0 0        0x00000001
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 XR4H XB4H
AR4H AB4H YUYV YVYU UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV
XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001d00000018000000
06000000900000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
58523448584234484152344841423448
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fec33f06000000000000000000000000
0300000000000001ffffff1f00000000
00000000000000000200000000000001
ffffff1f000000000000000000000000
0100000000000001ffffff1f00000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
42 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
43 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
44 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
45 alpha:
flags: range
values: 0 65535
value: 65535
46 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
47 zpos:
flags: immutable range
values: 1 1
value: 1
48 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
49 0 0 0,0 0,0 0        0x00000001
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 XR4H XB4H
AR4H AB4H YUYV YVYU UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV
XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001d00000018000000
06000000900000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
58523448584234484152344841423448
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fec33f06000000000000000000000000
0300000000000001ffffff1f00000000
00000000000000000200000000000001
ffffff1f000000000000000000000000
0100000000000001ffffff1f00000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
51 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
52 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
53 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
54 alpha:
flags: range
values: 0 65535
value: 65535
55 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
56 zpos:
flags: immutable range
values: 2 2
value: 2
57 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
58 0 0 0,0 0,0 0        0x00000001
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001900000018000000
06000000800000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
feff6300000000000000000000000000
0300000000000001ffffff0100000000
00000000000000000200000000000001
ffffff01000000000000000000000000
0100000000000001ffffff0100000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
60 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
61 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
62 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
63 alpha:
flags: range
values: 0 65535
value: 65535
64 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
65 zpos:
flags: immutable range
values: 3 3
value: 3
66 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
67 0 0 0,0 0,0 0        0x00000001
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001900000018000000
06000000800000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
feff6300000000000000000000000000
0300000000000001ffffff0100000000
00000000000000000200000000000001
ffffff01000000000000000000000000
0100000000000001ffffff0100000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
69 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
70 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
71 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
72 alpha:
flags: range
values: 0 65535
value: 65535
73 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
74 zpos:
flags: immutable range
values: 4 4
value: 4
75 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
76 0 0 0,0 0,0 0        0x00000001
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001500000018000000
06000000700000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fe3f0600000000000000000000000000
0300000000000001ffff1f0000000000
00000000000000000200000000000001
ffff1f00000000000000000000000000
0100000000000001ffff1f0000000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
78 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
79 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
80 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
81 alpha:
flags: range
values: 0 65535
value: 65535
82 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
83 zpos:
flags: immutable range
values: 5 5
value: 5
84 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
85 0 0 0,0 0,0 0        0x00000001
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001500000018000000
06000000700000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fe3f0600000000000000000000000000
0300000000000001ffff1f0000000000
00000000000000000200000000000001
ffff1f00000000000000000000000000
0100000000000001ffff1f0000000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
87 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
88 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
89 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
90 alpha:
flags: range
values: 0 65535
value: 65535
91 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
92 zpos:
flags: immutable range
values: 6 6
value: 6
93 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
94 0 0 0,0 0,0 0        0x00000001
  formats: AR24
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 2
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000000100000018000000
01000000200000004152323400000000
01000000000000000000000000000000
0000000000000000
in_formats blob decoded:
AR24:  LINEAR
96 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-180=0x4
value: 1
97 zpos:
flags: immutable range
values: 7 7
value: 7
100 0 0 0,0 0,0 0        0x00000002
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 XR4H XB4H
AR4H AB4H YUYV YVYU UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV
XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001d00000018000000
06000000900000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
58523448584234484152344841423448
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fec33f06000000000000000000000000
0300000000000001ffffff1f00000000
00000000000000000200000000000001
ffffff1f000000000000000000000000
0100000000000001ffffff1f00000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
102 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
103 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
104 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
105 alpha:
flags: range
values: 0 65535
value: 65535
106 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
107 zpos:
flags: immutable range
values: 0 0
value: 0
108 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
109 0 0 0,0 0,0 0        0x00000002
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 XR4H XB4H
AR4H AB4H YUYV YVYU UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV
XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001d00000018000000
06000000900000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
58523448584234484152344841423448
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fec33f06000000000000000000000000
0300000000000001ffffff1f00000000
00000000000000000200000000000001
ffffff1f000000000000000000000000
0100000000000001ffffff1f00000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
111 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
112 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
113 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
114 alpha:
flags: range
values: 0 65535
value: 65535
115 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
116 zpos:
flags: immutable range
values: 1 1
value: 1
117 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
118 0 0 0,0 0,0 0        0x00000002
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 XR4H XB4H
AR4H AB4H YUYV YVYU UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV
XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001d00000018000000
06000000900000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
58523448584234484152344841423448
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fec33f06000000000000000000000000
0300000000000001ffffff1f00000000
00000000000000000200000000000001
ffffff1f000000000000000000000000
0100000000000001ffffff1f00000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
120 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
121 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
122 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
123 alpha:
flags: range
values: 0 65535
value: 65535
124 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
125 zpos:
flags: immutable range
values: 2 2
value: 2
126 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
127 0 0 0,0 0,0 0        0x00000002
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001900000018000000
06000000800000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
feff6300000000000000000000000000
0300000000000001ffffff0100000000
00000000000000000200000000000001
ffffff01000000000000000000000000
0100000000000001ffffff0100000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
129 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
130 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
131 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
132 alpha:
flags: range
values: 0 65535
value: 65535
133 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
134 zpos:
flags: immutable range
values: 3 3
value: 3
135 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
136 0 0 0,0 0,0 0        0x00000002
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001900000018000000
06000000800000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
feff6300000000000000000000000000
0300000000000001ffffff0100000000
00000000000000000200000000000001
ffffff01000000000000000000000000
0100000000000001ffffff0100000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
138 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
139 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
140 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
141 alpha:
flags: range
values: 0 65535
value: 65535
142 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
143 zpos:
flags: immutable range
values: 4 4
value: 4
144 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
145 0 0 0,0 0,0 0        0x00000002
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001500000018000000
06000000700000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fe3f0600000000000000000000000000
0300000000000001ffff1f0000000000
00000000000000000200000000000001
ffff1f00000000000000000000000000
0100000000000001ffff1f0000000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
147 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
148 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
149 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
150 alpha:
flags: range
values: 0 65535
value: 65535
151 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
152 zpos:
flags: immutable range
values: 5 5
value: 5
153 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
154 0 0 0,0 0,0 0        0x00000002
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001500000018000000
06000000700000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fe3f0600000000000000000000000000
0300000000000001ffff1f0000000000
00000000000000000200000000000001
ffff1f00000000000000000000000000
0100000000000001ffff1f0000000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
156 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
157 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
158 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
159 alpha:
flags: range
values: 0 65535
value: 65535
160 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
161 zpos:
flags: immutable range
values: 6 6
value: 6
162 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
163 0 0 0,0 0,0 0        0x00000002
  formats: AR24
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 2
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000000100000018000000
01000000200000004152323400000000
01000000000000000000000000000000
0000000000000000
in_formats blob decoded:
AR24:  LINEAR
165 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-180=0x4
value: 1
166 zpos:
flags: immutable range
values: 7 7
value: 7
169 0 0 0,0 0,0 0        0x00000004
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 XR4H XB4H
AR4H AB4H YUYV YVYU UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV
XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 1
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001d00000018000000
06000000900000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
58523448584234484152344841423448
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fec33f06000000000000000000000000
0300000000000001ffffff1f00000000
00000000000000000200000000000001
ffffff1f000000000000000000000000
0100000000000001ffffff1f00000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
171 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
172 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
173 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
174 alpha:
flags: range
values: 0 65535
value: 65535
175 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
176 zpos:
flags: immutable range
values: 0 0
value: 0
177 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
178 0 0 0,0 0,0 0        0x00000004
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 XR4H XB4H
AR4H AB4H YUYV YVYU UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV
XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001d00000018000000
06000000900000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
58523448584234484152344841423448
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fec33f06000000000000000000000000
0300000000000001ffffff1f00000000
00000000000000000200000000000001
ffffff1f000000000000000000000000
0100000000000001ffffff1f00000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
180 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
181 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
182 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
183 alpha:
flags: range
values: 0 65535
value: 65535
184 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
185 zpos:
flags: immutable range
values: 1 1
value: 1
186 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
187 0 0 0,0 0,0 0        0x00000004
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 XR4H XB4H
AR4H AB4H YUYV YVYU UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV
XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001d00000018000000
06000000900000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
58523448584234484152344841423448
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fec33f06000000000000000000000000
0300000000000001ffffff1f00000000
00000000000000000200000000000001
ffffff1f000000000000000000000000
0100000000000001ffffff1f00000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AR4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
AB4H:  INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
189 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
190 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
191 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
192 alpha:
flags: range
values: 0 65535
value: 65535
193 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
194 zpos:
flags: immutable range
values: 2 2
value: 2
195 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
196 0 0 0,0 0,0 0        0x00000004
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001900000018000000
06000000800000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
feff6300000000000000000000000000
0300000000000001ffffff0100000000
00000000000000000200000000000001
ffffff01000000000000000000000000
0100000000000001ffffff0100000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
198 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
199 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
200 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
201 alpha:
flags: range
values: 0 65535
value: 65535
202 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
203 zpos:
flags: immutable range
values: 3 3
value: 3
204 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
205 0 0 0,0 0,0 0        0x00000004
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY NV12 P010 P012 P016 Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001900000018000000
06000000800000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
4e563132503031305030313250303136
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
feff6300000000000000000000000000
0300000000000001ffffff0100000000
00000000000000000200000000000001
ffffff01000000000000000000000000
0100000000000001ffffff0100000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
NV12:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P010:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P012:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
P016:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
207 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
208 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
209 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
210 alpha:
flags: range
values: 0 65535
value: 65535
211 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
212 zpos:
flags: immutable range
values: 4 4
value: 4
213 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
214 0 0 0,0 0,0 0        0x00000004
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001500000018000000
06000000700000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fe3f0600000000000000000000000000
0300000000000001ffff1f0000000000
00000000000000000200000000000001
ffff1f00000000000000000000000000
0100000000000001ffff1f0000000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
216 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
217 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
218 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
219 alpha:
flags: range
values: 0 65535
value: 65535
220 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
221 zpos:
flags: immutable range
values: 5 5
value: 5
222 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
223 0 0 0,0 0,0 0        0x00000004
  formats: C8   RG16 XR24 XB24 AR24 AB24 XR30 XB30 AR30 AB30 YUYV YVYU
UYVY VYUY Y210 Y212 Y216 XYUV XV30 XV36 XV48
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 0
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000001500000018000000
06000000700000004338202052473136
58523234584232344152323441423234
58523330584233304152333041423330
59555956595659555559565956595559
59323130593231325932313658595556
58563330585633365856343800000000
3c000000000000000000000000000000
05000000000000013c00000000000000
00000000000000000400000000000001
fe3f0600000000000000000000000000
0300000000000001ffff1f0000000000
00000000000000000200000000000001
ffff1f00000000000000000000000000
0100000000000001ffff1f0000000000
00000000000000000000000000000000
in_formats blob decoded:
C8  :  INTEL_Y_TILED INTEL_X_TILED LINEAR
RG16:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AR24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
AB24:  INTEL_Yf_TILED_CCS INTEL_Y_TILED_CCS INTEL_Yf_TILED
INTEL_Y_TILED INTEL_X_TILED LINEAR
XR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AR30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
AB30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YUYV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
YVYU:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
UYVY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
VYUY:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
Y210:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y212:  INTEL_Y_TILED INTEL_X_TILED LINEAR
Y216:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XYUV:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV30:  INTEL_Yf_TILED INTEL_Y_TILED INTEL_X_TILED LINEAR
XV36:  INTEL_Y_TILED INTEL_X_TILED LINEAR
XV48:  INTEL_Y_TILED INTEL_X_TILED LINEAR
225 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-90=0x2 rotate-180=0x4 rotate-270=0x8 reflect-x=0x10
value: 1
226 COLOR_ENCODING:
flags: enum
enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1 ITU-R BT.2020 YCbCr=2
value: 1
227 COLOR_RANGE:
flags: enum
enums: YCbCr limited range=0 YCbCr full range=1
value: 0
228 alpha:
flags: range
values: 0 65535
value: 65535
229 pixel blend mode:
flags: enum
enums: None=2 Pre-multiplied=0 Coverage=1
value: 0
230 zpos:
flags: immutable range
values: 6 6
value: 6
231 SCALING_FILTER:
flags: enum
enums: Default=0 Nearest Neighbor=1
value: 0
232 0 0 0,0 0,0 0        0x00000004
  formats: AR24
  props:
8 type:
flags: immutable enum
enums: Overlay=0 Primary=1 Cursor=2
value: 2
30 IN_FORMATS:
flags: immutable blob
blobs:

value:
01000000000000000100000018000000
01000000200000004152323400000000
01000000000000000000000000000000
0000000000000000
in_formats blob decoded:
AR24:  LINEAR
234 rotation:
flags: bitmask
values: rotate-0=0x1 rotate-180=0x4
value: 1
235 zpos:
flags: immutable range
values: 7 7
value: 7

Frame buffers:
id size pitch

Is mise le meas/Regards,

Eric Curtin



On Wed, 1 Dec 2021 at 18:31, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Eric,
>
> On Wed, Dec 01, 2021 at 06:03:43PM +0000, Eric Curtin wrote:
> > Hi Laurent,
> >
> > Thanks for welcoming me.
> >
> > Another suggested solution would be welcome, let me describe
> > what happens, it's been reproduced on multiple machines.
> >
> > So here the the CRTCs output of modetest on my machine:
> >
> > CRTCs:
> > id      fb      pos     size
> > 98      256     (0,0)   (1920x1080)
> >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > flags: nhsync, nvsync; type: preferred, driver
> > ...
> > 167     0       (0,0)   (0x0)
> >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > ...
> > 236     0       (0,0)   (0x0)
> >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> >
> > So these lines are executed 3 times:
> >
> > if (plane->supportsFormat(format)) {
> >     crtc_ = crtc;
> >
> > crtc_ = 98, break out of loop, crtc_ = 167, break out of loop, crtc_ =
> > 236, break out of loop.
> >
> > So crtc_ is set in the end to be the one with an id of 236, which doesn't
> > display anything on my machine but 98 does.
>
> The issue isn't so much the selected CRTC I believe, but the selected
> connector (of course the CRTC plays a role there). Could you share the
> full DRM device topology (CRTCs, encoders, connectors) ?
>
> > A alternative to fix this would be apprecitaion!
> >
> > I run like this:
> >
> > build/src/cam/cam -c1 -DeDP-1 -spixelformat=YUYV -C0
> >
> > On Wed, 1 Dec 2021 at 17:14, Laurent Pinchart wrote:
> > >
> > > Hi Eric,
> > >
> > > Thank you for the patch, and welcome to libcamera.
> > >
> > > On Wed, Dec 01, 2021 at 04:44:13PM +0000, Eric Curtin wrote:
> > > > When looping through possibleCrtcs on my machine, the only valid crtc is
> > > > actually the first one. This can be identified by checking if the clock
> > > > variable is non-zero.
> > > >
> > > > Signed-off-by: Eric Curtin <ecurtin@redhat.com>
> > > > ---
> > > >  src/cam/drm.cpp      | 2 +-
> > > >  src/cam/drm.h        | 2 ++
> > > >  src/cam/kms_sink.cpp | 4 ++++
> > > >  3 files changed, 7 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
> > > > index f2530091..808e5a87 100644
> > > > --- a/src/cam/drm.cpp
> > > > +++ b/src/cam/drm.cpp
> > > > @@ -128,7 +128,7 @@ std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
> > > >  }
> > > >
> > > >  Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
> > > > -     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
> > > > +     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
> > > >  {
> > > >  }
> > > >
> > > > diff --git a/src/cam/drm.h b/src/cam/drm.h
> > > > index de57e445..d05e6d13 100644
> > > > --- a/src/cam/drm.h
> > > > +++ b/src/cam/drm.h
> > > > @@ -149,12 +149,14 @@ public:
> > > >       Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
> > > >
> > > >       unsigned int index() const { return index_; }
> > > > +     uint32_t clock() const { return crtc_->mode.clock; }
> > > >       const std::vector<const Plane *> &planes() const { return planes_; }
> > > >
> > > >  private:
> > > >       friend Device;
> > > >
> > > >       unsigned int index_;
> > > > +     const drmModeCrtc *crtc_;
> > > >       std::vector<const Plane *> planes_;
> > > >  };
> > > >
> > > > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> > > > index d30fba78..aa0b7a3c 100644
> > > > --- a/src/cam/kms_sink.cpp
> > > > +++ b/src/cam/kms_sink.cpp
> > > > @@ -166,6 +166,10 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
> > > >        */
> > > >       for (const DRM::Encoder *encoder : connector_->encoders()) {
> > > >               for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
> > > > +                     if (!crtc->clock()) {
> > > > +                             continue;
> > > > +                     }
> > >
> > > I don't think this is quite right. When the Crtc instance is created,
> > > drmModeCrtc.mode contains the currently configured mode. Any CRTC that
> > > is not enabled when the cam application is started will thus be skipped,
> > > even if it can be used.
> > >
> > > On a side note, no need for curly braces.
> > >
> > > > +
> > > >                       for (const DRM::Plane *plane : crtc->planes()) {
> > > >                               if (plane->type() != DRM::Plane::TypePrimary)
> > > >                                       continue;
> > >
>
> --
> Regards,
>
> Laurent Pinchart
>
Laurent Pinchart Dec. 1, 2021, 6:55 p.m. UTC | #5
Hi Eric,

On Wed, Dec 01, 2021 at 06:43:02PM +0000, Eric Curtin wrote:
> $ sudo modetest
> trying to open device 'i915'...done
> Encoders:
> id crtc type possible crtcs possible clones
> 238 98 TMDS 0x00000007 0x00000001
> 246 0 TMDS 0x00000007 0x00000002
> 
> Connectors:
> id encoder status name size (mm) modes encoders
> 239 238 connected eDP-1          340x190 1 238
>   modes:
> index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
>   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> flags: nhsync, nvsync; type: preferred, driver

[snip] (no other connector)

> CRTCs:
> id fb pos size
> 98 259 (0,0) (1920x1080)
>   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> flags: nhsync, nvsync; type: preferred, driver

[snip]

> 167 0 (0,0) (0x0)
>   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:

[snip]

> 236 0 (0,0) (0x0)
>   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:

[snip]

According to this, it should be possible to configure a pipeline using
any CRTC to encoder 238 and connector 239 (eDP-1). I assume that's what
cam is doing, picking CRTC 236.

Let's first validate that this can actually work, can you get something
on the display when running

modetest -s 239@236:1920x1080

(if I remember the syntax correctly)

> On Wed, 1 Dec 2021 at 18:31, Laurent Pinchart wrote:
> > On Wed, Dec 01, 2021 at 06:03:43PM +0000, Eric Curtin wrote:
> > > Hi Laurent,
> > >
> > > Thanks for welcoming me.
> > >
> > > Another suggested solution would be welcome, let me describe
> > > what happens, it's been reproduced on multiple machines.
> > >
> > > So here the the CRTCs output of modetest on my machine:
> > >
> > > CRTCs:
> > > id      fb      pos     size
> > > 98      256     (0,0)   (1920x1080)
> > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > flags: nhsync, nvsync; type: preferred, driver
> > > ...
> > > 167     0       (0,0)   (0x0)
> > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > ...
> > > 236     0       (0,0)   (0x0)
> > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > >
> > > So these lines are executed 3 times:
> > >
> > > if (plane->supportsFormat(format)) {
> > >     crtc_ = crtc;
> > >
> > > crtc_ = 98, break out of loop, crtc_ = 167, break out of loop, crtc_ =
> > > 236, break out of loop.
> > >
> > > So crtc_ is set in the end to be the one with an id of 236, which doesn't
> > > display anything on my machine but 98 does.
> >
> > The issue isn't so much the selected CRTC I believe, but the selected
> > connector (of course the CRTC plays a role there). Could you share the
> > full DRM device topology (CRTCs, encoders, connectors) ?
> >
> > > A alternative to fix this would be apprecitaion!
> > >
> > > I run like this:
> > >
> > > build/src/cam/cam -c1 -DeDP-1 -spixelformat=YUYV -C0
> > >
> > > On Wed, 1 Dec 2021 at 17:14, Laurent Pinchart wrote:
> > > >
> > > > Hi Eric,
> > > >
> > > > Thank you for the patch, and welcome to libcamera.
> > > >
> > > > On Wed, Dec 01, 2021 at 04:44:13PM +0000, Eric Curtin wrote:
> > > > > When looping through possibleCrtcs on my machine, the only valid crtc is
> > > > > actually the first one. This can be identified by checking if the clock
> > > > > variable is non-zero.
> > > > >
> > > > > Signed-off-by: Eric Curtin <ecurtin@redhat.com>
> > > > > ---
> > > > >  src/cam/drm.cpp      | 2 +-
> > > > >  src/cam/drm.h        | 2 ++
> > > > >  src/cam/kms_sink.cpp | 4 ++++
> > > > >  3 files changed, 7 insertions(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
> > > > > index f2530091..808e5a87 100644
> > > > > --- a/src/cam/drm.cpp
> > > > > +++ b/src/cam/drm.cpp
> > > > > @@ -128,7 +128,7 @@ std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
> > > > >  }
> > > > >
> > > > >  Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
> > > > > -     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
> > > > > +     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
> > > > >  {
> > > > >  }
> > > > >
> > > > > diff --git a/src/cam/drm.h b/src/cam/drm.h
> > > > > index de57e445..d05e6d13 100644
> > > > > --- a/src/cam/drm.h
> > > > > +++ b/src/cam/drm.h
> > > > > @@ -149,12 +149,14 @@ public:
> > > > >       Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
> > > > >
> > > > >       unsigned int index() const { return index_; }
> > > > > +     uint32_t clock() const { return crtc_->mode.clock; }
> > > > >       const std::vector<const Plane *> &planes() const { return planes_; }
> > > > >
> > > > >  private:
> > > > >       friend Device;
> > > > >
> > > > >       unsigned int index_;
> > > > > +     const drmModeCrtc *crtc_;
> > > > >       std::vector<const Plane *> planes_;
> > > > >  };
> > > > >
> > > > > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> > > > > index d30fba78..aa0b7a3c 100644
> > > > > --- a/src/cam/kms_sink.cpp
> > > > > +++ b/src/cam/kms_sink.cpp
> > > > > @@ -166,6 +166,10 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
> > > > >        */
> > > > >       for (const DRM::Encoder *encoder : connector_->encoders()) {
> > > > >               for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
> > > > > +                     if (!crtc->clock()) {
> > > > > +                             continue;
> > > > > +                     }
> > > >
> > > > I don't think this is quite right. When the Crtc instance is created,
> > > > drmModeCrtc.mode contains the currently configured mode. Any CRTC that
> > > > is not enabled when the cam application is started will thus be skipped,
> > > > even if it can be used.
> > > >
> > > > On a side note, no need for curly braces.
> > > >
> > > > > +
> > > > >                       for (const DRM::Plane *plane : crtc->planes()) {
> > > > >                               if (plane->type() != DRM::Plane::TypePrimary)
> > > > >                                       continue;
Eric Curtin Dec. 1, 2021, 7:05 p.m. UTC | #6
Is mise le meas/Regards,

Eric Curtin


On Wed, 1 Dec 2021 at 18:55, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Eric,
>
> On Wed, Dec 01, 2021 at 06:43:02PM +0000, Eric Curtin wrote:
> > $ sudo modetest
> > trying to open device 'i915'...done
> > Encoders:
> > id crtc type possible crtcs possible clones
> > 238 98 TMDS 0x00000007 0x00000001
> > 246 0 TMDS 0x00000007 0x00000002
> >
> > Connectors:
> > id encoder status name size (mm) modes encoders
> > 239 238 connected eDP-1          340x190 1 238
> >   modes:
> > index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
> >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > flags: nhsync, nvsync; type: preferred, driver
>
> [snip] (no other connector)
>
> > CRTCs:
> > id fb pos size
> > 98 259 (0,0) (1920x1080)
> >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > flags: nhsync, nvsync; type: preferred, driver
>
> [snip]
>
> > 167 0 (0,0) (0x0)
> >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
>
> [snip]
>
> > 236 0 (0,0) (0x0)
> >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
>
> [snip]
>
> According to this, it should be possible to configure a pipeline using
> any CRTC to encoder 238 and connector 239 (eDP-1). I assume that's what
> cam is doing, picking CRTC 236.
>
> Let's first validate that this can actually work, can you get something
> on the display when running
>
> modetest -s 239@236:1920x1080

Yup sure. This seems to work fine,

$ sudo modetest -s 239@236:1920x1080
trying to open device 'i915'...done
setting mode 1920x1080-59.98Hz on connectors 239, crtc 23

>
> (if I remember the syntax correctly)
>
> > On Wed, 1 Dec 2021 at 18:31, Laurent Pinchart wrote:
> > > On Wed, Dec 01, 2021 at 06:03:43PM +0000, Eric Curtin wrote:
> > > > Hi Laurent,
> > > >
> > > > Thanks for welcoming me.
> > > >
> > > > Another suggested solution would be welcome, let me describe
> > > > what happens, it's been reproduced on multiple machines.
> > > >
> > > > So here the the CRTCs output of modetest on my machine:
> > > >
> > > > CRTCs:
> > > > id      fb      pos     size
> > > > 98      256     (0,0)   (1920x1080)
> > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > flags: nhsync, nvsync; type: preferred, driver
> > > > ...
> > > > 167     0       (0,0)   (0x0)
> > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > ...
> > > > 236     0       (0,0)   (0x0)
> > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > >
> > > > So these lines are executed 3 times:
> > > >
> > > > if (plane->supportsFormat(format)) {
> > > >     crtc_ = crtc;
> > > >
> > > > crtc_ = 98, break out of loop, crtc_ = 167, break out of loop, crtc_ =
> > > > 236, break out of loop.
> > > >
> > > > So crtc_ is set in the end to be the one with an id of 236, which doesn't
> > > > display anything on my machine but 98 does.
> > >
> > > The issue isn't so much the selected CRTC I believe, but the selected
> > > connector (of course the CRTC plays a role there). Could you share the
> > > full DRM device topology (CRTCs, encoders, connectors) ?
> > >
> > > > A alternative to fix this would be apprecitaion!
> > > >
> > > > I run like this:
> > > >
> > > > build/src/cam/cam -c1 -DeDP-1 -spixelformat=YUYV -C0
> > > >
> > > > On Wed, 1 Dec 2021 at 17:14, Laurent Pinchart wrote:
> > > > >
> > > > > Hi Eric,
> > > > >
> > > > > Thank you for the patch, and welcome to libcamera.
> > > > >
> > > > > On Wed, Dec 01, 2021 at 04:44:13PM +0000, Eric Curtin wrote:
> > > > > > When looping through possibleCrtcs on my machine, the only valid crtc is
> > > > > > actually the first one. This can be identified by checking if the clock
> > > > > > variable is non-zero.
> > > > > >
> > > > > > Signed-off-by: Eric Curtin <ecurtin@redhat.com>
> > > > > > ---
> > > > > >  src/cam/drm.cpp      | 2 +-
> > > > > >  src/cam/drm.h        | 2 ++
> > > > > >  src/cam/kms_sink.cpp | 4 ++++
> > > > > >  3 files changed, 7 insertions(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
> > > > > > index f2530091..808e5a87 100644
> > > > > > --- a/src/cam/drm.cpp
> > > > > > +++ b/src/cam/drm.cpp
> > > > > > @@ -128,7 +128,7 @@ std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
> > > > > >  }
> > > > > >
> > > > > >  Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
> > > > > > -     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
> > > > > > +     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
> > > > > >  {
> > > > > >  }
> > > > > >
> > > > > > diff --git a/src/cam/drm.h b/src/cam/drm.h
> > > > > > index de57e445..d05e6d13 100644
> > > > > > --- a/src/cam/drm.h
> > > > > > +++ b/src/cam/drm.h
> > > > > > @@ -149,12 +149,14 @@ public:
> > > > > >       Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
> > > > > >
> > > > > >       unsigned int index() const { return index_; }
> > > > > > +     uint32_t clock() const { return crtc_->mode.clock; }
> > > > > >       const std::vector<const Plane *> &planes() const { return planes_; }
> > > > > >
> > > > > >  private:
> > > > > >       friend Device;
> > > > > >
> > > > > >       unsigned int index_;
> > > > > > +     const drmModeCrtc *crtc_;
> > > > > >       std::vector<const Plane *> planes_;
> > > > > >  };
> > > > > >
> > > > > > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> > > > > > index d30fba78..aa0b7a3c 100644
> > > > > > --- a/src/cam/kms_sink.cpp
> > > > > > +++ b/src/cam/kms_sink.cpp
> > > > > > @@ -166,6 +166,10 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
> > > > > >        */
> > > > > >       for (const DRM::Encoder *encoder : connector_->encoders()) {
> > > > > >               for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
> > > > > > +                     if (!crtc->clock()) {
> > > > > > +                             continue;
> > > > > > +                     }
> > > > >
> > > > > I don't think this is quite right. When the Crtc instance is created,
> > > > > drmModeCrtc.mode contains the currently configured mode. Any CRTC that
> > > > > is not enabled when the cam application is started will thus be skipped,
> > > > > even if it can be used.
> > > > >
> > > > > On a side note, no need for curly braces.
> > > > >
> > > > > > +
> > > > > >                       for (const DRM::Plane *plane : crtc->planes()) {
> > > > > >                               if (plane->type() != DRM::Plane::TypePrimary)
> > > > > >                                       continue;
>
> --
> Regards,
>
> Laurent Pinchart
>
Laurent Pinchart Dec. 1, 2021, 7:33 p.m. UTC | #7
Hi Eric,

On Wed, Dec 01, 2021 at 07:05:15PM +0000, Eric Curtin wrote:
> On Wed, 1 Dec 2021 at 18:55, Laurent Pinchart wrote:
> > On Wed, Dec 01, 2021 at 06:43:02PM +0000, Eric Curtin wrote:
> > > $ sudo modetest
> > > trying to open device 'i915'...done
> > > Encoders:
> > > id crtc type possible crtcs possible clones
> > > 238 98 TMDS 0x00000007 0x00000001
> > > 246 0 TMDS 0x00000007 0x00000002
> > >
> > > Connectors:
> > > id encoder status name size (mm) modes encoders
> > > 239 238 connected eDP-1          340x190 1 238
> > >   modes:
> > > index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
> > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > flags: nhsync, nvsync; type: preferred, driver
> >
> > [snip] (no other connector)
> >
> > > CRTCs:
> > > id fb pos size
> > > 98 259 (0,0) (1920x1080)
> > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > flags: nhsync, nvsync; type: preferred, driver
> >
> > [snip]
> >
> > > 167 0 (0,0) (0x0)
> > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> >
> > [snip]
> >
> > > 236 0 (0,0) (0x0)
> > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> >
> > [snip]
> >
> > According to this, it should be possible to configure a pipeline using
> > any CRTC to encoder 238 and connector 239 (eDP-1). I assume that's what
> > cam is doing, picking CRTC 236.
> >
> > Let's first validate that this can actually work, can you get something
> > on the display when running
> >
> > modetest -s 239@236:1920x1080
> 
> Yup sure. This seems to work fine,
> 
> $ sudo modetest -s 239@236:1920x1080
> trying to open device 'i915'...done
> setting mode 1920x1080-59.98Hz on connectors 239, crtc 23

So that configuration can work. The question now is why it doesn't work
with cam. It's a bit hard for me to debug that remotely. It may be a
matter of having to disable the CRTC that is already connected to the
connector.

This being said, we can also optimize the KMS sink in cam to pick a CRTC
that would reuse an existing CRTC -> encoder -> connector route when one
is available. I think it would also solve (or work around) your problem.

Would you like to give either option a try ?

> > (if I remember the syntax correctly)
> >
> > > On Wed, 1 Dec 2021 at 18:31, Laurent Pinchart wrote:
> > > > On Wed, Dec 01, 2021 at 06:03:43PM +0000, Eric Curtin wrote:
> > > > > Hi Laurent,
> > > > >
> > > > > Thanks for welcoming me.
> > > > >
> > > > > Another suggested solution would be welcome, let me describe
> > > > > what happens, it's been reproduced on multiple machines.
> > > > >
> > > > > So here the the CRTCs output of modetest on my machine:
> > > > >
> > > > > CRTCs:
> > > > > id      fb      pos     size
> > > > > 98      256     (0,0)   (1920x1080)
> > > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > > flags: nhsync, nvsync; type: preferred, driver
> > > > > ...
> > > > > 167     0       (0,0)   (0x0)
> > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > > ...
> > > > > 236     0       (0,0)   (0x0)
> > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > >
> > > > > So these lines are executed 3 times:
> > > > >
> > > > > if (plane->supportsFormat(format)) {
> > > > >     crtc_ = crtc;
> > > > >
> > > > > crtc_ = 98, break out of loop, crtc_ = 167, break out of loop, crtc_ =
> > > > > 236, break out of loop.
> > > > >
> > > > > So crtc_ is set in the end to be the one with an id of 236, which doesn't
> > > > > display anything on my machine but 98 does.
> > > >
> > > > The issue isn't so much the selected CRTC I believe, but the selected
> > > > connector (of course the CRTC plays a role there). Could you share the
> > > > full DRM device topology (CRTCs, encoders, connectors) ?
> > > >
> > > > > A alternative to fix this would be apprecitaion!
> > > > >
> > > > > I run like this:
> > > > >
> > > > > build/src/cam/cam -c1 -DeDP-1 -spixelformat=YUYV -C0
> > > > >
> > > > > On Wed, 1 Dec 2021 at 17:14, Laurent Pinchart wrote:
> > > > > >
> > > > > > Hi Eric,
> > > > > >
> > > > > > Thank you for the patch, and welcome to libcamera.
> > > > > >
> > > > > > On Wed, Dec 01, 2021 at 04:44:13PM +0000, Eric Curtin wrote:
> > > > > > > When looping through possibleCrtcs on my machine, the only valid crtc is
> > > > > > > actually the first one. This can be identified by checking if the clock
> > > > > > > variable is non-zero.
> > > > > > >
> > > > > > > Signed-off-by: Eric Curtin <ecurtin@redhat.com>
> > > > > > > ---
> > > > > > >  src/cam/drm.cpp      | 2 +-
> > > > > > >  src/cam/drm.h        | 2 ++
> > > > > > >  src/cam/kms_sink.cpp | 4 ++++
> > > > > > >  3 files changed, 7 insertions(+), 1 deletion(-)
> > > > > > >
> > > > > > > diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
> > > > > > > index f2530091..808e5a87 100644
> > > > > > > --- a/src/cam/drm.cpp
> > > > > > > +++ b/src/cam/drm.cpp
> > > > > > > @@ -128,7 +128,7 @@ std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
> > > > > > >  }
> > > > > > >
> > > > > > >  Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
> > > > > > > -     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
> > > > > > > +     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
> > > > > > >  {
> > > > > > >  }
> > > > > > >
> > > > > > > diff --git a/src/cam/drm.h b/src/cam/drm.h
> > > > > > > index de57e445..d05e6d13 100644
> > > > > > > --- a/src/cam/drm.h
> > > > > > > +++ b/src/cam/drm.h
> > > > > > > @@ -149,12 +149,14 @@ public:
> > > > > > >       Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
> > > > > > >
> > > > > > >       unsigned int index() const { return index_; }
> > > > > > > +     uint32_t clock() const { return crtc_->mode.clock; }
> > > > > > >       const std::vector<const Plane *> &planes() const { return planes_; }
> > > > > > >
> > > > > > >  private:
> > > > > > >       friend Device;
> > > > > > >
> > > > > > >       unsigned int index_;
> > > > > > > +     const drmModeCrtc *crtc_;
> > > > > > >       std::vector<const Plane *> planes_;
> > > > > > >  };
> > > > > > >
> > > > > > > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> > > > > > > index d30fba78..aa0b7a3c 100644
> > > > > > > --- a/src/cam/kms_sink.cpp
> > > > > > > +++ b/src/cam/kms_sink.cpp
> > > > > > > @@ -166,6 +166,10 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
> > > > > > >        */
> > > > > > >       for (const DRM::Encoder *encoder : connector_->encoders()) {
> > > > > > >               for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
> > > > > > > +                     if (!crtc->clock()) {
> > > > > > > +                             continue;
> > > > > > > +                     }
> > > > > >
> > > > > > I don't think this is quite right. When the Crtc instance is created,
> > > > > > drmModeCrtc.mode contains the currently configured mode. Any CRTC that
> > > > > > is not enabled when the cam application is started will thus be skipped,
> > > > > > even if it can be used.
> > > > > >
> > > > > > On a side note, no need for curly braces.
> > > > > >
> > > > > > > +
> > > > > > >                       for (const DRM::Plane *plane : crtc->planes()) {
> > > > > > >                               if (plane->type() != DRM::Plane::TypePrimary)
> > > > > > >                                       continue;
> >
> > --
> > Regards,
> >
> > Laurent Pinchart
> >
>
Eric Curtin Dec. 1, 2021, 7:40 p.m. UTC | #8
I can try tomorrow, it's getting closer to bedtime in Ireland.

One thing I don't understand about that for loop logic, is that it breaks
out of the inner-most loop on a valid entry but keeps looping because
of the outer loops. I don't understand why we keep looping.

Behaving like this basically instead, would actually fix it for me even
though it may not be the best fix, it's also faster of course:

  /*
   * Find a CRTC and plane suitable for the request format and the
   * connector at the end of the pipeline. Restrict the search to primary
   * planes for now.
   */
  for (const DRM::Encoder* encoder : connector_->encoders()) {
    for (const DRM::Crtc* crtc : encoder->possibleCrtcs()) {
      for (const DRM::Plane* plane : crtc->planes()) {
        if (plane->type() != DRM::Plane::TypePrimary)
          continue;

        if (plane->supportsFormat(format)) {
          crtc_ = crtc;
          plane_ = plane;
          format_ = format;
          goto break_all;
        }

        if (plane->supportsFormat(xFormat)) {
          crtc_ = crtc;
          plane_ = plane;
          format_ = xFormat;
          goto break_all;
        }
      }
    }
  }

break_all:

Is mise le meas/Regards,

Eric Curtin

On Wed, 1 Dec 2021 at 19:33, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Eric,
>
> On Wed, Dec 01, 2021 at 07:05:15PM +0000, Eric Curtin wrote:
> > On Wed, 1 Dec 2021 at 18:55, Laurent Pinchart wrote:
> > > On Wed, Dec 01, 2021 at 06:43:02PM +0000, Eric Curtin wrote:
> > > > $ sudo modetest
> > > > trying to open device 'i915'...done
> > > > Encoders:
> > > > id crtc type possible crtcs possible clones
> > > > 238 98 TMDS 0x00000007 0x00000001
> > > > 246 0 TMDS 0x00000007 0x00000002
> > > >
> > > > Connectors:
> > > > id encoder status name size (mm) modes encoders
> > > > 239 238 connected eDP-1          340x190 1 238
> > > >   modes:
> > > > index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
> > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > flags: nhsync, nvsync; type: preferred, driver
> > >
> > > [snip] (no other connector)
> > >
> > > > CRTCs:
> > > > id fb pos size
> > > > 98 259 (0,0) (1920x1080)
> > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > flags: nhsync, nvsync; type: preferred, driver
> > >
> > > [snip]
> > >
> > > > 167 0 (0,0) (0x0)
> > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > >
> > > [snip]
> > >
> > > > 236 0 (0,0) (0x0)
> > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > >
> > > [snip]
> > >
> > > According to this, it should be possible to configure a pipeline using
> > > any CRTC to encoder 238 and connector 239 (eDP-1). I assume that's what
> > > cam is doing, picking CRTC 236.
> > >
> > > Let's first validate that this can actually work, can you get something
> > > on the display when running
> > >
> > > modetest -s 239@236:1920x1080
> >
> > Yup sure. This seems to work fine,
> >
> > $ sudo modetest -s 239@236:1920x1080
> > trying to open device 'i915'...done
> > setting mode 1920x1080-59.98Hz on connectors 239, crtc 23
>
> So that configuration can work. The question now is why it doesn't work
> with cam. It's a bit hard for me to debug that remotely. It may be a
> matter of having to disable the CRTC that is already connected to the
> connector.
>
> This being said, we can also optimize the KMS sink in cam to pick a CRTC
> that would reuse an existing CRTC -> encoder -> connector route when one
> is available. I think it would also solve (or work around) your problem.
>
> Would you like to give either option a try ?
>
> > > (if I remember the syntax correctly)
> > >
> > > > On Wed, 1 Dec 2021 at 18:31, Laurent Pinchart wrote:
> > > > > On Wed, Dec 01, 2021 at 06:03:43PM +0000, Eric Curtin wrote:
> > > > > > Hi Laurent,
> > > > > >
> > > > > > Thanks for welcoming me.
> > > > > >
> > > > > > Another suggested solution would be welcome, let me describe
> > > > > > what happens, it's been reproduced on multiple machines.
> > > > > >
> > > > > > So here the the CRTCs output of modetest on my machine:
> > > > > >
> > > > > > CRTCs:
> > > > > > id      fb      pos     size
> > > > > > 98      256     (0,0)   (1920x1080)
> > > > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > > > flags: nhsync, nvsync; type: preferred, driver
> > > > > > ...
> > > > > > 167     0       (0,0)   (0x0)
> > > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > > > ...
> > > > > > 236     0       (0,0)   (0x0)
> > > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > > >
> > > > > > So these lines are executed 3 times:
> > > > > >
> > > > > > if (plane->supportsFormat(format)) {
> > > > > >     crtc_ = crtc;
> > > > > >
> > > > > > crtc_ = 98, break out of loop, crtc_ = 167, break out of loop, crtc_ =
> > > > > > 236, break out of loop.
> > > > > >
> > > > > > So crtc_ is set in the end to be the one with an id of 236, which doesn't
> > > > > > display anything on my machine but 98 does.
> > > > >
> > > > > The issue isn't so much the selected CRTC I believe, but the selected
> > > > > connector (of course the CRTC plays a role there). Could you share the
> > > > > full DRM device topology (CRTCs, encoders, connectors) ?
> > > > >
> > > > > > A alternative to fix this would be apprecitaion!
> > > > > >
> > > > > > I run like this:
> > > > > >
> > > > > > build/src/cam/cam -c1 -DeDP-1 -spixelformat=YUYV -C0
> > > > > >
> > > > > > On Wed, 1 Dec 2021 at 17:14, Laurent Pinchart wrote:
> > > > > > >
> > > > > > > Hi Eric,
> > > > > > >
> > > > > > > Thank you for the patch, and welcome to libcamera.
> > > > > > >
> > > > > > > On Wed, Dec 01, 2021 at 04:44:13PM +0000, Eric Curtin wrote:
> > > > > > > > When looping through possibleCrtcs on my machine, the only valid crtc is
> > > > > > > > actually the first one. This can be identified by checking if the clock
> > > > > > > > variable is non-zero.
> > > > > > > >
> > > > > > > > Signed-off-by: Eric Curtin <ecurtin@redhat.com>
> > > > > > > > ---
> > > > > > > >  src/cam/drm.cpp      | 2 +-
> > > > > > > >  src/cam/drm.h        | 2 ++
> > > > > > > >  src/cam/kms_sink.cpp | 4 ++++
> > > > > > > >  3 files changed, 7 insertions(+), 1 deletion(-)
> > > > > > > >
> > > > > > > > diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
> > > > > > > > index f2530091..808e5a87 100644
> > > > > > > > --- a/src/cam/drm.cpp
> > > > > > > > +++ b/src/cam/drm.cpp
> > > > > > > > @@ -128,7 +128,7 @@ std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
> > > > > > > >  }
> > > > > > > >
> > > > > > > >  Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
> > > > > > > > -     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
> > > > > > > > +     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
> > > > > > > >  {
> > > > > > > >  }
> > > > > > > >
> > > > > > > > diff --git a/src/cam/drm.h b/src/cam/drm.h
> > > > > > > > index de57e445..d05e6d13 100644
> > > > > > > > --- a/src/cam/drm.h
> > > > > > > > +++ b/src/cam/drm.h
> > > > > > > > @@ -149,12 +149,14 @@ public:
> > > > > > > >       Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
> > > > > > > >
> > > > > > > >       unsigned int index() const { return index_; }
> > > > > > > > +     uint32_t clock() const { return crtc_->mode.clock; }
> > > > > > > >       const std::vector<const Plane *> &planes() const { return planes_; }
> > > > > > > >
> > > > > > > >  private:
> > > > > > > >       friend Device;
> > > > > > > >
> > > > > > > >       unsigned int index_;
> > > > > > > > +     const drmModeCrtc *crtc_;
> > > > > > > >       std::vector<const Plane *> planes_;
> > > > > > > >  };
> > > > > > > >
> > > > > > > > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> > > > > > > > index d30fba78..aa0b7a3c 100644
> > > > > > > > --- a/src/cam/kms_sink.cpp
> > > > > > > > +++ b/src/cam/kms_sink.cpp
> > > > > > > > @@ -166,6 +166,10 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
> > > > > > > >        */
> > > > > > > >       for (const DRM::Encoder *encoder : connector_->encoders()) {
> > > > > > > >               for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
> > > > > > > > +                     if (!crtc->clock()) {
> > > > > > > > +                             continue;
> > > > > > > > +                     }
> > > > > > >
> > > > > > > I don't think this is quite right. When the Crtc instance is created,
> > > > > > > drmModeCrtc.mode contains the currently configured mode. Any CRTC that
> > > > > > > is not enabled when the cam application is started will thus be skipped,
> > > > > > > even if it can be used.
> > > > > > >
> > > > > > > On a side note, no need for curly braces.
> > > > > > >
> > > > > > > > +
> > > > > > > >                       for (const DRM::Plane *plane : crtc->planes()) {
> > > > > > > >                               if (plane->type() != DRM::Plane::TypePrimary)
> > > > > > > >                                       continue;
> > >
> > > --
> > > Regards,
> > >
> > > Laurent Pinchart
> > >
> >
>
> --
> Regards,
>
> Laurent Pinchart
>
Eric Curtin Dec. 1, 2021, 8:18 p.m. UTC | #9
That was the old logic with the "return 0"'s before commit

1de0f90dd43200b0f101b8c732c35c2669d027ad

exit the loop instantly once one of these conditions are met.

Mind if I send a patch to change to the goto logic in the last email?

That way we exit the loop early like before and we still have the

"Using KMS plane "

cout printed.

Is mise le meas/Regards,

Eric Curtin

On Wed, 1 Dec 2021 at 19:40, Eric Curtin <ecurtin@redhat.com> wrote:
>
> I can try tomorrow, it's getting closer to bedtime in Ireland.
>
> One thing I don't understand about that for loop logic, is that it breaks
> out of the inner-most loop on a valid entry but keeps looping because
> of the outer loops. I don't understand why we keep looping.
>
> Behaving like this basically instead, would actually fix it for me even
> though it may not be the best fix, it's also faster of course:
>
>   /*
>    * Find a CRTC and plane suitable for the request format and the
>    * connector at the end of the pipeline. Restrict the search to primary
>    * planes for now.
>    */
>   for (const DRM::Encoder* encoder : connector_->encoders()) {
>     for (const DRM::Crtc* crtc : encoder->possibleCrtcs()) {
>       for (const DRM::Plane* plane : crtc->planes()) {
>         if (plane->type() != DRM::Plane::TypePrimary)
>           continue;
>
>         if (plane->supportsFormat(format)) {
>           crtc_ = crtc;
>           plane_ = plane;
>           format_ = format;
>           goto break_all;
>         }
>
>         if (plane->supportsFormat(xFormat)) {
>           crtc_ = crtc;
>           plane_ = plane;
>           format_ = xFormat;
>           goto break_all;
>         }
>       }
>     }
>   }
>
> break_all:
>
> Is mise le meas/Regards,
>
> Eric Curtin
>
> On Wed, 1 Dec 2021 at 19:33, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> >
> > Hi Eric,
> >
> > On Wed, Dec 01, 2021 at 07:05:15PM +0000, Eric Curtin wrote:
> > > On Wed, 1 Dec 2021 at 18:55, Laurent Pinchart wrote:
> > > > On Wed, Dec 01, 2021 at 06:43:02PM +0000, Eric Curtin wrote:
> > > > > $ sudo modetest
> > > > > trying to open device 'i915'...done
> > > > > Encoders:
> > > > > id crtc type possible crtcs possible clones
> > > > > 238 98 TMDS 0x00000007 0x00000001
> > > > > 246 0 TMDS 0x00000007 0x00000002
> > > > >
> > > > > Connectors:
> > > > > id encoder status name size (mm) modes encoders
> > > > > 239 238 connected eDP-1          340x190 1 238
> > > > >   modes:
> > > > > index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
> > > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > > flags: nhsync, nvsync; type: preferred, driver
> > > >
> > > > [snip] (no other connector)
> > > >
> > > > > CRTCs:
> > > > > id fb pos size
> > > > > 98 259 (0,0) (1920x1080)
> > > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > > flags: nhsync, nvsync; type: preferred, driver
> > > >
> > > > [snip]
> > > >
> > > > > 167 0 (0,0) (0x0)
> > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > >
> > > > [snip]
> > > >
> > > > > 236 0 (0,0) (0x0)
> > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > >
> > > > [snip]
> > > >
> > > > According to this, it should be possible to configure a pipeline using
> > > > any CRTC to encoder 238 and connector 239 (eDP-1). I assume that's what
> > > > cam is doing, picking CRTC 236.
> > > >
> > > > Let's first validate that this can actually work, can you get something
> > > > on the display when running
> > > >
> > > > modetest -s 239@236:1920x1080
> > >
> > > Yup sure. This seems to work fine,
> > >
> > > $ sudo modetest -s 239@236:1920x1080
> > > trying to open device 'i915'...done
> > > setting mode 1920x1080-59.98Hz on connectors 239, crtc 23
> >
> > So that configuration can work. The question now is why it doesn't work
> > with cam. It's a bit hard for me to debug that remotely. It may be a
> > matter of having to disable the CRTC that is already connected to the
> > connector.
> >
> > This being said, we can also optimize the KMS sink in cam to pick a CRTC
> > that would reuse an existing CRTC -> encoder -> connector route when one
> > is available. I think it would also solve (or work around) your problem.
> >
> > Would you like to give either option a try ?
> >
> > > > (if I remember the syntax correctly)
> > > >
> > > > > On Wed, 1 Dec 2021 at 18:31, Laurent Pinchart wrote:
> > > > > > On Wed, Dec 01, 2021 at 06:03:43PM +0000, Eric Curtin wrote:
> > > > > > > Hi Laurent,
> > > > > > >
> > > > > > > Thanks for welcoming me.
> > > > > > >
> > > > > > > Another suggested solution would be welcome, let me describe
> > > > > > > what happens, it's been reproduced on multiple machines.
> > > > > > >
> > > > > > > So here the the CRTCs output of modetest on my machine:
> > > > > > >
> > > > > > > CRTCs:
> > > > > > > id      fb      pos     size
> > > > > > > 98      256     (0,0)   (1920x1080)
> > > > > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > > > > flags: nhsync, nvsync; type: preferred, driver
> > > > > > > ...
> > > > > > > 167     0       (0,0)   (0x0)
> > > > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > > > > ...
> > > > > > > 236     0       (0,0)   (0x0)
> > > > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > > > >
> > > > > > > So these lines are executed 3 times:
> > > > > > >
> > > > > > > if (plane->supportsFormat(format)) {
> > > > > > >     crtc_ = crtc;
> > > > > > >
> > > > > > > crtc_ = 98, break out of loop, crtc_ = 167, break out of loop, crtc_ =
> > > > > > > 236, break out of loop.
> > > > > > >
> > > > > > > So crtc_ is set in the end to be the one with an id of 236, which doesn't
> > > > > > > display anything on my machine but 98 does.
> > > > > >
> > > > > > The issue isn't so much the selected CRTC I believe, but the selected
> > > > > > connector (of course the CRTC plays a role there). Could you share the
> > > > > > full DRM device topology (CRTCs, encoders, connectors) ?
> > > > > >
> > > > > > > A alternative to fix this would be apprecitaion!
> > > > > > >
> > > > > > > I run like this:
> > > > > > >
> > > > > > > build/src/cam/cam -c1 -DeDP-1 -spixelformat=YUYV -C0
> > > > > > >
> > > > > > > On Wed, 1 Dec 2021 at 17:14, Laurent Pinchart wrote:
> > > > > > > >
> > > > > > > > Hi Eric,
> > > > > > > >
> > > > > > > > Thank you for the patch, and welcome to libcamera.
> > > > > > > >
> > > > > > > > On Wed, Dec 01, 2021 at 04:44:13PM +0000, Eric Curtin wrote:
> > > > > > > > > When looping through possibleCrtcs on my machine, the only valid crtc is
> > > > > > > > > actually the first one. This can be identified by checking if the clock
> > > > > > > > > variable is non-zero.
> > > > > > > > >
> > > > > > > > > Signed-off-by: Eric Curtin <ecurtin@redhat.com>
> > > > > > > > > ---
> > > > > > > > >  src/cam/drm.cpp      | 2 +-
> > > > > > > > >  src/cam/drm.h        | 2 ++
> > > > > > > > >  src/cam/kms_sink.cpp | 4 ++++
> > > > > > > > >  3 files changed, 7 insertions(+), 1 deletion(-)
> > > > > > > > >
> > > > > > > > > diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
> > > > > > > > > index f2530091..808e5a87 100644
> > > > > > > > > --- a/src/cam/drm.cpp
> > > > > > > > > +++ b/src/cam/drm.cpp
> > > > > > > > > @@ -128,7 +128,7 @@ std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
> > > > > > > > >  }
> > > > > > > > >
> > > > > > > > >  Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
> > > > > > > > > -     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
> > > > > > > > > +     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
> > > > > > > > >  {
> > > > > > > > >  }
> > > > > > > > >
> > > > > > > > > diff --git a/src/cam/drm.h b/src/cam/drm.h
> > > > > > > > > index de57e445..d05e6d13 100644
> > > > > > > > > --- a/src/cam/drm.h
> > > > > > > > > +++ b/src/cam/drm.h
> > > > > > > > > @@ -149,12 +149,14 @@ public:
> > > > > > > > >       Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
> > > > > > > > >
> > > > > > > > >       unsigned int index() const { return index_; }
> > > > > > > > > +     uint32_t clock() const { return crtc_->mode.clock; }
> > > > > > > > >       const std::vector<const Plane *> &planes() const { return planes_; }
> > > > > > > > >
> > > > > > > > >  private:
> > > > > > > > >       friend Device;
> > > > > > > > >
> > > > > > > > >       unsigned int index_;
> > > > > > > > > +     const drmModeCrtc *crtc_;
> > > > > > > > >       std::vector<const Plane *> planes_;
> > > > > > > > >  };
> > > > > > > > >
> > > > > > > > > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> > > > > > > > > index d30fba78..aa0b7a3c 100644
> > > > > > > > > --- a/src/cam/kms_sink.cpp
> > > > > > > > > +++ b/src/cam/kms_sink.cpp
> > > > > > > > > @@ -166,6 +166,10 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
> > > > > > > > >        */
> > > > > > > > >       for (const DRM::Encoder *encoder : connector_->encoders()) {
> > > > > > > > >               for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
> > > > > > > > > +                     if (!crtc->clock()) {
> > > > > > > > > +                             continue;
> > > > > > > > > +                     }
> > > > > > > >
> > > > > > > > I don't think this is quite right. When the Crtc instance is created,
> > > > > > > > drmModeCrtc.mode contains the currently configured mode. Any CRTC that
> > > > > > > > is not enabled when the cam application is started will thus be skipped,
> > > > > > > > even if it can be used.
> > > > > > > >
> > > > > > > > On a side note, no need for curly braces.
> > > > > > > >
> > > > > > > > > +
> > > > > > > > >                       for (const DRM::Plane *plane : crtc->planes()) {
> > > > > > > > >                               if (plane->type() != DRM::Plane::TypePrimary)
> > > > > > > > >                                       continue;
> > > >
> > > > --
> > > > Regards,
> > > >
> > > > Laurent Pinchart
> > > >
> > >
> >
> > --
> > Regards,
> >
> > Laurent Pinchart
> >
Laurent Pinchart Dec. 1, 2021, 9:19 p.m. UTC | #10
Hi Eric,

On Wed, Dec 01, 2021 at 08:18:10PM +0000, Eric Curtin wrote:
> That was the old logic with the "return 0"'s before commit
> 
> 1de0f90dd43200b0f101b8c732c35c2669d027ad
> 
> exit the loop instantly once one of these conditions are met.
> 
> Mind if I send a patch to change to the goto logic in the last email?
> 
> That way we exit the loop early like before and we still have the
> 
> "Using KMS plane "
> 
> cout printed.

It seems to be a bug in that commit, yes. Please feel free to submit a
fix (and include a Fixes: line in the patch, you can look at git log for
examples if you're not familiar with that).

> On Wed, 1 Dec 2021 at 19:40, Eric Curtin wrote:
> >
> > I can try tomorrow, it's getting closer to bedtime in Ireland.
> >
> > One thing I don't understand about that for loop logic, is that it breaks
> > out of the inner-most loop on a valid entry but keeps looping because
> > of the outer loops. I don't understand why we keep looping.
> >
> > Behaving like this basically instead, would actually fix it for me even
> > though it may not be the best fix, it's also faster of course:
> >
> >   /*
> >    * Find a CRTC and plane suitable for the request format and the
> >    * connector at the end of the pipeline. Restrict the search to primary
> >    * planes for now.
> >    */
> >   for (const DRM::Encoder* encoder : connector_->encoders()) {
> >     for (const DRM::Crtc* crtc : encoder->possibleCrtcs()) {
> >       for (const DRM::Plane* plane : crtc->planes()) {
> >         if (plane->type() != DRM::Plane::TypePrimary)
> >           continue;
> >
> >         if (plane->supportsFormat(format)) {
> >           crtc_ = crtc;
> >           plane_ = plane;
> >           format_ = format;
> >           goto break_all;
> >         }
> >
> >         if (plane->supportsFormat(xFormat)) {
> >           crtc_ = crtc;
> >           plane_ = plane;
> >           format_ = xFormat;
> >           goto break_all;
> >         }
> >       }
> >     }
> >   }
> >
> > break_all:
> >
> > On Wed, 1 Dec 2021 at 19:33, Laurent Pinchart wrote:
> > > On Wed, Dec 01, 2021 at 07:05:15PM +0000, Eric Curtin wrote:
> > > > On Wed, 1 Dec 2021 at 18:55, Laurent Pinchart wrote:
> > > > > On Wed, Dec 01, 2021 at 06:43:02PM +0000, Eric Curtin wrote:
> > > > > > $ sudo modetest
> > > > > > trying to open device 'i915'...done
> > > > > > Encoders:
> > > > > > id crtc type possible crtcs possible clones
> > > > > > 238 98 TMDS 0x00000007 0x00000001
> > > > > > 246 0 TMDS 0x00000007 0x00000002
> > > > > >
> > > > > > Connectors:
> > > > > > id encoder status name size (mm) modes encoders
> > > > > > 239 238 connected eDP-1          340x190 1 238
> > > > > >   modes:
> > > > > > index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
> > > > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > > > flags: nhsync, nvsync; type: preferred, driver
> > > > >
> > > > > [snip] (no other connector)
> > > > >
> > > > > > CRTCs:
> > > > > > id fb pos size
> > > > > > 98 259 (0,0) (1920x1080)
> > > > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > > > flags: nhsync, nvsync; type: preferred, driver
> > > > >
> > > > > [snip]
> > > > >
> > > > > > 167 0 (0,0) (0x0)
> > > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > >
> > > > > [snip]
> > > > >
> > > > > > 236 0 (0,0) (0x0)
> > > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > >
> > > > > [snip]
> > > > >
> > > > > According to this, it should be possible to configure a pipeline using
> > > > > any CRTC to encoder 238 and connector 239 (eDP-1). I assume that's what
> > > > > cam is doing, picking CRTC 236.
> > > > >
> > > > > Let's first validate that this can actually work, can you get something
> > > > > on the display when running
> > > > >
> > > > > modetest -s 239@236:1920x1080
> > > >
> > > > Yup sure. This seems to work fine,
> > > >
> > > > $ sudo modetest -s 239@236:1920x1080
> > > > trying to open device 'i915'...done
> > > > setting mode 1920x1080-59.98Hz on connectors 239, crtc 23
> > >
> > > So that configuration can work. The question now is why it doesn't work
> > > with cam. It's a bit hard for me to debug that remotely. It may be a
> > > matter of having to disable the CRTC that is already connected to the
> > > connector.
> > >
> > > This being said, we can also optimize the KMS sink in cam to pick a CRTC
> > > that would reuse an existing CRTC -> encoder -> connector route when one
> > > is available. I think it would also solve (or work around) your problem.
> > >
> > > Would you like to give either option a try ?
> > >
> > > > > (if I remember the syntax correctly)
> > > > >
> > > > > > On Wed, 1 Dec 2021 at 18:31, Laurent Pinchart wrote:
> > > > > > > On Wed, Dec 01, 2021 at 06:03:43PM +0000, Eric Curtin wrote:
> > > > > > > > Hi Laurent,
> > > > > > > >
> > > > > > > > Thanks for welcoming me.
> > > > > > > >
> > > > > > > > Another suggested solution would be welcome, let me describe
> > > > > > > > what happens, it's been reproduced on multiple machines.
> > > > > > > >
> > > > > > > > So here the the CRTCs output of modetest on my machine:
> > > > > > > >
> > > > > > > > CRTCs:
> > > > > > > > id      fb      pos     size
> > > > > > > > 98      256     (0,0)   (1920x1080)
> > > > > > > >   #0 1920x1080 59.98 1920 1968 2000 2080 1080 1083 1088 1111 138600
> > > > > > > > flags: nhsync, nvsync; type: preferred, driver
> > > > > > > > ...
> > > > > > > > 167     0       (0,0)   (0x0)
> > > > > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > > > > > ...
> > > > > > > > 236     0       (0,0)   (0x0)
> > > > > > > >   #0  -nan 0 0 0 0 0 0 0 0 0 flags: ; type:
> > > > > > > >
> > > > > > > > So these lines are executed 3 times:
> > > > > > > >
> > > > > > > > if (plane->supportsFormat(format)) {
> > > > > > > >     crtc_ = crtc;
> > > > > > > >
> > > > > > > > crtc_ = 98, break out of loop, crtc_ = 167, break out of loop, crtc_ =
> > > > > > > > 236, break out of loop.
> > > > > > > >
> > > > > > > > So crtc_ is set in the end to be the one with an id of 236, which doesn't
> > > > > > > > display anything on my machine but 98 does.
> > > > > > >
> > > > > > > The issue isn't so much the selected CRTC I believe, but the selected
> > > > > > > connector (of course the CRTC plays a role there). Could you share the
> > > > > > > full DRM device topology (CRTCs, encoders, connectors) ?
> > > > > > >
> > > > > > > > A alternative to fix this would be apprecitaion!
> > > > > > > >
> > > > > > > > I run like this:
> > > > > > > >
> > > > > > > > build/src/cam/cam -c1 -DeDP-1 -spixelformat=YUYV -C0
> > > > > > > >
> > > > > > > > On Wed, 1 Dec 2021 at 17:14, Laurent Pinchart wrote:
> > > > > > > > >
> > > > > > > > > Hi Eric,
> > > > > > > > >
> > > > > > > > > Thank you for the patch, and welcome to libcamera.
> > > > > > > > >
> > > > > > > > > On Wed, Dec 01, 2021 at 04:44:13PM +0000, Eric Curtin wrote:
> > > > > > > > > > When looping through possibleCrtcs on my machine, the only valid crtc is
> > > > > > > > > > actually the first one. This can be identified by checking if the clock
> > > > > > > > > > variable is non-zero.
> > > > > > > > > >
> > > > > > > > > > Signed-off-by: Eric Curtin <ecurtin@redhat.com>
> > > > > > > > > > ---
> > > > > > > > > >  src/cam/drm.cpp      | 2 +-
> > > > > > > > > >  src/cam/drm.h        | 2 ++
> > > > > > > > > >  src/cam/kms_sink.cpp | 4 ++++
> > > > > > > > > >  3 files changed, 7 insertions(+), 1 deletion(-)
> > > > > > > > > >
> > > > > > > > > > diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
> > > > > > > > > > index f2530091..808e5a87 100644
> > > > > > > > > > --- a/src/cam/drm.cpp
> > > > > > > > > > +++ b/src/cam/drm.cpp
> > > > > > > > > > @@ -128,7 +128,7 @@ std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
> > > > > > > > > >  }
> > > > > > > > > >
> > > > > > > > > >  Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
> > > > > > > > > > -     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
> > > > > > > > > > +     : Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
> > > > > > > > > >  {
> > > > > > > > > >  }
> > > > > > > > > >
> > > > > > > > > > diff --git a/src/cam/drm.h b/src/cam/drm.h
> > > > > > > > > > index de57e445..d05e6d13 100644
> > > > > > > > > > --- a/src/cam/drm.h
> > > > > > > > > > +++ b/src/cam/drm.h
> > > > > > > > > > @@ -149,12 +149,14 @@ public:
> > > > > > > > > >       Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
> > > > > > > > > >
> > > > > > > > > >       unsigned int index() const { return index_; }
> > > > > > > > > > +     uint32_t clock() const { return crtc_->mode.clock; }
> > > > > > > > > >       const std::vector<const Plane *> &planes() const { return planes_; }
> > > > > > > > > >
> > > > > > > > > >  private:
> > > > > > > > > >       friend Device;
> > > > > > > > > >
> > > > > > > > > >       unsigned int index_;
> > > > > > > > > > +     const drmModeCrtc *crtc_;
> > > > > > > > > >       std::vector<const Plane *> planes_;
> > > > > > > > > >  };
> > > > > > > > > >
> > > > > > > > > > diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
> > > > > > > > > > index d30fba78..aa0b7a3c 100644
> > > > > > > > > > --- a/src/cam/kms_sink.cpp
> > > > > > > > > > +++ b/src/cam/kms_sink.cpp
> > > > > > > > > > @@ -166,6 +166,10 @@ int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
> > > > > > > > > >        */
> > > > > > > > > >       for (const DRM::Encoder *encoder : connector_->encoders()) {
> > > > > > > > > >               for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
> > > > > > > > > > +                     if (!crtc->clock()) {
> > > > > > > > > > +                             continue;
> > > > > > > > > > +                     }
> > > > > > > > >
> > > > > > > > > I don't think this is quite right. When the Crtc instance is created,
> > > > > > > > > drmModeCrtc.mode contains the currently configured mode. Any CRTC that
> > > > > > > > > is not enabled when the cam application is started will thus be skipped,
> > > > > > > > > even if it can be used.
> > > > > > > > >
> > > > > > > > > On a side note, no need for curly braces.
> > > > > > > > >
> > > > > > > > > > +
> > > > > > > > > >                       for (const DRM::Plane *plane : crtc->planes()) {
> > > > > > > > > >                               if (plane->type() != DRM::Plane::TypePrimary)
> > > > > > > > > >                                       continue;

Patch
diff mbox series

diff --git a/src/cam/drm.cpp b/src/cam/drm.cpp
index f2530091..808e5a87 100644
--- a/src/cam/drm.cpp
+++ b/src/cam/drm.cpp
@@ -128,7 +128,7 @@  std::unique_ptr<Blob> Mode::toBlob(Device *dev) const
 }
 
 Crtc::Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index)
-	: Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index)
+	: Object(dev, crtc->crtc_id, Object::TypeCrtc), index_(index), crtc_(crtc)
 {
 }
 
diff --git a/src/cam/drm.h b/src/cam/drm.h
index de57e445..d05e6d13 100644
--- a/src/cam/drm.h
+++ b/src/cam/drm.h
@@ -149,12 +149,14 @@  public:
 	Crtc(Device *dev, const drmModeCrtc *crtc, unsigned int index);
 
 	unsigned int index() const { return index_; }
+	uint32_t clock() const { return crtc_->mode.clock; }
 	const std::vector<const Plane *> &planes() const { return planes_; }
 
 private:
 	friend Device;
 
 	unsigned int index_;
+	const drmModeCrtc *crtc_;
 	std::vector<const Plane *> planes_;
 };
 
diff --git a/src/cam/kms_sink.cpp b/src/cam/kms_sink.cpp
index d30fba78..aa0b7a3c 100644
--- a/src/cam/kms_sink.cpp
+++ b/src/cam/kms_sink.cpp
@@ -166,6 +166,10 @@  int KMSSink::configurePipeline(const libcamera::PixelFormat &format)
 	 */
 	for (const DRM::Encoder *encoder : connector_->encoders()) {
 		for (const DRM::Crtc *crtc : encoder->possibleCrtcs()) {
+			if (!crtc->clock()) {
+				continue;
+			}
+
 			for (const DRM::Plane *plane : crtc->planes()) {
 				if (plane->type() != DRM::Plane::TypePrimary)
 					continue;