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

Commit 464fdeca authored by Thierry Reding's avatar Thierry Reding Committed by Daniel Vetter
Browse files

drm/edid: Drop revision argument for drm_mode_std()



This argument is used to pass in the revision of the EDID, but since the
EDID is passed in as well, we can just as well get the revision from the
EDID structure directly.

While at it, update the kerneldoc comment.

Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent b77f0765
Loading
Loading
Loading
Loading
+4 −7
Original line number Original line Diff line number Diff line
@@ -1595,14 +1595,13 @@ bad_std_timing(u8 a, u8 b)
 * @connector: connector of for the EDID block
 * @connector: connector of for the EDID block
 * @edid: EDID block to scan
 * @edid: EDID block to scan
 * @t: standard timing params
 * @t: standard timing params
 * @revision: standard timing level
 *
 *
 * Take the standard timing params (in this case width, aspect, and refresh)
 * Take the standard timing params (in this case width, aspect, and refresh)
 * and convert them into a real mode using CVT/GTF/DMT.
 * and convert them into a real mode using CVT/GTF/DMT.
 */
 */
static struct drm_display_mode *
static struct drm_display_mode *
drm_mode_std(struct drm_connector *connector, struct edid *edid,
drm_mode_std(struct drm_connector *connector, struct edid *edid,
	     struct std_timing *t, int revision)
	     struct std_timing *t)
{
{
	struct drm_device *dev = connector->dev;
	struct drm_device *dev = connector->dev;
	struct drm_display_mode *m, *mode = NULL;
	struct drm_display_mode *m, *mode = NULL;
@@ -1623,7 +1622,7 @@ drm_mode_std(struct drm_connector *connector, struct edid *edid,
	vrefresh_rate = vfreq + 60;
	vrefresh_rate = vfreq + 60;
	/* the vdisplay is calculated based on the aspect ratio */
	/* the vdisplay is calculated based on the aspect ratio */
	if (aspect_ratio == 0) {
	if (aspect_ratio == 0) {
		if (revision < 3)
		if (edid->revision < 3)
			vsize = hsize;
			vsize = hsize;
		else
		else
			vsize = (hsize * 10) / 16;
			vsize = (hsize * 10) / 16;
@@ -2191,8 +2190,7 @@ do_standard_modes(struct detailed_timing *timing, void *c)
			struct drm_display_mode *newmode;
			struct drm_display_mode *newmode;


			std = &data->data.timings[i];
			std = &data->data.timings[i];
			newmode = drm_mode_std(connector, edid, std,
			newmode = drm_mode_std(connector, edid, std);
					       edid->revision);
			if (newmode) {
			if (newmode) {
				drm_mode_probed_add(connector, newmode);
				drm_mode_probed_add(connector, newmode);
				closure->modes++;
				closure->modes++;
@@ -2221,8 +2219,7 @@ add_standard_modes(struct drm_connector *connector, struct edid *edid)
		struct drm_display_mode *newmode;
		struct drm_display_mode *newmode;


		newmode = drm_mode_std(connector, edid,
		newmode = drm_mode_std(connector, edid,
				       &edid->standard_timings[i],
				       &edid->standard_timings[i]);
				       edid->revision);
		if (newmode) {
		if (newmode) {
			drm_mode_probed_add(connector, newmode);
			drm_mode_probed_add(connector, newmode);
			modes++;
			modes++;