]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: fix sporadic multiple aux transaction failure
authorYogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Thu, 1 Nov 2018 18:48:48 +0000 (00:18 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Nov 2018 17:01:42 +0000 (12:01 -0500)
commit52985f7220abcf2f8cd598457faeafc9df79a7e8
tree844393a42de8ea2ca9423d2eec646eb732aad725
parent12e51864e7774b0ae50acc6e60a6df17b7ae892c
drm/amd/display: fix sporadic multiple aux transaction failure

[why]
When there are multiple aux transaction in parallel, it is sometime
sporadically the aux transaction starts to continuously fail. The
aux transaction was failing because the busy bit for the given gpio
pin was always set. The busy bit was alway set because the
programming sequence to read, modify and write busy bit was not
atomic. Due to which when multiple threads are trying to modify the
busy bits for their gpio pins in the same integer variable sometimes
the busy bits integer variable is written with old data causing
failure.

[how]
Instead of using individual bits to track gpio pins and grouping
them to integers, one byte will be allcoated for each gpio pin.
Now whenever a gpio pin needs to be set to mark being used, only
writing a value of one to that byte is sufficient, other bytes
are not impacted. Also no need to have atomicity with bytes unlike
with bits.

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/gpio/gpio_service.c
drivers/gpu/drm/amd/display/dc/gpio/gpio_service.h