[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <477e8801-5b14-5d76-eb07-bf3ec6c1795b@ti.com>
Date: Mon, 19 Dec 2016 18:50:34 +0200
From: Jyri Sarha <jsarha@...com>
To: Bartosz Golaszewski <bgolaszewski@...libre.com>
CC: Tomi Valkeinen <tomi.valkeinen@...com>,
David Airlie <airlied@...ux.ie>,
Kevin Hilman <khilman@...libre.com>,
Michael Turquette <mturquette@...libre.com>,
Sekhar Nori <nsekhar@...com>,
LKML <linux-kernel@...r.kernel.org>,
linux-drm <dri-devel@...ts.freedesktop.org>,
Peter Ujfalusi <peter.ujfalusi@...com>,
arm-soc <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] drm: tilcdc: simplify the recovery from sync lost error
on rev1
On 12/19/16 16:19, Bartosz Golaszewski wrote:
>> I would add here:
>> + if ((tilcdc_read(dev, LCDC_RASTER_CTRL_REG) &
>> + LCDC_RASTER_ENABLE)) {
>>
>>> + tilcdc_clear(dev,
>>> + LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE);
>>> + tilcdc_set(dev,
>>> + LCDC_RASTER_CTRL_REG, LCDC_RASTER_ENABLE);
>> + }
>>
>> Just in case the interrupt is for some reason handled right after the
>> crtc is disabled.
>>
>> With this addition I could send a pull request for this fix still today,
>> if you agree with the change.
> I'm not sure this can really happen, but it won't hurt either, so I'll
> send a v2.
Well, in theory it is quite possible. If the driver clears the raster
enable at the same time when sync lost interrupt is generated, then the
irq routine handles the irq before the interrupts are disabled. Then it
happens that rastere remains on but the driver thinks it has already
turned it off.
In practice this is of course terribly unlikely, but a race is a race
and should be avoided.
Anyway, my vacation has already been started so I won't send a pull
request now. I do not like the idea of doing something like that and
then vanishing for two weeks. I hope they still take fixes for 4.10 in
4th Jan.
Best regards,
Jyri
Powered by blists - more mailing lists