Rev 1963 | Rev 2160 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1963 | Rev 2004 | ||
---|---|---|---|
Line 182... | Line 182... | ||
182 | 182 | ||
Line 183... | Line 183... | ||
183 | return 1; |
183 | return 1; |
184 | 184 | ||
185 | bad: |
185 | bad: |
186 | if (raw_edid) { |
186 | if (raw_edid) { |
187 | DRM_ERROR("Raw EDID:\n"); |
187 | printk(KERN_ERR "Raw EDID:\n"); |
188 | // print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE, raw_edid, EDID_LENGTH); |
188 | // print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE, raw_edid, EDID_LENGTH); |
189 | // printk("\n"); |
189 | printk(KERN_ERR "\n"); |
190 | } |
190 | } |
Line 191... | Line 191... | ||
191 | return 0; |
191 | return 0; |
Line 256... | Line 256... | ||
256 | } while (ret != 2 && --retries); |
256 | } while (ret != 2 && --retries); |
Line 257... | Line 257... | ||
257 | 257 | ||
258 | return ret == 2 ? 0 : -1; |
258 | return ret == 2 ? 0 : -1; |
Line -... | Line 259... | ||
- | 259 | } |
|
- | 260 | ||
- | 261 | static bool drm_edid_is_zero(u8 *in_edid, int length) |
|
- | 262 | { |
|
- | 263 | int i; |
|
- | 264 | u32 *raw_edid = (u32 *)in_edid; |
|
- | 265 | ||
- | 266 | for (i = 0; i < length / 4; i++) |
|
- | 267 | if (*(raw_edid + i) != 0) |
|
- | 268 | return false; |
|
- | 269 | return true; |
|
259 | } |
270 | } |
260 | 271 | ||
261 | static u8 * |
272 | static u8 * |
262 | drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) |
273 | drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter) |
263 | { |
274 | { |
Line 272... | Line 283... | ||
272 | for (i = 0; i < 4; i++) { |
283 | for (i = 0; i < 4; i++) { |
273 | if (drm_do_probe_ddc_edid(adapter, block, 0, EDID_LENGTH)) |
284 | if (drm_do_probe_ddc_edid(adapter, block, 0, EDID_LENGTH)) |
274 | goto out; |
285 | goto out; |
275 | if (drm_edid_block_valid(block)) |
286 | if (drm_edid_block_valid(block)) |
276 | break; |
287 | break; |
- | 288 | if (i == 0 && drm_edid_is_zero(block, EDID_LENGTH)) { |
|
- | 289 | connector->null_edid_counter++; |
|
- | 290 | goto carp; |
|
- | 291 | } |
|
277 | } |
292 | } |
278 | if (i == 4) |
293 | if (i == 4) |
279 | goto carp; |
294 | goto carp; |
Line 280... | Line 295... | ||
280 | 295 |