fixed several compiler warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5912 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Other authors:
|
Other authors:
|
||||||
Mark Watson,
|
Mark Watson,
|
||||||
Rudolf Cornelissen 10/2002-12/2003.
|
Rudolf Cornelissen 10/2002-1/2004.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MODULE_BIT 0x00800000
|
#define MODULE_BIT 0x00800000
|
||||||
@@ -13,9 +13,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "acc_std.h"
|
#include "acc_std.h"
|
||||||
|
|
||||||
/* defined in ProposeDisplayMode.c */
|
|
||||||
extern status_t create_mode_list(void);
|
|
||||||
|
|
||||||
static status_t init_common(int the_fd);
|
static status_t init_common(int the_fd);
|
||||||
|
|
||||||
/* Initialization code shared between primary and cloned accelerants */
|
/* Initialization code shared between primary and cloned accelerants */
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Other authors for MGA driver:
|
Other authors for MGA driver:
|
||||||
Mark Watson,
|
Mark Watson,
|
||||||
Rudolf Cornelissen 9/2002-12/2003
|
Rudolf Cornelissen 9/2002-1/2004
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MODULE_BIT 0x00400000
|
#define MODULE_BIT 0x00400000
|
||||||
@@ -340,7 +340,7 @@ status_t PROPOSE_DISPLAY_MODE(display_mode *target, const display_mode *low, con
|
|||||||
case DUALHEAD_SWITCH:
|
case DUALHEAD_SWITCH:
|
||||||
if ((((si->ps.memory_size * 1024 * 1024) - pointer_reservation) >=
|
if ((((si->ps.memory_size * 1024 * 1024) - pointer_reservation) >=
|
||||||
(row_bytes * (target->virtual_height + vblank_fix))) &&
|
(row_bytes * (target->virtual_height + vblank_fix))) &&
|
||||||
((row_bytes / bpp) >= (target->timing.h_display * 2)))
|
((uint16)(row_bytes / bpp) >= (target->timing.h_display * 2)))
|
||||||
{
|
{
|
||||||
target->flags |= DUALHEAD_CAPABLE;
|
target->flags |= DUALHEAD_CAPABLE;
|
||||||
}
|
}
|
||||||
@@ -416,7 +416,6 @@ status_t GET_MODE_LIST(display_mode *dm)
|
|||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Create a list of display_modes to pass back to the caller.*/
|
/* Create a list of display_modes to pass back to the caller.*/
|
||||||
status_t create_mode_list(void) {
|
status_t create_mode_list(void) {
|
||||||
size_t max_size;
|
size_t max_size;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
Other authors:
|
Other authors:
|
||||||
Mark Watson,
|
Mark Watson,
|
||||||
Apsed,
|
Apsed,
|
||||||
Rudolf Cornelissen 11/2002-12/2003
|
Rudolf Cornelissen 11/2002-1/2004
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MODULE_BIT 0x00200000
|
#define MODULE_BIT 0x00200000
|
||||||
@@ -88,7 +88,7 @@ status_t SET_DISPLAY_MODE(display_mode *mode_to_set)
|
|||||||
if (si->ps.secondary_head) g400_crtc2_dpms(false, false, false);
|
if (si->ps.secondary_head) g400_crtc2_dpms(false, false, false);
|
||||||
|
|
||||||
/*where in framebuffer the screen is (should this be dependant on previous MOVEDISPLAY?)*/
|
/*where in framebuffer the screen is (should this be dependant on previous MOVEDISPLAY?)*/
|
||||||
startadd = si->fbc.frame_buffer - si->framebuffer;
|
startadd = (uint8*)si->fbc.frame_buffer - (uint8*)si->framebuffer;
|
||||||
|
|
||||||
/* calculate and set new mode bytes_per_row */
|
/* calculate and set new mode bytes_per_row */
|
||||||
gx00_general_validate_pic_size (&target, &si->fbc.bytes_per_row, &si->acc_mode);
|
gx00_general_validate_pic_size (&target, &si->fbc.bytes_per_row, &si->acc_mode);
|
||||||
@@ -488,7 +488,7 @@ status_t MOVE_DISPLAY(uint16 h_display_start, uint16 v_display_start) {
|
|||||||
//fixme: seperate both heads: we need a secondary si->fbc!
|
//fixme: seperate both heads: we need a secondary si->fbc!
|
||||||
startadd = v_display_start * si->fbc.bytes_per_row;
|
startadd = v_display_start * si->fbc.bytes_per_row;
|
||||||
startadd += h_display_start * (colour_depth >> 3);
|
startadd += h_display_start * (colour_depth >> 3);
|
||||||
startadd += si->fbc.frame_buffer - si->framebuffer;
|
startadd += (uint8*)si->fbc.frame_buffer - (uint8*)si->framebuffer;
|
||||||
startadd_right = startadd + si->dm.timing.h_display * (colour_depth >> 3);
|
startadd_right = startadd + si->dm.timing.h_display * (colour_depth >> 3);
|
||||||
|
|
||||||
/* account for switched CRTC's */
|
/* account for switched CRTC's */
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ status_t SYNC_TO_TOKEN(sync_token *st);
|
|||||||
|
|
||||||
void SCREEN_TO_SCREEN_BLIT(engine_token *et, blit_params *list, uint32 count);
|
void SCREEN_TO_SCREEN_BLIT(engine_token *et, blit_params *list, uint32 count);
|
||||||
void SCREEN_TO_SCREEN_TRANSPARENT_BLIT(engine_token *et, uint32 transparent_colour, blit_params *list, uint32 count);
|
void SCREEN_TO_SCREEN_TRANSPARENT_BLIT(engine_token *et, uint32 transparent_colour, blit_params *list, uint32 count);
|
||||||
|
void SCREEN_TO_SCREEN_SCALED_FILTERED_BLIT(engine_token *et, scaled_blit_params *list, uint32 count);
|
||||||
void FILL_RECTANGLE(engine_token *et, uint32 color, fill_rect_params *list, uint32 count);
|
void FILL_RECTANGLE(engine_token *et, uint32 color, fill_rect_params *list, uint32 count);
|
||||||
void INVERT_RECTANGLE(engine_token *et, fill_rect_params *list, uint32 count);
|
void INVERT_RECTANGLE(engine_token *et, fill_rect_params *list, uint32 count);
|
||||||
|
|
||||||
@@ -63,4 +64,6 @@ overlay_token ALLOCATE_OVERLAY(void);
|
|||||||
status_t RELEASE_OVERLAY(overlay_token ot);
|
status_t RELEASE_OVERLAY(overlay_token ot);
|
||||||
status_t CONFIGURE_OVERLAY(overlay_token ot, const overlay_buffer *ob, const overlay_window *ow, const overlay_view *ov);
|
status_t CONFIGURE_OVERLAY(overlay_token ot, const overlay_buffer *ob, const overlay_window *ow, const overlay_view *ov);
|
||||||
|
|
||||||
|
status_t create_mode_list(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* MGA Acceleration functions */
|
/* MGA Acceleration functions */
|
||||||
/* Authors:
|
/* Authors:
|
||||||
Mark Watson 2/2000,
|
Mark Watson 2/2000,
|
||||||
Rudolf Cornelissen 10/2002-11/2003.
|
Rudolf Cornelissen 10/2002-1/2004.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MODULE_BIT 0x00080000
|
#define MODULE_BIT 0x00080000
|
||||||
@@ -154,10 +154,10 @@ status_t gx00_acc_init()
|
|||||||
|
|
||||||
if (si->ps.card_type >= G200) {
|
if (si->ps.card_type >= G200) {
|
||||||
/*DSTORG - location of active screen in framebuffer*/
|
/*DSTORG - location of active screen in framebuffer*/
|
||||||
ACCW(DSTORG,(si->fbc.frame_buffer)-(si->framebuffer));
|
ACCW(DSTORG,((uint8*)si->fbc.frame_buffer) - ((uint8*)si->framebuffer));
|
||||||
|
|
||||||
/*SRCORG - init source address - same as dest*/
|
/*SRCORG - init source address - same as dest*/
|
||||||
ACCW(SRCORG,(si->fbc.frame_buffer)-(si->framebuffer));
|
ACCW(SRCORG,((uint8*)si->fbc.frame_buffer) - ((uint8*)si->framebuffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* init YDSTORG - apsed, if not inited, BitBlts may fails on <= G200 */
|
/* init YDSTORG - apsed, if not inited, BitBlts may fails on <= G200 */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* G200-G550 Back End Scaler functions */
|
/* G200-G550 Back End Scaler functions */
|
||||||
/* Written by Rudolf Cornelissen 05/2002-04/2003 */
|
/* Written by Rudolf Cornelissen 05/2002-1/2004 */
|
||||||
|
|
||||||
#define MODULE_BIT 0x00000200
|
#define MODULE_BIT 0x00000200
|
||||||
|
|
||||||
@@ -631,7 +631,7 @@ status_t gx00_configure_bes
|
|||||||
* upto 360Mhz. So snooze about 4uS to prevent bus-congestion...
|
* upto 360Mhz. So snooze about 4uS to prevent bus-congestion...
|
||||||
* Appr. 200 lines time will provide enough room even on a 100Mhz CPU if it's
|
* Appr. 200 lines time will provide enough room even on a 100Mhz CPU if it's
|
||||||
* screen is set to the highest refreshrate/resolution possible. */
|
* screen is set to the highest refreshrate/resolution possible. */
|
||||||
while (CR1R(VCOUNT) > (si->dm.timing.v_total - 200)) snooze(4);
|
while ((uint16)CR1R(VCOUNT) > (si->dm.timing.v_total - 200)) snooze(4);
|
||||||
|
|
||||||
|
|
||||||
/**************************************
|
/**************************************
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
/* some bits are hacks, where PINS is not known */
|
/* some bits are hacks, where PINS is not known */
|
||||||
/* Authors:
|
/* Authors:
|
||||||
Mark Watson 2/2000,
|
Mark Watson 2/2000,
|
||||||
Rudolf Cornelissen 10/2002-4/2003
|
Rudolf Cornelissen 10/2002-1/2004
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MODULE_BIT 0x00002000
|
#define MODULE_BIT 0x00002000
|
||||||
@@ -151,9 +151,9 @@ status_t pins1_read(uint8 *pins, uint8 length)
|
|||||||
si->ps.max_dac1_clock_32 = pins[22];//ramdac
|
si->ps.max_dac1_clock_32 = pins[22];//ramdac
|
||||||
si->ps.max_pixel_vco = (pins[25] << 8) | pins[24];//PCLK
|
si->ps.max_pixel_vco = (pins[25] << 8) | pins[24];//PCLK
|
||||||
si->ps.std_engine_clock = (pins[29] << 8) | pins[28];
|
si->ps.std_engine_clock = (pins[29] << 8) | pins[28];
|
||||||
if (((pins[31] << 8) | pins[30]) < si->ps.std_engine_clock)
|
if ((uint32)((pins[31] << 8) | pins[30]) < si->ps.std_engine_clock)
|
||||||
si->ps.std_engine_clock = (pins[31] << 8) | pins[30];
|
si->ps.std_engine_clock = (pins[31] << 8) | pins[30];
|
||||||
if (((pins[33] << 8) | pins[32]) < si->ps.std_engine_clock)
|
if ((uint32)((pins[33] << 8) | pins[32]) < si->ps.std_engine_clock)
|
||||||
si->ps.std_engine_clock = (pins[33] << 8) | pins[32];
|
si->ps.std_engine_clock = (pins[33] << 8) | pins[32];
|
||||||
|
|
||||||
//temp. test to see some vals..
|
//temp. test to see some vals..
|
||||||
|
|||||||
Reference in New Issue
Block a user