Hi Heikki,

On 12/4/2025 9:40 PM, Heikki Krogerus wrote:
> Hi,
> 
> I don't know what's going on here - this series is the 12th?
> In any case, you need to fix this..
> 

It is 11th. Patch 1 was missing the Signed-off-by line, so I've resent
it. Sorry for the confusion.

>> diff --git a/drivers/gpu/drm/bridge/aux-hpd-typec-dp-bridge.c 
>> b/drivers/gpu/drm/bridge/aux-hpd-typec-dp-bridge.c
>> new file mode 100644
>> index 000000000000..94be3d5f69e9
>> --- /dev/null
>> +++ b/drivers/gpu/drm/bridge/aux-hpd-typec-dp-bridge.c
>> @@ -0,0 +1,51 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>> +#include <linux/of.h>
>> +#include <linux/usb/typec_altmode.h>
>> +#include <linux/usb/typec_dp.h>
>> +
>> +#include <drm/bridge/aux-bridge.h>
>> +
>> +static int drm_typec_bus_event(struct notifier_block *nb,
>> +                           unsigned long action, void *data)
>> +{
>> +    struct device *dev = (struct device *)data;
>> +    struct typec_altmode *alt = to_typec_altmode(dev);
>> +
>> +    if (action != BUS_NOTIFY_ADD_DEVICE)
>> +            goto done;
>> +
>> +    if (is_typec_partner_altmode(&alt->dev) || alt->svid != 
>> USB_TYPEC_DP_SID)
>> +            goto done;
> 
> That's still not enough because of the plug altmodes. You need to
> check that it's a port altmode:
> 
>         if (is_typec_port_altmode(&alt->dev) && alt->svid == USB_TYPEC_DP_SID)
>               drm_dp_hpd_bridge_register(alt->dev.parent->parent,
>                                          to_of_node(alt->dev.parent->fwnode));
>

Oh, it is. Will fix in v12. Thank you.

>> +    /*
>> +     * alt->dev.parent->parent : USB-C controller device
>> +     * alt->dev.parent         : USB-C connector device
>> +     */
>> +    drm_dp_hpd_bridge_register(alt->dev.parent->parent,
>> +                               to_of_node(alt->dev.parent->fwnode));
>> +
>> +done:
>> +    return NOTIFY_OK;
>> +}
>> +
>> +static struct notifier_block drm_typec_event_nb = {
>> +    .notifier_call = drm_typec_bus_event,
>> +};
>> +
>> +static void drm_aux_hpd_typec_dp_bridge_module_exit(void)
>> +{
>> +    bus_unregister_notifier(&typec_bus, &drm_typec_event_nb);
>> +}
>> +
>> +static int __init drm_aux_hpd_typec_dp_bridge_module_init(void)
>> +{
>> +    bus_register_notifier(&typec_bus, &drm_typec_event_nb);
>> +
>> +    return 0;
>> +}
>> +
>> +module_init(drm_aux_hpd_typec_dp_bridge_module_init);
>> +module_exit(drm_aux_hpd_typec_dp_bridge_module_exit);
>> +
>> +MODULE_DESCRIPTION("DRM TYPEC DP HPD BRIDGE");
>> +MODULE_LICENSE("GPL");
> 
> thanks,
> 

-- 
Best, 
Chaoyi

Reply via email to