From patchwork Sat Jul 28 01:07:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 10344 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8BDF02402A for ; Sat, 28 Jul 2012 01:08:43 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 447ABA1925A for ; Sat, 28 Jul 2012 01:08:43 +0000 (UTC) Received: by yenq6 with SMTP id q6so3763258yen.11 for ; Fri, 27 Jul 2012 18:08:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=u5TXGzv0LlBrS9Azg0if74xZasbZXskzMdVb9KPwqi4=; b=VsCyS3Hdg4zuJ3tw6PRVvnqWYkYe1Ej7Whb6EvbTyQpAent0uVCxQjSMgc6adakr82 waAZMz6XRn+jU/gWYBhdLmEoKLnZJrwJO7tUHJjDofGF1IzjTkTE4V5UXJ8NdYzA3hEX 0JBwzQr5vdD/Gq4DoKhTjD8jPIXOy9FNQuE+69ldQGb/m5mtSUfiQaPKdFDwLo0FajRz AkORs83AE/+yxwNLE34vpU6eNGUrwfawlGKKB5JTzV2YmTLhJrZboA60MiQFL4FUy7or s7/Kr48dMICmcE1Kyniy4ExbPrarBhGF9w23EixWIPNoKIfGBMxFMoWxAftRSkkgS4Vt PDzw== Received: by 10.50.149.134 with SMTP id ua6mr6155166igb.11.1343437722513; Fri, 27 Jul 2012 18:08:42 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.87.40 with SMTP id u8csp54965igz; Fri, 27 Jul 2012 18:08:42 -0700 (PDT) Received: by 10.182.111.74 with SMTP id ig10mr6190578obb.14.1343437721987; Fri, 27 Jul 2012 18:08:41 -0700 (PDT) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id r4si3133939obz.102.2012.07.27.18.08.41 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jul 2012 18:08:41 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by mail-ob0-f178.google.com with SMTP id wd20so6557100obb.37 for ; Fri, 27 Jul 2012 18:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=u5TXGzv0LlBrS9Azg0if74xZasbZXskzMdVb9KPwqi4=; b=UNmOeBOGGOuB9a9itwI2jMJxvQvRkH3/1UNuWRMw3FK4xEE22aq5w2qKuzoXx/vcDM /QFvA0BQ46vLld5JnyzcjWFc16W4nl8qpAPU0ZfoeF2/WhIZslaxUELb1c7xbU3UUrEq BGkGBnPkZSH8R26TSJthzMWsrD6WsC1iDEcy0WwYvvTZDrFzA6DenVSVxHHPbv12vd7o h8h5LmIR7CbeHUcrQS2uwexHGWNkU8qS0Tr415W+hr8Noo0z+wPlPd91h9DDvb6Nf6BQ zaAEIz1k7wfMQzBqtlWL01gl8+YC8C3hZ5C5sG2gyRRxNMYfDd+vejGiZurVnhp2ChY5 +3xw== Received: by 10.60.29.169 with SMTP id l9mr6294765oeh.14.1343437721800; Fri, 27 Jul 2012 18:08:41 -0700 (PDT) Received: from localhost (ppp-70-129-143-140.dsl.rcsntx.swbell.net. [70.129.143.140]) by mx.google.com with ESMTPS id pj4sm3216295obb.20.2012.07.27.18.08.40 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jul 2012 18:08:41 -0700 (PDT) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Greg KH , Tomi Valkeinen , Andy Gross , Rob Clark Subject: [RFC 2/3] omap2+: use dss_dispc hwmod for omapdrm Date: Fri, 27 Jul 2012 20:07:53 -0500 Message-Id: <1343437674-24246-3-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343437674-24246-1-git-send-email-rob.clark@linaro.org> References: <1343437674-24246-1-git-send-email-rob.clark@linaro.org> X-Gm-Message-State: ALoCoQnlqEImsd7WJVWFfEPZFvdvT+VsyObBZ+gmkHZXSkh7v8VSoPhzSRUTYxjU63ErJ1R5XXYc From: Rob Clark We need this so that platform_get_irq() works when drm core sets up the irq handling. Signed-off-by: Rob Clark --- arch/arm/mach-omap2/drm.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-omap2/drm.c b/arch/arm/mach-omap2/drm.c index 4ab7b6a..f7a2444 100644 --- a/arch/arm/mach-omap2/drm.c +++ b/arch/arm/mach-omap2/drm.c @@ -33,18 +33,6 @@ #include #if defined(CONFIG_DRM_OMAP) || (CONFIG_DRM_OMAP_MODULE) - -static struct omap_drm_platform_data omapdrm_platdata; - -static struct platform_device omap_drm_device = { - .dev = { - .coherent_dma_mask = DMA_BIT_MASK(32), - .platform_data = &omapdrm_platdata, - }, - .name = "omapdrm", - .id = 0, -}; - static int __init omap_init_drm(void) { struct omap_hwmod *oh = NULL; @@ -60,8 +48,16 @@ static int __init omap_init_drm(void) oh->name); } - return platform_device_register(&omap_drm_device); + /* lookup and populate DSS information: */ + oh = omap_hwmod_lookup("dss_dispc"); + pdev = omap_device_build("omapdrm", -1, oh, NULL, 0, NULL, 0, + false); + WARN(IS_ERR(pdev), "Could not build omap_device for omapdrm\n"); + if (!pdev) + return -EINVAL; + + return 0; } arch_initcall(omap_init_drm); @@ -69,12 +65,14 @@ arch_initcall(omap_init_drm); void __init omapdrm_reserve_vram(void) { #ifdef CONFIG_CMA +#if 0 /* TODO add this back for omap3 */ /* * Create private 32MiB contiguous memory area for omapdrm.0 device * TODO revisit size.. if uc/wc buffers are allocated from CMA pages * then the amount of memory we need goes up.. */ dma_declare_contiguous(&omap_drm_device.dev, 32 * SZ_1M, 0, 0); +#endif #else # warning "CMA is not enabled, there may be limitations about scanout buffer allocations on OMAP3 and earlier" #endif