diff options
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 10 | ||||
-rw-r--r-- | include/drm/drm_crtc.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index c6366e90041e..f425379e5aa0 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -149,13 +149,13 @@ EXPORT_SYMBOL(drm_edid_header_is_valid); | |||
149 | * Sanity check the EDID block (base or extension). Return 0 if the block | 149 | * Sanity check the EDID block (base or extension). Return 0 if the block |
150 | * doesn't check out, or 1 if it's valid. | 150 | * doesn't check out, or 1 if it's valid. |
151 | */ | 151 | */ |
152 | bool drm_edid_block_valid(u8 *raw_edid) | 152 | bool drm_edid_block_valid(u8 *raw_edid, int block) |
153 | { | 153 | { |
154 | int i; | 154 | int i; |
155 | u8 csum = 0; | 155 | u8 csum = 0; |
156 | struct edid *edid = (struct edid *)raw_edid; | 156 | struct edid *edid = (struct edid *)raw_edid; |
157 | 157 | ||
158 | if (raw_edid[0] == 0x00) { | 158 | if (block == 0) { |
159 | int score = drm_edid_header_is_valid(raw_edid); | 159 | int score = drm_edid_header_is_valid(raw_edid); |
160 | if (score == 8) ; | 160 | if (score == 8) ; |
161 | else if (score >= 6) { | 161 | else if (score >= 6) { |
@@ -219,7 +219,7 @@ bool drm_edid_is_valid(struct edid *edid) | |||
219 | return false; | 219 | return false; |
220 | 220 | ||
221 | for (i = 0; i <= edid->extensions; i++) | 221 | for (i = 0; i <= edid->extensions; i++) |
222 | if (!drm_edid_block_valid(raw + i * EDID_LENGTH)) | 222 | if (!drm_edid_block_valid(raw + i * EDID_LENGTH, i)) |
223 | return false; | 223 | return false; |
224 | 224 | ||
225 | return true; | 225 | return true; |
@@ -299,7 +299,7 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) | |||
299 | for (i = 0; i < 4; i++) { | 299 | for (i = 0; i < 4; i++) { |
300 | if (drm_do_probe_ddc_edid(adapter, block, 0, EDID_LENGTH)) | 300 | if (drm_do_probe_ddc_edid(adapter, block, 0, EDID_LENGTH)) |
301 | goto out; | 301 | goto out; |
302 | if (drm_edid_block_valid(block)) | 302 | if (drm_edid_block_valid(block, 0)) |
303 | break; | 303 | break; |
304 | if (i == 0 && drm_edid_is_zero(block, EDID_LENGTH)) { | 304 | if (i == 0 && drm_edid_is_zero(block, EDID_LENGTH)) { |
305 | connector->null_edid_counter++; | 305 | connector->null_edid_counter++; |
@@ -324,7 +324,7 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) | |||
324 | block + (valid_extensions + 1) * EDID_LENGTH, | 324 | block + (valid_extensions + 1) * EDID_LENGTH, |
325 | j, EDID_LENGTH)) | 325 | j, EDID_LENGTH)) |
326 | goto out; | 326 | goto out; |
327 | if (drm_edid_block_valid(block + (valid_extensions + 1) * EDID_LENGTH)) { | 327 | if (drm_edid_block_valid(block + (valid_extensions + 1) * EDID_LENGTH, j)) { |
328 | valid_extensions++; | 328 | valid_extensions++; |
329 | break; | 329 | break; |
330 | } | 330 | } |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 6f5faf669959..f35e7edd7de2 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -1012,7 +1012,7 @@ extern int drm_add_modes_noedid(struct drm_connector *connector, | |||
1012 | int hdisplay, int vdisplay); | 1012 | int hdisplay, int vdisplay); |
1013 | 1013 | ||
1014 | extern int drm_edid_header_is_valid(const u8 *raw_edid); | 1014 | extern int drm_edid_header_is_valid(const u8 *raw_edid); |
1015 | extern bool drm_edid_block_valid(u8 *raw_edid); | 1015 | extern bool drm_edid_block_valid(u8 *raw_edid, int block); |
1016 | extern bool drm_edid_is_valid(struct edid *edid); | 1016 | extern bool drm_edid_is_valid(struct edid *edid); |
1017 | struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev, | 1017 | struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev, |
1018 | int hsize, int vsize, int fresh, | 1018 | int hsize, int vsize, int fresh, |