Hi,

Dne petek, 05. maj 2017 ob 12:07:09 CEST je Andre Przywara napisal(a):
> Hi,
> 
> (re-adding the list)
> 
> On 05/05/17 05:49, Pajeet Gurav wrote:
> > thank you so much andre! I guess I'll just mooch the code off the
> > u-boot sources and write simple pixel writing routines using that.
> 
> Well, as I said below I don't think this is a good idea. Can't you just
> use U-Boot's framebuffer? Please note that U-Boot sets up everything for
> you, in a pretty portable manner (so a new SoC or board would look the
> same to your OS). Once this is set up, the DE2 and HDMI controller keep
> running (as long as you don't mess with their clocks) and continuously
> scan out the framebuffer to the screen.
> All you need to do is do read out the simplefb node from the DT.

Unfortunatelly, simplefb is not supported by DM video driver, at least not 
yet. Icenowy put together temporary support for simplefb [1]. 

> If you don't want or can't use the DT, you could as well hardcode that
> information: the framebuffer address itself is probably a constant in
> U-Boot 

No, it is not, it has to be read out from somewhere.

> and you might be able to read out the resolution from some HDMI
> or DE2 register.

If you want to go this way, registers in DE2 are recommended. You need color 
depth, framebuffer start and pitch.

> 
> Once you know the address, resolution and colour encoding, you can
> easily code your pixel routines. You should be able to easily give this
> a try: just look up the framebuffer address and write something into
> that area.
> 
> This approach saves your from writing a lot of tedious, fragile and
> boring code (for instance EDID parsing), and allows you to just go ahead
> with graphics on the screen.
> If you go ahead with your idea, you probably end up with code that works
> on the A64 only, and with your HDMI monitor only (and not other monitors
> or interfaces).

I completely agree with Andre here.

Best regards,
Jernej

[1] https://github.com/Icenowy/u-boot/commit/
315edb971fa05d80fd0f17190406125f7455dc96

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to