[PATCH v3] drm/rockchip: cdn-dp: Convert to drm bridge
Chaoyi Chen
chaoyi.chen at rock-chips.com
Thu May 29 01:57:52 UTC 2025
Hi Dmitry,
On 2025/5/29 0:09, Dmitry Baryshkov wrote:
>>>> @@ -595,16 +546,41 @@ static bool cdn_dp_check_link_status(struct cdn_dp_device *dp)
>>>> static void cdn_dp_audio_handle_plugged_change(struct cdn_dp_device *dp,
>>>> bool plugged)
>>>> {
>>>> - if (dp->codec_dev)
>>>> - dp->plugged_cb(dp->codec_dev, plugged);
>>>> + if (dp->sink_has_audio)
>>>> + drm_connector_hdmi_audio_plugged_notify(dp->connector, plugged);
>>> I'd say, notify always and let userspace figure it out via the ELD. Then
>>> you shouldn't need sink_has_audio. This would match the behaviour of
>>> HDMI drivers.
>> Oh, I find that there are similar usages in qcom msm driver. Is there
>> any more progress?
> For msm driver it is required as DSP requires HDMI to be plugged for
> the audio path to work.
I see, will fix in v4.
>>>> @@ -705,8 +681,6 @@ static int cdn_dp_encoder_atomic_check(struct drm_encoder *encoder,
>>>>
>>>> static const struct drm_encoder_helper_funcs cdn_dp_encoder_helper_funcs = {
>>>> .mode_set = cdn_dp_encoder_mode_set,
>>>> - .enable = cdn_dp_encoder_enable,
>>>> - .disable = cdn_dp_encoder_disable,
>>>> .atomic_check = cdn_dp_encoder_atomic_check,
>>> Nit: for the future cleanup, it should probably be possible to get rid
>>> of these encoder ops too by moving them to the bridge ops.
>> Interesting, have these patches been submitted upstream yet?
> Everything is already there, see drm_bridge_funcs::mode_set() and
> drm_bridge_funcs::atomic_check().
Thanks for the clarification. I will move mode_set() to bridge ops.
And for the drm_encoder_helper_funcs::atomic_check(), most Rockchip
drivers will set some Rockchip-specific properties here so that the VOP
driver can process them. In the future, we may integrate a new encoder
driver to process these private properties. So, I prefer to keep this as
it is.
More information about the dri-devel
mailing list