All of lore.kernel.org
 help / color / mirror / Atom feed
* Empty IN_FORMATS in sun4i-drm
@ 2021-12-14 12:02 Emmanuel Gil Peyrot
  2021-12-14 17:58 ` Jernej Škrabec
  0 siblings, 1 reply; 8+ messages in thread
From: Emmanuel Gil Peyrot @ 2021-12-14 12:02 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, dri-devel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]

Hi,

After updating Weston from 9f8561e9 to 07326040 (latest master), it
fails to run on my PinePhone saying “format 0x34325258 not supported by
output DSI-1” and then exiting.

This format is XR24, which would be extremely surprising not to be
present, and drm_info[1] says it is present.  Looking into Weston’s
code, I found that drm_plane_populate_formats()’s docstring says it uses
“either the IN_FORMATS blob property (if available), or the plane's
format list if not.”  Looking back at drm_info, I saw said IN_FORMATS
blob being empty of formats (while the format list is fully populated):
"IN_FORMATS" (immutable): blob = 32
└───DRM_FORMAT_MOD_LINEAR (0x0)

This makes me think the kernel should populate IN_FORMATS with at least
the same formats as the format list when supported, or stop advertising
this property altogether.

Other compositors (such as phoc) still run file, probably because they
use the format list exclusively, without consideration for modifiers.

Besides fixing this driver, would it make sense to also make Weston
ignore an empty IN_FORMATS and fall back to the format list?

Thanks,

[1] https://github.com/ascent12/drm_info

-- 
Emmanuel Gil Peyrot

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Empty IN_FORMATS in sun4i-drm
  2021-12-14 12:02 Empty IN_FORMATS in sun4i-drm Emmanuel Gil Peyrot
@ 2021-12-14 17:58 ` Jernej Škrabec
  2021-12-23  9:59     ` Emmanuel Gil Peyrot
  0 siblings, 1 reply; 8+ messages in thread
From: Jernej Škrabec @ 2021-12-14 17:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, dri-devel, linux-sunxi, Emmanuel Gil Peyrot

Dne torek, 14. december 2021 ob 13:02:48 CET je Emmanuel Gil Peyrot 
napisal(a):
> Hi,
> 
> After updating Weston from 9f8561e9 to 07326040 (latest master), it
> fails to run on my PinePhone saying “format 0x34325258 not supported by
> output DSI-1” and then exiting.
> 
> This format is XR24, which would be extremely surprising not to be
> present, and drm_info[1] says it is present.  Looking into Weston’s
> code, I found that drm_plane_populate_formats()’s docstring says it uses
> “either the IN_FORMATS blob property (if available), or the plane's
> format list if not.”  Looking back at drm_info, I saw said IN_FORMATS
> blob being empty of formats (while the format list is fully populated):
> "IN_FORMATS" (immutable): blob = 32
> └───DRM_FORMAT_MOD_LINEAR (0x0)

Does this solve your issue? http://ix.io/3Ipo

Best regards,
Jernej

> 
> This makes me think the kernel should populate IN_FORMATS with at least
> the same formats as the format list when supported, or stop advertising
> this property altogether.
> 
> Other compositors (such as phoc) still run file, probably because they
> use the format list exclusively, without consideration for modifiers.
> 
> Besides fixing this driver, would it make sense to also make Weston
> ignore an empty IN_FORMATS and fall back to the format list?
> 
> Thanks,
> 
> [1] https://github.com/ascent12/drm_info
> 
> -- 
> Emmanuel Gil Peyrot
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Empty IN_FORMATS in sun4i-drm
  2021-12-14 17:58 ` Jernej Škrabec
