Skip to content

Commit b334be8

Browse files
committed
drm/meson: switch to drm_bridge_edid_read()
Prefer using the struct drm_edid based functions. Not ideal, should use source physical address from connector info. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/0a6556b4abaa341b5a3b9b466dbb23714369f7e1.1706038510.git.jani.nikula@intel.com
1 parent d61f651 commit b334be8

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

drivers/gpu/drm/meson/meson_encoder_hdmi.c

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,19 +323,31 @@ static void meson_encoder_hdmi_hpd_notify(struct drm_bridge *bridge,
323323
enum drm_connector_status status)
324324
{
325325
struct meson_encoder_hdmi *encoder_hdmi = bridge_to_meson_encoder_hdmi(bridge);
326-
struct edid *edid;
327326

328327
if (!encoder_hdmi->cec_notifier)
329328
return;
330329

331330
if (status == connector_status_connected) {
332-
edid = drm_bridge_get_edid(encoder_hdmi->next_bridge, encoder_hdmi->connector);
333-
if (!edid)
331+
const struct drm_edid *drm_edid;
332+
const struct edid *edid;
333+
334+
drm_edid = drm_bridge_edid_read(encoder_hdmi->next_bridge,
335+
encoder_hdmi->connector);
336+
if (!drm_edid)
334337
return;
335338

339+
/*
340+
* FIXME: The CEC physical address should be set using
341+
* cec_notifier_set_phys_addr(encoder_hdmi->cec_notifier,
342+
* connector->display_info.source_physical_address) from a path
343+
* that has read the EDID and called
344+
* drm_edid_connector_update().
345+
*/
346+
edid = drm_edid_raw(drm_edid);
347+
336348
cec_notifier_set_phys_addr_from_edid(encoder_hdmi->cec_notifier, edid);
337349

338-
kfree(edid);
350+
drm_edid_free(drm_edid);
339351
} else
340352
cec_notifier_phys_addr_invalidate(encoder_hdmi->cec_notifier);
341353
}

0 commit comments

Comments
 (0)