All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Rob Clark <rob.clark@linaro.org>
Cc: greg@kroah.com, linux-omap@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] omap2+: add drm device
Date: Thu, 24 May 2012 15:10:16 +0300	[thread overview]
Message-ID: <1337861416.12304.4.camel@deskari> (raw)
In-Reply-To: <CAF6AEGtQqn3jpDMRDeCrDA8p_EEAG5=NhRh8uhmfs6haboAE5g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 5178 bytes --]

On Thu, 2012-05-24 at 02:35 -0600, Rob Clark wrote:
> On Thu, May 24, 2012 at 1:05 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> > On Thu, 2012-05-24 at 00:27 -0600, Clark, Rob wrote:
> >> On Thu, May 24, 2012 at 12:01 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> >> > Hi,
> >> >
> >> > On Wed, 2012-05-23 at 15:08 -0500, Andy Gross wrote:
> >> >> Register OMAP DRM/KMS platform device.  DMM is split into a
> >> >> separate device using hwmod.
> >> >>
> >> >> Signed-off-by: Andy Gross <andy.gross@ti.com>
> >> >
> >> > <snip>
> >> >
> >> >> +static int __init omap_init_drm(void)
> >> >> +{
> >> >> +     struct omap_hwmod *oh = NULL;
> >> >> +     struct platform_device *pdev;
> >> >> +
> >> >> +     /* lookup and populate the DMM information, if present - OMAP4+ */
> >> >> +     oh = omap_hwmod_lookup("dmm");
> >> >> +
> >> >> +     if (oh) {
> >> >> +             pdev = omap_device_build(oh->name, -1, oh, NULL, 0, NULL, 0,
> >> >> +                                     false);
> >> >> +             WARN(IS_ERR(pdev), "Could not build omap_device for %s\n",
> >> >> +                     oh->name);
> >> >> +     }
> >> >> +
> >> >> +     return platform_device_register(&omap_drm_device);
> >> >> +
> >> >> +}
> >> >
> >> > I still don't like fixing the tiler to drm. I would like to have basic
> >> > tiler support in omapfb also, but with this approach I'll need to
> >> > duplicate the code. And even if we disregard omapfb, wouldn't it be
> >> > architecturally better to have the tiler as a separate independent
> >> > library/driver?
> >>
> >> Not easily, at least not if we want to manage to use tiler/dmm in a
> >> more dynamic way, or to enable some additional features which are
> >> still on the roadmap (like reprogramming dmm synchronized w/ scanout,
> >> or some things which are coming if future hw generations).  We need
> >> one place to keep track of which buffers are potentially evictable to
> >> make room for mapping a new buffer.  And if you look at the tricks
> >> that go on with mmap'ing tiled buffers to userspace, you *really*
> >> don't want to duplicate that in N different drivers.
> >
> > So why can't all that code be in a tiler library/driver?
> 
> Possibly the placement stuff could be in a library..  the
> mmap/faulting stuff I think would be harder to split.  With it split
> out in a separate lib, it becomes logistically a bit more of a
> headache to change APIs, etc.  Basically it just makes more work and
> is unnecessary.

Unnecessary for you, but maybe not for those who want to use omapfb.

> >> Fortunately with dmabuf there is not really a need for N different
> >> drivers to need to use tiler/dmm directly.  The dmabuf mechanism
> >> provides what they need to import GEM buffers from omapdrm.  That may
> >> not really help omapfb because fbdev doesn't have a concept of
> >> importing buffers.  But OTOH this is unnecessary, because drm provides
> >> an fbdev interface for legacy apps.  The best thing I'd recommend is,
> >> if you miss some features of omapfb in the drm fbdev implementation,
> >> is to send some patches to add this missing features.
> >
> > Well, at least currently omapfb and omapdrm work quite differently, if
> > I've understood right. Can we make a full omapfb layer on top of
> > omapdrm? With multiple framebuffers mapped to one or more overlays,
> > support for all the ioctls, etc?
> 
> Well, there is still room to add your own fb_ioctl() fxn, so I guess
> in principle it should be possible to add whatever custom ioctls are
> required.
> 
> Typically you have a single fbdev device for a single drm device,
> although I suppose nothing prevents creating more.  I'd probably want
> to encourage users more towards using KMS directly for multi-display
> cases because you have a lot more options/flexibility that way.