@ 2021-12-23  9:59     ` Emmanuel Gil Peyrot
  0 siblings, 0 replies; 8+ messages in thread
From: Emmanuel Gil Peyrot @ 2021-12-23  9:59 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: Emmanuel Gil Peyrot, Chen-Yu Tsai, dri-devel, linux-sunxi

[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]

On Tue, Dec 14, 2021 at 06:58:56PM +0100, Jernej Škrabec wrote:
> Dne torek, 14. december 2021 ob 13:02:48 CET je Emmanuel Gil Peyrot 
> napisal(a):
> > Hi,
> > 
> > After updating Weston from 9f8561e9 to 07326040 (latest master), it
> > fails to run on my PinePhone saying “format 0x34325258 not supported by
> > output DSI-1” and then exiting.
> > 
> > This format is XR24, which would be extremely surprising not to be
> > present, and drm_info[1] says it is present.  Looking into Weston’s
> > code, I found that drm_plane_populate_formats()’s docstring says it uses
> > “either the IN_FORMATS blob property (if available), or the plane's
> > format list if not.”  Looking back at drm_info, I saw said IN_FORMATS
> > blob being empty of formats (while the format list is fully populated):
> > "IN_FORMATS" (immutable): blob = 32
> > └───DRM_FORMAT_MOD_LINEAR (0x0)
> 
> Does this solve your issue? http://ix.io/3Ipo

Hi, yes it does, thanks!

Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

> 
> Best regards,
> Jernej
> 
> > 
> > This makes me think the kernel should populate IN_FORMATS with at least
> > the same formats as the format list when supported, or stop advertising
> > this property altogether.
> > 
> > Other compositors (such as phoc) still run file, probably because they
> > use the format list exclusively, without consideration for modifiers.
> > 
> > Besides fixing this driver, would it make sense to also make Weston
> > ignore an empty IN_FORMATS and fall back to the format list?
> > 
> > Thanks,
> > 
> > [1] https://github.com/ascent12/drm_info
> > 
> > -- 
> > Emmanuel Gil Peyrot
> > 
> 

-- 
Emmanuel Gil Peyrot

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Empty IN_FORMATS in sun4i-drm
@ 2021-12-23  9:59     ` Emmanuel Gil Peyrot
  0 siblings, 0 replies; 8+ messages in thread
From: Emmanuel Gil Peyrot @ 2021-12-23  9:59 UTC (permalink / raw)
  To: Jernej Škrabec
  Cc: Maxime Ripard, Chen-Yu Tsai, dri-devel, linux-sunxi, Emmanuel Gil Peyrot

[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]

On Tue, Dec 14, 2021 at 06:58:56PM +0100, Jernej Škrabec wrote:
> Dne torek, 14. december 2021 ob 13:02:48 CET je Emmanuel Gil Peyrot 
> napisal(a):
> > Hi,
> > 
> > After updating Weston from 9f8561e9 to 07326040 (latest master), it
> > fails to run on my PinePhone saying “format 0x34325258 not supported by
> > output DSI-1” and then exiting.
> > 
> > This format is XR24, which would be extremely surprising not to be
> > present, and drm_info[1] says it is present.  Looking into Weston’s
> > code, I found that drm_plane_populate_formats()’s docstring says it uses
> > “either the IN_FORMATS blob property (if available), or the plane's
> > format list if not.”  Looking back at drm_info, I saw said IN_FORMATS
> > blob being empty of formats (while the format list is fully populated):
> > "IN_FORMATS" (immutable): blob = 32
> > └───DRM_FORMAT_MOD_LINEAR (0x0)
> 
> Does this solve your issue? http://ix.io/3Ipo

Hi, yes it does, thanks!

Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

> 
> Best regards,
> Jernej
> 
> > 
> > This makes me think the kernel should populate IN_FORMATS with at least
> > the same formats as the format list when supported, or stop advertising
> > this property altogether.
> > 
> > Other compositors (such as phoc) still run file, probably because they
> > use the format list exclusively, without consideration for modifiers.
> > 
> > Besides fixing this driver, would it make sense to also make Weston
> > ignore an empty IN_FORMATS and fall back to the format list?
> > 
> > Thanks,
> > 
> > [1] https://github.com/ascent12/drm_info
> > 
> > -- 
> > Emmanuel Gil Peyrot
> > 
> 

-- 
Emmanuel Gil Peyrot

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: Empty IN_FORMATS in sun4i-drm
  2021-12-23  9:59     ` Emmanuel Gil Peyrot
@ 2021-12-24  6:33       ` Jernej Škrabec
  -1 siblings, 0 replies; 8+ messages in thread
