From patchwork Thu Nov 15 15:58:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1750481 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id BF4CBDF2AB for ; Thu, 15 Nov 2012 15:59:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1768309Ab2KOP7w (ORCPT ); Thu, 15 Nov 2012 10:59:52 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:59141 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1768307Ab2KOP7u (ORCPT ); Thu, 15 Nov 2012 10:59:50 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id qAFFxoOP019852; Thu, 15 Nov 2012 09:59:50 -0600 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAFFxnSH030106; Thu, 15 Nov 2012 09:59:49 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Thu, 15 Nov 2012 09:59:49 -0600 Received: from deskari.tieu.ti.com (h68-10.vpn.ti.com [172.24.68.10]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAFFx6vL025421; Thu, 15 Nov 2012 09:59:48 -0600 From: Tomi Valkeinen To: Archit Taneja , Rob Clark CC: , , Tomi Valkeinen Subject: [PATCH 24/32] OMAPDSS: move irq handling to dispc-compat Date: Thu, 15 Nov 2012 17:58:32 +0200 Message-ID: <1352995120-3288-25-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1352995120-3288-1-git-send-email-tomi.valkeinen@ti.com> References: <1352995120-3288-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org The whole dispc irq handling system we currently have is only needed for compat layer, and thus can be moved from dispc.c to the compat layer. This is quite straigtforward, but we need to add new dispc functions to request and free the actual hardware irq: dispc_request_irq() and dispc_free_irq(). Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/apply.c | 14 + drivers/video/omap2/dss/dispc-compat.c | 430 +++++++++++++++++++++++++++++++ drivers/video/omap2/dss/dispc-compat.h | 3 + drivers/video/omap2/dss/dispc.c | 437 +------------------------------- drivers/video/omap2/dss/dss.h | 5 + 5 files changed, 463 insertions(+), 426 deletions(-) diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 45d837f..51124ab 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -1606,11 +1606,23 @@ int omapdss_compat_init(void) if (r) goto err_mgr_ops; + dispc_runtime_get(); + + r = dss_dispc_initialize_irq(); + if (r) + goto err_init_irq; + + dispc_runtime_put(); + out: mutex_unlock(&apply_lock); return 0; +err_init_irq: + dispc_runtime_put(); + dss_uninstall_mgr_ops(); + err_mgr_ops: dss_uninit_overlay_managers(pdev); dss_uninit_overlays(pdev); @@ -1632,6 +1644,8 @@ void omapdss_compat_uninit(void) if (--compat_refcnt > 0) goto out; + dss_dispc_uninitialize_irq(); + dss_uninstall_mgr_ops(); dss_uninit_overlay_managers(pdev); diff --git a/drivers/video/omap2/dss/dispc-compat.c b/drivers/video/omap2/dss/dispc-compat.c index 24e1d5e..928884c 100644 --- a/drivers/video/omap2/dss/dispc-compat.c +++ b/drivers/video/omap2/dss/dispc-compat.c @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include