lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Aug 2020 23:30:58 +0200
From:   Stefan Wahren <stefan.wahren@...e.com>
To:     Maxime Ripard <maxime@...no.tech>
Cc:     Tim Gover <tim.gover@...pberrypi.com>,
        Dave Stevenson <dave.stevenson@...pberrypi.com>,
        LKML <linux-kernel@...r.kernel.org>,
        DRI Development <dri-devel@...ts.freedesktop.org>,
        Eric Anholt <eric@...olt.net>,
        bcm-kernel-feedback-list@...adcom.com,
        linux-arm-kernel@...ts.infradead.org,
        Phil Elwell <phil@...pberrypi.com>,
        Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
        linux-rpi-kernel@...ts.infradead.org
Subject: Re: [PATCH v4 29/78] drm/vc4: crtc: Add a delay after disabling the
 PixelValve output

Hi Maxime,

Am 25.08.20 um 17:06 schrieb Maxime Ripard:
> Hi Stefan,
>
> On Wed, Jul 29, 2020 at 05:50:31PM +0200, Stefan Wahren wrote:
>> Am 29.07.20 um 16:42 schrieb Maxime Ripard:
>>> Hi,
>>>
>>> On Wed, Jul 29, 2020 at 03:09:21PM +0100, Dave Stevenson wrote:
>>>> On Wed, 8 Jul 2020 at 18:43, Maxime Ripard <maxime@...no.tech> wrote:
>>>>> In order to avoid pixels getting stuck in the (unflushable) FIFO between
>>>>> the HVS and the PV, we need to add some delay after disabling the PV output
>>>>> and before disabling the HDMI controller. 20ms seems to be good enough so
>>>>> let's use that.
>>>>>
>>>>> Signed-off-by: Maxime Ripard <maxime@...no.tech>
>>>>> ---
>>>>>  drivers/gpu/drm/vc4/vc4_crtc.c | 2 ++
>>>>>  1 file changed, 2 insertions(+)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
>>>>> index d0b326e1df0a..7b178d67187f 100644
>>>>> --- a/drivers/gpu/drm/vc4/vc4_crtc.c
>>>>> +++ b/drivers/gpu/drm/vc4/vc4_crtc.c
>>>>> @@ -403,6 +403,8 @@ static void vc4_crtc_atomic_disable(struct drm_crtc *crtc,
>>>>>         ret = wait_for(!(CRTC_READ(PV_V_CONTROL) & PV_VCONTROL_VIDEN), 1);
>>>>>         WARN_ONCE(ret, "Timeout waiting for !PV_VCONTROL_VIDEN\n");
>>>>>
>>>>> +       mdelay(20);
>>>> mdelay for 20ms seems a touch unfriendly as it's a busy wait. Can we
>>>> not msleep instead?
>>> Since the timing was fairly critical, sleeping didn't seem like a good
>>> solution since there's definitely some chance you overshoot and end up
>>> with a higher time than the one you targeted.
>> usleep_range(min, max) isn't a solution?
> My understanding of usleep_range was that you can still overshoot, even
> though it's backed by an HR timer so the resolution is not a jiffy. Are
> we certain that we're going to be in that range?

you are right there is no guarantee about the upper wake up time.

And it's not worth the effort to poll the FIFO state until its empty
(using 20 ms as timeout)?

>
> Maxime
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Powered by blists - more mailing lists