summaryrefslogtreecommitdiff
path: root/src/mainboard/google/smaug
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2021-11-25 14:31:21 +0800
committerHung-Te Lin <hungte@chromium.org>2021-12-02 08:23:36 +0000
commit0c9b1deb63483a031d1014b615f1c207e1e250fe (patch)
tree8b07ea8f93e0dcde0f6480f4983bbb389896c411 /src/mainboard/google/smaug
parent74033df2bd97a3e407aeffdf2722140f80164b77 (diff)
drivers/analogix/anx7625: Fix edid_read()
The current implementations of edid_read() and segments_edid_read() have a few problems: 1. The type of variable `c` is incorrect, not matching the return type of sp_tx_aux_rd(). In addition, the meaning of `c` is unknown. 2. It is pointless to do `cnt++` when sp_tx_aux_rd() fails. 3. These two functions ignore the return value of anx7625_reg_block_read(). 4. In segments_edid_read(), anx7625_reg_write() might return a positive value on failure. Fix all of the 4 issues, and modify the code to be closer to kernel 5.10's implementation (drivers/gpu/drm/bridge/analogix/anx7625.c). Note that, however, unlike in kernel, anx7625_reg_block_read() here doesn't return the number of bytes. On success, 0 is returned instead. In addition, following coreboot's convention, always return negative error codes. In particular, change the return value to -1 for edid_read() and segments_edid_read() on failure. BUG=b:207055969 TEST=emerge-asurada coreboot BRANCH=none Change-Id: Ife9d7d97df2926b4581ba519a152c9efed8cd969 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/59540 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'src/mainboard/google/smaug')
0 files changed, 0 insertions, 0 deletions