LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-08-2013, 06:26 PM   #1
PunMaster
LQ Newbie
 
Registered: May 2010
Posts: 6

Rep: Reputation: 0
Framebuffer data structures


I am programming for the Linux framebuffer for the first time and I have a few questions.

1) Why is fb_fix_screeninfo.line_length in the "fixed" data structure? Doesn't this value change with resolution?

2) What is the difference between fb_fix_screeninfo.line_length and fb_var_screeninfo.xres * (fb_var_screeninfo.bits_per_pixel / 8)?

Thank you.
 
Old 06-10-2013, 06:41 AM   #2
Sigg3.net
Member
 
Registered: Mar 2008
Location: Oslo, Norway
Distribution: Slackware 14.1 64-bit, Ubuntu 15.10, Fedora 17, Ubuntu 12 LTS and Ubuntu server 10.04
Posts: 173

Rep: Reputation: 28
According to this API spec, the line length is a fixed measure of bytes, which can be changed by the driver.

Quote:
151 struct fb_fix_screeninfo stores device independent unchangeable information
152 about the frame buffer device and the current format. Those information can't
153 be directly modified by applications, but can be changed by the driver when an
154 application modifies the format.
See: http://www.mjmwired.net/kernel/Docum...fb/api.txt#144


fb_var_screeninfo.xres is "visible resolution" while line_length is "length of a line in bytes". At some point they will both be bytes, but the difference here could be due to a level of abstraction. I am a noob, so dunno

Last edited by Sigg3.net; 06-10-2013 at 06:44 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
from kernel data structures ? sha_neb Linux - Kernel 1 06-08-2007 03:54 PM
from kernel data structures ? sha_neb Programming 1 06-07-2007 09:53 AM
data structures used by ls command vishalbutte Programming 1 01-19-2006 02:47 PM
Data structures - Trees rahul_kulkarni Programming 1 05-16-2005 05:45 AM
java data structures tunedLow Programming 4 12-17-2002 11:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration