From patchwork Tue May 20 22:25:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 4213321 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 337209F333 for ; Tue, 20 May 2014 22:27:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 75D8B20166 for ; Tue, 20 May 2014 22:27:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A91902015D for ; Tue, 20 May 2014 22:27:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9EC1C6E945; Tue, 20 May 2014 15:27:00 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from gproxy3-pub.mail.unifiedlayer.com (gproxy3-pub.mail.unifiedlayer.com [69.89.30.42]) by gabe.freedesktop.org (Postfix) with SMTP id 0FA7F6E953 for ; Tue, 20 May 2014 15:26:58 -0700 (PDT) Received: (qmail 26735 invoked by uid 0); 20 May 2014 22:26:56 -0000 Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy3.mail.unifiedlayer.com with SMTP; 20 May 2014 22:26:55 -0000 Received: from box514.bluehost.com ([74.220.219.114]) by cmgw2 with id 4NRn1o00T2UhLwi01NRqdd; Tue, 20 May 2014 16:25:55 -0600 X-Authority-Analysis: v=2.1 cv=Q9RBveGa c=1 sm=1 tr=0 a=9W6Fsu4pMcyimqnCr1W0/w==:117 a=9W6Fsu4pMcyimqnCr1W0/w==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=QNyh4yzL7f0A:10 a=3ROhxo7VqVMA:10 a=TBVoxVdAAAAA:8 a=GhZ5P8ky69gA:10 a=noBwr2J6l1kA:10 a=cig5nNgEZSJlWuN18LMA:9 a=rW6DTWptwo0A:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=TNNP7Kuico1Zm3zTHrCeTY/g62TAHQUiYW9DE0lD9qU=; b=UVRnAqZvWu9GVx96Wjo0BeP/v9q31dJO1uSMgAo+a0QR1hxrUf14GsVHyN7aiJfFNr1Cp8oBzTP9mwIX4zbH0Dbdo79rVX4jrnSUB276dhasDjMzA4btdYLVN12wj7R+; Received: from [67.161.37.189] (port=48562 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1WmsTk-0000AT-8B; Tue, 20 May 2014 16:25:48 -0600 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Date: Tue, 20 May 2014 15:25:34 -0700 Message-Id: <1400624735-4220-2-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1400624735-4220-1-git-send-email-jbarnes@virtuousgeek.org> References: <1400624735-4220-1-git-send-email-jbarnes@virtuousgeek.org> X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Cc: dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 2/3] drm: add async version of hpd_irq_event X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In some cases, the callers of this function may not need the return value and delaying the uevent is ok. So add an async version of the function for use in those cases. Signed-off-by: Jesse Barnes --- drivers/gpu/drm/drm_probe_helper.c | 8 ++++++++ include/drm/drm_crtc_helper.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 79f07f2..f3aee4a 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -446,3 +446,11 @@ bool drm_helper_hpd_irq_event(struct drm_device *dev) return changed; } EXPORT_SYMBOL(drm_helper_hpd_irq_event); + +void drm_helper_hpd_irq_event_async(void *data, async_cookie_t cookie) +{ + struct drm_device *dev = data; + + drm_helper_hpd_irq_event(dev); +} +EXPORT_SYMBOL(drm_helper_hpd_irq_event_async); diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index a3d75fe..4f4ed9c 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h @@ -33,6 +33,7 @@ #ifndef __DRM_CRTC_HELPER_H__ #define __DRM_CRTC_HELPER_H__ +#include #include #include #include @@ -172,6 +173,7 @@ extern int drm_helper_probe_single_connector_modes_nomerge(struct drm_connector extern void drm_kms_helper_poll_init(struct drm_device *dev); extern void drm_kms_helper_poll_fini(struct drm_device *dev); extern bool drm_helper_hpd_irq_event(struct drm_device *dev); +extern void drm_helper_hpd_irq_event_async(void *data, async_cookie_t cookie); extern void drm_kms_helper_hotplug_event(struct drm_device *dev); extern void drm_kms_helper_poll_disable(struct drm_device *dev);