Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1282110

Re: [PATCH v3 2/4] drm: Add support for ARM's HDLCD controller.

From Daniel Stone <daniel@fooishbar.org>
Newsgroups linux.kernel
Subject Re: [PATCH v3 2/4] drm: Add support for ARM's HDLCD controller.
Date 2015-12-02 18:30 +0100
Message-ID <qBjo7-1O1-45@gated-at.bofh.it> (permalink)
References <qBeHM-76w-11@gated-at.bofh.it> <qBeHM-76w-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Liviu,

On 2 December 2015 at 12:23, Liviu Dudau <Liviu.Dudau@arm.com> wrote:
> +       if (irq_status & HDLCD_INTERRUPT_VSYNC) {
> +               unsigned long flags;
> +
> +               drm_handle_vblank(drm, 0);
> +
> +               spin_lock_irqsave(&drm->event_lock, flags);
> +               if (hdlcd->event) {
> +                       drm_send_vblank_event(drm, hdlcd->event->pipe, hdlcd->event);
> +                       drm_crtc_vblank_put(&hdlcd->crtc);
> +                       hdlcd->event = NULL;
> +               }
> +               spin_unlock_irqrestore(&drm->event_lock, flags);
> +       }

As with VC4 and Rockchip, you're missing a ->preclose handler in your
drm_drv, to make sure that you don't try to send events to a dead
client (which causes an OOPS):
https://git.collabora.com/cgit/user/daniels/linux.git/commit/?h=wip/4.4.x/rockchip-drm-fixes&id=d14f21bcd7
(and its parent)

Also, is there anything preventing clients from submitting multiple
pageflips before the event is sent? I couldn't see anything from a
quick look, so you could have the situation of:
  - client submits pageflip, event 1 stored to hdlcd->event
  - client submits pageflip, event 2 stored to hdlcd->event
  - vblank arrives, event 2 is sent
  - event 1 has disappeared and been leaked

Cheers,
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/4] drm: Add support for the ARM HDLCD display controller Liviu Dudau <Liviu.Dudau@arm.com> - 2015-12-02 13:30 +0100
  [PATCH v3 2/4] drm: Add support for ARM's HDLCD controller. Liviu Dudau <Liviu.Dudau@arm.com> - 2015-12-02 13:30 +0100
    Re: [PATCH v3 2/4] drm: Add support for ARM's HDLCD controller. Daniel Stone <daniel@fooishbar.org> - 2015-12-02 18:30 +0100
      Re: [PATCH v3 2/4] drm: Add support for ARM's HDLCD controller. Liviu Dudau <Liviu.Dudau@arm.com> - 2015-12-03 11:10 +0100
        Re: [PATCH v3 2/4] drm: Add support for ARM's HDLCD controller. Daniel Stone <daniel@fooishbar.org> - 2015-12-03 15:30 +0100
          Re: [PATCH v3 2/4] drm: Add support for ARM's HDLCD controller. Liviu Dudau <Liviu.Dudau@arm.com> - 2015-12-03 15:50 +0100
  [PATCH v3 3/4] arm64: Juno: Add HDLCD support to the Juno boards. Liviu Dudau <Liviu.Dudau@arm.com> - 2015-12-02 13:30 +0100
  [PATCH v3 4/4] MAINTAINERS: Add Liviu Dudau as maintainer for ARM HDLCD driver. Liviu Dudau <Liviu.Dudau@arm.com> - 2015-12-02 13:30 +0100
  [PATCH v3 1/4] drm: arm: Add DT bindings documentation for HDLCD driver. Liviu Dudau <Liviu.Dudau@arm.com> - 2015-12-02 13:30 +0100
    Re: [PATCH v3 1/4] drm: arm: Add DT bindings documentation for HDLCD  driver. Rob Herring <robh@kernel.org> - 2015-12-02 15:30 +0100
      Re: [PATCH v3 1/4] drm: arm: Add DT bindings documentation for HDLCD  driver. Liviu Dudau <Liviu.Dudau@arm.com> - 2015-12-02 16:00 +0100

csiph-web