Skip to content

Commit 2ea9ec5

Browse files
committed
drm/vc4: hdmi: use drm_atomic_helper_connector_hdmi_hotplug()
Use the helper function to update the connector's information. This makes sure that HDMI-related events are handled in a generic way. Currently it is limited to the HDMI state reporting to the sound system. Acked-by: Maxime Ripard <[email protected]> Tested-by: Dave Stevenson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20241224-drm-bridge-hdmi-connector-v10-10-dc89577cd438@linaro.org Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent b4fa080 commit 2ea9ec5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/gpu/drm/vc4/vc4_hdmi.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ static void vc4_hdmi_handle_hotplug(struct vc4_hdmi *vc4_hdmi,
384384
enum drm_connector_status status)
385385
{
386386
struct drm_connector *connector = &vc4_hdmi->connector;
387-
const struct drm_edid *drm_edid;
388387
int ret;
389388

390389
/*
@@ -406,17 +405,14 @@ static void vc4_hdmi_handle_hotplug(struct vc4_hdmi *vc4_hdmi,
406405
return;
407406
}
408407

409-
drm_edid = drm_edid_read_ddc(connector, vc4_hdmi->ddc);
408+
drm_atomic_helper_connector_hdmi_hotplug(connector, status);
410409

411-
drm_edid_connector_update(connector, drm_edid);
412410
cec_s_phys_addr(vc4_hdmi->cec_adap,
413411
connector->display_info.source_physical_address, false);
414412

415-
if (!drm_edid)
413+
if (status != connector_status_connected)
416414
return;
417415

418-
drm_edid_free(drm_edid);
419-
420416
for (;;) {
421417
ret = vc4_hdmi_reset_link(connector, ctx);
422418
if (ret == -EDEADLK) {
@@ -550,6 +546,7 @@ static void vc4_hdmi_connector_reset(struct drm_connector *connector)
550546
}
551547

552548
static const struct drm_connector_funcs vc4_hdmi_connector_funcs = {
549+
.force = drm_atomic_helper_connector_hdmi_force,
553550
.fill_modes = drm_helper_probe_single_connector_modes,
554551
.reset = vc4_hdmi_connector_reset,
555552
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,

0 commit comments

Comments
 (0)