• Yogesh Mohan Marimuthu's avatar
    drm/amd/display: fix sporadic multiple aux transaction failure · 50f9ca04
    Yogesh Mohan Marimuthu authored
    [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: default avatarYogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
    Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
    Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    50f9ca04
gpio_service.c 11 KB