LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-12-2018, 07:27 PM   #1
ENzero
LQ Newbie
 
Registered: Sep 2018
Posts: 5

Rep: Reputation: Disabled
Understanding framebuffer's imageblits ioctl


I have been creating a custom framebuffer driver and had to implement XXXfb_imageblit. The function takes an fb_image struct as a parameter and I do not understand how the image is stored in fb_image. (see code in line 544)

here is the definition of the struct in fb.h:
Code:
struct fb_image {
    __u32 dx;       /* Where to place image */
    __u32 dy;
    __u32 width;        /* Size of image */
    __u32 height;
    __u32 fg_color;     /* Only used when a mono bitmap */
    __u32 bg_color;
    __u8  depth;        /* Depth of the image */
    const char *data;   /* Pointer to image data */
    struct fb_cmap cmap;    /* color map info */
};
It is said in the comment that *data should have the pointer to the image data. How is the image data represented in this case?
 
Old 09-13-2018, 12:31 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
That is supposed to be a pointer to the data for the image.

Hexdump out an image file, that's what this data is supposed to be.
 
  


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
[SOLVED] Help with understanding the 'with' keyword and understanding file reading and writing. vysero Programming 3 05-30-2018 02:37 PM
ioctl jideesha Linux - Software 2 07-29-2012 11:07 PM
framebuffer confusion with Hauppauge PVR 350 framebuffer /dev/fb0 tofino_surfer Linux - General 4 09-18-2008 11:36 PM
How to pass IOCTL arguments from usespace ioctl call devkpict Linux - Kernel 1 12-07-2007 06:45 PM
VESA framebuffer vs Intel framebuffer in Slackware 10.0 with default kernel brancalessio Slackware 3 01-20-2005 03:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:21 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