Re: Implementing new fb driver

5 messages, 2 authors, 2008-09-20 · open the first message on its own page

Re: Implementing new fb driver

From: <hidden>
Date: 2008-09-17 14:05:42

krzysztof.h1@poczta.fm wrote:


I have a question; this hardware supports (only) true color cursors. Is
the fb API unable to deal with this? I have read only 1-bit cursor
images are supported.
No. Look at the include/linux/fb.h

#define FB_CUR_SETIMAGE 0x01
#define FB_CUR_SETPOS   0x02
#define FB_CUR_SETHOT   0x04
#define FB_CUR_SETCMAP  0x08
#define FB_CUR_SETSHAPE 0x10
#define FB_CUR_SETSIZE  0x20
#define FB_CUR_SETALL   0xFF

struct fbcurpos {
    __u16 x, y;
};

struct fb_cursor {
    __u16 set;      /* what to set */
    __u16 enable;       /* cursor on/off */
    __u16 rop;      /* bitop operation */
    const char *mask;   /* cursor mask bits */
    struct fbcurpos hot;    /* cursor hot spot */
    struct fb_image image;  /* Cursor image */
};

You can set colormap for the cursor. 
This said, I ma confused by the hw cursors calls, and I am not sure how
to proceed. Basically my hardware can store a number of cursor images,
enable or disable the cursor, and move the cursor at a specified
position. How do I implement that?
There is only one function to handle cursor (fb_cursor) which set appropriate properties based on set flags (the constants above). 
One file I fixed cursor handling is the tdfxfb driver (look there).

Best regards,
Krzysztof

----------------------------------------------------------------------
Jak zrobic swoja wlasna tapete na telefon?
Sprawdz >>  http://link.interia.pl/f1f14   


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Re: Implementing new fb driver

From: Alessio Sangalli <hidden>
Date: 2008-09-17 17:14:13

krzysztof.h1@poczta.fm wrote:
quoted
the fb API unable to deal with this? I have read only 1-bit cursor
images are supported.
No. Look at the include/linux/fb.h
[...]
You can set colormap for the cursor. 
Umh... I really have to go and get more details, this part of the driver
is the one I do not really understand well. You mean colormap as in
'palette'? or as in 'bitmap'; this hardware will only support truecolor.
There is only one function to handle cursor (fb_cursor) which set appropriate properties based on set flags (the constants above). 
One file I fixed cursor handling is the tdfxfb driver (look there).

I will thank you.

Bye
as


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Re: Implementing new fb driver

From: Alessio Sangalli <hidden>
Date: 2008-09-19 00:15:27

Alessio Sangalli wrote:
quoted
quoted
the fb API unable to deal with this? I have read only 1-bit cursor
images are supported.
No. Look at the include/linux/fb.h

I have another question: in fbmem.h line 1070 function fb_ioctl

        case FBIO_CURSOR:
                return -EINVAL;

is the ioctl 'manager' in this file? Why does it return like this? How
is the userspace supposed to deal with the cursor?

Thank you
Alessio



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Re: Implementing new fb driver

From: Krzysztof Helt <hidden>
Date: 2008-09-20 17:58:47

On Thu, 18 Sep 2008 17:15:11 -0700
Alessio Sangalli [off-list ref] wrote:
Alessio Sangalli wrote:
quoted
quoted
quoted
the fb API unable to deal with this? I have read only 1-bit cursor
images are supported.
No. Look at the include/linux/fb.h

I have another question: in fbmem.h line 1070 function fb_ioctl

        case FBIO_CURSOR:
                return -EINVAL;

is the ioctl 'manager' in this file? Why does it return like this? How
is the userspace supposed to deal with the cursor?
I see. It seems that this ioctl is not implemented. The cursor control works through the console layer but I am not sure if you can set shape through this.

I have no time implement this at the moment.

Regards,
Krzysztof

----------------------------------------------------------------------
Doladuj telefon szybko i bezpiecznie.
Sprawdz >>  http://link.interia.pl/f1f02


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Re: Implementing new fb driver

From: Alessio Sangalli <hidden>
Date: 2008-09-20 18:43:03

Krzysztof Helt wrote:
I see. It seems that this ioctl is not implemented. The cursor
control works through the console layer but I am not sure if you can
set shape through this.

I have no time implement this at the moment.
Well, we did implement it, on Monday I will send you a patch to consider.

bye!
as


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help