Commit 084c7a7c authored by Jani Nikula's avatar Jani Nikula

drm/edid: convert drm_dmt_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/a8f393263225321e74f1e2884e81b3346d1adf20.1652097712.git.jani.nikula@intel.com
parent f0d080ff
...@@ -3121,8 +3121,8 @@ static bool valid_inferred_mode(const struct drm_connector *connector, ...@@ -3121,8 +3121,8 @@ static bool valid_inferred_mode(const struct drm_connector *connector,
return ok; return ok;
} }
static int static int drm_dmt_modes_for_range(struct drm_connector *connector,
drm_dmt_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;
...@@ -3130,7 +3130,7 @@ drm_dmt_modes_for_range(struct drm_connector *connector, const struct edid *edid ...@@ -3130,7 +3130,7 @@ drm_dmt_modes_for_range(struct drm_connector *connector, const struct edid *edid
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
for (i = 0; i < ARRAY_SIZE(drm_dmt_modes); i++) { for (i = 0; i < ARRAY_SIZE(drm_dmt_modes); i++) {
if (mode_in_range(drm_dmt_modes + i, edid, timing) && if (mode_in_range(drm_dmt_modes + i, drm_edid->edid, timing) &&
valid_inferred_mode(connector, drm_dmt_modes + i)) { valid_inferred_mode(connector, drm_dmt_modes + i)) {
newmode = drm_mode_duplicate(dev, &drm_dmt_modes[i]); newmode = drm_mode_duplicate(dev, &drm_dmt_modes[i]);
if (newmode) { if (newmode) {
...@@ -3226,7 +3226,7 @@ do_inferred_modes(const struct detailed_timing *timing, void *c) ...@@ -3226,7 +3226,7 @@ do_inferred_modes(const struct detailed_timing *timing, void *c)
return; return;
closure->modes += drm_dmt_modes_for_range(closure->connector, closure->modes += drm_dmt_modes_for_range(closure->connector,
closure->drm_edid->edid, closure->drm_edid,
timing); timing);
if (!version_greater(closure->drm_edid->edid, 1, 1)) if (!version_greater(closure->drm_edid->edid, 1, 1))
......
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