[PATCH v6 5/9] drm/vc4: hdmi: Create a custom connector state

Maxime Ripard maxime at cerno.tech
Thu Dec 10 14:26:29 UTC 2020


On Thu, Dec 10, 2020 at 03:23:25PM +0100, Maxime Ripard wrote:
> When run with a higher bpc than 8, the clock of the HDMI controller needs
> to be adjusted. Let's create a connector state that will be used at
> atomic_check and atomic_enable to compute and store the clock rate
> associated to the state.
> 
> Acked-by: Thomas Zimmermann <tzimmermann at suse.de>
> Reviewed-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
> Signed-off-by: Maxime Ripard <maxime at cerno.tech>
> ---
>  drivers/gpu/drm/vc4/vc4_hdmi.c | 33 ++++++++++++++++++++++++++++++---
>  drivers/gpu/drm/vc4/vc4_hdmi.h | 10 ++++++++++
>  2 files changed, 40 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
> index 61039cc89d9d..8978df3f0ca4 100644
> --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
> +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
> @@ -170,10 +170,37 @@ static int vc4_hdmi_connector_get_modes(struct drm_connector *connector)
>  
>  static void vc4_hdmi_connector_reset(struct drm_connector *connector)
>  {
> -	drm_atomic_helper_connector_reset(connector);
> +	struct vc4_hdmi_connector_state *old_state =
> +		conn_state_to_vc4_hdmi_conn_state(connector->state);
> +	struct vc4_hdmi_connector_state *new_state =
> +		kzalloc(sizeof(*conn_state), GFP_KERNEL);

This should be sizeof(*new_state). I'll fix it up when applying if there's no other comments

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20201210/e79e6bbc/attachment-0001.sig>


More information about the dri-devel mailing list