Thread (13 messages) 13 messages, 4 authors, 2004-09-12

Re: monitor detection through ddc/edid stuff.

flat view

From: Sven Luther <hidden>
Date: 2004-09-12 14:34:40

On Sun, Sep 12, 2004 at 06:11:01PM +0800, Antonino A. Daplas wrote:
On Sunday 12 September 2004 18:04, Sven Luther wrote:
quoted
On Sun, Sep 12, 2004 at 05:32:44PM +0800, Antonino A. Daplas wrote:
quoted
On Sunday 12 September 2004 16:42, Sven Luther wrote:
quoted
Now, another question which has me baffled. In set_par, i set the video
mode for the card, but i only seem to have access to the bpp, and not
the actual depth. Since i can distinguish between depth 15 (5551) and
16 (5650), as well as between depth 24 (8888) and 30 (AAA2), where do i
get the information concerning the actual depth used from ?
var->green.length
So, on a 5551 more, i should get :

  var->green.length + var->red.length + var->blue.length == 15

right ?
Yes, sorry for being cryptic.  Only if (visual == truecolor ||
visual == directcolor), otherwise color depth = var->green.length.  If you
are using at least a 2.6.8 kernel, there is a new helper in
drivers/video/fbmem.c that you can check out:

int fb_get_color_depth(struct fb_info *)
Ah, it seems this one didn't make it to 2.6.8, since i don't have such a
function. Will do : 

if (fix->visual == FB_VISUAL_TRUECOLOR || fix->visual == FB_VISUAL_DIRECTCOLOR)
	depth = var->green.length + var->red.length + var->blue.length;
else
	depth = var->green.length

instead. Hope this is ok.

Friendly,

Sven Luther


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help