From patchwork Thu Aug 30 08:27:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuansheng Liu X-Patchwork-Id: 1389241 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 085793FDF6 for ; Thu, 30 Aug 2012 18:32:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F543A0960 for ; Thu, 30 Aug 2012 11:32:08 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id E4A23A02A4 for ; Thu, 30 Aug 2012 01:27:04 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 30 Aug 2012 01:27:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,338,1344236400"; d="scan'208";a="215673729" Received: from fmsmsx108.amr.corp.intel.com ([10.19.9.228]) by fmsmga002.fm.intel.com with ESMTP; 30 Aug 2012 01:27:04 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.19.9.52) by FMSMSX108.amr.corp.intel.com (10.19.9.228) with Microsoft SMTP Server (TLS) id 14.1.355.2; Thu, 30 Aug 2012 01:27:04 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX101.amr.corp.intel.com (10.19.9.52) with Microsoft SMTP Server (TLS) id 14.1.355.2; Thu, 30 Aug 2012 01:27:03 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.239]) by SHSMSX102.ccr.corp.intel.com ([169.254.2.92]) with mapi id 14.01.0355.002; Thu, 30 Aug 2012 16:27:02 +0800 From: "Liu, Chuansheng" To: "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Subject: drm: Adding the option IRQ_ONESHOT to support irq oneshot Thread-Topic: drm: Adding the option IRQ_ONESHOT to support irq oneshot Thread-Index: Ac2GiTRA4atAo+8LSdC3HwZnlXLsOg== Date: Thu, 30 Aug 2012 08:27:01 +0000 Message-ID: <27240C0AC20F114CBF8149A2696CBE4A172DCC@SHSMSX101.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 30 Aug 2012 11:31:55 -0700 Cc: "Shi, Yang A" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: liu chuansheng Subject: [PATCH] drm: Adding the option IRQ_ONESHOT to support irq oneshot For some platforms, we want the irq is handled as one shot, then even when we use the irq thread, with this option, the new irq will come until the irq thread finished. So we have the requirement for IRQ_ONESHOT. Signed-off-by: liu chuansheng --- drivers/gpu/drm/drm_irq.c | 3 +++ include/drm/drmP.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 03f16f3..7a8a581 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -345,6 +345,9 @@ int drm_irq_install(struct drm_device *dev) if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED)) sh_flags = IRQF_SHARED; + if (drm_core_check_feature(dev, DRIVER_IRQ_ONESHOT)) + sh_flags |= IRQF_ONESHOT; + if (dev->devname) irqname = dev->devname; else diff --git a/include/drm/drmP.h b/include/drm/drmP.h index d6b67bb..dfede31 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -152,6 +152,7 @@ int drm_err(const char *func, const char *format, ...); #define DRIVER_GEM 0x1000 #define DRIVER_MODESET 0x2000 #define DRIVER_PRIME 0x4000 +#define DRIVER_IRQ_ONESHOT 0x8000 #define DRIVER_BUS_PCI 0x1 #define DRIVER_BUS_PLATFORM 0x2