linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
	David Airlie <airlied@linux.ie>,
	Kevin Hilman <khilman@baylibre.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Sekhar Nori <nsekhar@ti.com>, LKML <linux-kernel@vger.kernel.org>,
	linux-drm <dri-devel@lists.freedesktop.org>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	arm-soc <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] drm: tilcdc: simplify the recovery from sync lost error on rev1
Date: Mon, 19 Dec 2016 18:50:34 +0200	[thread overview]
Message-ID: <477e8801-5b14-5d76-eb07-bf3ec6c1795b@ti.com> (raw)
In-Reply-To: <CAMpxmJVHXoP0BokfbPwQmC=eBaNfS5yfG77EB_MnScmSbUVAdA@mail.gmail.com>

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

      reply	other threads:[~2016-12-19 16:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13 15:07 [PATCH] drm: tilcdc: simplify the recovery from sync lost error on rev1 Bartosz Golaszewski
2016-12-19 13:09 ` Jyri Sarha
2016-12-19 14:19   ` Bartosz Golaszewski
2016-12-19 16:50     ` Jyri Sarha [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=477e8801-5b14-5d76-eb07-bf3ec6c1795b@ti.com \
    --to=jsarha@ti.com \
    --cc=airlied@linux.ie \
    --cc=bgolaszewski@baylibre.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=khilman@baylibre.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=nsekhar@ti.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).