coreboot-kgpe-d16/src
Yu-Ping Wu 0c9b1deb63 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>
2021-12-02 08:23:36 +00:00
..
acpi acpi,Makefile: Add preload_acpi_dsdt 2021-11-29 20:35:33 +00:00
arch arch/{arm,arm64,ppc64,riscv}: Add noop cpu_relax 2021-11-25 10:42:17 +00:00
commonlib commonlib: Move commonlib/cbmem_id.h to commonlib/bsd/ 2021-11-30 17:23:37 +00:00
console
cpu cpu/x86/mp_init.c: Fix building without an SMI_HANDLER 2021-12-01 14:55:13 +00:00
device device/pci_device.c: Scan only one device for PCIe 2021-11-29 03:19:51 +00:00
drivers drivers/analogix/anx7625: Fix edid_read() 2021-12-02 08:23:36 +00:00
ec ec/google/chromeec: Support 5 temperature sensors 2021-11-26 11:19:52 +00:00
include acpi: Convert ACPI_DEVICE_SLEEP_* values to an enum 2021-11-30 22:14:24 +00:00
lib cbfs: Add unverified_area APIs 2021-11-30 00:27:30 +00:00
mainboard guybrush: add RO_GSCVD area to FMAP 2021-12-01 23:34:54 +00:00
northbridge nb/intel/sandybridge: Add support for DPR 2021-11-26 11:25:19 +00:00
security security/intel/txt: Fix GETSEC checks in romstage 2021-11-27 14:20:16 +00:00
soc soc/intel/common/pmc: Drop unnecessary pmc_ipc.c entry 2021-12-01 06:37:51 +00:00
southbridge lippert/frontrunner-af: Use common cimx/sb800 ASL 2021-11-28 16:40:03 +00:00
superio superio/smsc/sch5545: Disable PS/2 lines isolation during init 2021-11-27 14:23:08 +00:00
vendorcode vc/mediatek/mt8195: Fix rank1 CKE setting for single-rank DRAM 2021-12-01 09:48:17 +00:00
Kconfig Kconfig: Show console DEBUG_FUNC if OVERRIDE_LOGLEVEL is set 2021-11-13 00:20:11 +00:00