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  linux-cve-announce  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]
Message-ID: <a31e6514-1643-9e47-cbb4-3323183fd370@axentia.se>
Date:   Thu, 10 Jan 2019 18:51:21 +0000
From:   Peter Rosin <peda@...ntia.se>
To:     Boris Brezillon <bbrezillon@...nel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        David Airlie <airlied@...ux.ie>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        Boris Brezillon <boris.brezillon@...tlin.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 4/4] drm/atmel-hlcdc: do not immediately disable planes,
 wait for next frame

On 2019-01-10 18:29, Boris Brezillon wrote:
> On Thu, 10 Jan 2019 15:10:48 +0000
> Peter Rosin <peda@...ntia.se> wrote:
> 
>> The A2Q and UPDATE bits have no effect in the channel disable registers.
>> However, since they are present, assume that the intention is to disable
>> planes, not immediately as indicated by the RST bit, but on the next
>> frame shift since that is what A2Q and UPDATE means in the channel enable
>> registers.
>>
>> Disabling the plane on the next frame shift is done with the EN bit,
>> so use that.
> 
> It's been a long time, but I think I had a good reason for forcing a
> reset. IIRC, when you don't do that and the CRTC is disabled before the
> plane, the EN bit stays around, and next time you queue a plane update,
> you'll start with an invalid buf pointer.

It might be possible to clear the EN bit in ...CHDR before enabling the
plane in ...CHER. Or is that too late? But this patch is not overly
important, I just wanted to avoid the resulting "black hole" when the
plane DMA is disabled mid-frame. But disabling planes is probably not
something that happens frequently and will perhaps not be noticed at
all...

Cheers,
Peter

>>
>> Signed-off-by: Peter Rosin <peda@...ntia.se>
>> ---
>>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
>> index 05519e8c6586..f2f570642f84 100644
>> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
>> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
>> @@ -728,9 +728,7 @@ static void atmel_hlcdc_plane_atomic_disable(struct drm_plane *p,
>>  
>>  	/* Disable the layer */
>>  	atmel_hlcdc_layer_write_reg(&plane->layer, ATMEL_HLCDC_LAYER_CHDR,
>> -				    ATMEL_HLCDC_LAYER_RST |
>> -				    ATMEL_HLCDC_LAYER_A2Q |
>> -				    ATMEL_HLCDC_LAYER_UPDATE);
>> +				    ATMEL_HLCDC_LAYER_EN);
>>  
>>  	/* Clear all pending interrupts */
>>  	atmel_hlcdc_layer_read_reg(&plane->layer, ATMEL_HLCDC_LAYER_ISR);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