[interfacekit] integrating graphics drivers
- From: "Andrew Bachmann" <shatty@xxxxxxxxxxxxx>
- To: "openbeos interface kit" <interfacekit@xxxxxxxxxxxxx>
- Date: Sat, 15 Nov 2003 19:37:01 -0800 PST
Hello all,
I am trying to assist Rudolf by integrating his drivers into our CVS and I have
a few questions
that I thought I would consult ya'll about.
#1. new generic header "video_overlay.h"
One of the header files in the drivers is "video_overlay.h". This file is the
defines the types of
functions that an accelerant should provide to give overlay support. For
example:
typedef uint32 (*overlay_count)(const display_mode *dm);
typedef status_t (*get_overlay_constraints)(const display_mode *dm, const
overlay_buffer *ob,
overlay_constraints *oc);
typedef status_t (*release_overlay)(overlay_token ot);
It also contains definitions for some related overlay structs and enumerated
constants:
enum {
B_OVERLAY_COUNT = 0x08000000,
B_OVERLAY_SUPPORTED_SPACES,
B_OVERLAY_SUPPORTED_FEATURES,
B_ALLOCATE_OVERLAY_BUFFER,
B_RELEASE_OVERLAY_BUFFER,
B_GET_OVERLAY_CONSTRAINTS,
B_ALLOCATE_OVERLAY,
B_RELEASE_OVERLAY,
B_CONFIGURE_OVERLAY
};
typedef struct {
uint32 space; /* color_space of buffer */
uint16 width; /* width in pixels */
uint16 height; /* height in lines */
uint32 bytes_per_row; /* number of bytes in one line */
void *buffer; /* pointer to first byte of overlay
buffer in virtual memory */
void *buffer_dma; /* pointer to first byte of overlay buffer in
physical memory for DMA
*/
} overlay_buffer;
This file has the following at the top:
/*
Copyright Be Incorporated.
This file will eventually be merged into Accelerant.h once the API is
finalized.
*/
So I was wondering if we should merge this file into Accelerant.h, or if we
should put it here:
current/headers/os/add-ons/graphics
Also, if we put it in that directory, should we rename it to VideoOverlay.h,
instead of
video_overlay.h?
#2. accelerant & graphics driver shared interfaces
The accelerant and graphics driver have some shared interfaces. These are
expressed through
some common structs and macros in two headers included by both the accelerant
and graphics
driver. Is it appropriate to place these common headers into the private
headers area, such as:
headers/private/..<something>../nvidia
Or should I perhaps put the headers in the graphics driver directory and then
point the
accelerant to use headers from that directory as well?
#3. driver config file
The graphics driver has a config file to be installed. ("nv.settings") This
file is typically installed
here:
/boot/home/config/settings/kernel/drivers/nv.settings
Where should this config file reside in our source tree? Also in sort of a
forward looking
direction, it seems like it would be a little annoying to have many of these
settings files in the
kernel drivers directory, especially if one didn't even have the hardware. If
there any thoughts
on how to address this future issue, do they affect the decision of where to
place this today?
Andrew
Other related posts:
- » [interfacekit] integrating graphics drivers