drm: Don't create the IN_FORMATS blob when the driver does not provide .format_mod_supported()
Subsystems (2)
PATCH 1/1 drm: Don't create the IN_FORMATS blob when the driver does not provide .format_mod_supported()
From: Ville Syrjälä <[email protected]>
The code responsible for creating the IN_FORMATS blob is broken when the driver doesn't provide a .format_mod_supported() hook. It just copies in the format list, but leaves all the modifier information zeroed. That would indicate (in a very silly way) that there are in fact no supported format+modifier combinations. That is utter nonsense.
Let's just not create the blob at all in that case. The alternative would be to assume all format+mod combos will work and populate it accordingly. But I'm not convinced we can make that promise to userspace for all the drivers.
--- drivers/gpu/drm/drm_plane.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/drm_plane.c +1 -6
@@ -124,10 +124,6 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *planememcpy (formats_ptr (blob_data), plane->format_types, formats_size); -/* If we can't determine support, just bail */ -if (!plane->funcs->format_mod_supported) - goto done; - mod =modifiers_ptr (blob_data);for (i =0 ; i < plane->modifier_count; i++) {for (j =0 ; j < plane->format_count; j++) {
@@ -145,7 +141,6 @@ static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane mod++; } -done:drm_object_attach_property (&plane->base, config->modifiers_property, blob->base.id);
@@ -281,7 +276,7 @@ int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane,drm_object_attach_property (&plane->base, config->prop_src_h,0 ); } -if (config->allow_fb_modifiers) +if (config->allow_fb_modifiers && funcs->format_mod_supported)create_in_format_blob (dev, plane);return 0 ;
Signature · 6 lines
2.26.2 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm: Don't create the IN_FORMATS blob when the driver does not provide .format_mod_supported()
== Series Details ==
== Series Details ==
Series: drm: Don't create the IN_FORMATS blob when the driver does not provide .format_mod_supported()
URL : https://patchwork.freedesktop.org/series/83019/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9191 -> Patchwork_18778
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_18778 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_18778, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18778/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_18778:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@execlists:
- fi-cml-s: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9191/fi-cml-s/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18778/fi-cml-s/igt@i915_selftest@[email protected]
Known issues
------------
Here are the changes found in Patchwork_18778 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@execlists:
- fi-skl-6600u: [PASS][3] -> [INCOMPLETE][4] ([CI#80])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9191/fi-skl-6600u/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18778/fi-skl-6600u/igt@i915_selftest@[email protected]
#### Possible fixes ####
* igt@gem_close_race@basic-threads:
- fi-apl-guc: [INCOMPLETE][5] ([i915#1635]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9191/fi-apl-guc/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18778/fi-apl-guc/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-byt-j1900: [DMESG-WARN][7] ([i915#1982]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9191/fi-byt-j1900/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18778/fi-byt-j1900/igt@[email protected]
* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: [DMESG-WARN][9] ([i915#165]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9191/fi-kbl-7500u/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18778/fi-kbl-7500u/igt@[email protected]
* igt@kms_chamelium@hdmi-crc-fast:
- fi-kbl-7500u: [DMESG-WARN][11] ([i915#2203]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9191/fi-kbl-7500u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18778/fi-kbl-7500u/igt@[email protected]
* igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- fi-icl-u2: [DMESG-WARN][13] ([i915#1982]) -> [PASS][14] +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9191/fi-icl-u2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18778/fi-icl-u2/igt@[email protected]
[CI#80]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/80
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2203]: https://gitlab.freedesktop.org/drm/intel/issues/2203
Participating hosts (46 -> 39)
------------------------------
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_9191 -> Patchwork_18778
CI-20190529: 20190529
CI_DRM_9191: 4b693bbb9b41fda404b5cd081bf5cd8dba240468 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5823: 7dd2fe99bd9dde00456cc5abf7e5ef0c8d7d6118 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18778: d9e4406ae38a3735c63ef947b55686d1dd936100 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
d9e4406ae38a drm: Don't create the IN_FORMATS blob when the driver does not provide .format_mod_supported()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18778/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Ville Syrjala
From: Ville Syrjälä [email protected]
The code responsible for creating the
IN_FORMATSblob is broken when the driver doesn't provide a .format_mod_supported() hook. It just copies in the format list, but leaves all the modifier information zeroed. That would indicate (in a very silly way) that there are in fact no supported format+modifier combinations. That is utter nonsense.
Should we WARN_ON when the driver enables allow_fb_modifiers but doesn't populate format_mod_supported?
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 12 lines · Simon Ser
Quoted 9 lines · Ville Syrjala
From: Ville Syrjälä [email protected]
The code responsible for creating the
IN_FORMATSblob is broken when the driver doesn't provide a .format_mod_supported() hook. It just copies in the format list, but leaves all the modifier information zeroed. That would indicate (in a very silly way) that there are in fact no supported format+modifier combinations. That is utter nonsense.
Quoted 2 lines
Should we
WARN_ONwhen the driver enablesallow_fb_modifiersbut doesn't populateformat_mod_supported?
.format_mod_supported() was supposed to be optional IIRC.
But now that I look at it, it looks like only these drivers are lacking .format_mod_supported(): exynos, mxsfb, tiny/cirrus, tiny/gm12u320.
There is some other oddity going on with sun4i which sometimes uses modifiers sometimes it doesn't. No idea what is going on there. But it does have .format_mod_supported() at least.
So I guess if we can get exynos, mxsfb, and tiny/* to implement the hook then we could make it mandatory.
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 23 lines · Ville Syrjälä
Quoted 12 lines · Simon Ser
Quoted 9 lines · Ville Syrjala
From: Ville Syrjälä [email protected]
The code responsible for creating the
IN_FORMATSblob is broken when the driver doesn't provide a .format_mod_supported() hook. It just copies in the format list, but leaves all the modifier information zeroed. That would indicate (in a very silly way) that there are in fact no supported format+modifier combinations. That is utter nonsense.Quoted 2 lines
Should we
WARN_ONwhen the driver enablesallow_fb_modifiersbut doesn't populateformat_mod_supported?.format_mod_supported() was supposed to be optional IIRC.
But now that I look at it, it looks like only these drivers are lacking .format_mod_supported(): exynos, mxsfb, tiny/cirrus, tiny/gm12u320.
Quoted 6 lines
There is some other oddity going on with sun4i which sometimes uses modifiers sometimes it doesn't. No idea what is going on there. But it does have .format_mod_supported() at least.
So I guess if we can get exynos, mxsfb, and tiny/* to implement the hook then we could make it mandatory.
I'd just delete it all, since it's obviously not tested for these drivers. And then add a patch which warns if allow_fb_modifiers, modifiers list passed y/n and .format_mod_support don't all agree. Since a bunch of your don't even set allow_fb_modifiers but pass a format list. So it's a complete mess :-/
Next step would then be to add some todo items, at least the simple/tiny drivers should all be able to do this fairly easily, and probably with linear only as the default.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx