From: Rob Clark <rob.clark@linaro.org>
To: dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org
Cc: patches@linaro.org, Greg KH <greg@kroah.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Andy Gross <andy.gross@ti.com>, Rob Clark <rob@ti.com>
Subject: [RFC 2/3] omap2+: use dss_dispc hwmod for omapdrm
Date: Fri, 27 Jul 2012 20:07:53 -0500 [thread overview]
Message-ID: <1343437674-24246-3-git-send-email-rob.clark@linaro.org> (raw)
In-Reply-To: <1343437674-24246-1-git-send-email-rob.clark@linaro.org>
From: Rob Clark <rob@ti.com>
We need this so that platform_get_irq() works when drm core sets up the
irq handling.
Signed-off-by: Rob Clark <rob@ti.com>
---
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 <plat/drm.h>
#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
--
1.7.9.5
next prev parent reply other threads:[~2012-07-28 1:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-28 1:07 [RFC 0/3] solving omapdrm/omapdss layering issues Rob Clark
2012-07-28 1:07 ` [RFC 1/3] OMAPDSS: expose dispc for use from omapdrm Rob Clark
2012-07-28 1:07 ` Rob Clark [this message]
2012-07-28 1:07 ` [RFC 3/3] drm/omap: use dispc directly Rob Clark
2012-07-31 13:40 ` [RFC 0/3] solving omapdrm/omapdss layering issues Tomi Valkeinen
2012-07-31 14:45 ` Rob Clark
2012-08-01 9:21 ` Tomi Valkeinen
2012-08-01 14:25 ` Rob Clark
2012-08-01 16:46 ` Archit Taneja
2012-08-01 16:53 ` Rob Clark
2012-08-01 17:03 ` Rob Clark
2012-08-01 17:38 ` Tomi Valkeinen
2012-08-01 22:41 ` Rob Clark
2012-08-02 7:13 ` Tomi Valkeinen
2012-08-02 12:45 ` Rob Clark
2012-08-02 13:15 ` Tomi Valkeinen
2012-08-02 14:16 ` Rob Clark
2012-08-03 6:01 ` Semwal, Sumit
2012-08-03 12:22 ` Rob Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1343437674-24246-3-git-send-email-rob.clark@linaro.org \
--to=rob.clark@linaro.org \
--cc=andy.gross@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=greg@kroah.com \
--cc=linux-omap@vger.kernel.org \
--cc=patches@linaro.org \
--cc=rob@ti.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).