All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: James Simmons <jsimmons@infradead.org>
Cc: David Eger <eger-dated-1082943669.d79d33@theboonies.us>,
	Linux Frame Buffer Device Development
	<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: [PATCH] radeonfb(): memmove() fix -- this one works ;-)
Date: Wed, 21 Apr 2004 10:30:00 +1000	[thread overview]
Message-ID: <1082507399.2056.26.camel@gaston> (raw)
In-Reply-To: <Pine.LNX.4.44.0404202032210.29160-100000@phoenix.infradead.org>

On Wed, 2004-04-21 at 08:52, James Simmons wrote:
> > BTW, James, did we decide what is the best way to set fbcon accel
> > mode ? For drivers with copyarea accelerated, we want YMOVE. I'd like
> > a patch to send Linus/Andrew asap along with some pending radeonfb
> > fixes for that.
> 
> I had to do some thinking about this. Here is explation ofthe scrolling 
> code. It really needs to be cleaned up. So renamings would make sense 
> here.

> .../...

Why not simply

 1) Document properly what those various options do
 2) Let the driver provide it's "preferred" scroll mode ? It's sort-of
    a stack violation since it really only affects fbcon at this point,
    but since it's just an "hint", it's perfectly acceptable.

(Note: I'm not sure about controlfb at this point, I have to dig
out some old HW and test)

Also, we sort-of lost the ability to have fbcon specific accels in the
drivers... It would have been nice to be able to store the font in
vram and use blits to composite text, but that would have meant having
fbcon-related hooks =P Or maybe we can find a clean way to express that
to fbcon without clobbering fbdev's with fbcon-related datas ? Simply by
having fbcon request a vres big enough to store the font data outside
of the visible area and using copyarea ?

Ben.

> In the original code we had:
> 
> These we set by the driver.
> 
> SCROLL_YREDRAW		( __SCROLL_YFIXED  | __SCROLL_YREDRAW )     Lots use this
> SCROLL_YNOMOVE		( __SCROLL_YNOMOVE | __SCROLL_YPANREDRAW )  Lots use this
> SCROLL_YNOPARTIAL	  __SCROLL_YNOPARTIAL			    (controlfb)
> 
> fbcon.c -> updatescrollmode.
> 
> __SCROLL_YFIXED		--> Does not update. Test to see if it is set then exits
> __SCROLL_YWRAP		--> sets if we have ywrapstep and conditions are right
> __SCROLL_YPAN		--> sets if we have ypanstep and conditions are right
> __SCROLL_YNOMOVE	--> test for this and if yes then
> __SCROLL_YREDRAW	-->			set __SCROLL_YREDRAW
> __SCROLL_YMOVE		-->		      else set __SCROLL_YMOVE
> 
> __SCROLL_YMASK		Mask to clear out extra bits.
> 
> Not used in updatescrollmode
> 
> __SCROLL_YPANREDRAW	--> Set by SCROLL_YNOMOVE
> __SCROLL_YNOPARTIAL	--> Set by SCROLL_YNOPARTIAL. Its deals for the case 
> 			    when we can only only pan the whole screen, 
> 			    not a region of the screen.
> ---------------------------------------------------------------------------------
> Let go over what happened in the old code.
> 
> So if the driver set SCROLL_YNOPARTIAL then __SCROLL_YNOPARTIAL was set. This was
> to deal with hardware panning flickering. Only the controlfb used it. Is this 
> problem still present? If not this could go away. The goal is:
> 
> 	Handle screen flickering.
> 
> The second one is the driver using SCROLL_YREDRAW. This sets __SCROLL_YFIXED and
> __SCROLL_YREDRAW. When going into updatescrollmode nothing happens since the first
> thing we do is test for __SCROLL_YFIXED. So the goal is to override the hardware 
> panning or wrap. The system is set up to only __SCROLL_YREDRAW which just redraws
> all the font images. In this case only __SCROLL_YREDRAW is important. So the 
> goal is:
> 	
> 	if driver set SCROLL_YREDRAW
> 		Use hardware image drawing	// Only use this
> 
> The 3rd and final one is where we set the scrollmode to __SCROLL_YNOMOVE and 
> __SCROLL_YPANREDRAW. __SCROLL_YNOMOVE again is one of those variables used only
> in updatescrollmode. First we test to see if hardware panning or hardware wrapping. 
> Use that. If we don't have that ablity then we test the __SCROLL_YNOMOVE to see
> if we just draw all the font images or use a copyarea operation with the flag 
> is set to __SCROLL_YMOVE. So the goal is:
> 
> 	if Ywrap
> 		Use hardware ywrap
> 	else if ypan 
> 	  	Use hardware panning
> 	else if driver set SCROLL_YNOMOVE
> 		Use hardware image drawing
> 	else 
> 		Use hardware copyarea
> 
> I like to see this cleaned up now. The question is what is the proper order of all
> this stuff. For use we have the following conditions.
> 
> Hardware panning. Test for fb_pan_display and ypanstep. 
> Hardware wrapping. Test for ywrapstep.
> Hardware copyarea.
> Hardware image drawing.
> 
>    So if the we have the case of both copyarea and imageblit hardware accelerated we
> need to use copyarea for scrolling since that will be faster. Its the same case
> for if we only have copyarea accelerating. 
>    The question is if we have only hardware imageblit should we use that? There is
> a cost to assembly a image for the hardware to draw. The question is the assembly
> of the image less costly than a soft copyarea?
>    As for hardware panning should we prefer it above everthing? 
>    



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

  reply	other threads:[~2004-04-21  0:30 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-19  1:46 [PATCH] radeonfb(): memmove() fix -- this one works ;-) David Eger
