linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Paul Mundt <lethal@linux-sh.org>, adaplas@pol.net
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: Re: [PATCH][RFC] Add support for Epson S1D13806 FB
Date: Tue, 15 Mar 2005 18:26:42 +0800	[thread overview]
Message-ID: <200503151826.42957.adaplas@hotpop.com> (raw)
In-Reply-To: <20050315071735.GA5037@linux-sh.org>

On Tuesday 15 March 2005 15:17, Paul Mundt wrote:
> On Mon, Mar 14, 2005 at 11:06:00PM +0800, Antonino A. Daplas wrote:
> > In the case of hitfb, fillrect and copyarea are both accelerated.  So the
> > proper flags would be:
> >
> > FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN | FBINFO_HWACCEL_COPYAREA |
> > FBINFO_HWACCEL_FILLRECT.
>
> Should this not be implied by having something other then the cfb_
> routines for these?

Yes.

> On the other hand, will this affect performance
> negatively if these flags remain and we end up wrapping to the cfb_
> routines in certain cases?

Yes, if cfb_copyarea is used and FBINFO_HWACCEL_COPYAREA is set,  fbcon
will use SCROLL_MOVE. And SCROLL_MOVE is magnitudes slower than
SCROLL_REDRAW especially for unaccelerated PCI/AGP cards.

>
> If we consider the case of FBINFO_HWACCEL_COPYAREA:
>
>         if ((cap & FBINFO_HWACCEL_COPYAREA) &&
>             !(cap & FBINFO_HWACCEL_DISABLED))
>                 p->scrollmode = SCROLL_MOVE;
>         else /* default to something safe */
>                 p->scrollmode = SCROLL_REDRAW;
>
>
> This doesn't seem like it will work out well if we end up having
> something like (using neofb as an example):
>
> static void
> neofb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
> {
>         switch (info->fix.accel) {
>                 case FB_ACCEL_NEOMAGIC_NM2200:
>                 case FB_ACCEL_NEOMAGIC_NM2230:
>                 case FB_ACCEL_NEOMAGIC_NM2360:
>                 case FB_ACCEL_NEOMAGIC_NM2380:
>                         neo2200_copyarea(info, area);
>                         break;
>                 default:
>                         cfb_copyarea(info, area);
>                         break;
>         }
> }
>
> The behaviour in this case will be to use SCROLL_MOVE with regards to
> cfb_copyarea() instead of SCROLL_REDRAW as it would normally. If we trust
> the comment, then this seems unsafe or broken.

Yes.

>
> In this case it would seem to be more sensible to fix neo_alloc_fb_info()
> to only set these flags for those devices where an optimization exists.
> In the case of where using the optimized method depends on a fixed bit
> depth, this issue becomes a bit more problematic.

Yes, the hwaccel flags should be fixed for neofb.  Also drivers can always
reset these flags during the set_par() part, if for example accel is only
available at depth 8, 16, 24,  but not 32 (i810fb).

Fortunately, SCROLL_REDRAW  is an acceptable default, accelerated or not.
It's not very fast, but is not that slow either. It's just that setting the
wrong flags can lead to significant performance loss, and not setting any
flags at all may underutilize the driver's capability.

So driver maintainers may need to try out which flags work best for them.
This is the algo used to choose the scrolling mode (in fbcon.c):

	if (good_wrap || good_pan) {
		if (reading_fast || fast_copyarea)
			p->scrollmode = good_wrap ? SCROLL_WRAP_MOVE : SCROLL_PAN_MOVE;
		else
			p->scrollmode = good_wrap ? SCROLL_REDRAW :
				SCROLL_PAN_REDRAW;
	} else {
		if (reading_fast || (fast_copyarea && !fast_imageblit))
			p->scrollmode = SCROLL_MOVE;
		else
			p->scrollmode = SCROLL_REDRAW;
	}


Tony




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

  reply	other threads:[~2005-03-15 10:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-14 10:13 [PATCH][RFC] Add support for Epson S1D13806 FB Thibaut VARENE
2005-03-14 12:15 ` Antonino A. Daplas
2005-03-14 13:00   ` Thibaut VARENE
2005-03-14 13:13     ` Antonino A. Daplas
2005-03-14 14:10     ` Antonino A. Daplas
2005-03-14 14:24       ` Thibaut VARENE
2005-03-14 15:06         ` Antonino A. Daplas
2005-03-14 14:35       ` Paul Mundt
2005-03-14 15:06         ` Antonino A. Daplas
2005-03-15  7:17           ` Paul Mundt
2005-03-15 10:26             ` Antonino A. Daplas [this message]
2005-03-14 15:18         ` Antonino A. Daplas
2005-03-14 13:18   ` Paul Mundt
2005-03-14 13:25     ` Geert Uytterhoeven
2005-03-14 13:34       ` Thibaut VARENE
2005-03-14 13:53         ` Antonino A. Daplas
2005-03-14 14:09           ` Thibaut VARENE
2005-03-14 14:12           ` Thibaut VARENE
2005-03-14 13:44       ` Paul Mundt

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=200503151826.42957.adaplas@hotpop.com \
    --to=adaplas@hotpop.com \
    --cc=adaplas@pol.net \
    --cc=lethal@linux-sh.org \
    --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).