linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Jon Smirl <jonsmirl@gmail.com>, adaplas@pol.net
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [RFC] Does fbdev need a cursor API for userland?
Date: Mon, 18 Oct 2004 14:47:43 +0800	[thread overview]
Message-ID: <200410181447.44492.adaplas@hotpop.com> (raw)
In-Reply-To: <9e47339104101719462ea5b2dd@mail.gmail.com>

On Monday 18 October 2004 10:46, Jon Smirl wrote:
> On Mon, 18 Oct 2004 09:20:39 +0800, Antonino A. Daplas
>
> <adaplas@hotpop.com> wrote:
> > On Monday 18 October 2004 06:25, Jon Smirl wrote:
> > > On Sun, 17 Oct 2004 23:47:15 +0800, Antonino A. Daplas
> > >
> > > <adaplas@hotpop.com> wrote:
> > > > IMO, I believe that the cursor ioctl should just be removed :-)
> > >
> > > The merged fbdev/DRM needs hardware cursor support in fbdev but it
> >
> > A kernel-to-kernel interface to the hardware cursor is easier to
> > implement since we always trust kernel data, so that is not much of a
> > problem. The problematic area is the generic, non-fbcon specific cursor
> > implementation, and exporting the interface to userspace. All are doable
> > of course, and I'm willing to code it if people want it.
>
> Merged fbdev/DRM is being built as a platform to run mesa-solo on.
> mesa-solo is the standalone OpenGL implementation. X on GL will then
> run on top of mesa-solo. Do this will get X out of the device driver
> business.
>
> The downside is that Merged fbdev/DRM has to pick up the load that the
> 2D XAA drivers were carrying and part of that is support for the
> hardware cursor. The other major component is mode setting support.
>

Ok, adding a cursor interface that _only_ supports drivers with a hardware
cursor implementation is easy to do, and the current fbdev cursor API is
quite capable of handling the task with just a few minor modifications, such
as support for transparent cursors.

The difficult part is the software cursor implementation.  Software
implementation is basically done this way:

show_cursor:
save_fb_contents->draw _cursor

hide_cursor:
restore_fb_contents

move_cursor:
restore_fb_contents->move_cursor->save_fb_contents->draw_cursor

The restore_fb_contents/save_fb_contents cannot be done generically.  Not
all framebuffers have a linear format, there are some that are planar such
as amifb and vga16fb.  This means that we need to add per-driver hooks just
to save and restore the framebuffer contents.

In the case of fbcon, saving and restoring the content underneath the cursor
is easy to do because we always know that the contents are just monochrome
character bitmaps, and the exact character underneath the cursor is provided
by the vt layer. Also, the cursor movement granularity is always a
character. So coding an fbcon->fbdev cursor interface is trivial.

So if this cursor interface is needed, here are the possible options:

1. provide a cursor interface that works universally for all drivers

2. same as #1 but exclude drivers with a non-linear format

3. only provide an interface for drivers with a hardware implementation.

If driver has no hardware implementation, then:
  For #1, per-driver save/restore functions are necessary.
  For #2, only a generic save/restore function is needed.
  For #3, minimal change, we can add the interface now.

So, which one do you think is acceptable?

Tony




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl

  reply	other threads:[~2004-10-18  6:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-17 15:47 [RFC] Does fbdev need a cursor API for userland? Antonino A. Daplas
2004-10-17 17:18 ` Zachary Smith
2004-10-17 21:51   ` Antonino A. Daplas
2004-10-17 22:25     ` Jon Smirl
2004-10-17 23:49       ` Zachary Smith
2004-10-18  1:18         ` Antonino A. Daplas
2004-10-18  1:20       ` Antonino A. Daplas
2004-10-18  2:46         ` Jon Smirl
2004-10-18  6:47           ` Antonino A. Daplas [this message]
2004-10-18  9:35             ` Geert Uytterhoeven
2004-10-18 11:05               ` Antonino A. Daplas
2004-10-18 12:01                 ` Geert Uytterhoeven
2004-10-18 12:10                   ` Geert Uytterhoeven
2004-10-18 20:56                   ` Antonino A. Daplas
2004-10-18 21:00                     ` Geert Uytterhoeven
2004-10-18 21:34                       ` Antonino A. Daplas
2004-10-19  8:01                         ` Geert Uytterhoeven
2004-10-19  8:55                           ` Antonino A. Daplas
2004-10-18  7:06           ` Antonino A. Daplas

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=200410181447.44492.adaplas@hotpop.com \
    --to=adaplas@hotpop.com \
    --cc=adaplas@pol.net \
    --cc=jonsmirl@gmail.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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).