Re: [PATCH 11/12] drm/rockchip: convert to using has_audio from display_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> Cc: Heiko Stübner <heiko@xxxxxxxxx>
> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

Acked-by: Heiko Stuebner <heiko@xxxxxxxxx>

> ---
>  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;
> 








[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux