* [PATCH v2 1/3] drm/todo: Create a TODO item for additional HDMI work
@ 2024-06-20 13:35 Maxime Ripard
2024-06-20 13:35 ` [PATCH v2 2/3] drm/todo: Create a TODO item for MIPI-DSI rework Maxime Ripard
2024-06-20 13:35 ` [PATCH v2 3/3] drm/todo: Add TODO entry for "lints" Maxime Ripard
0 siblings, 2 replies; 3+ messages in thread
From: Maxime Ripard @ 2024-06-20 13:35 UTC (permalink / raw)
To: dri-devel
Cc: Maarten Lankhorst, Thomas Zimmermann, Maxime Ripard,
Javier Martinez Canillas, Dmitry Baryshkov
We recently added some infrastructure to deal with HDMI but we're still
lacking a couple of things. Add a TODO entry with the remaining items.
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Changes from v1:
- Add sound and HDCP
---
Documentation/gpu/todo.rst | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 2ea6ffc9b22b..3104ffbd6295 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -633,10 +633,46 @@ long as that supports DMA. Otherwise importing can still needlessly fail.
Contact: Thomas Zimmermann <tzimmermann@suse.de>, Daniel Vetter
Level: Advanced
+Improve HDMI Infrastructure
+---------------------------
+
+We have a bunch of helpers to handle HDMI and reduce the boilerplate in
+drivers. Support so far includes HDMI 1.4 support, but we need to extend
+it with:
+
+ - CEC handling support. CEC requires a bit of integration into every
+ HDMI driver to set the device physical address according to the EDID
+ in `.get_modes`, and to clear/reset it in the hotplug detection
+ path. We should create the ``drm_atomic_helper_connector_hdmi_get_modes()``
+ and ``drm_atomic_helper_connector_hdmi_handle_hotplug()`` helpers to handle
+ this properly, and convert drivers to use them.
+
+ - In order to support HDMI 2.0 properly, the scrambler parameters need
+ to be moved into the state. This includes figuring out in
+ drm_atomic_helper_connector_hdmi_check() if the scrambler and TMDS ratio
+ need to be changed, and make the
+ ``drm_atomic_helper_connector_hdmi_handle_hotplug()`` helper reset the
+ scrambler status when the device is plugged and unplugged.
+
+ - We need to support YUV420 too.
+
+ - Make the audio support somewhat generic too. The lowest hanging fruits
+ would be to provide helpers for `get_eld`, to handle hotplug and compute
+ ACR, N, and CTS parameters.
+
+ - Handling HDCP in a generic manner would be a good idea too.
+ See `[PATCH v10 00/10] drm/hdcp: Pull HDCP auth/exchange/check into helpers <https://lore.kernel.org/dri-devel/20230419154321.1993419-1-markyacoub@google.com/>`_
+
+The `vc4` driver is a good example for all this.
+
+Contact: Maxime Ripard <mripard@kernel.org>
+
+Level: Intermediate
+
Better Testing
==============
Add unit tests using the Kernel Unit Testing (KUnit) framework
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 2/3] drm/todo: Create a TODO item for MIPI-DSI rework
2024-06-20 13:35 [PATCH v2 1/3] drm/todo: Create a TODO item for additional HDMI work Maxime Ripard
@ 2024-06-20 13:35 ` Maxime Ripard
2024-06-20 13:35 ` [PATCH v2 3/3] drm/todo: Add TODO entry for "lints" Maxime Ripard
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2024-06-20 13:35 UTC (permalink / raw)
To: dri-devel
Cc: Maarten Lankhorst, Thomas Zimmermann, Maxime Ripard,
Javier Martinez Canillas, Dmitry Baryshkov
The MIPI-DSI infrastructure and setup we have so far is limited and
doesn't provide a good way to address some corner-cases.
Add a TODO entry to document what is needed.
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Documentation/gpu/todo.rst | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 3104ffbd6295..030ef6bec82a 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -633,10 +633,30 @@ long as that supports DMA. Otherwise importing can still needlessly fail.
Contact: Thomas Zimmermann <tzimmermann@suse.de>, Daniel Vetter
Level: Advanced
+Improve MIPI-DSI infrastructure
+-------------------------------
+
+The MIPI-DSI infrastructure in KMS supports MIPI-DSI devices in part
+through a dedicated bus (`drm_mipi_dsi.c`) and in part through ad-hoc
+calls in drivers, especially to handle the power state of the bus.
+
+This is an oddity as far as the device model is concerned, but is also
+an issue when multiple devices are chained (like bridges) and have
+different requirements.
+
+It would be a good idea to move all the power state handling out of KMS
+and into the bus support itself.
+
+See `[RFC PATCH 03/10] drm/mipi-dsi: add API for manual control over the DSI link power state <https://lore.kernel.org/dri-devel/20231016165355.1327217-4-dmitry.baryshkov@linaro.org/>`_
+
+Contact: Maxime Ripard <mripard@kernel.org>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+
+Level: Advanced
+
Improve HDMI Infrastructure
---------------------------
We have a bunch of helpers to handle HDMI and reduce the boilerplate in
drivers. Support so far includes HDMI 1.4 support, but we need to extend
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2 3/3] drm/todo: Add TODO entry for "lints"
2024-06-20 13:35 [PATCH v2 1/3] drm/todo: Create a TODO item for additional HDMI work Maxime Ripard
2024-06-20 13:35 ` [PATCH v2 2/3] drm/todo: Create a TODO item for MIPI-DSI rework Maxime Ripard
@ 2024-06-20 13:35 ` Maxime Ripard
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2024-06-20 13:35 UTC (permalink / raw)
To: dri-devel
Cc: Maarten Lankhorst, Thomas Zimmermann, Maxime Ripard,
Javier Martinez Canillas
Having lints would prove beneficial to prevent the same dark patterns
from reoccuring over and over again in drivers.
Add a TODO entry for that.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Changes from v1:
- Add allow_modeset and cec phys address handling
---
Documentation/gpu/todo.rst | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 030ef6bec82a..9e0e2df3a59a 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -724,10 +724,44 @@ doesn't or document it if it does would be of great help.
Contact: Maxime Ripard <mripard@kernel.org>
Level: Intermediate
+Create lints for KMS drivers
+----------------------------
+
+Over time, we've accumulated a list of dark patterns in KMS drivers that
+should be avoided. However, none of them are published anywhere, and not
+all reviewers are aware of them. It creates a situation where we have
+more drivers with problematic / deprecated code, even though we know
+that they shouldn't.
+
+We should create a set of coccinelle scripts that match these patterns,
+and make new drivers run that list. And possibly integrate them in CI.
+
+These patterns include:
+
+ - Drivers using kzalloc() or devm_kzalloc() to allocate their memory,
+ instead of drmm_kzalloc().
+
+ - Drivers not protecting their device resources (MMIO, clocks,
+ regulators, etc.) by drm_dev_enter() and drm_dev_exit().
+
+ - Drivers using drm_dev_unregister() instead of drm_dev_unplug().
+
+ - Drivers not calling drm_atomic_helper_shutdown() at shutdown
+
+ - Drivers using drm_dp_cec_set_edid(), cec_get_edid_phys_addr(), or
+ cec_s_phys_addr_from_edid() instead of drm_dp_cec_attach() or
+ cec_s_phys_addr().
+
+ - Drivers setting drm_atomic_state->allow_modeset manually.
+
+Contact: Maxime Ripard <mripard@kernel.org>
+
+Level: Intermediate
+
Enable trinity for DRM
----------------------
And fix up the fallout. Should be really interesting ...
--
2.45.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-20 13:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-20 13:35 [PATCH v2 1/3] drm/todo: Create a TODO item for additional HDMI work Maxime Ripard
2024-06-20 13:35 ` [PATCH v2 2/3] drm/todo: Create a TODO item for MIPI-DSI rework Maxime Ripard
2024-06-20 13:35 ` [PATCH v2 3/3] drm/todo: Add TODO entry for "lints" Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox