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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190529215530.mi3fjlsaziq22mw5@earth.universe>
Date:   Wed, 29 May 2019 23:55:30 +0200
From:   Sebastian Reichel <sre@...nel.org>
To:     Tomi Valkeinen <tomi.valkeinen@...com>
Cc:     Tony Lindgren <tony@...mide.com>, Pavel Machek <pavel@....cz>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        "H. Nikolaus Schaller" <hns@...delico.com>,
        dri-devel@...ts.freedesktop.org, linux-omap@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCHv6 3/4] drm/omap: add framedone interrupt support

Hi Tomi,

On Tue, May 28, 2019 at 01:19:01PM +0300, Tomi Valkeinen wrote:
> Hi Sebastian,
> 
> On 23/05/2019 23:07, Sebastian Reichel wrote:
> 
> > @@ -302,6 +328,30 @@ void omap_crtc_vblank_irq(struct drm_crtc *crtc)
> >   	DBG("%s: apply done", omap_crtc->name);
> >   }
> > +void omap_crtc_framedone_irq(struct drm_crtc *crtc, uint32_t irqstatus)
> > +{
> > +	struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
> > +
> > +	if (!omap_crtc->framedone_handler) {
> > +		dev_warn(omap_crtc->base.dev->dev, "no framedone handler?");
> > +		return;
> > +	}
> 
> This triggers on normal displays.
> 
> FRAMEDONE is an interrupt we get when DISPC's output videoport is being
> turned off. It's raised after the last frame has been finished (i.e. the
> DISPC is truly done with that videoport).
>
> We get it for both conventional displays (when the display is turned off)
> and for DSI command mode (when a single frame has been sent), as in both
> cases the videoport is disabled after the operation. For conventional
> displays, you can think FRAMEDONE as the last vsync.

Ok, but it should only trigger when framedone irq is enabled. This
commit adds the required infrastructure, but does not call 
omap_irq_enable_framedone() anywhere. The next commit enables it,
but only for manually updated displays.

> We also have special handling for FRAMEDONE in omap_crtc_set_enabled(),
> which is used to get the drm driver to wait for FRAMEDONE when disabling the
> display. I wonder if this separate framedone handling might somehow conflict
> with that code. And/or should these be somehow combined.

Oh sorry, I missed the part that omap_irq_wait_init() actually
enables the framedone irq. It should be enough to just drop the
warning (and the curly brackets) to keep existing behaviour. The
code exits early with the above warning for any existing code (since
that does not register a framedone handler). DSI on the other hand
does not reach the omap_irq_wait_init() part. Regarding combining
the logic: I don't think there is anything to combine right now.
It should be possible to simplify the logic after DSI has been
converted to drm_panel style, since this will move the update logic
for the screen content from the panel driver to DSI core.

TLDR: It's enough to remove the warning. Do you need a new
submission for this?

-- Sebastian

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