Ticket #10486: medusa-apiv2-r1.diff

File medusa-apiv2-r1.diff, 4.4 KB (added by kallisti5, 11 years ago)

medusa. Throw the baby out with the bath water. revision 1

  • headers/os/add-ons/graphics/Accelerant.h

    diff --git a/headers/os/add-ons/graphics/Accelerant.h b/headers/os/add-ons/graphics/Accelerant.h
    index 1322c35..249678e 100644
    a b  
    1616
    1717
    1818#define B_ACCELERANT_ENTRY_POINT    "get_accelerant_hook"
    19 #define B_ACCELERANT_VERSION        1
     19#define B_ACCELERANT_VERSION        2
    2020
    2121
    2222typedef void* (*GetAccelerantHook)(uint32, void*);
    enum {  
    3333    B_UNINIT_ACCELERANT,                /* required */
    3434    B_GET_ACCELERANT_DEVICE_INFO,       /* required */
    3535    B_ACCELERANT_RETRACE_SEMAPHORE,     /* optional */
     36    B_ACCELERANT_GET_HEAD_COUNT,        /* optional */
    3637
    3738    /* mode configuration */
    3839    B_ACCELERANT_MODE_COUNT = 0x100,    /* required */
    typedef struct {  
    129130                                        /* virtual_width line */
    130131                                        /* not neccesarily the same as */
    131132                                        /* virtual_width * byte_per_pixel */
     133    int32   x_display_position;         /* coordinate of x position */
     134    int32   y_display_position;         /* coordinate of y position */
    132135} frame_buffer_config;
    133136
    134137
    typedef struct {  
    171174    }       produced;
    172175    float   width;
    173176    float   height;
    174     uint32  min_horizontal_frequency;   /* in kHz */
    175     uint32  max_horizontal_frequency;
    176     uint32  min_vertical_frequency;     /* in Hz */
    177     uint32  max_vertical_frequency;
    178     uint32  max_pixel_clock;            /* in kHz */
     177    struct {
     178        uint32  min_horizontal_frequency;   /* in kHz */
     179        uint32  max_horizontal_frequency;
     180        uint32  min_vertical_frequency;     /* in Hz */
     181        uint32  max_vertical_frequency;
     182        uint32  max_pixel_clock;            /* in kHz */
     183    } constraints;
     184    struct {
     185        uint8   crtc;
     186        uint32  encoder_type;
     187        uint32  connector_type;
     188        uint32  dpcm;                   /* dots per cm */
     189    } hardware;
    179190} monitor_info;
    180191
    181192
    typedef void (*get_accelerant_clone_info)(void* data);  
    284295typedef status_t (*clone_accelerant)(void* data);
    285296typedef void (*uninit_accelerant)(void);
    286297typedef status_t (*get_accelerant_device_info)(accelerant_device_info* adi);
     298typedef uint8 (*get_head_count)(void);
    287299
    288 typedef uint32 (*accelerant_mode_count)(void);
    289 typedef status_t (*get_mode_list)(display_mode*);
    290 typedef status_t (*propose_display_mode)(display_mode* target,
     300typedef uint32 (*accelerant_mode_count)(uint8 displayID);
     301typedef status_t (*get_mode_list)(uint8 displayID, display_mode*);
     302typedef status_t (*propose_display_mode)(uint8 displayID, display_mode* target,
    291303    display_mode* low, display_mode* high);
    292 typedef status_t (*set_display_mode)(display_mode* modeToSet);
    293 typedef status_t (*get_display_mode)(display_mode* currentMode);
    294 typedef status_t (*get_frame_buffer_config)(frame_buffer_config* frameBuffer);
    295 typedef status_t (*get_pixel_clock_limits)(display_mode* dm, uint32* low,
    296     uint32* high);
    297 typedef status_t (*move_display_area)(uint16 hDisplayStart,
     304typedef status_t (*set_display_mode)(uint8 displayID, display_mode* modeToSet);
     305typedef status_t (*get_display_mode)(uint8 displayID, display_mode* currentMode);
     306typedef status_t (*get_frame_buffer_config)(uint8 displayID,
     307    frame_buffer_config* frameBuffer);
     308typedef status_t (*get_pixel_clock_limits)(uint8 displayID, display_mode* dm,
     309    uint32* low, uint32* high);
     310typedef status_t (*move_display_area)(uint8 displayID, uint16 hDisplayStart,
    298311    uint16 vDisplayStart);
    299 typedef status_t (*get_timing_constraints)(display_timing_constraints* dtc);
    300 typedef void (*set_indexed_colors)(uint count, uint8 first,
     312typedef status_t (*get_timing_constraints)(uint8 displayID,
     313    display_timing_constraints* dtc);
     314typedef void (*set_indexed_colors)(uint8 displayID, uint count, uint8 first,
    301315    const uint8* colorData, uint32 flags);
    302 typedef uint32 (*dpms_capabilities)(void);
    303 typedef uint32 (*dpms_mode)(void);
    304 typedef status_t (*set_dpms_mode)(uint32 dpms_flags);
    305 typedef status_t (*get_preferred_display_mode)(display_mode* preferredMode);
    306 typedef status_t (*get_monitor_info)(monitor_info* info);
    307 typedef status_t (*get_edid_info)(void* info, uint32 size, uint32* _version);
     316typedef uint32 (*dpms_capabilities)(uint8 displayID);
     317typedef uint32 (*dpms_mode)(uint8 displayID);
     318typedef status_t (*set_dpms_mode)(uint8 displayID, uint32 dpms_flags);
     319typedef status_t (*get_preferred_display_mode)(uint8 displayID,
     320    display_mode* preferredMode);
     321typedef status_t (*get_monitor_info)(uint8 displayID, monitor_info* info);
     322typedef status_t (*get_edid_info)(uint8 displayID, void* info, uint32 size,
     323    uint32* _version);
    308324typedef sem_id (*accelerant_retrace_semaphore)(void);
    309325
    310326typedef status_t (*set_cursor_shape)(uint16 width, uint16 height,