}
-static u8 *drm_find_displayid_extension(const struct edid *edid)
+static u8 *drm_find_displayid_extension(const struct edid *edid, int *idx)
{
- return drm_find_edid_extension(edid, DISPLAYID_EXT);
+ u8 *displayid = drm_find_edid_extension(edid, DISPLAYID_EXT);
+
+ if (!displayid)
+ return NULL;
+
+ *idx = 1;
+
+ return displayid;
}
static u8 *drm_find_cea_extension(const struct edid *edid)
{
int ret;
- int idx = 1;
+ int idx;
int length = EDID_LENGTH;
struct displayid_block *block;
u8 *cea;
return cea;
/* CEA blocks can also be found embedded in a DisplayID block */
- displayid = drm_find_displayid_extension(edid);
+ displayid = drm_find_displayid_extension(edid, &idx);
if (!displayid)
return NULL;
{
u8 *displayid;
int ret;
- int idx = 1;
+ int idx;
int length = EDID_LENGTH;
struct displayid_block *block;
int num_modes = 0;
- displayid = drm_find_displayid_extension(edid);
+ displayid = drm_find_displayid_extension(edid, &idx);
if (!displayid)
return 0;
}
static int drm_parse_display_id(struct drm_connector *connector,
- u8 *displayid, int length,
- bool is_edid_extension)
+ u8 *displayid, int length, int idx)
{
- /* if this is an EDID extension the first byte will be 0x70 */
- int idx = 0;
struct displayid_block *block;
int ret;
- if (is_edid_extension)
- idx = 1;
-
ret = validate_displayid(displayid, length, idx);
if (ret)
return ret;
struct edid *edid)
{
void *displayid = NULL;
+ int idx;
int ret;
+
connector->has_tile = false;
- displayid = drm_find_displayid_extension(edid);
+ displayid = drm_find_displayid_extension(edid, &idx);
if (!displayid) {
/* drop reference to any tile group we had */
goto out_drop_ref;
}
- ret = drm_parse_display_id(connector, displayid, EDID_LENGTH, true);
+ ret = drm_parse_display_id(connector, displayid, EDID_LENGTH, idx);
if (ret < 0)
goto out_drop_ref;
if (!connector->has_tile)