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

Commit 6c7e66e6 authored by Doug Anderson's avatar Doug Anderson Committed by Thierry Reding
Browse files

drm/bridge: dw-hdmi: Return number of EDID modes



The dw_hdmi_connector_get_modes() function accidentally forgets to
return the number of modes it added, although it has this information
stored in a local variable.  Let's fix that.

Without this fix, drm_helper_probe_single_connector_modes_merge_bits()
could get confused and always call drm_add_modes_noedid().  That's not
right.

Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
Tested-by: default avatarYakir Yang <ykk@rock-chips.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent dd015002
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1395,7 +1395,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
	struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi,
					     connector);
	struct edid *edid;
	int ret;
	int ret = 0;

	if (!hdmi->ddc)
		return 0;
@@ -1412,7 +1412,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
		dev_dbg(hdmi->dev, "failed to get edid\n");
	}

	return 0;
	return ret;
}

static enum drm_mode_status