diff mbox series

[1/3] drm/todo: Create a TODO item for additional HDMI work

Message ID 20240612143553.915966-1-mripard@kernel.org (mailing list archive)
State New, archived
Headers show
Series [1/3] drm/todo: Create a TODO item for additional HDMI work | expand

Commit Message

Maxime Ripard June 12, 2024, 2:35 p.m. UTC
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>
---
 Documentation/gpu/todo.rst | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

Comments

Dmitry Baryshkov June 12, 2024, 4:11 p.m. UTC | #1
On Wed, 12 Jun 2024 at 17:35, Maxime Ripard <mripard@kernel.org> wrote:
>
> 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>
> ---
>  Documentation/gpu/todo.rst | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
> index 2ea6ffc9b22b..52fd8672fb6d 100644
> --- a/Documentation/gpu/todo.rst
> +++ b/Documentation/gpu/todo.rst
> @@ -633,10 +633,39 @@ 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.

- HDMI audio improvements:
  - Implement the get_eld() and possibly hook_plugged_cb() functions
for hdmi_codec_ops in a generic way. Maybe implementing generic HDMI
hdmi_codec_ops and then providing device-specific hooks to prepare /
shutdown / mute stream.
  - provide helpers to determine ACR / N / CTS params

A different, but closely related topic is HDCP support in a generic
way. 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
>
Jani Nikula June 13, 2024, 7:44 a.m. UTC | #2
On Wed, 12 Jun 2024, Maxime Ripard <mripard@kernel.org> wrote:
> 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>
> ---
>  Documentation/gpu/todo.rst | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>
> diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
> index 2ea6ffc9b22b..52fd8672fb6d 100644
> --- a/Documentation/gpu/todo.rst
> +++ b/Documentation/gpu/todo.rst
> @@ -633,10 +633,39 @@ 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.

Furthermore, we should stop passing EDID to the CEC functions, and
instead use the source physical address we've parsed ourselves and
stored to connector->display_info.source_physical_address.

I.e. stop using

- drm_dp_cec_set_edid()
- cec_s_phys_addr_from_edid()
- cec_get_edid_phys_addr()

And instead use .source_physical_address and

- drm_dp_cec_attach()
- cec_s_phys_addr()

The main rationale is to avoid using a separate EDID parser that's
outside of the drm subsystem and unaware of struct drm_edid and frankly
cdoes not look very robust.


BR,
Jani.


> +
> +  - 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.
> +
> +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
diff mbox series

Patch

diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 2ea6ffc9b22b..52fd8672fb6d 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -633,10 +633,39 @@  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.
+
+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