Ville Syrj�l� writes:
[...]
You could use memchr_inv() here. But the compiler can't optimize it since it's not inline, so I suppose it might make it slower.
Right. It's stupid anyway. See below.
Oops, right. Leftover from old code.
change seems superfluous since you're not using the more detailed return value from drm_edid_block_check_error().
This should probably be changed. For the drm_edid_block_valid() I'm already using the previous error state as argument - but I don't tell the result of this read. Doesn't make much sense :(
Something similar should be done for drm_edid_is_valid() - even if the driver doesn't bother (for instance because this function is only called once when the device structures are initialized).
The current code ignores the error state for extension blocks i guess it should not if we want to avoid having repreated logging of errors in the extension blocks. What should be done is: unsigned err = drm_edid_block_check_error(); result |= err; if (!err) { valid_extensions++; ... }
Exactly. Please see above.
Thanks for looking at the patches!
Cheers, Egbert.
On Thu, Nov 22, 2012 at 07:28:44PM +0100, Egbert Eich wrote:
I'm not sure. The current code dump all failed extension block, doesn't it? Maybe we actually do want that to happen, at least w/ debugs enabled.
Then there are various retry loops in the code, which may or may not be necessary. I have a feeling some of them may have been attempts at papering over a bug that I fixed [1] in the i2c bitbanging code. But if they are necessary, I'm not sure we really appreciate repeated dumps of the same block.
[1] https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=8ee...
dri-devel@lists.freedesktop.org