]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amd/display: Workaround for stuck I2C arbitrage
authorDominik Kaszewski <dominik.kaszewski@amd.com>
Tue, 24 Jun 2025 10:40:25 +0000 (12:40 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Jul 2025 18:07:51 +0000 (14:07 -0400)
commit04d57f4462a6c39f04711550aa60c42c8ed5d25d
tree21103ad71dc13de2b7f648a65eb8e71362539e3e
parent48cb9c3b21474864beb9e19cb4f7b4ccb50de77b
drm/amd/display: Workaround for stuck I2C arbitrage

[Why]
When booting without an HDMI display connected, the I2C registers
are not initialized correctly, leading to DC_I2C_ARBITRATION register
getting stuck with DC_I2C_REG_RW_CNTL_STATUS == USED_BY_SW.

[How]
* Correct TOCTOU race condition in engine acquire logic which did not
check against DMUB trying to acquire it at the same time.
* Deassert SOFT_RESET before acquire, as it can block access to other
I2C registers.
* Add a workaround in release, checking that after triggerring
DC_I2C_SW_DONE_USING_I2C_REG, DC_I2C_REG_RW_CNTL_STATUS != USED_BY_SW.
If necessary, trigger DC_I2C_SW_DONE_USING_I2C_REG again.
* Remove unnecessary clear of DC_I2C_SW_USE_I2C_REG_REQ, which engine
ignores according to specification.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Dominik Kaszewski <dominik.kaszewski@amd.com>
Signed-off-by: Ivan Lipski <ivan.lipski@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c