Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174491
b: refs/heads/master
c: 47ee4cc
h: refs/heads/master
i:
  174489: 73679a0
  174487: 1e303c4
v: v3
  • Loading branch information
Adam Jackson authored and Dave Airlie committed Nov 24, 2009
1 parent 7bcdf91 commit 267fab6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f985dedb57bae741b4326415f72fe1a1e556563b
refs/heads/master: 47ee4ccf745ea88ee1aadcf5895d91af3b73ea64
28 changes: 14 additions & 14 deletions trunk/drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ static bool edid_is_valid(struct edid *edid)
DRM_ERROR("EDID has major version %d, instead of 1\n", edid->version);
goto bad;
}
if (edid->revision > 4)
DRM_DEBUG("EDID minor > 4, assuming backward compatibility\n");

for (i = 0; i < EDID_LENGTH; i++)
csum += raw_edid[i];
if (csum) {
DRM_ERROR("EDID checksum is invalid, remainder is %d\n", csum);
goto bad;
}

if (edid->revision > 4)
DRM_DEBUG("EDID minor > 4, assuming backward compatibility\n");

return 1;

bad:
Expand Down Expand Up @@ -1060,19 +1060,19 @@ static int drm_ddc_read_edid(struct drm_connector *connector,
struct i2c_adapter *adapter,
char *buf, int len)
{
int ret;
int i;

ret = drm_do_probe_ddc_edid(adapter, buf, len);
if (ret != 0) {
goto end;
}
if (!edid_is_valid((struct edid *)buf)) {
dev_warn(&connector->dev->pdev->dev, "%s: EDID invalid.\n",
drm_get_connector_name(connector));
ret = -1;
for (i = 0; i < 4; i++) {
if (drm_do_probe_ddc_edid(adapter, buf, len))
return -1;
if (edid_is_valid((struct edid *)buf))
return 0;
}
end:
return ret;

/* repeated checksum failures; warn, but carry on */
dev_warn(&connector->dev->pdev->dev, "%s: EDID invalid.\n",
drm_get_connector_name(connector));
return -1;
}

/**
Expand Down

0 comments on commit 267fab6

Please sign in to comment.