linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: James Simmons <jsimmons@infradead.org>
Cc: linux-fbdev-devel@lists.sourceforge.net,
	"Paulius Zaleckas" <paulius.zaleckas@gmail.com>,
	"Michel Dänzer" <michel@daenzer.net>,
	"Michal Suchanek" <hramrach@centrum.cz>,
	"Alex Deucher" <alexdeucher@gmail.com>,
	dri-devel@lists.sourceforge.net
Subject: Re: [Linux-fbdev-devel] drm_fb_helper: Impossible to change video  mode
Date: Sat, 13 Mar 2010 06:51:52 +1000	[thread overview]
Message-ID: <21d7e9971003121251v4bef7e96v67f3d98aa9ab384a@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1003121332470.10546@casper.infradead.org>

>> >
>> >> >> It would be nice to find a way to reclaim the console memory for X,
>> >> >> but I'm not sure that can be done and still provide a good way to
>> >> >> provide oops support.
>> >> >
>> >> > What do you think the average user will care about more?
>> >> >
>> >> >      * Seeing kernel oops/panic output about once in a lifetime.
>> >> >      * Being able to start/use X in the first place and enabling it to
>> >> >        use all of VRAM.
>> >> >
>> >> > Personally, I've never even seen any kernel oops/panic output despite
>> >> > numerous opportunities for that in the couple of months I've been using
>> >> > KMS. But I have spent considerable time and effort trying to get rid of
>> >> > the pinned fbcon BO. If the oops/panic output is the only thing
>> >> > preventing that, maybe that should only be enabled via some module
>> >> > option for developers.
>> >>
>> >> I'm all for it!
>> >
>> > I'm looking into the details for this. It will require some changes to
>> > internal apis to make it to work.
>> >
>>
>> Can't it print the oops on whatever is currently displayed?
>>
>> It need not be a dedicated buffer as long as there is always some buffer.
>>
>> But perhaps this is more complex than that.
>
>        Yes it is very complex. Reading the code and drm specs you come to
> realize buffer handling is done with GEM, TTM, or for older drivers drm_maps.
> Drivers often handle a combine of those, meaning no real wrapper from one
> api to another :-( From the code it appears GEM is the main userland interface
> when using KMS. Some how TTM is also usable from userland but I never found a
> clear example of how that is done. So to the average userland app writer it is
> a mystery. As for hardware that has a static front buffer I can see how to
> use drm_maps or TTM but I don't see a easy way to map it to the GEM api.
> Also their exist ioctl for gem but it appears no one actually uses them
> but instead write their own :-( So you can see the confusion here.

Userspace buffer management interfaces are pre-driver, the only requirement
if that they have a 32-bit handle to identify buffers uniquely. Pre-KMS drivers
don't exist for the purposes of fb interaction, so drm_maps are ignorable from
that pov.

>        Outside of what I described above the drm_framebuffer handling is
> a mess. From what I can see with the code you can only create a
> drm_framebuffer with the GEM api. With this case the two most important
> functions to provide are

This isn't correct. You get a drm_file and a handle, the driver then uses
these to do whatever it wants to do. This means lookup a GEM object or
whatever but there is no reliance on GEM or any other memory manager
outside the driver. Again a handle a file priv are in no way GEM specific.

>
> dev->mode_config.funcs->fb_create(dev, file_priv, r)
>
> and
>
> fb->funcs->create_handle(fb, file_priv, &r->handle);
>
> As you can see if the functions they depend on a handle and a drm_file. To
> make it possible to create a framebuffer internally using a common code we
> would remove those requirements.

We already have an internal framebuffer creation for fbdev, there is
an fb_create
callback that does this, its not up to dynamic fbdev creation.

>        This gets me to point of where to go from here. We have two choices.
> The first being we could just make the drm_framebuffer code totally gem
> dependent thus we could cleanup the drivers code up by moving gem code
> there. The second option is to make the drm_framebuffer code agnostic to the gem
> layer. So I have been pondering on how to make the second option work.
> There is one thing that all these layers do share in common. That is they
> have some sort of drm_hash with a object lookup. Still pondering how that
> would be done.

I'm not sure either of these makes sense, can you clearly state the
goal and maybe
we can work out what you need.

Dave.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--

  reply	other threads:[~2010-03-12 20:51 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 13:16 [Linux-fbdev-devel] drm_fb_helper: Impossible to change video mode Paulius Zaleckas
2009-11-20 15:55 ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video Clemens Ladisch
2009-11-20 18:53 ` James Simmons
2009-11-20 19:05 ` Andrew Morton
2009-11-20 19:39 ` Paulius Zaleckas
2009-11-20 20:01 ` James Simmons
2009-11-20 20:13 ` Paulius Zaleckas
2009-11-20 20:48 ` James Simmons
2009-11-21  4:25 ` Dave Airlie
2009-11-21  4:27 ` Dave Airlie
2010-03-01  9:18   ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video mode Michal Suchanek
2010-03-03  5:02     ` Dave Airlie
2010-03-03  8:23       ` Michal Suchanek
2010-03-03  9:23         ` Dave Airlie
2010-03-03 10:32           ` Michal Suchanek
2010-03-10 18:11             ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video James Simmons
2010-03-10 21:04               ` Ville Syrjälä
2010-03-10 21:16                 ` Michal Suchanek
2010-03-11  2:24                   ` James Simmons
2010-03-11  2:22                 ` James Simmons
2010-03-11  5:03                   ` Ville Syrjälä
2010-03-10 18:04           ` James Simmons
2010-03-10 17:42       ` James Simmons
2010-03-10 18:05         ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video mode Alex Deucher
2010-03-10 18:10           ` Alex Deucher
2010-03-10 18:47             ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video James Simmons
2010-03-10 19:49               ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video mode Michal Suchanek
2010-03-10 20:06               ` Alex Deucher
2010-03-11 10:13             ` Michel Dänzer
2010-03-11 10:31               ` Pauli Nieminen
2010-03-11 15:12               ` Alex Deucher
2010-03-11 15:17                 ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video James Simmons
2010-03-11 15:47                   ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video mode Michal Suchanek
2010-03-12 14:52                     ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video James Simmons
2010-03-12 20:51                       ` Dave Airlie [this message]
2010-03-13 14:40                         ` James Simmons
2010-03-13 21:01                           ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video mode Dave Airlie
2010-03-14 11:41                             ` Michel Dänzer
2010-03-15 18:38                               ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video James Simmons
2010-03-16 13:46                                 ` Michel Dänzer
2010-03-16 13:56                                   ` James Simmons
2010-03-16 14:00                                     ` Michel Dänzer
2010-03-25 12:30                                       ` James Simmons
2010-03-15 18:22                             ` James Simmons
2010-03-10 20:58         ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video mode Michal Suchanek
2010-03-11  3:41           ` [Linux-fbdev-devel] drm_fb_helper: Impossible to change video James Simmons
2010-03-10 17:35     ` James Simmons

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=21d7e9971003121251v4bef7e96v67f3d98aa9ab384a@mail.gmail.com \
    --to=airlied@gmail.com \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=hramrach@centrum.cz \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=michel@daenzer.net \
    --cc=paulius.zaleckas@gmail.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).