Thread (19 messages) flat view 19 messages, 5 authors, 2005-03-15

Re: Re: [PATCH][RFC] Add support for Epson S1D13806 FB

From: Paul Mundt <hidden>
Date: 2005-03-15 07:17:41

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? 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?

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.

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.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help