2004-04-19  1:50 ` Benjamin Herrenschmidt
2004-04-19  1:52 ` Benjamin Herrenschmidt
2004-04-20 22:52   ` James Simmons
2004-04-21  0:30     ` Benjamin Herrenschmidt [this message]
2004-04-21 18:03       ` James Simmons
2004-04-21 23:08         ` Benjamin Herrenschmidt
     [not found]     ` <12573.10.250.10.1.1082504618.squirrel@sq01.pol.net>
2004-04-21  0:30       ` Benjamin Herrenschmidt
2004-04-21  8:28         ` Geert Uytterhoeven
2004-04-21 10:36           ` Benjamin Herrenschmidt
2004-04-21 10:50             ` Geert Uytterhoeven
2004-04-21 18:13               ` James Simmons
2004-04-21 19:35                 ` Antonino A. Daplas
2004-04-22  8:22                   ` Geert Uytterhoeven
2004-04-27  0:19                     ` James Simmons
2004-04-27  0:22                       ` Benjamin Herrenschmidt
2004-04-27  8:51                         ` Geert Uytterhoeven
2004-04-27  9:43                           ` David Eger
2004-04-27  9:57                             ` Geert Uytterhoeven
2004-04-27 10:09                               ` Benjamin Herrenschmidt
2004-04-27 11:19                                 ` Geert Uytterhoeven
2004-04-27 22:41                                   ` John Zielinski
2004-04-27 10:10                             ` Benjamin Herrenschmidt
2004-04-27 11:21                               ` Geert Uytterhoeven
2004-04-27 20:28                                 ` James Simmons
2004-04-27 20:27                               ` James Simmons
2004-04-27 22:28                               ` John Zielinski
2004-04-27 22:33                                 ` James Simmons
2004-04-27 22:59                                   ` John Zielinski
2004-04-27 23:14                                     ` Benjamin Herrenschmidt
2004-04-27 23:24                                     ` James Simmons
2004-04-27 23:28                                       ` Benjamin Herrenschmidt
2004-04-27 23:57                                         ` James Simmons
2004-04-28  0:12                                           ` Benjamin Herrenschmidt
2004-04-28  1:12                                           ` John Zielinski
2004-04-28  1:50                                             ` Benjamin Herrenschmidt
2004-04-28 16:51                                             ` James Simmons
2004-04-28  0:18                                       ` John Zielinski
2004-04-27 23:02                                   ` Benjamin Herrenschmidt
2004-04-27 23:18                                     ` James Simmons
2004-04-27 23:25                                       ` Benjamin Herrenschmidt
2004-04-27 23:51                                         ` James Simmons
2004-04-27 23:53                                           ` Benjamin Herrenschmidt
2004-04-28  8:41                                             ` Geert Uytterhoeven
2004-04-28 10:00                                               ` Benjamin Herrenschmidt
2004-04-28 16:48                                                 ` James Simmons
2004-04-28 23:31                                                   ` Benjamin Herrenschmidt
2004-04-29  0:02                                                     ` James Simmons
2004-04-29  0:50                                                       ` Benjamin Herrenschmidt
2004-04-29 18:01                                                         ` James Simmons
2004-04-29 18:11                                                           ` Otto Solares
     [not found]                                                             ` <20040429194813.GA8799@dreamland.darkstar.lan>
2004-04-29 20:13                                                               ` Otto Solares
2004-04-30 16:03                                                                 ` James Simmons
2004-04-29 21:58                                                           ` Benjamin Herrenschmidt
2004-04-30 16:05                                                             ` James Simmons
2004-04-30 23:57                                                               ` Benjamin Herrenschmidt
2004-04-28 16:29                                             ` James Simmons
2004-04-28 17:56                                               ` Geert Uytterhoeven
2004-04-28 19:05                                                 ` James Simmons
2004-04-28 23:00                                                 ` John Zielinski
2004-04-28 23:29                                               ` Benjamin Herrenschmidt
2004-04-29  0:26                                                 ` James Simmons
2004-04-29  0:38                                                   ` Otto Solares
2004-04-29  8:28                                                     ` [PATCH] radeonfb(): memmove() fix -- this one works ; -) Geert Uytterhoeven
2004-04-28  1:00                                           ` [PATCH] radeonfb(): memmove() fix -- this one works ;-) John Zielinski
2004-04-28 16:38                                             ` James Simmons
2004-04-28 22:11                                               ` John Zielinski
2004-04-28  4:43                                           ` Alex Stewart
2004-04-28 17:54                                             ` James Simmons
2004-04-28 21:51                                               ` Alex Stewart
2004-04-28 21:52                                                 ` James Simmons
2004-04-28 23:35                                                   ` Alex Stewart
2004-04-27 23:54                                         ` John Zielinski
2004-04-28  0:47                           ` Antonino A. Daplas
2004-04-28  8:35                             ` [PATCH] radeonfb(): memmove() fix -- this one works ; -) Geert Uytterhoeven
2004-04-28 17:14                               ` 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=1082507399.2056.26.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=eger-dated-1082943669.d79d33@theboonies.us \
    --cc=jsimmons@infradead.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 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.