Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: OSD bugging me....



Ralph,

> There is very little memory for OSD.

=:-O Oooohhhh nooooo!!!!!

> The older firmware had 32K. In the last firmware I freed up a little
> more, about 100K.

Good job :-)

> They should have put 4MB SDRAM on the card instead of 2MB. The AV7110
> has nice graphics capabilities if one has the memory for it.

I guess they've reserved this for the "Power DVB/2" version of the card.
Maybe I should get those datasheets and write a hacker guide on how to
solder some more SDRAM on the board.

> I also added a lot of pointer checking to the OSD code in the
> firmware. Thatīs why there are no more ARM crashes (outcommand errors).
> Iīll go over it again to check if there is any memory loss.

Ok.... let's get constructive (speaking about myself :-) I knew you were
under NDA, but I had to ask....

So, without being able to see the code, I have to guess, so if I don't get
it, ignore me.

So, from your words, I guess that you're using malloc. And I guess that
malloc is used somewhere else in the driver (maybe you need some extra
memory in the tuner routines?). What can happen is that you have a small
piece of allocated memory in the middle of the big memory (this can be due
to uneven malloc/free or even memory leakage leaving allocated blocks
around). Anyway, you have this total of 100K split in 49K + 2K + 49K and the
user application requires an OSD that would take 55K.... the firmware is
stuck. But if the app makes it's OSD let's say 40K then it shows up.... but
only until the memory is more fragmented and you end up with 29K + 2K + 29K
+ 2K + .......

This happened to me all the time in the past (remember, I am an embedded
systems programmer) until I decided to actually ignore malloc, and allocate
memory once and then use it as is (static allocation of everything).

So... the question is: Is it possible for the driver to lock the OSD memory
(let's say allocate a predefined maximum array that will be the one that is
used always) ...... or ....... Is there a mode where the user application
can allocate some memory for OSD (i.e. get the firmware to allocate it) and
then just show/hide it (this would allow the apllication to draw off-screen
and then quickly show the stuff that was pre-drawn). I guess the third
choice (garbadge collectors and heap defragmentation) is too much of a pain
to implement.

> Sorry, but we are bound by NDAs not to release the firmware.

What a pitty... but better an NDA driver than no driver at all.

Plamen.



Home | Main Index | Thread Index