Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/fbio.h
Show First 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | struct fbtype { | ||||
int fb_size; /* total size in bytes */ | int fb_size; /* total size in bytes */ | ||||
}; | }; | ||||
#define FBIOGTYPE _IOR('F', 0, struct fbtype) | #define FBIOGTYPE _IOR('F', 0, struct fbtype) | ||||
#define FBTYPE_GET_STRIDE(_fb) ((_fb)->fb_size / (_fb)->fb_height) | #define FBTYPE_GET_STRIDE(_fb) ((_fb)->fb_size / (_fb)->fb_height) | ||||
#define FBTYPE_GET_BPP(_fb) ((_fb)->fb_bpp) | #define FBTYPE_GET_BPP(_fb) ((_fb)->fb_bpp) | ||||
#define FBTYPE_GET_BYTESPP(_fb) ((_fb)->fb_bpp / 8) | #define FBTYPE_GET_BYTESPP(_fb) ((_fb)->fb_bpp / 8) | ||||
/* | |||||
* RGB offsets as returned by FBIO_GETRGBOFFS. | |||||
*/ | |||||
struct fb_rgboffs { | |||||
int red; | |||||
int green; | |||||
int blue; | |||||
}; | |||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
struct fb_info; | struct fb_info; | ||||
typedef int fb_enter_t(void *priv); | typedef int fb_enter_t(void *priv); | ||||
typedef int fb_leave_t(void *priv); | typedef int fb_leave_t(void *priv); | ||||
typedef int fb_setblankmode_t(void *priv, int mode); | typedef int fb_setblankmode_t(void *priv, int mode); | ||||
Show All 22 Lines | struct fb_info { | ||||
uint32_t fb_flags; | uint32_t fb_flags; | ||||
#define FB_FLAG_NOMMAP 1 /* mmap unsupported. */ | #define FB_FLAG_NOMMAP 1 /* mmap unsupported. */ | ||||
#define FB_FLAG_NOWRITE 2 /* disable writes for the time being */ | #define FB_FLAG_NOWRITE 2 /* disable writes for the time being */ | ||||
#define FB_FLAG_MEMATTR 4 /* override memattr for mmap */ | #define FB_FLAG_MEMATTR 4 /* override memattr for mmap */ | ||||
vm_memattr_t fb_memattr; | vm_memattr_t fb_memattr; | ||||
int fb_stride; | int fb_stride; | ||||
int fb_bpp; /* bits per pixel */ | int fb_bpp; /* bits per pixel */ | ||||
uint32_t fb_cmap[16]; | uint32_t fb_cmap[16]; | ||||
struct fb_rgboffs fb_rgboffs; /* RGB offsets */ | |||||
emaste: This will remain unpopulated on vt drivers other than ofwfb? | |||||
luporlAuthorUnsubmitted Done Inline ActionsYes, in the other drivers this field should contain zeroes, as long as the driver declares its fb_info as a global or zero initialize it, which seems to be the case. Do you think this is a problem? luporl: Yes, in the other drivers this field should contain zeroes, as long as the driver declares its… | |||||
luporlAuthorUnsubmitted Done Inline ActionsAny update or idea of a better way to fix this? I think it would be safe to just return an error (such as ENOTTY) if the vt driver doesn't populate it. luporl: Any update or idea of a better way to fix this?
I think it would be safe to just return an… | |||||
luporlAuthorUnsubmitted Done Inline ActionsWith changes in last diff, now all vt drivers populate fb_rgboffs. luporl: With changes in last diff, now all vt drivers populate fb_rgboffs. | |||||
}; | }; | ||||
int fbd_list(void); | int fbd_list(void); | ||||
int fbd_register(struct fb_info *); | int fbd_register(struct fb_info *); | ||||
int fbd_unregister(struct fb_info *); | int fbd_unregister(struct fb_info *); | ||||
static inline int | static inline int | ||||
register_framebuffer(struct fb_info *info) | register_framebuffer(struct fb_info *info) | ||||
▲ Show 20 Lines • Show All 454 Lines • ▼ Show 20 Lines | |||||
/* blank display */ | /* blank display */ | ||||
#define V_DISPLAY_ON 0 | #define V_DISPLAY_ON 0 | ||||
#define V_DISPLAY_BLANK 1 | #define V_DISPLAY_BLANK 1 | ||||
#define V_DISPLAY_STAND_BY 2 | #define V_DISPLAY_STAND_BY 2 | ||||
#define V_DISPLAY_SUSPEND 3 | #define V_DISPLAY_SUSPEND 3 | ||||
#define FBIO_BLANK _IOW('F', 115, int) | #define FBIO_BLANK _IOW('F', 115, int) | ||||
/* get RGB offsets */ | |||||
#define FBIO_GETRGBOFFS _IOR('F', 116, struct fb_rgboffs) | |||||
#endif /* !_SYS_FBIO_H_ */ | #endif /* !_SYS_FBIO_H_ */ |
This will remain unpopulated on vt drivers other than ofwfb?