[Intel-gfx] [PATCH 11/12] drm/rockchip: convert to using has_audio from display_info

Heiko Stübner heiko at sntech.de
Thu Mar 30 16:39:12 UTC 2023


Am Donnerstag, 30. März 2023, 17:39:48 CEST schrieb Jani Nikula:
> Prefer the parsed results for has_audio in display info over calling
> drm_detect_monitor_audio().
> 
> Cc: Sandy Huang <hjc at rock-chips.com>
> Cc: Heiko Stübner <heiko at sntech.de>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Acked-by: Heiko Stuebner <heiko at sntech.de>

> ---
>  drivers/gpu/drm/rockchip/cdn-dp-core.c | 4 ++--
>  drivers/gpu/drm/rockchip/inno_hdmi.c   | 3 ++-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> index b6afe3786b74..4a4cf4354e27 100644
> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> @@ -272,10 +272,10 @@ static int cdn_dp_connector_get_modes(struct drm_connector *connector)
>  		DRM_DEV_DEBUG_KMS(dp->dev, "got edid: width[%d] x height[%d]\n",
>  				  edid->width_cm, edid->height_cm);
>  
> -		dp->sink_has_audio = drm_detect_monitor_audio(edid);
> -
>  		drm_connector_update_edid_property(connector, edid);
>  		ret = drm_add_edid_modes(connector, edid);
> +
> +		dp->sink_has_audio = connector->display_info.has_audio;
>  	}
>  	mutex_unlock(&dp->lock);
>  
> diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
> index f51774866f41..98691aef1be5 100644
> --- a/drivers/gpu/drm/rockchip/inno_hdmi.c
> +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
> @@ -564,10 +564,11 @@ static int inno_hdmi_connector_get_modes(struct drm_connector *connector)
>  
>  	edid = drm_get_edid(connector, hdmi->ddc);
>  	if (edid) {
> -		hdmi->hdmi_data.sink_has_audio = drm_detect_monitor_audio(edid);
>  		drm_connector_update_edid_property(connector, edid);
>  		ret = drm_add_edid_modes(connector, edid);
>  		kfree(edid);
> +
> +		hdmi->hdmi_data.sink_has_audio = connector->display_info.has_audio;
>  	}
>  
>  	return ret;
> 






More information about the Intel-gfx mailing list