From: Jernej Škrabec @ 2021-12-24  6:33 UTC (permalink / raw)
  To: Emmanuel Gil Peyrot
  Cc: Maxime Ripard, Chen-Yu Tsai, dri-devel, linux-sunxi, Emmanuel Gil Peyrot

Hi!

Dne četrtek, 23. december 2021 ob 10:59:23 CET je Emmanuel Gil Peyrot 
napisal(a):
> On Tue, Dec 14, 2021 at 06:58:56PM +0100, Jernej Škrabec wrote:
> > Dne torek, 14. december 2021 ob 13:02:48 CET je Emmanuel Gil Peyrot 
> > napisal(a):
> > > Hi,
> > > 
> > > After updating Weston from 9f8561e9 to 07326040 (latest master), it
> > > fails to run on my PinePhone saying “format 0x34325258 not supported by
> > > output DSI-1” and then exiting.
> > > 
> > > This format is XR24, which would be extremely surprising not to be
> > > present, and drm_info[1] says it is present.  Looking into Weston’s
> > > code, I found that drm_plane_populate_formats()’s docstring says it uses
> > > “either the IN_FORMATS blob property (if available), or the plane's
> > > format list if not.”  Looking back at drm_info, I saw said IN_FORMATS
> > > blob being empty of formats (while the format list is fully populated):
> > > "IN_FORMATS" (immutable): blob = 32
> > > └───DRM_FORMAT_MOD_LINEAR (0x0)
> > 
> > Does this solve your issue? http://ix.io/3Ipo
> 
> Hi, yes it does, thanks!
> 
> Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

Thanks, but this issue is already in process of being fixed with a more general 
approach (this driver is not the only one with this type of issue).

Please look and comment at:
https://patchwork.kernel.org/project/dri-devel/cover/20211222090552.25972-1-jose.exposito89@gmail.com/

Best regards,
Jernej

> 
> > 
> > Best regards,
> > Jernej
> > 
> > > 
> > > This makes me think the kernel should populate IN_FORMATS with at least
> > > the same formats as the format list when supported, or stop advertising
> > > this property altogether.
> > > 
> > > Other compositors (such as phoc) still run file, probably because they
> > > use the format list exclusively, without consideration for modifiers.
> > > 
> > > Besides fixing this driver, would it make sense to also make Weston
> > > ignore an empty IN_FORMATS and fall back to the format list?
> > > 
> > > Thanks,
> > > 
> > > [1] https://github.com/ascent12/drm_info
> > > 
> > > -- 
> > > Emmanuel Gil Peyrot
> > > 
> > 
> 
> -- 
> Emmanuel Gil Peyrot
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Re: Empty IN_FORMATS in sun4i-drm
@ 2021-12-24  6:33       ` Jernej Škrabec
  0 siblings, 0 replies; 8+ messages in thread
From: Jernej Škrabec @ 2021-12-24  6:33 UTC (permalink / raw)
  To: Emmanuel Gil Peyrot
  Cc: Emmanuel Gil Peyrot, Chen-Yu Tsai, dri-devel, linux-sunxi

Hi!

Dne četrtek, 23. december 2021 ob 10:59:23 CET je Emmanuel Gil Peyrot 
napisal(a):
> On Tue, Dec 14, 2021 at 06:58:56PM +0100, Jernej Škrabec wrote:
> > Dne torek, 14. december 2021 ob 13:02:48 CET je Emmanuel Gil Peyrot 
> > napisal(a):
> > > Hi,
> > > 
> > > After updating Weston from 9f8561e9 to 07326040 (latest master), it
> > > fails to run on my PinePhone saying “format 0x34325258 not supported by
> > > output DSI-1” and then exiting.
> > > 
> > > This format is XR24, which would be extremely surprising not to be
> > > present, and drm_info[1] says it is present.  Looking into Weston’s
> > > code, I found that drm_plane_populate_formats()’s docstring says it uses
> > > “either the IN_FORMATS blob property (if available), or the plane's
> > > format list if not.”  Looking back at drm_info, I saw said IN_FORMATS
> > > blob being empty of formats (while the format list is fully populated):
> > > "IN_FORMATS" (immutable): blob = 32
> > > └───DRM_FORMAT_MOD_LINEAR (0x0)
> > 
> > Does this solve your issue? http://ix.io/3Ipo
> 
> Hi, yes it does, thanks!
> 
> Tested-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>

Thanks, but this issue is already in process of being fixed with a more general 
approach (this driver is not the only one with this type of issue).

Please look and comment at:
https://patchwork.kernel.org/project/dri-devel/cover/20211222090552.25972-1-jose.exposito89@gmail.com/

Best regards,
Jernej

> 
> > 
> > Best regards,
> > Jernej
> > 
> > > 
> > > This makes me think the kernel should populate IN_FORMATS with at least
> > > the same formats as the format list when supported, or stop advertising
> > > this property altogether.
> > > 
> > > Other compositors (such as phoc) still run file, probably because they
> > > use the format list exclusively, without consideration for modifiers.
> > > 
> > > Besides fixing this driver, would it make sense to also make Weston
> > > ignore an empty IN_FORMATS and fall back to the format list?
> > > 
> > > Thanks,
> > > 
> > > [1] https://github.com/ascent12/drm_info
> > > 
> > > -- 
> > > Emmanuel Gil Peyrot
> > > 
> > 
> 
> -- 
> Emmanuel Gil Peyrot
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Empty IN_FORMATS in sun4i-drm
       [not found] <Ybiu8jZEyRii44Dw@luna>
@ 2021-12-14 16:34   ` Simon Ser
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Ser @ 2021-12-14 16:34 UTC (permalink / raw)
  To: Emmanuel Gil Peyrot; +Cc: Chen-Yu Tsai, linux-sunxi, dri-devel, wayland-devel

