Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933426AbbLBRVt (ORCPT ); Wed, 2 Dec 2015 12:21:49 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:38566 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933294AbbLBRVp (ORCPT ); Wed, 2 Dec 2015 12:21:45 -0500 MIME-Version: 1.0 In-Reply-To: <1449058982-18595-3-git-send-email-Liviu.Dudau@arm.com> References: <1449058982-18595-1-git-send-email-Liviu.Dudau@arm.com> <1449058982-18595-3-git-send-email-Liviu.Dudau@arm.com> Date: Wed, 2 Dec 2015 17:21:44 +0000 Message-ID: Subject: Re: [PATCH v3 2/4] drm: Add support for ARM's HDLCD controller. From: Daniel Stone To: Liviu Dudau Cc: David Airlie , Catalin Marinas , Will Deacon , Rob Herring , Sudeep Holla , Jon Medhurst , Mark Rutland , Ian Campbell , Kumar Gala , Rob Herring , Russell King , devicetree , Pawel Moll , Arnd Bergmann , Greg Kroah-Hartman , Punit Agrawal , LKML , DRI devel , Andrew Morton , Robin Murphy , LAKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1557 Lines: 38 Hi Liviu, On 2 December 2015 at 12:23, Liviu Dudau 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/