Skip to content

Commit b4fa080

Browse files
committed
drm/vc4: hdmi: stop rereading EDID in get_modes()
The vc4_hdmi_connector_detect_ctx() via vc4_hdmi_handle_hotplug() already reads EDID and propagates it to the drm_connector. Stop rereading EDID as a part of the .get_modes() callback and just update the list of modes. This matches the behaviour of the i915 driver. Acked-by: Maxime Ripard <[email protected]> Tested-by: Dave Stevenson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 9640f14 commit b4fa080

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

drivers/gpu/drm/vc4/vc4_hdmi.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -471,31 +471,10 @@ static int vc4_hdmi_connector_detect_ctx(struct drm_connector *connector,
471471

472472
static int vc4_hdmi_connector_get_modes(struct drm_connector *connector)
473473
{
474-
struct vc4_hdmi *vc4_hdmi = connector_to_vc4_hdmi(connector);
475474
struct vc4_dev *vc4 = to_vc4_dev(connector->dev);
476-
const struct drm_edid *drm_edid;
477475
int ret = 0;
478476

479-
/*
480-
* NOTE: This function should really take vc4_hdmi->mutex, but doing so
481-
* results in reentrancy issues since cec_s_phys_addr() might call
482-
* .adap_enable, which leads to that funtion being called with our mutex
483-
* held.
484-
*
485-
* Concurrency isn't an issue at the moment since we don't share
486-
* any state with any of the other frameworks so we can ignore
487-
* the lock for now.
488-
*/
489-
490-
drm_edid = drm_edid_read_ddc(connector, vc4_hdmi->ddc);
491-
drm_edid_connector_update(connector, drm_edid);
492-
cec_s_phys_addr(vc4_hdmi->cec_adap,
493-
connector->display_info.source_physical_address, false);
494-
if (!drm_edid)
495-
return 0;
496-
497477
ret = drm_edid_connector_add_modes(connector);
498-
drm_edid_free(drm_edid);
499478

500479
if (!vc4->hvs->vc5_hdmi_enable_hdmi_20) {
501480
struct drm_device *drm = connector->dev;

0 commit comments

Comments
 (0)