On Tuesday, December 14th, 2021 at 15:49, Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> wrote:

> This makes me think the kernel should populate IN_FORMATS with at least
> the same formats as the format list when supported, or stop advertising
> this property altogether.

Yup. This is a bug in the driver.

> Other compositors (such as phoc) still run file, probably because they
> use the format list exclusively, without consideration for modifiers.

phoc is based on wlroots, which falls back to its modifier-less codepath when
a driver is missing IN_FORMATS (or if it's empty). But it does support
modifier-aware buffer allocation as well.

> Besides fixing this driver, would it make sense to also make Weston
> ignore an empty IN_FORMATS and fall back to the format list?

I'd rather not, because this makes it more difficult to find buggy drivers.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Empty IN_FORMATS in sun4i-drm
@ 2021-12-14 16:34   ` Simon Ser
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Ser @ 2021-12-14 16:34 UTC (permalink / raw)
  To: Emmanuel Gil Peyrot
  Cc: wayland-devel, Maxime Ripard, Chen-Yu Tsai, dri-devel, linux-sunxi

On Tuesday, December 14th, 2021 at 15:49, Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> wrote:

> This makes me think the kernel should populate IN_FORMATS with at least
> the same formats as the format list when supported, or stop advertising
> this property altogether.

Yup. This is a bug in the driver.

> Other compositors (such as phoc) still run file, probably because they
> use the format list exclusively, without consideration for modifiers.

phoc is based on wlroots, which falls back to its modifier-less codepath when
a driver is missing IN_FORMATS (or if it's empty). But it does support
modifier-aware buffer allocation as well.

> Besides fixing this driver, would it make sense to also make Weston
> ignore an empty IN_FORMATS and fall back to the format list?

I'd rather not, because this makes it more difficult to find buggy drivers.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-12-24  6:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 12:02 Empty IN_FORMATS in sun4i-drm Emmanuel Gil Peyrot
2021-12-14 17:58 ` Jernej Škrabec
2021-12-23  9:59   ` Emmanuel Gil Peyrot
2021-12-23  9:59     ` Emmanuel Gil Peyrot
2021-12-24  6:33     ` Jernej Škrabec
2021-12-24  6:33       ` Jernej Škrabec
     [not found] <Ybiu8jZEyRii44Dw@luna>
2021-12-14 16:34 ` Simon Ser
2021-12-14 16:34   ` Simon Ser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.