Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c77e2c2 authored by Sean Paul's avatar Sean Paul Committed by Archit Taneja
Browse files

drm/bridge: analogix_dp: Don't read EDID if panel present



If there's a panel connected to the analogix_dp bridge, rely on
the panel driver for modes, rather than reading EDID *and* calling
get_modes() on the panel.

This allows panels with a valid EDID to read it in the panel driver
(e.g. simple_panel), and panels with invalid EDID to homebrew modes
in their get_modes implementation.

Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
parent 0d97ad03
Loading
Loading
Loading
Loading
+10 −8
Original line number Original line Diff line number Diff line
@@ -930,15 +930,17 @@ int analogix_dp_get_modes(struct drm_connector *connector)
		return 0;
		return 0;
	}
	}


	if (dp->plat_data->panel) {
		num_modes += drm_panel_get_modes(dp->plat_data->panel);
	} else {
		edid = drm_get_edid(connector, &dp->aux.ddc);
		edid = drm_get_edid(connector, &dp->aux.ddc);
		if (edid) {
		if (edid) {
		drm_mode_connector_update_edid_property(&dp->connector, edid);
			drm_mode_connector_update_edid_property(&dp->connector,
								edid);
			num_modes += drm_add_edid_modes(&dp->connector, edid);
			num_modes += drm_add_edid_modes(&dp->connector, edid);
			kfree(edid);
			kfree(edid);
		}
		}

	}
	if (dp->plat_data->panel)
		num_modes += drm_panel_get_modes(dp->plat_data->panel);


	if (dp->plat_data->get_modes)
	if (dp->plat_data->get_modes)
		num_modes += dp->plat_data->get_modes(dp->plat_data, connector);
		num_modes += dp->plat_data->get_modes(dp->plat_data, connector);