Commit f447dd1f authored by Ville Syrjälä's avatar Ville Syrjälä

drm/edid: Introduce is_detailed_timing_descritor()

Let's introduce is_detailed_timing_descritor() as the opposite
counterpart of is_display_descriptor().

Cc: Allen Chen <allen.chen@ite.com.tw>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200124200231.10517-3-ville.syrjala@linux.intel.comAcked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarUma Shankar <uma.shankar@intel.com>
parent a7a131ac
......@@ -2218,6 +2218,11 @@ static bool is_display_descriptor(const u8 d[18], u8 tag)
d[2] == 0x00 && d[3] == tag;
}
static bool is_detailed_timing_descriptor(const u8 d[18])
{
return d[0] != 0x00 || d[1] != 0x00;
}
typedef void detailed_cb(struct detailed_timing *timing, void *closure);
static void
......@@ -3117,7 +3122,9 @@ do_detailed_mode(struct detailed_timing *timing, void *c)
struct detailed_mode_closure *closure = c;
struct drm_display_mode *newmode;
if (timing->pixel_clock) {
if (!is_detailed_timing_descriptor((const u8 *)timing))
return;
newmode = drm_mode_detailed(closure->connector->dev,
closure->edid, timing,
closure->quirks);
......@@ -3137,7 +3144,6 @@ do_detailed_mode(struct detailed_timing *timing, void *c)
drm_mode_probed_add(closure->connector, newmode);
closure->modes++;
closure->preferred = false;
}
}
/*
......
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