Sure, but we can't force people to use omapdrm instead of omapfb. And
omapfb is not going to disappear. So obviously we should recommend using
omapdrm, but on the other hand, I don't see any problem in adding new
features to omapfb if they are easily implemented (using, for example, a
separate tiler driver).

> > I guess we'd still need to have omapfb driver to keep the module
> > parameters and behavior the same. Can omapdrm be used from inside the
> > kernel by another driver?
> 
> Hmm, I'm not quite sure what you have in mind, but it sounds a bit
> hacky..  I'd guess if you need 100% backwards compatibility even down
> to kernel cmdline / module params, then you probably want to use
> omapfb.  But there isn't really need to add new features to omapfb in
> that case.

I was thinking of making omapfb use omapdrm, instead of omapdss. I mean,
not planning to do that, just wondering if that would be possible.

> Off the top of my head, I guess that 80-90% compatibility would
> probably be reasonable to add to omapdrm's fbdev..  and that the last
> 10-20% would be too hacky/invasive to justify adding to omapdrm.

I think it should be 99.9% - 100% or nothing. If it's only 80-90%
compatible, then it's not compatible =).

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-05-24 12:10 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23 20:08 [PATCH] omap2+: add drm device Andy Gross
2012-05-24  6:01 ` Tomi Valkeinen
2012-05-24  6:27   ` Clark, Rob
2012-05-24  7:05     ` Tomi Valkeinen
2012-05-24  7:21       ` Tomi Valkeinen
2012-05-24  8:44         ` Rob Clark
2012-05-24 12:13           ` Tomi Valkeinen
2012-05-24 15:09             ` Gross, Andy
2012-05-24 15:26               ` Tomi Valkeinen
2012-06-11 14:51                 ` Gross, Andy
2012-06-11 14:54                   ` Gross, Andy
2012-06-11 15:05                   ` Tomi Valkeinen
2012-05-24  8:35       ` Rob Clark
2012-05-24 12:10         ` Tomi Valkeinen [this message]
2012-05-24 14:22   ` Gross, Andy
2012-06-11 15:51 ` Rob Clark
2012-06-19 21:12   ` Gross, Andy
2012-07-03  7:09     ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2012-03-13 20:34 Rob Clark
2012-03-14 12:38 ` Tomi Valkeinen
2012-03-14 12:55   ` Rob Clark
2012-03-14 13:07     ` Tomi Valkeinen
2012-03-14 13:16       ` Rob Clark
2012-03-14 13:43         ` Tomi Valkeinen
2012-03-14 15:06           ` Rob Clark
2012-03-15  8:46             ` Tomi Valkeinen
2012-03-15 12:32               ` Rob Clark
2012-03-16 11:03                 ` Tomi Valkeinen
2012-03-05 16:54 Rob Clark
2012-03-06  0:10 ` Tony Lindgren
2012-03-06  1:42   ` Rob Clark
2012-03-06 13:26 ` Tomi Valkeinen
2012-03-06 14:01   ` Rob Clark
2012-03-06 14:35     ` Tomi Valkeinen
2012-03-06 15:29       ` Rob Clark
2012-03-07 11:59         ` Tomi Valkeinen
2012-03-07 13:06           ` Rob Clark
2012-03-07 13:11             ` Tomi Valkeinen
2012-03-06 15:50       ` Gross, Andy
2012-03-07 12:05         ` Tomi Valkeinen
2012-03-07 13:27           ` Rob Clark
2012-03-07 15:59           ` Gross, Andy
2012-03-08  7:47             ` Tomi Valkeinen
2012-01-13 19:41 Rob Clark
2012-01-13 19:46 ` Rob Clark
2012-01-13 19:49   ` Felipe Contreras
2012-01-13 19:53     ` Rob Clark
2012-01-13 20:23       ` Felipe Contreras
2012-01-13 20:25         ` Rob Clark
2012-01-13 19:51 ` Aguirre, Sergio
2012-01-13 19:54   ` Rob Clark
2012-01-13 20:29 ` Felipe Contreras

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=1337861416.12304.4.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=greg@kroah.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=rob.clark@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.