Commit a77f7c89 authored by Jani Nikula's avatar Jani Nikula

drm/edid: convert drm_gtf_modes_for_range() to drm_edid

We'll need to propagate drm_edid everywhere.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b50377ce67fd3cee6628ea5865c80fa0fa7da990.1652097712.git.jani.nikula@intel.com
parent 084c7a7c
...@@ -3156,9 +3156,9 @@ void drm_mode_fixup_1366x768(struct drm_display_mode *mode) ...@@ -3156,9 +3156,9 @@ void drm_mode_fixup_1366x768(struct drm_display_mode *mode)
} }
} }
static int static int drm_gtf_modes_for_range(struct drm_connector *connector,
drm_gtf_modes_for_range(struct drm_connector *connector, const struct edid *edid, const struct drm_edid *drm_edid,
const struct detailed_timing *timing) const struct detailed_timing *timing)
{ {
int i, modes = 0; int i, modes = 0;
struct drm_display_mode *newmode; struct drm_display_mode *newmode;
...@@ -3172,7 +3172,7 @@ drm_gtf_modes_for_range(struct drm_connector *connector, const struct edid *edid ...@@ -3172,7 +3172,7 @@ drm_gtf_modes_for_range(struct drm_connector *connector, const struct edid *edid
return modes; return modes;
drm_mode_fixup_1366x768(newmode); drm_mode_fixup_1366x768(newmode);
if (!mode_in_range(newmode, edid, timing) || if (!mode_in_range(newmode, drm_edid->edid, timing) ||
!valid_inferred_mode(connector, newmode)) { !valid_inferred_mode(connector, newmode)) {
drm_mode_destroy(dev, newmode); drm_mode_destroy(dev, newmode);
continue; continue;
...@@ -3236,7 +3236,7 @@ do_inferred_modes(const struct detailed_timing *timing, void *c) ...@@ -3236,7 +3236,7 @@ do_inferred_modes(const struct detailed_timing *timing, void *c)
case 0x02: /* secondary gtf, XXX could do more */ case 0x02: /* secondary gtf, XXX could do more */
case 0x00: /* default gtf */ case 0x00: /* default gtf */
closure->modes += drm_gtf_modes_for_range(closure->connector, closure->modes += drm_gtf_modes_for_range(closure->connector,
closure->drm_edid->edid, closure->drm_edid,
timing); timing);
break; break;
case 0x04: /* cvt, only in 1.4+ */ case 0x04: /* cvt, only in 1.4+ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment