lkml.org 
[lkml]   [2024]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 8/8] drm: zynqmp_dp: Add debugfs interface for compliance testing
From
On 21/03/2024 18:08, Sean Anderson wrote:
> On 3/20/24 03:49, Tomi Valkeinen wrote:
>> On 20/03/2024 00:51, Sean Anderson wrote:
>>
>>> +/**
>>> + * enum test_pattern - Test patterns for test testing
>>
>> "for test testing"? =)
>>
>>> @@ -1655,6 +2321,9 @@ static void zynqmp_dp_hpd_irq_work_func(struct work_struct *work)
>>> u8 status[DP_LINK_STATUS_SIZE + 2];
>>> int err;
>>> + if (READ_ONCE(dp->ignore_hpd))
>>> + return;
>>> +
>>> mutex_lock(&dp->lock);
>>> err = drm_dp_dpcd_read(&dp->aux, DP_SINK_COUNT, status,
>>> DP_LINK_STATUS_SIZE + 2);
>>
>> Why do you need READ/WRITE_ONCE() for ignore_hpd?
>
> It's not protected by dp->lock so we don't have to take it for
> zynqmp_dp_hpd_work_func. Although maybe we should make a version of
> zynqmp_dp_bridge_detect which assumes we already hold the lock.

Does using the macros solve some potential issue, or is it just for
documenting that this variable is accessed without lock?

Tomi


\
 
 \ /
  Last update: 2024-05-27 15:58    [W:0.071 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site