From: "Linux PPC" <linuxppc@rediffmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: bits_per_pixel query
Date: 8 Sep 2002 16:39:36 -0000 [thread overview]
Message-ID: <20020908163936.31266.qmail@webmail30.rediffmail.com> (raw)
Hello there,
I had some doubts regarding the framebuffer struct
usage.
As I understand, the buffer is at fb_info.screen_base
and the size of the buffer is (hres * vres *
bits_per_pixel )/8. The state of the pixel at
location (x,y), would be represented by the value of
byte at screen_base + ((y*hres + x) * bits_per_pixel)/8.
If the display is 8 bit, then it would require only
a byte to represent the value of the pixel. If it were 24 bit,
then it would require 3 bytes, and so
on. Is that right? What would happen, to the size required for the
buffer, if the display
requires, say 12 bits per pixel, or 18 bits?
So, if I were to set all the bytes after screen_base
uptil screen_base + (hres*vres*bits_per_pixel/8) to
zeros, then I would get a black screen. Is that right?
I'm asking cos, I'm workin on a framebuffer support
for an LCD panel, and am making the above assumption
which doesn't seem happening.
- navin.
__________________________________________________________
Give your Company an email address like
ravi @ ravi-exports.com. Sign up for Rediffmail Pro today!
Know more. http://www.rediffmailpro.com/signup/
-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
next reply other threads:[~2002-09-08 16:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-08 16:39 Linux PPC [this message]
2002-09-09 14:23 ` bits_per_pixel query Antonino Daplas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020908163936.31266.qmail@webmail30.rediffmail.com \
--to=linuxppc@rediffmail.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).