diff options
author | Martin-Éric Racine <martin-eric.racine@iki.fi> | 2024-10-13 11:27:06 +0300 |
---|---|---|
committer | Martin-Éric Racine <martin-eric.racine@iki.fi> | 2024-10-13 11:27:06 +0300 |
commit | 1a81b5e4e3691eb725bb1ea6a0f7e93199e2737d (patch) | |
tree | 42cd500f6a19315c442ecd0baf855cc623103564 /src | |
parent | eb15e41211c4a10b14561ec069f75c90f03d7c91 (diff) |
Signed-off-by: Martin-Éric Racine <martin-eric.racine@iki.fi>
Diffstat (limited to 'src')
42 files changed, 414 insertions, 365 deletions
diff --git a/src/cim/cim_defs.h b/src/cim/cim_defs.h index d705abe..ad2c25c 100644 --- a/src/cim/cim_defs.h +++ b/src/cim/cim_defs.h @@ -742,7 +742,7 @@ cim_outb(unsigned short port, unsigned char data) #endif /* CIMARRON_INCLUDE_IO_MACROS */ -extern void (*cim_rdmsr) (uint32_t, uint32_t *, uint32_t *); -extern void (*cim_wrmsr) (uint32_t, uint32_t, uint32_t); +extern void (*cim_rdmsr)(uint32_t, uint32_t *, uint32_t *); +extern void (*cim_wrmsr)(uint32_t, uint32_t, uint32_t); #endif diff --git a/src/cim/cim_df.c b/src/cim/cim_df.c index 61a77d1..322d58b 100644 --- a/src/cim/cim_df.c +++ b/src/cim/cim_df.c @@ -120,8 +120,8 @@ df_set_panel_enable(int enable) *--------------------------------------------------------------------------*/ int -df_configure_video_source(DF_VIDEO_SOURCE_PARAMS * video_source_odd, - DF_VIDEO_SOURCE_PARAMS * video_source_even) +df_configure_video_source(DF_VIDEO_SOURCE_PARAMS *video_source_odd, + DF_VIDEO_SOURCE_PARAMS *video_source_even) { unsigned long pitch, ctrl, vcfg; unsigned long lock, vg_line, gcfg; @@ -449,7 +449,7 @@ df_set_video_scale(unsigned long src_width, unsigned long src_height, *--------------------------------------------------------------------------*/ int -df_set_video_position(DF_VIDEO_POSITION * video_window) +df_set_video_position(DF_VIDEO_POSITION *video_window) { unsigned long vblankstart_even, vblankend_even, vsyncend_even, vtotal_even, vactive_even; @@ -1022,7 +1022,7 @@ df_set_video_palette_entry(unsigned long index, unsigned long palette) *--------------------------------------------------------------------------*/ int -df_configure_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS * cursor_color_key) +df_configure_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS *cursor_color_key) { unsigned long key; @@ -1031,8 +1031,8 @@ df_configure_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS * cursor_color_key) key = READ_VID32(DF_CURSOR_COLOR_KEY) & DF_CURSOR_COLOR_KEY_ENABLE; key = - key | (cursor_color_key->key & 0xFFFFFF) | (cursor_color_key-> - select_color2 << 24); + key | (cursor_color_key-> + key & 0xFFFFFF) | (cursor_color_key->select_color2 << 24); WRITE_VID32(DF_CURSOR_COLOR_KEY, key); WRITE_VID32(DF_CURSOR_COLOR_MASK, (cursor_color_key->mask & 0xFFFFFF)); @@ -1070,7 +1070,7 @@ df_set_video_cursor_color_key_enable(int enable) *--------------------------------------------------------------------------*/ int -df_configure_alpha_window(int window, DF_ALPHA_REGION_PARAMS * alpha_data) +df_configure_alpha_window(int window, DF_ALPHA_REGION_PARAMS *alpha_data) { unsigned long vsyncend_even, vtotal_even, vactive_even; unsigned long hsyncend, htotal, hactive; @@ -1443,7 +1443,7 @@ df_test_video_flip_status(void) *--------------------------------------------------------------------------*/ int -df_save_state(DF_SAVE_RESTORE * df_state) +df_save_state(DF_SAVE_RESTORE *df_state) { unsigned long i; @@ -1523,7 +1523,7 @@ df_save_state(DF_SAVE_RESTORE * df_state) *--------------------------------------------------------------------------*/ int -df_restore_state(DF_SAVE_RESTORE * df_state) +df_restore_state(DF_SAVE_RESTORE *df_state) { unsigned long i; @@ -2089,8 +2089,8 @@ df_get_video_enable(int *enable, unsigned long *flags) *--------------------------------------------------------------------------*/ int -df_get_video_source_configuration(DF_VIDEO_SOURCE_PARAMS * video_source_odd, - DF_VIDEO_SOURCE_PARAMS * video_source_even) +df_get_video_source_configuration(DF_VIDEO_SOURCE_PARAMS *video_source_odd, + DF_VIDEO_SOURCE_PARAMS *video_source_even) { unsigned long format, temp; unsigned long size; @@ -2161,7 +2161,7 @@ df_get_video_source_configuration(DF_VIDEO_SOURCE_PARAMS * video_source_odd, *--------------------------------------------------------------------------*/ int -df_get_video_position(DF_VIDEO_POSITION * video_window) +df_get_video_position(DF_VIDEO_POSITION *video_window) { unsigned long xreg, yreg, dst_clip, clip; unsigned long height; @@ -2398,7 +2398,7 @@ df_get_video_palette(unsigned long *palette) *--------------------------------------------------------------------------*/ int -df_get_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS * cursor_color_key) +df_get_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS *cursor_color_key) { unsigned long key; @@ -2439,7 +2439,7 @@ df_get_video_cursor_color_key_enable(void) int df_get_alpha_window_configuration(int window, - DF_ALPHA_REGION_PARAMS * alpha_data) + DF_ALPHA_REGION_PARAMS *alpha_data) { unsigned long pos, color, alpha_ctl; unsigned long hsyncend, htotal; diff --git a/src/cim/cim_gp.c b/src/cim/cim_gp.c index 4ab909f..0eda717 100644 --- a/src/cim/cim_gp.c +++ b/src/cim/cim_gp.c @@ -3423,7 +3423,7 @@ gp_wait_blt_pending(void) *-------------------------------------------------------------------------*/ void -gp_save_state(GP_SAVE_RESTORE * gp_state) +gp_save_state(GP_SAVE_RESTORE *gp_state) { Q_WORD msr_value; @@ -3448,7 +3448,7 @@ gp_save_state(GP_SAVE_RESTORE * gp_state) *-------------------------------------------------------------------------*/ void -gp_restore_state(GP_SAVE_RESTORE * gp_state) +gp_restore_state(GP_SAVE_RESTORE *gp_state) { gp_wait_until_idle(); diff --git a/src/cim/cim_init.c b/src/cim/cim_init.c index e80eeb1..d1a117d 100644 --- a/src/cim/cim_init.c +++ b/src/cim/cim_init.c @@ -175,7 +175,7 @@ init_read_pci(unsigned long address) *---------------------------------------------------------------------------*/ int -init_read_base_addresses(INIT_BASE_ADDRESSES * base_addresses) +init_read_base_addresses(INIT_BASE_ADDRESSES *base_addresses) { unsigned long value; diff --git a/src/cim/cim_msr.c b/src/cim/cim_msr.c index 0d3c571..6a2c7ac 100644 --- a/src/cim/cim_msr.c +++ b/src/cim/cim_msr.c @@ -147,7 +147,7 @@ msr_init_table(void) *--------------------------------------------------------------------------*/ int -msr_create_geodelink_table(GEODELINK_NODE * gliu_nodes) +msr_create_geodelink_table(GEODELINK_NODE *gliu_nodes) { unsigned long mbiu_port_count, reflective; unsigned long port, index; @@ -370,7 +370,7 @@ msr_create_geodelink_table(GEODELINK_NODE * gliu_nodes) *--------------------------------------------------------------------------*/ int -msr_create_device_list(GEODELINK_NODE * gliu_nodes, int max_devices) +msr_create_device_list(GEODELINK_NODE *gliu_nodes, int max_devices) { int i, count; @@ -395,7 +395,7 @@ msr_create_device_list(GEODELINK_NODE * gliu_nodes, int max_devices) *-------------------------------------------------------------------*/ int -msr_read64(unsigned long device, unsigned long msr_register, Q_WORD * msr_value) +msr_read64(unsigned long device, unsigned long msr_register, Q_WORD *msr_value) { if (device < MSR_DEVICE_EMPTY) { if (msr_dev_lookup[device].device_id == MSR_DEVICE_PRESENT) { @@ -417,8 +417,7 @@ msr_read64(unsigned long device, unsigned long msr_register, Q_WORD * msr_value) *-------------------------------------------------------------------*/ int -msr_write64(unsigned long device, unsigned long msr_register, - Q_WORD * msr_value) +msr_write64(unsigned long device, unsigned long msr_register, Q_WORD *msr_value) { if (device < MSR_DEVICE_EMPTY) { if (msr_dev_lookup[device].device_id == MSR_DEVICE_PRESENT) { diff --git a/src/cim/cim_vg.c b/src/cim/cim_vg.c index a8a875b..78c09eb 100644 --- a/src/cim/cim_vg.c +++ b/src/cim/cim_vg.c @@ -382,7 +382,7 @@ vg_set_tv_mode(unsigned long *src_width, unsigned long *src_height, *--------------------------------------------------------------------------*/ int -vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) +vg_set_custom_mode(VG_DISPLAY_MODE *mode_params, int bpp) { unsigned long config, misc, temp; unsigned long irq_ctl, genlk_ctl; @@ -1095,7 +1095,7 @@ vg_set_display_bpp(int bpp) *--------------------------------------------------------------------------*/ int -vg_get_display_mode_index(VG_QUERY_MODE * query) +vg_get_display_mode_index(VG_QUERY_MODE *query) { unsigned int mode; unsigned long hz_flag = 0xFFFFFFFF; @@ -1281,7 +1281,7 @@ vg_get_display_mode_index(VG_QUERY_MODE * query) *--------------------------------------------------------------------------*/ int -vg_get_display_mode_information(unsigned int index, VG_DISPLAY_MODE * vg_mode) +vg_get_display_mode_information(unsigned int index, VG_DISPLAY_MODE *vg_mode) { if (index > NUM_CIMARRON_DISPLAY_MODES) return CIM_STATUS_INVALIDPARAMS; @@ -1310,7 +1310,7 @@ vg_get_display_mode_count(void) *--------------------------------------------------------------------------*/ int -vg_get_current_display_mode(VG_DISPLAY_MODE * current_display, int *bpp) +vg_get_current_display_mode(VG_DISPLAY_MODE *current_display, int *bpp) { Q_WORD msr_value; unsigned long active, blank, sync; @@ -1860,7 +1860,7 @@ vg_set_mono_cursor_colors(unsigned long bkcolor, unsigned long fgcolor) *--------------------------------------------------------------------------*/ int -vg_set_cursor_position(long xpos, long ypos, VG_PANNING_COORDINATES * panning) +vg_set_cursor_position(long xpos, long ypos, VG_PANNING_COORDINATES *panning) { unsigned long unlock, memoffset; unsigned long gcfg; @@ -2103,7 +2103,7 @@ vg_set_color_cursor_shape(unsigned long memoffset, unsigned char *data, int vg_pan_desktop(unsigned long x, unsigned long y, - VG_PANNING_COORDINATES * panning) + VG_PANNING_COORDINATES *panning) { unsigned long modeShiftPerPixel; unsigned long modeBytesPerScanline; @@ -2384,7 +2384,7 @@ vg_set_compression_enable(int enable) *--------------------------------------------------------------------------*/ int -vg_configure_compression(VG_COMPRESSION_DATA * comp_data) +vg_configure_compression(VG_COMPRESSION_DATA *comp_data) { unsigned long delta, size; unsigned long comp_size, unlock; @@ -2499,7 +2499,7 @@ vg_test_even_field(void) *--------------------------------------------------------------------------*/ int -vg_configure_line_interrupt(VG_INTERRUPT_PARAMS * interrupt_info) +vg_configure_line_interrupt(VG_INTERRUPT_PARAMS *interrupt_info) { unsigned long irq_line, irq_enable; unsigned long lock; @@ -2580,7 +2580,7 @@ vg_test_flip_status(void) *--------------------------------------------------------------------------*/ int -vg_save_state(VG_SAVE_RESTORE * vg_state) +vg_save_state(VG_SAVE_RESTORE *vg_state) { Q_WORD msr_value; unsigned long irqfilt; @@ -2732,7 +2732,7 @@ vg_save_state(VG_SAVE_RESTORE * vg_state) *--------------------------------------------------------------------------*/ int -vg_restore_state(VG_SAVE_RESTORE * vg_state) +vg_restore_state(VG_SAVE_RESTORE *vg_state) { unsigned long irqfilt, j; unsigned long memoffset; @@ -3582,7 +3582,7 @@ vg_get_display_offset(void) *--------------------------------------------------------------------------*/ int -vg_get_cursor_info(VG_CURSOR_DATA * cursor_data) +vg_get_cursor_info(VG_CURSOR_DATA *cursor_data) { unsigned long temp; @@ -3683,7 +3683,7 @@ vg_get_display_palette(unsigned long *palette) *--------------------------------------------------------------------------*/ int -vg_get_compression_info(VG_COMPRESSION_DATA * comp_data) +vg_get_compression_info(VG_COMPRESSION_DATA *comp_data) { comp_data->compression_offset = READ_REG32(DC3_CB_ST_OFFSET) & 0x0FFFFFFF; comp_data->pitch = (READ_REG32(DC3_GFX_PITCH) >> 13) & 0x7FFF8; diff --git a/src/cim/cim_vip.c b/src/cim/cim_vip.c index f37a394..a1ca968 100644 --- a/src/cim/cim_vip.c +++ b/src/cim/cim_vip.c @@ -36,7 +36,7 @@ *--------------------------------------------------------------------------*/ int -vip_initialize(VIPSETMODEBUFFER * buffer) +vip_initialize(VIPSETMODEBUFFER *buffer) { unsigned long vip_control1, vip_control2, vip_control3; @@ -151,7 +151,7 @@ vip_initialize(VIPSETMODEBUFFER * buffer) *--------------------------------------------------------------------------*/ int -vip_update_601_params(VIP_601PARAMS * buffer) +vip_update_601_params(VIP_601PARAMS *buffer) { unsigned long vip_control3, vip_control1; @@ -214,7 +214,7 @@ vip_update_601_params(VIP_601PARAMS * buffer) *--------------------------------------------------------------------------*/ int -vip_configure_capture_buffers(int buffer_type, VIPINPUTBUFFER * buffer) +vip_configure_capture_buffers(int buffer_type, VIPINPUTBUFFER *buffer) { VIPINPUTBUFFER_ADDR *offsets; unsigned long cur_buffer = buffer->current_buffer; @@ -316,7 +316,7 @@ vip_configure_capture_buffers(int buffer_type, VIPINPUTBUFFER * buffer) *--------------------------------------------------------------------------*/ int -vip_toggle_video_offsets(int buffer_type, VIPINPUTBUFFER * buffer) +vip_toggle_video_offsets(int buffer_type, VIPINPUTBUFFER *buffer) { unsigned long cur_buffer = buffer->current_buffer; VIPINPUTBUFFER_ADDR *offsets; @@ -663,7 +663,7 @@ vip_set_loopback_enable(int enable) *---------------------------------------------------------------------------*/ int -vip_configure_genlock(VIPGENLOCKBUFFER * buffer) +vip_configure_genlock(VIPGENLOCKBUFFER *buffer) { unsigned long vip_control1, vip_control2; unsigned long unlock, genlk_ctl; @@ -748,7 +748,7 @@ vip_set_genlock_enable(int enable) *--------------------------------------------------------------------------*/ int -vip_set_power_characteristics(VIPPOWERBUFFER * buffer) +vip_set_power_characteristics(VIPPOWERBUFFER *buffer) { Q_WORD q_word; @@ -781,7 +781,7 @@ vip_set_power_characteristics(VIPPOWERBUFFER * buffer) *--------------------------------------------------------------------------*/ int -vip_set_priority_characteristics(VIPPRIORITYBUFFER * buffer) +vip_set_priority_characteristics(VIPPRIORITYBUFFER *buffer) { Q_WORD q_word; @@ -810,7 +810,7 @@ vip_set_priority_characteristics(VIPPRIORITYBUFFER * buffer) *--------------------------------------------------------------------------*/ int -vip_set_debug_characteristics(VIPDEBUGBUFFER * buffer) +vip_set_debug_characteristics(VIPDEBUGBUFFER *buffer) { Q_WORD q_word; @@ -907,7 +907,7 @@ vip_reset(void) *--------------------------------------------------------------------------*/ int -vip_set_subwindow_enable(VIPSUBWINDOWBUFFER * buffer) +vip_set_subwindow_enable(VIPSUBWINDOWBUFFER *buffer) { unsigned long vip_control2; @@ -965,7 +965,7 @@ vip_reset_interrupt_state(unsigned long interrupt_mask) *--------------------------------------------------------------------------*/ int -vip_save_state(VIPSTATEBUFFER * save_buffer) +vip_save_state(VIPSTATEBUFFER *save_buffer) { if (!save_buffer) return CIM_STATUS_INVALIDPARAMS; @@ -1027,7 +1027,7 @@ vip_save_state(VIPSTATEBUFFER * save_buffer) *--------------------------------------------------------------------------*/ int -vip_restore_state(VIPSTATEBUFFER * restore_buffer) +vip_restore_state(VIPSTATEBUFFER *restore_buffer) { if (!restore_buffer) return CIM_STATUS_OK; @@ -1157,7 +1157,7 @@ vip_get_current_field(void) *--------------------------------------------------------------------------*/ int -vip_get_current_mode(VIPSETMODEBUFFER * buffer) +vip_get_current_mode(VIPSETMODEBUFFER *buffer) { unsigned long vip_control1, vip_control2, vip_control3; @@ -1222,7 +1222,7 @@ vip_get_current_mode(VIPSETMODEBUFFER * buffer) *--------------------------------------------------------------------------*/ int -vip_get_601_configuration(VIP_601PARAMS * buffer) +vip_get_601_configuration(VIP_601PARAMS *buffer) { unsigned long vip_control3, vip_control1; @@ -1273,7 +1273,7 @@ vip_get_601_configuration(VIP_601PARAMS * buffer) *--------------------------------------------------------------------------*/ int -vip_get_buffer_configuration(int buffer_type, VIPINPUTBUFFER * buffer) +vip_get_buffer_configuration(int buffer_type, VIPINPUTBUFFER *buffer) { unsigned long cur_buffer = buffer->current_buffer; VIPINPUTBUFFER_ADDR *offsets; @@ -1376,7 +1376,7 @@ vip_get_buffer_configuration(int buffer_type, VIPINPUTBUFFER * buffer) *--------------------------------------------------------------------------*/ int -vip_get_genlock_configuration(VIPGENLOCKBUFFER * buffer) +vip_get_genlock_configuration(VIPGENLOCKBUFFER *buffer) { unsigned long vip_control1, vip_control2; unsigned long genlk_ctl; @@ -1554,7 +1554,7 @@ vip_enable_fifo_access(int enable) *--------------------------------------------------------------------------*/ int -vip_get_power_characteristics(VIPPOWERBUFFER * buffer) +vip_get_power_characteristics(VIPPOWERBUFFER *buffer) { Q_WORD q_word; @@ -1581,7 +1581,7 @@ vip_get_power_characteristics(VIPPOWERBUFFER * buffer) *--------------------------------------------------------------------------*/ int -vip_get_priority_characteristics(VIPPRIORITYBUFFER * buffer) +vip_get_priority_characteristics(VIPPRIORITYBUFFER *buffer) { Q_WORD q_word; @@ -1610,7 +1610,7 @@ vip_get_priority_characteristics(VIPPRIORITYBUFFER * buffer) *--------------------------------------------------------------------------*/ int -vip_get_capability_characteristics(VIPCAPABILITIESBUFFER * buffer) +vip_get_capability_characteristics(VIPCAPABILITIESBUFFER *buffer) { Q_WORD q_word; diff --git a/src/cim/cim_vop.c b/src/cim/cim_vop.c index 5a85998..e9f14bb 100644 --- a/src/cim/cim_vop.c +++ b/src/cim/cim_vop.c @@ -36,7 +36,7 @@ *--------------------------------------------------------------------------*/ int -vop_set_vbi_window(VOPVBIWINDOWBUFFER * buffer) +vop_set_vbi_window(VOPVBIWINDOWBUFFER *buffer) { unsigned long unlock, temp; unsigned long hstart, hstop; @@ -172,7 +172,7 @@ vop_enable_vbi_output(int enable) *--------------------------------------------------------------------------*/ int -vop_set_configuration(VOPCONFIGURATIONBUFFER * config) +vop_set_configuration(VOPCONFIGURATIONBUFFER *config) { unsigned long vop_config = 0; unsigned long alpha, control2; @@ -309,7 +309,7 @@ vop_set_configuration(VOPCONFIGURATIONBUFFER * config) *--------------------------------------------------------------------------*/ int -vop_save_state(VOPSTATEBUFFER * save_buffer) +vop_save_state(VOPSTATEBUFFER *save_buffer) { if (!save_buffer) return CIM_STATUS_INVALIDPARAMS; @@ -327,7 +327,7 @@ vop_save_state(VOPSTATEBUFFER * save_buffer) *--------------------------------------------------------------------------*/ int -vop_restore_state(VOPSTATEBUFFER * restore_buffer) +vop_restore_state(VOPSTATEBUFFER *restore_buffer) { if (!restore_buffer) return CIM_STATUS_INVALIDPARAMS; @@ -353,7 +353,7 @@ vop_restore_state(VOPSTATEBUFFER * restore_buffer) *--------------------------------------------------------------------------*/ int -vop_get_current_mode(VOPCONFIGURATIONBUFFER * config) +vop_get_current_mode(VOPCONFIGURATIONBUFFER *config) { unsigned long vop_config = 0; unsigned long alpha; @@ -442,7 +442,7 @@ vop_get_current_mode(VOPCONFIGURATIONBUFFER * config) *--------------------------------------------------------------------------*/ int -vop_get_vbi_configuration(VOPVBIWINDOWBUFFER * buffer) +vop_get_vbi_configuration(VOPVBIWINDOWBUFFER *buffer) { unsigned long temp; unsigned long hstart, hstop; diff --git a/src/cimarron.c b/src/cimarron.c index c180b11..86036de 100644 --- a/src/cimarron.c +++ b/src/cimarron.c @@ -147,7 +147,6 @@ /* #define CIMARRON_EXCLUDE_CUSTOM_MACROS */ - /* ROUTINE DEFINITIONS */ /* All routines have a prototype, even those that are not included */ /* via #ifdefs. This prevents the user from having to include the */ @@ -188,8 +187,8 @@ unsigned char *cim_vg_ptr = (unsigned char *) 0; * to share the MSR code with the GX code */ #ifdef CIMARRON_MSR_HOOKS -void (*cim_rdmsr) (uint32_t, uint32_t*, uint32_t*); -void (*cim_wrmsr) (uint32_t, uint32_t, uint32_t); +void (*cim_rdmsr)(uint32_t, uint32_t *, uint32_t *); +void (*cim_wrmsr)(uint32_t, uint32_t, uint32_t); #endif /*----------------------------------------------------------------------*/ diff --git a/src/durango.c b/src/durango.c index d3f5a47..52da80e 100644 --- a/src/durango.c +++ b/src/durango.c @@ -211,8 +211,7 @@ extern int GeodeWriteMSR(uint32_t, uint32_t, uint32_t); extern int GeodeReadMSR(uint32_t, uint32_t *, uint32_t *); void -gfx_msr_asm_write(unsigned short reg, uint32_t addr, - uint32_t *hi, uint32_t *lo) +gfx_msr_asm_write(unsigned short reg, uint32_t addr, uint32_t *hi, uint32_t *lo) { static int msr_method = 0; @@ -228,8 +227,7 @@ gfx_msr_asm_write(unsigned short reg, uint32_t addr, } void -gfx_msr_asm_read(unsigned short reg, uint32_t addr, - uint32_t *hi, uint32_t *lo) +gfx_msr_asm_read(unsigned short reg, uint32_t addr, uint32_t *hi, uint32_t *lo) { static int msr_method = 0; diff --git a/src/geode.h b/src/geode.h index f8dca0b..33d49a7 100644 --- a/src/geode.h +++ b/src/geode.h @@ -224,9 +224,9 @@ typedef struct _geodeRec { /* Hooks */ - void (*PointerMoved) (ScrnInfoPtr pScrn, int x, int y); + void (*PointerMoved)(ScrnInfoPtr pScrn, int x, int y); CloseScreenProcPtr CloseScreen; - Bool (*CreateScreenResources) (ScreenPtr); + Bool (*CreateScreenResources)(ScreenPtr); /* ===== LX specific items ===== */ @@ -285,9 +285,9 @@ typedef struct _geodeRec { GFX_DISPLAYTIMING FBgfxdisplaytiming; /* Hooks */ - void (*WritePixmap) (ScrnInfoPtr pScrni, int x, int y, int w, int h, - unsigned char *src, int srcwidth, int rop, - unsigned int planemask, int trans, int bpp, int depth); + void (*WritePixmap)(ScrnInfoPtr pScrni, int x, int y, int w, int h, + unsigned char *src, int srcwidth, int rop, + unsigned int planemask, int trans, int bpp, int depth); /* Video information */ int video_x; @@ -361,7 +361,6 @@ int GeodeGetSizeFromFB(unsigned int *); int - GeodeQueryImageAttributes(ScrnInfoPtr, int id, unsigned short *w, unsigned short *h, int *pitches, int *offsets); @@ -380,7 +379,7 @@ int GeodeCalculatePitchBytes(unsigned int width, unsigned int bpp); void GXSetupChipsetFPtr(ScrnInfoPtr pScrn); /* geode_msr.c */ -int GeodeReadMSR(uint32_t addr, uint32_t *lo, uint32_t *hi); +int GeodeReadMSR(uint32_t addr, uint32_t * lo, uint32_t * hi); int GeodeWriteMSR(uint32_t addr, uint32_t lo, uint32_t hi); /* gx_cursor.c */ diff --git a/src/geode_ddc.c b/src/geode_ddc.c index 0a873c4..e6b685c 100644 --- a/src/geode_ddc.c +++ b/src/geode_ddc.c @@ -117,7 +117,7 @@ geode_ddc_getbits(I2CBusPtr b, int *scl, int *sda) } Bool -GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, const char *name) +GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr *ptr, const char *name) { I2CBusPtr bus; unsigned int ddciobase; @@ -150,7 +150,7 @@ GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, const char *name) if (!bus) return FALSE; - bus->BusName = (char *)name; + bus->BusName = (char *) name; bus->scrnIndex = pScrni->scrnIndex; bus->I2CGetBits = geode_ddc_getbits; diff --git a/src/geode_driver.c b/src/geode_driver.c index a8c9dee..e7bf9e0 100644 --- a/src/geode_driver.c +++ b/src/geode_driver.c @@ -423,7 +423,7 @@ AmdProbe(DriverPtr drv, int flags) GDevPtr *devSections = NULL; int *usedChips = NULL; int i; - void (*drvr_setup) (ScrnInfoPtr pScrni) = NULL; + void (*drvr_setup)(ScrnInfoPtr pScrni) = NULL; int CPUDetected; DEBUGMSG(1, (0, X_INFO, "AmdProbe: Probing for supported devices!\n")); diff --git a/src/geode_msr.c b/src/geode_msr.c index 4d9725e..2fbd425 100644 --- a/src/geode_msr.c +++ b/src/geode_msr.c @@ -69,7 +69,7 @@ _msr_open(void) #endif if (msrfd == -1) FatalError("Unable to open %s: %s\n", _PATH_MSRDEV, - strerror(errno)); + strerror(errno)); } return msrfd; @@ -85,8 +85,8 @@ GeodeReadMSR(uint32_t addr, uint32_t *lo, uint32_t *hi) req.addr = addr; if (ioctl(fd, RDMSR, &req) == -1) - FatalError("Unable to read MSR at address %0x06x: %s\n", addr, - strerror(errno)); + FatalError("Unable to read MSR at address %0x06x: %s\n", addr, + strerror(errno)); *hi = req.val >> 32; *lo = req.val & 0xffffffff; @@ -97,8 +97,8 @@ GeodeReadMSR(uint32_t addr, uint32_t *lo, uint32_t *hi) args.msr = addr; if (ioctl(fd, CPUCTL_RDMSR, &args) == -1) - FatalError("Unable to read MSR at address %0x06x: %s\n", addr, - strerror(errno)); + FatalError("Unable to read MSR at address %0x06x: %s\n", addr, + strerror(errno)); *hi = args.data >> 32; *lo = args.data & 0xffffffff; @@ -134,21 +134,21 @@ GeodeWriteMSR(uint32_t addr, uint32_t lo, uint32_t hi) int fd = _msr_open(); req.addr = addr; - req.val = (u_int64_t) hi << 32 | (u_int64_t)lo; + req.val = (u_int64_t) hi << 32 | (u_int64_t) lo; if (ioctl(fd, WRMSR, &req) == -1) FatalError("Unable to write MSR at address 0x%06x: %s\n", addr, - strerror(errno)); + strerror(errno)); #elif defined __FreeBSD__ cpuctl_msr_args_t args; int fd = _msr_open(); args.msr = addr; - args.data = (u_int64_t) hi << 32 | (u_int64_t)lo; + args.data = (u_int64_t) hi << 32 | (u_int64_t) lo; if (ioctl(fd, CPUCTL_WRMSR, &args) == -1) FatalError("Unable to write MSR at address 0x%06x: %s\n", addr, - strerror(errno)); + strerror(errno)); #else unsigned int data[2]; int fd = _msr_open(); diff --git a/src/gfx/disp_gu1.c b/src/gfx/disp_gu1.c index fa081eb..b8e5938 100644 --- a/src/gfx/disp_gu1.c +++ b/src/gfx/disp_gu1.c @@ -257,7 +257,7 @@ gfx_set_display_bpp(unsigned short bpp) *---------------------------------------------------------------------------- */ int -gu1_set_specified_mode(DISPLAYMODE * pMode, int bpp) +gu1_set_specified_mode(DISPLAYMODE *pMode, int bpp) { unsigned long unlock, value; unsigned long gcfg, tcfg, ocfg; diff --git a/src/gfx/disp_gu2.c b/src/gfx/disp_gu2.c index 8bd89e9..43f5e1f 100644 --- a/src/gfx/disp_gu2.c +++ b/src/gfx/disp_gu2.c @@ -135,7 +135,7 @@ gfx_set_display_bpp(unsigned short bpp) *---------------------------------------------------------------------------- */ int -gu2_set_specified_mode(DISPLAYMODE * pMode, int bpp) +gu2_set_specified_mode(DISPLAYMODE *pMode, int bpp) { unsigned long unlock, value; unsigned long gcfg, dcfg; @@ -1753,7 +1753,6 @@ gfx_mode_frequency_supported(int xres, int yres, int bpp, unsigned long bpp_flag = 0; gfx_mode_bpp_conversion_def(bpp) - for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) { if ((DisplayParams[index].hactive == (unsigned int) xres) && (DisplayParams[index].vactive == (unsigned int) yres) && @@ -1810,7 +1809,6 @@ gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, *hz = 60; gfx_mode_bpp_conversion_def(bpp) - /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */ /* Search the table for the closest frequency (16.16 format). */ min = 0x7fffffff; @@ -1877,7 +1875,6 @@ gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, *hz = 60; gfx_mode_bpp_conversion_def(bpp) - /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */ /* Search the table for the closest frequency (16.16 format). */ min = 0x7fffffff; @@ -1942,7 +1939,6 @@ gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz, *frequency = 0; gfx_mode_hz_conversion gfx_mode_bpp_conversion_def(bpp) - /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */ /* Search the table for the closest frequency (16.16 format). */ for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) { @@ -2002,7 +1998,6 @@ gfx_get_display_mode(int *xres, int *yres, int *bpp, int *hz) /* SET BPP FLAGS TO LIMIT MODE SELECTION */ gfx_mode_bpp_conversion_def(*bpp) - for (mode = 0; mode < NUM_RC_DISPLAY_MODES; mode++) { if ((DisplayParams[mode].hactive == (unsigned int) *xres) && (DisplayParams[mode].vactive == (unsigned int) *yres) && diff --git a/src/gfx/gfx_defs.h b/src/gfx/gfx_defs.h index 46815db..e7b952c 100644 --- a/src/gfx/gfx_defs.h +++ b/src/gfx/gfx_defs.h @@ -114,9 +114,9 @@ /* ACCESS TO MSRS */ void gfx_msr_asm_write(unsigned short msrReg, uint32_t msrAddr, - uint32_t *ptrHigh, uint32_t *ptrLow); + uint32_t * ptrHigh, uint32_t * ptrLow); void gfx_msr_asm_read(unsigned short msrReg, uint32_t msrAddr, - uint32_t *ptrHigh, uint32_t *ptrLow); + uint32_t * ptrHigh, uint32_t * ptrLow); #define MSR_READ( MBD_MSR_CAP, address, valueHigh_ptr, valueLow_ptr ) \ gfx_msr_asm_read( ((unsigned short)(MBD_MSR_CAP)), address, \ diff --git a/src/gfx/gfx_msr.c b/src/gfx/gfx_msr.c index a779971..b1a8a2f 100644 --- a/src/gfx/gfx_msr.c +++ b/src/gfx/gfx_msr.c @@ -72,7 +72,7 @@ gfx_msr_init() *---------------------------------------------------------------------------- */ DEV_STATUS -gfx_id_msr_device(MSR * pDev, unsigned long address) +gfx_id_msr_device(MSR *pDev, unsigned long address) { DEV_STATUS ret_value = NOT_KNOWN; @@ -123,7 +123,7 @@ gfx_get_glink_id_at_address(unsigned int *device, unsigned long address) *---------------------------------------------------------------------------- */ DEV_STATUS -gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) +gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD *msrValue) { DEV_STATUS ret_value = NOT_KNOWN; @@ -140,7 +140,7 @@ gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) *---------------------------------------------------------------------------- */ DEV_STATUS -gfx_msr_write(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) +gfx_msr_write(unsigned int device, unsigned int msrRegister, Q_WORD *msrValue) { DEV_STATUS ret_value = NOT_KNOWN; diff --git a/src/gfx/gfx_vid.c b/src/gfx/gfx_vid.c index c4215e8..a396538 100644 --- a/src/gfx/gfx_vid.c +++ b/src/gfx/gfx_vid.c @@ -1768,7 +1768,7 @@ gfx_get_video_request(short *x, short *y) *--------------------------------------------------------------------------- */ int -gfx_get_video_source(VideoSourceType * source) +gfx_get_video_source(VideoSourceType *source) { int status = GFX_STATUS_UNSUPPORTED; @@ -1784,7 +1784,7 @@ gfx_get_video_source(VideoSourceType * source) *--------------------------------------------------------------------------- */ int -gfx_get_vbi_source(VbiSourceType * source) +gfx_get_vbi_source(VbiSourceType *source) { int status = GFX_STATUS_UNSUPPORTED; diff --git a/src/gfx/msr_rdcl.c b/src/gfx/msr_rdcl.c index 1a01be7..a3637d5 100644 --- a/src/gfx/msr_rdcl.c +++ b/src/gfx/msr_rdcl.c @@ -381,7 +381,7 @@ redcloud_init_msr_devices(MSR aDev[], unsigned int array_size) *------------------------------------------------------------------ */ DEV_STATUS -redcloud_find_msr_device(MSR * pDev) +redcloud_find_msr_device(MSR *pDev) { unsigned int i; @@ -454,10 +454,10 @@ redcloud_find_msr_device(MSR * pDev) */ #if GFX_MSR_DYNAMIC DEV_STATUS -redcloud_id_msr_device(MSR * pDev, unsigned long address) +redcloud_id_msr_device(MSR *pDev, unsigned long address) #else DEV_STATUS -gfx_id_msr_device(MSR * pDev, unsigned long address) +gfx_id_msr_device(MSR *pDev, unsigned long address) #endif { Q_WORD msrValue; @@ -579,10 +579,10 @@ gfx_get_glink_id_at_address(unsigned int *device, unsigned long address) #if GFX_MSR_DYNAMIC DEV_STATUS redcloud_msr_read(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue) + Q_WORD *msrValue) #else DEV_STATUS -gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) +gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD *msrValue) #endif { if (device < NUM_DEVS) { @@ -616,10 +616,10 @@ gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) #if GFX_MSR_DYNAMIC DEV_STATUS redcloud_msr_write(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue) + Q_WORD *msrValue) #else DEV_STATUS -gfx_msr_write(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) +gfx_msr_write(unsigned int device, unsigned int msrRegister, Q_WORD *msrValue) #endif { if (device < NUM_DEVS) { diff --git a/src/gfx/tv_fs450.c b/src/gfx/tv_fs450.c index 99194b2..c2ac91d 100644 --- a/src/gfx/tv_fs450.c +++ b/src/gfx/tv_fs450.c @@ -404,91 +404,91 @@ static const struct { } tvsetup = { /* ntsc, pal, ntsc-eij, pal-m, pal-n */ { - 0x1f7cf021, 0xcb8a092a, 0x1f7cf021, 0xe3efe621, 0xcb8a092a}, - /* chroma_freq */ + 0x1f7cf021, 0xcb8a092a, 0x1f7cf021, 0xe3efe621, 0xcb8a092a}, + /* chroma_freq */ { - 0, 0, 0, 0, 0}, - /* chroma_phase */ + 0, 0, 0, 0, 0}, + /* chroma_phase */ { - 2, 0, 2, 0, 0}, - /* cphase_rst */ + 2, 0, 2, 0, 0}, + /* cphase_rst */ { - 54, 43, 54, 43, 43}, - /* color */ + 54, 43, 54, 43, 43}, + /* color */ { - 0, 31, 0, 29, 29}, - /* cr_burst_level */ + 0, 31, 0, 29, 29}, + /* cr_burst_level */ { - 59, 44, 59, 41, 41}, - /* cb_burst_level */ + 59, 44, 59, 41, 41}, + /* cb_burst_level */ { - 0, 1, 0, 0, 1}, - /* sys625_50 */ + 0, 1, 0, 0, 1}, + /* sys625_50 */ { - 0, 1, 0, 0, 0}, - /* vsync5 */ + 0, 1, 0, 0, 0}, + /* vsync5 */ { - 0, 1, 0, 1, 1}, - /* pal_mode */ + 0, 1, 0, 1, 1}, + /* pal_mode */ { - 0x7a, 0x7a, 0x7a, 0x7a, 0x7a}, - /* hsync_width */ + 0x7a, 0x7a, 0x7a, 0x7a, 0x7a}, + /* hsync_width */ { - 0x40, 0x3c, 0x40, 0x40, 0x3c}, - /* burst_width */ + 0x40, 0x3c, 0x40, 0x40, 0x3c}, + /* burst_width */ { - 0x80, 0x9a, 0x80, 0x80, 0x9a}, - /* back_porch */ + 0x80, 0x9a, 0x80, 0x80, 0x9a}, + /* back_porch */ { - 0x24, 0x1e, 0x24, 0x24, 0x1e}, - /* front_porch */ + 0x24, 0x1e, 0x24, 0x24, 0x1e}, + /* front_porch */ { - 0x19, 0x1a, 0x19, 0x12, 0x1a}, - /* breeze_way */ + 0x19, 0x1a, 0x19, 0x12, 0x1a}, + /* breeze_way */ { - 0xb4, 0xb4, 0xb4, 0xb4, 0xb4}, - /* active_line */ + 0xb4, 0xb4, 0xb4, 0xb4, 0xb4}, + /* active_line */ { - 240, 251, 240, 240, 240}, - /* blank_level */ + 240, 251, 240, 240, 240}, + /* blank_level */ { - 240, 251, 240, 240, 240}, - /* vbi_blank_level */ + 240, 251, 240, 240, 240}, + /* vbi_blank_level */ { - 284, 252, 240, 252, 252}, - /* black_level */ + 284, 252, 240, 252, 252}, + /* black_level */ { - 823, 821, 823, 821, 821}, - /* white_level */ + 823, 821, 823, 821, 821}, + /* white_level */ { - 60, 48, 60, 48, 48}, - /* hamp_offset */ + 60, 48, 60, 48, 48}, + /* hamp_offset */ { - 0x08, 0x08, 0x08, 0x08, 0x08}, - /* sync_level */ + 0x08, 0x08, 0x08, 0x08, 0x08}, + /* sync_level */ { - 525, 625, 525, 525, 625}, - /* tv_lines */ + 525, 625, 525, 525, 625}, + /* tv_lines */ { - 858, 864, 858, 858, 864}, - /* tv_width */ + 858, 864, 858, 858, 864}, + /* tv_width */ { - 487, 576, 487, 487, 576}, - /* tv_active_lines */ + 487, 576, 487, 487, 576}, + /* tv_active_lines */ { - 800, 800, 800, 800, 800}, - /* tv_active_width */ + 800, 800, 800, 800, 800}, + /* tv_active_width */ { - 0x1a, 0x1d, 0x1a, 0x1d, 0x1d}, - /* notch filter enabled */ + 0x1a, 0x1d, 0x1a, 0x1d, 0x1d}, + /* notch filter enabled */ { - 0x0000, 0x0100, 0x0000, 0x0000, 0x0100}, - /* houston cr pal */ + 0x0000, 0x0100, 0x0000, 0x0000, 0x0100}, + /* houston cr pal */ { - 0x7e48, 0xf580, 0x7e48, 0x7e48, 0xf580}, - /* houston ncodl */ + 0x7e48, 0xf580, 0x7e48, 0x7e48, 0xf580}, + /* houston ncodl */ { - 0x001b, 0x0020, 0x001b, 0x001b, 0x0020} + 0x001b, 0x0020, 0x001b, 0x001b, 0x0020} /* houston ncodh */ }; @@ -818,7 +818,6 @@ FS450_init(void) int err; TRACE(("FS450_Init()\n")) - err = houston_init(); if (err) return err; @@ -1650,7 +1649,7 @@ gfx_set_tv_cc_data(unsigned char data1, unsigned char data2) /*==========================================================================*/ int -FS450_ReadRegister(S_REG_INFO * p_reg) +FS450_ReadRegister(S_REG_INFO *p_reg) { unsigned long tmp; @@ -1682,7 +1681,7 @@ FS450_ReadRegister(S_REG_INFO * p_reg) } int -FS450_WriteRegister(S_REG_INFO * p_reg) +FS450_WriteRegister(S_REG_INFO *p_reg) { if (PLAL_WriteRegister(p_reg)) return 0; @@ -1709,7 +1708,6 @@ houston_init(void) unsigned long write, read; TRACE(("houston_init()\n")) - /*Before we begin, we must enable power to the TFT */ read = READ_VID32(CS5530_DISPLAY_CONFIG); read |= CS5530_DCFG_FP_PWR_EN | CS5530_DCFG_FP_DATA_EN; @@ -1762,7 +1760,6 @@ config_init(void) int err; TRACE(("config_init()\n")) - err = houston_init(); if (err) return err; @@ -1795,15 +1792,22 @@ static const struct { int tvsetup_index; } g_tv_standards[] = { { - GFX_TV_STANDARD_NTSC_M, 0}, { - GFX_TV_STANDARD_NTSC_M_J, 2}, { - GFX_TV_STANDARD_PAL_B, 1}, { - GFX_TV_STANDARD_PAL_D, 1}, { - GFX_TV_STANDARD_PAL_H, 1}, { - GFX_TV_STANDARD_PAL_I, 1}, { - GFX_TV_STANDARD_PAL_M, 3}, { - GFX_TV_STANDARD_PAL_N, 4}, { -GFX_TV_STANDARD_PAL_G, 1},}; + GFX_TV_STANDARD_NTSC_M, 0}, { + GFX_TV_STANDARD_NTSC_M_J, 2}, { + GFX_TV_STANDARD_PAL_B, + 1}, { + GFX_TV_STANDARD_PAL_D, + 1}, { + GFX_TV_STANDARD_PAL_H, + 1}, { + GFX_TV_STANDARD_PAL_I, + 1}, + { + GFX_TV_STANDARD_PAL_M, 3}, { + GFX_TV_STANDARD_PAL_N, 4}, { + GFX_TV_STANDARD_PAL_G, + 1}, +}; static int map_tvstd_to_index(unsigned long tv_std) @@ -1904,11 +1908,18 @@ config_vga_mode(unsigned long vga_mode) int h_total; } vgaparams[] = { { - GFX_VGA_MODE_640X480, 640, 480, 1056}, { - GFX_VGA_MODE_720X487, 720, 487, 1056}, { - GFX_VGA_MODE_720X576, 720, 576, 1056}, { - GFX_VGA_MODE_800X600, 800, 600, 1056}, { - GFX_VGA_MODE_1024X768, 1024, 768, 1344},}; + GFX_VGA_MODE_640X480, 640, 480, 1056}, { + GFX_VGA_MODE_720X487, 720, 487, + 1056}, { + GFX_VGA_MODE_720X576, + 720, 576, 1056}, { + GFX_VGA_MODE_800X600, + 800, + 600, + 1056}, + { + GFX_VGA_MODE_1024X768, 1024, 768, 1344}, + }; unsigned long cr, misc, byp; unsigned int i; @@ -2270,11 +2281,9 @@ config_overscan_xy(unsigned long tv_std, base_v_total = scantable[vga_index].v_total[k]; range = fsmax(base_v_total - v_total_min, v_total_max - base_v_total); TRACE(("v_total range = %d\n", range)) - /*map +/-1000 overscan y into +/-range. */ v_offset = (int) ((((float) overscan_y * range) / 1000.f) + .5f); TRACE(("v_offset = %d\n", v_offset)) - /*range limit v_total. */ g_specs.v_total = range_limit(base_v_total + v_offset, v_total_min, v_total_max); @@ -2283,7 +2292,6 @@ config_overscan_xy(unsigned long tv_std, v_offset = (g_specs.v_total - v_total_min + (v_step / 2)) / v_step; g_specs.v_total = v_total_min + v_offset * v_step; TRACE(("desired v_total=%d\n", g_specs.v_total)) - /*vertical positioning (vsync setup). */ get_ffolat_ivo(vga_mode, tv_std, v_offset, &ffolat, &ivo); houston_WriteReg(HOUSTON_IVO, ivo, 2); @@ -2314,7 +2322,6 @@ config_overscan_xy(unsigned long tv_std, g_specs.v_sync = g_specs.v_total - 10; } TRACE(("v_total=%d v_sync=%d\n", g_specs.v_total, g_specs.v_sync)) - /* FFOLAT. */ houston_WriteReg(HOUSTON_FFO_LAT, ffolat, 2); @@ -2344,14 +2351,12 @@ config_overscan_xy(unsigned long tv_std, (int) hscale_min, (int) ((hscale_min - (int) hscale_min) * 1000), (int) hscale_max, (int) ((hscale_max - (int) hscale_max) * 1000))) - /* map overscan_x into min to max. */ hscale = hscale_min + ((overscan_x + 1000.0f) / 2000.0f) * (hscale_max - hscale_min); TRACE(("hscale = %u.%u\n", (int) hscale, (int) ((hscale - (int) hscale) * 1000))) - /* determine hsc where hscale = (1 + hsc/128) */ if (hscale >= 1.0f) hsc = (int) (128.f * (hscale - 1.0f) + .5f); @@ -2368,7 +2373,6 @@ config_overscan_xy(unsigned long tv_std, hscale = 1.0f + (hsc / 128.0f); TRACE(("recalculated hscale = %u.%u\n", (int) hscale, (int) ((hscale - (int) hscale) * 1000))) - /* horizontal offset. */ /* place hsync 40 before halfway from vga_width to htotal */ /* but not less than vga_width + 10 */ @@ -2378,7 +2382,6 @@ config_overscan_xy(unsigned long tv_std, /* also, make it even */ g_specs.h_sync &= ~1; TRACE(("hsync = %u\n", g_specs.h_sync)) - /* iho range is 0 to iho_max. */ /* iho_max is 2 * iho_center. */ /* iho_center is pre_pixels - (tvwidth / hscale - vga pixels) / 2. */ @@ -2793,55 +2796,55 @@ config_macrovision(unsigned long tv_std, unsigned int trigger_bits) /* off. only 2-line 4-line off. on. */ /* CS. CS. */ { - 0x00, 0x36, 0x3e, 0x3e, 0x00, 0x3e}, /*n0 */ + 0x00, 0x36, 0x3e, 0x3e, 0x00, 0x3e}, /*n0 */ { - 0x1d, 0x1d, 0x1d, 0x17, 0x1a, 0x1a}, /*n1 */ + 0x1d, 0x1d, 0x1d, 0x17, 0x1a, 0x1a}, /*n1 */ { - 0x11, 0x11, 0x11, 0x15, 0x22, 0x22}, /*n2 */ + 0x11, 0x11, 0x11, 0x15, 0x22, 0x22}, /*n2 */ { - 0x25, 0x25, 0x25, 0x21, 0x2a, 0x2a}, /*n3 */ + 0x25, 0x25, 0x25, 0x21, 0x2a, 0x2a}, /*n3 */ { - 0x11, 0x11, 0x11, 0x15, 0x22, 0x22}, /*n4 */ + 0x11, 0x11, 0x11, 0x15, 0x22, 0x22}, /*n4 */ { - 0x01, 0x01, 0x01, 0x05, 0x05, 0x05}, /*n5 */ + 0x01, 0x01, 0x01, 0x05, 0x05, 0x05}, /*n5 */ { - 0x07, 0x07, 0x07, 0x05, 0x02, 0x02}, /*n6 */ + 0x07, 0x07, 0x07, 0x05, 0x02, 0x02}, /*n6 */ { - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00}, /*n7 */ + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00}, /*n7 */ { - 0x1b, 0x1b, 0x1b, 0x1b, 0x1c, 0x1c}, /*n8 */ + 0x1b, 0x1b, 0x1b, 0x1b, 0x1c, 0x1c}, /*n8 */ { - 0x1b, 0x1b, 0x1b, 0x1b, 0x3d, 0x3d}, /*n9 */ + 0x1b, 0x1b, 0x1b, 0x1b, 0x3d, 0x3d}, /*n9 */ { - 0x24, 0x24, 0x24, 0x24, 0x14, 0x14}, /*n10 */ + 0x24, 0x24, 0x24, 0x24, 0x14, 0x14}, /*n10 */ { - 0x780f, 0x780f, 0x780f, 0x780f, 0x7e07, 0x7e07}, /*n11 */ + 0x780f, 0x780f, 0x780f, 0x780f, 0x7e07, 0x7e07}, /*n11 */ { - 0x0000, 0x0000, 0x0000, 0x0000, 0x5402, 0x5402}, /*n12 */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x5402, 0x5402}, /*n12 */ { - 0x0f, 0x0f, 0x0f, 0x0f, 0xfe, 0xfe}, /*n13 */ + 0x0f, 0x0f, 0x0f, 0x0f, 0xfe, 0xfe}, /*n13 */ { - 0x0f, 0x0f, 0x0f, 0x0f, 0x7e, 0x7e}, /*n14 */ + 0x0f, 0x0f, 0x0f, 0x0f, 0x7e, 0x7e}, /*n14 */ { - 0x60, 0x60, 0x60, 0x60, 0x60, 0x60}, /*n15 */ + 0x60, 0x60, 0x60, 0x60, 0x60, 0x60}, /*n15 */ { - 0x01, 0x01, 0x01, 0x01, 0x00, 0x00}, /*n16 */ + 0x01, 0x01, 0x01, 0x01, 0x00, 0x00}, /*n16 */ { - 0x0a, 0x0a, 0x0a, 0x0a, 0x08, 0x08}, /*n17 */ + 0x0a, 0x0a, 0x0a, 0x0a, 0x08, 0x08}, /*n17 */ { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*n18 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*n18 */ { - 0x05, 0x05, 0x05, 0x05, 0x04, 0x04}, /*n19 */ + 0x05, 0x05, 0x05, 0x05, 0x04, 0x04}, /*n19 */ { - 0x04, 0x04, 0x04, 0x04, 0x07, 0x07}, /*n20 */ + 0x04, 0x04, 0x04, 0x04, 0x07, 0x07}, /*n20 */ { - 0x03ff, 0x03ff, 0x03ff, 0x03ff, 0x0155, 0x0155}, /*n21 */ + 0x03ff, 0x03ff, 0x03ff, 0x03ff, 0x0155, 0x0155}, /*n21 */ { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*n22 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*n22 */ { - 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3}, /*agc_pulse_level */ + 0xa3, 0xa3, 0xa3, 0xa3, 0xa3, 0xa3}, /*agc_pulse_level */ { - 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8}, /*bp_pulse_level */ + 0xc8, 0xc8, 0xc8, 0xc8, 0xc8, 0xc8}, /*bp_pulse_level */ }; int nMode; @@ -3098,7 +3101,7 @@ WriteGx(unsigned long inRegAddr, unsigned long inData) /*==========================================================================*/ static int -PLAL_ReadRegister(S_REG_INFO * p_reg) +PLAL_ReadRegister(S_REG_INFO *p_reg) { if (!p_reg) return 0; @@ -3113,7 +3116,7 @@ PLAL_ReadRegister(S_REG_INFO * p_reg) } static int -PLAL_WriteRegister(const S_REG_INFO * p_reg) +PLAL_WriteRegister(const S_REG_INFO *p_reg) { if (!p_reg) return 0; @@ -3199,7 +3202,7 @@ PLAL_PrepForTVout(void) } static int -PLAL_SetTVTimingRegisters(const S_TIMING_SPECS * p_specs) +PLAL_SetTVTimingRegisters(const S_TIMING_SPECS *p_specs) { unsigned long reg; diff --git a/src/gfx/vga_gu1.c b/src/gfx/vga_gu1.c index 8cbfe4f..5240096 100644 --- a/src/gfx/vga_gu1.c +++ b/src/gfx/vga_gu1.c @@ -394,7 +394,7 @@ gfx_vga_set_graphics_bits(void) *---------------------------------------------------------------------------- */ int -gfx_vga_mode(gfx_vga_struct * vga, int xres, int yres, int bpp, int hz) +gfx_vga_mode(gfx_vga_struct *vga, int xres, int yres, int bpp, int hz) { unsigned int i; unsigned short pitch; @@ -447,7 +447,7 @@ gfx_vga_mode(gfx_vga_struct * vga, int xres, int yres, int bpp, int hz) *---------------------------------------------------------------------------- */ int -gfx_vga_pitch(gfx_vga_struct * vga, unsigned short pitch) +gfx_vga_pitch(gfx_vga_struct *vga, unsigned short pitch) { pitch >>= 3; vga->stdCRTCregs[0x13] = (unsigned char) pitch; @@ -464,7 +464,7 @@ gfx_vga_pitch(gfx_vga_struct * vga, unsigned short pitch) *---------------------------------------------------------------------------- */ int -gfx_vga_save(gfx_vga_struct * vga, int flags) +gfx_vga_save(gfx_vga_struct *vga, int flags) { int i; unsigned short crtcindex, crtcdata; @@ -540,7 +540,7 @@ gfx_vga_clear_extended(void) *---------------------------------------------------------------------------- */ int -gfx_vga_restore(gfx_vga_struct * vga, int flags) +gfx_vga_restore(gfx_vga_struct *vga, int flags) { int i; unsigned short crtcindex, crtcdata; diff --git a/src/gfx/vid_1200.c b/src/gfx/vid_1200.c index 3e6c023..d5656c0 100644 --- a/src/gfx/vid_1200.c +++ b/src/gfx/vid_1200.c @@ -2417,10 +2417,10 @@ gfx_get_video_request(short *x, short *y) */ #if GFX_VIDEO_DYNAMIC int -sc1200_get_video_source(VideoSourceType * source) +sc1200_get_video_source(VideoSourceType *source) #else int -gfx_get_video_source(VideoSourceType * source) +gfx_get_video_source(VideoSourceType *source) #endif { switch (READ_VID32(SC1200_VIDEO_DISPLAY_MODE) & SC1200_VIDEO_SOURCE_MASK) { @@ -2444,10 +2444,10 @@ gfx_get_video_source(VideoSourceType * source) */ #if GFX_VIDEO_DYNAMIC int -sc1200_get_vbi_source(VbiSourceType * source) +sc1200_get_vbi_source(VbiSourceType *source) #else int -gfx_get_vbi_source(VbiSourceType * source) +gfx_get_vbi_source(VbiSourceType *source) #endif { switch (READ_VID32(SC1200_VIDEO_DISPLAY_MODE) & SC1200_VBI_SOURCE_MASK) { diff --git a/src/gx_driver.c b/src/gx_driver.c index b34d4c6..dd78863 100644 --- a/src/gx_driver.c +++ b/src/gx_driver.c @@ -284,11 +284,14 @@ GXMapMem(ScrnInfoPtr pScrni) #else { int fd = open("/dev/mem", O_RDWR); + if (fd < 0) { xf86DrvMsg(index, X_ERROR, "Failed to open /dev/mem: %m\n"); return FALSE; } - XpressROMPtr = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0xF0000); + XpressROMPtr = + mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, + 0xF0000); close(fd); } #endif @@ -486,7 +489,8 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) } if ((s = xf86GetOptValString(GeodeOptions, GX_OPTION_OSM_IMG_BUFS))) - xf86DrvMsg(pScrni->scrnIndex, X_WARNING, "XAA not present so OSMImageBuffers is ignored"); + xf86DrvMsg(pScrni->scrnIndex, X_WARNING, + "XAA not present so OSMImageBuffers is ignored"); xf86GetOptValInteger(GeodeOptions, GX_OPTION_OSM_CLR_BUFS, (int *) &(pGeode->exaBfrSz)); @@ -1013,7 +1017,7 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) static void GXLoadPalette(ScrnInfoPtr pScrni, - int numColors, int *indizes, LOCO * colors, VisualPtr pVisual) + int numColors, int *indizes, LOCO *colors, VisualPtr pVisual) { int i, index, color; diff --git a/src/gx_exa.c b/src/gx_exa.c index 1328802..ba1a112 100644 --- a/src/gx_exa.c +++ b/src/gx_exa.c @@ -438,7 +438,9 @@ amd_gx_exa_PrepareComposite(int op, PicturePtr pSrc, PicturePtr pMsk, int srcPitch; amd_gx_exa_fmt_t *sfp, *dfp; GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pxDst); - if (!pxSrc || !pSrc->pDrawable) return FALSE; + + if (!pxSrc || !pSrc->pDrawable) + return FALSE; //ErrorF("amd_gx_exa_PrepareComposite()\n"); diff --git a/src/gx_randr.c b/src/gx_randr.c index 48f7ce4..d72b395 100644 --- a/src/gx_randr.c +++ b/src/gx_randr.c @@ -75,7 +75,7 @@ GXRandRModeRefresh(DisplayModePtr mode) } static Bool -GXRandRGetInfo(ScreenPtr pScreen, Rotation * rotations) +GXRandRGetInfo(ScreenPtr pScreen, Rotation *rotations) { RRScreenSizePtr pSize; ScrnInfoPtr pScrni = XF86SCRNINFO(pScreen); @@ -287,15 +287,15 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, } /* FIXME: we don't have a new video ABI yet */ - if (pScreen == miPointerGetScreen(inputInfo.pointer)) - { + if (pScreen == miPointerGetScreen(inputInfo.pointer)) { px = (px >= pScreen->width ? (pScreen->width - 1) : px); py = (py >= pScreen->height ? (pScreen->height - 1) : py); xf86SetViewport(pScreen, px, py); /* FIXME: we don't have a new video ABI yet */ - (*pScreen->SetCursorPosition) (inputInfo.pointer, pScreen, px, py, FALSE); + (*pScreen->SetCursorPosition) (inputInfo.pointer, pScreen, px, py, + FALSE); } return TRUE; diff --git a/src/gx_rotate.c b/src/gx_rotate.c index c849792..435b9f0 100644 --- a/src/gx_rotate.c +++ b/src/gx_rotate.c @@ -152,8 +152,8 @@ GXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode) pScrni->pScreen->rootDepth, pScrni->bitsPerPixel, PixmapBytePad(pScrni->displayWidth, - pScrni-> - pScreen->rootDepth), + pScrni->pScreen-> + rootDepth), (pointer) (pGeode->FBBase + pScrni->fbOffset)); diff --git a/src/gx_vga.c b/src/gx_vga.c index 9482a3f..dc570a8 100644 --- a/src/gx_vga.c +++ b/src/gx_vga.c @@ -208,7 +208,7 @@ gu2_vga_seq_reset(int reset) *---------------------------------------------------------------------------- */ int -gu2_vga_save(gfx_vga_struct * vga, int flags) +gu2_vga_save(gfx_vga_struct *vga, int flags) { int i; unsigned short crtcindex, crtcdata; @@ -342,7 +342,7 @@ gu2_vga_extcrtc(char offset, int reset) *---------------------------------------------------------------------------- */ int -gu2_vga_restore(gfx_vga_struct * vga, int flags) +gu2_vga_restore(gfx_vga_struct *vga, int flags) { int i; unsigned short crtcindex, crtcdata; diff --git a/src/gx_video.c b/src/gx_video.c index 4cc2836..1813fc4 100644 --- a/src/gx_video.c +++ b/src/gx_video.c @@ -222,11 +222,11 @@ static XF86VideoFormatRec Formats[NUM_FORMATS] = { static XF86AttributeRec Attributes[NUM_ATTRIBUTES] = { #if DBUF - {XvSettable | XvGettable, 0, 1, (char *)"XV_DOUBLE_BUFFER"}, + {XvSettable | XvGettable, 0, 1, (char *) "XV_DOUBLE_BUFFER"}, #endif - {XvSettable | XvGettable, 0, (1 << 24) - 1, (char *)"XV_COLORKEY"}, - {XvSettable | XvGettable, 0, 1, (char *)"XV_FILTER"}, - {XvSettable | XvGettable, 0, 1, (char *)"XV_COLORKEYMODE"} + {XvSettable | XvGettable, 0, (1 << 24) - 1, (char *) "XV_COLORKEY"}, + {XvSettable | XvGettable, 0, 1, (char *) "XV_FILTER"}, + {XvSettable | XvGettable, 0, 1, (char *) "XV_COLORKEYMODE"} }; #define NUM_IMAGES 8 @@ -279,7 +279,7 @@ typedef struct { *---------------------------------------------------------------------------- */ static INT32 -GXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv) +GXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec *pPriv) { int red, green, blue; unsigned long key; @@ -677,7 +677,7 @@ GXCopyData422(unsigned char *src, unsigned char *dst, #ifdef XF86EXA static void -GXVideoSave(ScreenPtr pScreen, ExaOffscreenArea * area) +GXVideoSave(ScreenPtr pScreen, ExaOffscreenArea *area) { ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen); GeodePortPrivRec *pPriv = GET_PORT_PRIVATE(pScrni); @@ -1181,7 +1181,8 @@ GXPutImage(ScrnInfoPtr pScrni, } GXDisplayVideo(pScrni, id, global_offset, width, height, dstPitch, - Bx1, By1, Bx2, By2, &global_dstBox, src_w, src_h, drw_w, drw_h); + Bx1, By1, Bx2, By2, &global_dstBox, src_w, src_h, drw_w, + drw_h); } #endif switch (id) { @@ -1215,7 +1216,8 @@ GXPutImage(ScrnInfoPtr pScrni, } GXDisplayVideo(pScrni, id, global_offset, width, height, dstPitch, - Bx1, By1, Bx2, By2, &global_dstBox, src_w, src_h, drw_w, drw_h); + Bx1, By1, Bx2, By2, &global_dstBox, src_w, src_h, drw_w, + drw_h); #endif #if XV_PROFILE diff --git a/src/lx_display.c b/src/lx_display.c index 005e5b2..5041845 100644 --- a/src/lx_display.c +++ b/src/lx_display.c @@ -78,7 +78,7 @@ lx_disable_dac_power(ScrnInfoPtr pScrni, int option) } static void -lx_set_panel_mode(VG_DISPLAY_MODE * mode, DisplayModePtr pMode) +lx_set_panel_mode(VG_DISPLAY_MODE *mode, DisplayModePtr pMode) { int hsync, vsync; @@ -119,7 +119,7 @@ lx_set_panel_mode(VG_DISPLAY_MODE * mode, DisplayModePtr pMode) } static void -lx_set_crt_mode(VG_DISPLAY_MODE * mode, DisplayModePtr pMode) +lx_set_crt_mode(VG_DISPLAY_MODE *mode, DisplayModePtr pMode) { int hsync, vsync; diff --git a/src/lx_driver.c b/src/lx_driver.c index 2c82f4a..fca019e 100644 --- a/src/lx_driver.c +++ b/src/lx_driver.c @@ -265,11 +265,14 @@ LXMapMem(ScrnInfoPtr pScrni) #else { int fd = open("/dev/mem", O_RDWR); + if (fd < 0) { xf86DrvMsg(index, X_ERROR, "Failed to open /dev/mem: %m\n"); return FALSE; } - XpressROMPtr = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0xF0000); + XpressROMPtr = + mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, + 0xF0000); close(fd); } #endif @@ -495,7 +498,8 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) pGeode->Output = OUTPUT_PANEL | OUTPUT_DCON; } else if (pGeode->Output & OUTPUT_PANEL) { - const char *pmode = xf86GetOptValString(GeodeOptions, LX_OPTION_PANEL_MODE); + const char *pmode = + xf86GetOptValString(GeodeOptions, LX_OPTION_PANEL_MODE); if (pmode != NULL) pGeode->panelMode = LXGetManualPanelMode(pmode); @@ -845,7 +849,7 @@ LXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) static void LXLoadPalette(ScrnInfoPtr pScrni, - int numColors, int *indizes, LOCO * colors, VisualPtr pVisual) + int numColors, int *indizes, LOCO *colors, VisualPtr pVisual) { int i, index, color; diff --git a/src/lx_exa.c b/src/lx_exa.c index fb26bee..5e19b9a 100644 --- a/src/lx_exa.c +++ b/src/lx_exa.c @@ -68,17 +68,40 @@ static const struct exa_format_t { int alphabits; } lx_exa_formats[] = { { - PICT_a8r8g8b8, 32, CIMGP_SOURCE_FMT_8_8_8_8, 8}, { - PICT_x8r8g8b8, 32, CIMGP_SOURCE_FMT_8_8_8_8, 0}, { - PICT_x8b8g8r8, 32, CIMGP_SOURCE_FMT_32BPP_BGR, 0}, { - PICT_a4r4g4b4, 16, CIMGP_SOURCE_FMT_4_4_4_4, 4}, { - PICT_a1r5g5b5, 16, CIMGP_SOURCE_FMT_1_5_5_5, 1}, { - PICT_r5g6b5, 16, CIMGP_SOURCE_FMT_0_5_6_5, 0}, { - PICT_b5g6r5, 16, CIMGP_SOURCE_FMT_16BPP_BGR, 0}, { - PICT_x1r5g5b5, 16, CIMGP_SOURCE_FMT_1_5_5_5, 0}, { - PICT_x1b5g5r5, 16, CIMGP_SOURCE_FMT_15BPP_BGR, 0}, { - PICT_r3g3b2, 8, CIMGP_SOURCE_FMT_3_3_2, 0}, { - PICT_a8, 32, CIMGP_SOURCE_FMT_8_8_8_8, 8} + PICT_a8r8g8b8, 32, CIMGP_SOURCE_FMT_8_8_8_8, 8}, { + PICT_x8r8g8b8, 32, + CIMGP_SOURCE_FMT_8_8_8_8, + 0}, { + PICT_x8b8g8r8, 32, + CIMGP_SOURCE_FMT_32BPP_BGR, + 0}, { + PICT_a4r4g4b4, + 16, + CIMGP_SOURCE_FMT_4_4_4_4, + 4}, { + PICT_a1r5g5b5, + 16, + CIMGP_SOURCE_FMT_1_5_5_5, + 1}, { + PICT_r5g6b5, + 16, + CIMGP_SOURCE_FMT_0_5_6_5, + 0}, { + PICT_b5g6r5, + 16, + CIMGP_SOURCE_FMT_16BPP_BGR, + 0}, + { + PICT_x1r5g5b5, 16, CIMGP_SOURCE_FMT_1_5_5_5, 0}, { + PICT_x1b5g5r5, 16, + CIMGP_SOURCE_FMT_15BPP_BGR, + 0}, { + PICT_r3g3b2, 8, + CIMGP_SOURCE_FMT_3_3_2, + 0}, { + PICT_a8, 32, + CIMGP_SOURCE_FMT_8_8_8_8, + 8} }; /* This is a chunk of memory we use for scratch space */ @@ -409,56 +432,74 @@ struct blend_ops_t { } lx_alpha_ops[] = { /* PictOpClear */ { - CIMGP_ALPHA_TIMES_A, CIMGP_CONSTANT_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { - }, - /* PictOpSrc */ + CIMGP_ALPHA_TIMES_A, CIMGP_CONSTANT_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { + }, + /* PictOpSrc */ { - CIMGP_ALPHA_TIMES_A, CIMGP_ALPHA_EQUALS_ONE, CIMGP_CHANNEL_A_SOURCE}, { - }, - /* PictOpDst */ + CIMGP_ALPHA_TIMES_A, CIMGP_ALPHA_EQUALS_ONE, CIMGP_CHANNEL_A_SOURCE}, { + }, + /* PictOpDst */ { - CIMGP_ALPHA_TIMES_A, CIMGP_ALPHA_EQUALS_ONE, CIMGP_CHANNEL_A_DEST}, { - }, - /* PictOpOver */ + CIMGP_ALPHA_TIMES_A, CIMGP_ALPHA_EQUALS_ONE, CIMGP_CHANNEL_A_DEST}, { + }, + /* PictOpOver */ { - CIMGP_A_PLUS_BETA_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { - CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpOverReverse */ + CIMGP_A_PLUS_BETA_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { + CIMGP_ALPHA_TIMES_A, + CIMGP_CONVERTED_ALPHA, + CIMGP_CHANNEL_A_SOURCE}, + /* PictOpOverReverse */ { - CIMGP_A_PLUS_BETA_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, { - CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpIn */ + CIMGP_A_PLUS_BETA_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, { + CIMGP_ALPHA_TIMES_A, + CIMGP_CONVERTED_ALPHA, + CIMGP_CHANNEL_A_SOURCE}, + /* PictOpIn */ { - CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { - CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpInReverse */ + CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { + CIMGP_ALPHA_TIMES_A, + CIMGP_CONVERTED_ALPHA, + CIMGP_CHANNEL_A_SOURCE}, + /* PictOpInReverse */ { - CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_DEST}, { - CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpOut */ + CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_DEST}, { + CIMGP_ALPHA_TIMES_A, + CIMGP_CONVERTED_ALPHA, + CIMGP_CHANNEL_A_SOURCE}, + /* PictOpOut */ { - CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, { - CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpOutReverse */ + CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, { + CIMGP_ALPHA_TIMES_A, + CIMGP_CONVERTED_ALPHA, + CIMGP_CHANNEL_A_SOURCE}, + /* PictOpOutReverse */ { - CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { - CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* SrcAtop */ + CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { + CIMGP_ALPHA_TIMES_A, + CIMGP_CONVERTED_ALPHA, + CIMGP_CHANNEL_A_SOURCE}, + /* SrcAtop */ { - CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_DEST}, { - CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* SrcAtopReverse */ + CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_DEST}, { + CIMGP_BETA_TIMES_B, + CIMGP_CHANNEL_A_ALPHA, + CIMGP_CHANNEL_A_SOURCE}, + /* SrcAtopReverse */ { - CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { - CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, - /* Xor */ + CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { + CIMGP_BETA_TIMES_B, + CIMGP_CHANNEL_A_ALPHA, + CIMGP_CHANNEL_A_DEST}, + /* Xor */ { - CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { - CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpAdd */ + CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { + CIMGP_BETA_TIMES_B, + CIMGP_CHANNEL_A_ALPHA, + CIMGP_CHANNEL_A_SOURCE}, + /* PictOpAdd */ { - CIMGP_A_PLUS_BETA_B, CIMGP_CONSTANT_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { - } + CIMGP_A_PLUS_BETA_B, CIMGP_CONSTANT_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { + } }; #ifndef ARRAY_SIZE @@ -1201,7 +1242,7 @@ lx_do_composite_mask_two_pass(PixmapPtr pxDst, unsigned long dstOffset, } static void -transformPoint(PictTransform * t, xPointFixed * point) +transformPoint(PictTransform *t, xPointFixed *point) { PictVector v; diff --git a/src/lx_memory.c b/src/lx_memory.c index 9e14926..050f088 100644 --- a/src/lx_memory.c +++ b/src/lx_memory.c @@ -43,7 +43,7 @@ /* Return the number of free bytes */ unsigned int -GeodeOffscreenFreeSize(GeodeRec * pGeode) +GeodeOffscreenFreeSize(GeodeRec *pGeode) { GeodeMemPtr ptr = pGeode->offscreenList; @@ -56,7 +56,7 @@ GeodeOffscreenFreeSize(GeodeRec * pGeode) } void -GeodeFreeOffscreen(GeodeRec * pGeode, GeodeMemPtr ptr) +GeodeFreeOffscreen(GeodeRec *pGeode, GeodeMemPtr ptr) { /* There is a clear memory leak here, but * but it is unlikely that the first block of @@ -81,7 +81,7 @@ GeodeFreeOffscreen(GeodeRec * pGeode, GeodeMemPtr ptr) */ static GeodeMemPtr -GeodeAllocRemainder(GeodeRec * pGeode) +GeodeAllocRemainder(GeodeRec *pGeode) { GeodeMemPtr nptr, ptr = pGeode->offscreenList; @@ -114,7 +114,7 @@ GeodeAllocRemainder(GeodeRec * pGeode) */ GeodeMemPtr -GeodeAllocOffscreen(GeodeRec * pGeode, int size, int align) +GeodeAllocOffscreen(GeodeRec *pGeode, int size, int align) { GeodeMemPtr ptr = pGeode->offscreenList; GeodeMemPtr nptr; diff --git a/src/lx_panel.c b/src/lx_panel.c index 4a304a9..e7daac9 100644 --- a/src/lx_panel.c +++ b/src/lx_panel.c @@ -133,8 +133,8 @@ LXGetManualPanelMode(const char *modestr) sprintf(sname, "%dx%d", hactive, vactive); - mode->name = (char *)XNFalloc(strlen(sname) + 1); - strcpy((char *)mode->name, sname); + mode->name = (char *) XNFalloc(strlen(sname) + 1); + strcpy((char *) mode->name, sname); mode->type = M_T_DRIVER | M_T_PREFERRED; mode->Clock = clock; diff --git a/src/lx_video.c b/src/lx_video.c index a941557..2b65ee8 100644 --- a/src/lx_video.c +++ b/src/lx_video.c @@ -69,7 +69,6 @@ static void LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit); static void - LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, BoxPtr dstBox, short srcW, short srcH, short drawW, short drawH); @@ -84,9 +83,9 @@ static XF86VideoFormatRec Formats[] = { }; static XF86AttributeRec Attributes[] = { - {XvSettable | XvGettable, 0, (1 << 24) - 1, (char *)"XV_COLORKEY"}, - {XvSettable | XvGettable, 0, 1, (char *)"XV_FILTER"}, - {XvSettable | XvGettable, 0, 1, (char *)"XV_COLORKEYMODE"} + {XvSettable | XvGettable, 0, (1 << 24) - 1, (char *) "XV_COLORKEY"}, + {XvSettable | XvGettable, 0, 1, (char *) "XV_FILTER"}, + {XvSettable | XvGettable, 0, 1, (char *) "XV_COLORKEYMODE"} }; static XF86ImageRec Images[] = { @@ -116,7 +115,7 @@ typedef struct { (GeodePortPrivRec *)((GEODEPTR(pScrni))->adaptor->pPortPrivates[0].ptr) static void -LXCopyFromSys(GeodeRec * pGeode, unsigned char *src, unsigned int dst, +LXCopyFromSys(GeodeRec *pGeode, unsigned char *src, unsigned int dst, int dstPitch, int srcPitch, int h, int w) { @@ -131,7 +130,7 @@ LXCopyFromSys(GeodeRec * pGeode, unsigned char *src, unsigned int dst, } static void -LXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv) +LXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec *pPriv) { int red, green, blue; unsigned long key; @@ -189,7 +188,7 @@ struct { /* Copy planar YUV data */ static Bool -LXAllocateVidMem(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv, int size) +LXAllocateVidMem(ScrnInfoPtr pScrni, GeodePortPrivRec *pPriv, int size) { if (!pPriv->vidmem || pPriv->vidmem->size < size) { if (pPriv->vidmem) { diff --git a/src/panel/cen9211.c b/src/panel/cen9211.c index 7a36a56..d768ab7 100644 --- a/src/panel/cen9211.c +++ b/src/panel/cen9211.c @@ -183,7 +183,7 @@ restore_Centaurus_97317_SIOC2(void) *------------------------------------------------------------------------*/ unsigned char -set_Centaurus_92xx_mode(Pnl_PanelStat * pstat) +set_Centaurus_92xx_mode(Pnl_PanelStat *pstat) { int mode; @@ -551,7 +551,7 @@ read_Centaurus_CX9211_DWdata(void) } /* end read_Centaurus_CX9211_DWdata() */ void -Centaurus_Get_9211_Details(unsigned long flags, Pnl_PanelParams * pParam) +Centaurus_Get_9211_Details(unsigned long flags, Pnl_PanelParams *pParam) { unsigned long PanelType; int i; @@ -792,7 +792,7 @@ Centaurus_Power_Down(void) } /* Centaurus_Disable_Power */ void -Centaurus_9211init(Pnl_PanelStat * pstat) +Centaurus_9211init(Pnl_PanelStat *pstat) { init_Centaurus_GPIO(); init_Centaurus_9211(); diff --git a/src/panel/dora9211.c b/src/panel/dora9211.c index 295cf93..716561b 100644 --- a/src/panel/dora9211.c +++ b/src/panel/dora9211.c @@ -33,7 +33,7 @@ #include "dora9211.h" void -Dorado_Get_9211_Details(unsigned long flags, Pnl_PanelParams * pParam) +Dorado_Get_9211_Details(unsigned long flags, Pnl_PanelParams *pParam) { unsigned long DPanelType; int i; @@ -167,7 +167,7 @@ Dorado_Get_9211_Details(unsigned long flags, Pnl_PanelParams * pParam) } void -Dorado9211Init(Pnl_PanelStat * pstat) +Dorado9211Init(Pnl_PanelStat *pstat) { int mode; unsigned long orig_value, pm_value; diff --git a/src/panel/drac9210.c b/src/panel/drac9210.c index 4eb0a98..6f9e2de 100644 --- a/src/panel/drac9210.c +++ b/src/panel/drac9210.c @@ -52,7 +52,7 @@ static unsigned char Draco9210ReadDataIn(void); static void Draco9210ToggleClock(void); void -Draco9210Init(Pnl_PanelStat * pstat) +Draco9210Init(Pnl_PanelStat *pstat) { unsigned char panelvalues[] = { 0x2, 0x80, diff --git a/src/panel/gx2_9211.c b/src/panel/gx2_9211.c index b34a19d..e91a872 100644 --- a/src/panel/gx2_9211.c +++ b/src/panel/gx2_9211.c @@ -264,7 +264,7 @@ set_Redcloud_92xx_mode_params(int mode) *------------------------------------------------------------------------*/ unsigned char -set_Redcloud_92xx_mode(Pnl_PanelStat * pstat) +set_Redcloud_92xx_mode(Pnl_PanelStat *pstat) { int mode; @@ -287,7 +287,7 @@ set_Redcloud_92xx_mode(Pnl_PanelStat * pstat) } /* end set_Centaurus_92xx_mode() */ void -Redcloud_9211init(Pnl_PanelStat * pstat) +Redcloud_9211init(Pnl_PanelStat *pstat) { set_Redcloud_92xx_mode(pstat); diff --git a/src/panel/platform.c b/src/panel/platform.c index 812e762..33f0aaf 100644 --- a/src/panel/platform.c +++ b/src/panel/platform.c @@ -182,8 +182,8 @@ FindStringInSeg(unsigned int segment_address, const char *string_ptr) *********************************************************************** */ static unsigned char -get_sys_board_type(SYS_BOARD_INFO * sys_info, - SYS_BOARD_INFO * sys_board_array_base) +get_sys_board_type(SYS_BOARD_INFO *sys_info, + SYS_BOARD_INFO *sys_board_array_base) { int index; const char *xpress_rom_string_ptr = "XpressStart"; diff --git a/src/panel/pnl_init.c b/src/panel/pnl_init.c index ae28ecb..ce30081 100644 --- a/src/panel/pnl_init.c +++ b/src/panel/pnl_init.c @@ -154,7 +154,7 @@ Pnl_SetPanelPresent(int present) * return: none. *-----------------------------------------------------------------*/ void -Pnl_SetPanelParam(Pnl_PanelParams * pParam) +Pnl_SetPanelParam(Pnl_PanelParams *pParam) { if (pParam->Flags & PNL_PANELPRESENT) { Pnl_SetPanelPresent(pParam->PanelPresent); @@ -396,7 +396,7 @@ Pnl_RestorePanelState(void) * return: none. *-----------------------------------------------------------------*/ void -Pnl_GetPanelParam(Pnl_PanelParams * pParam) +Pnl_GetPanelParam(Pnl_PanelParams *pParam) { if (pParam->Flags & PNL_PANELPRESENT) { pParam->PanelPresent = Pnl_IsPanelPresent(); @@ -488,7 +488,7 @@ Pnl_GetPanelChip(void) * return: none. *-----------------------------------------------------------------*/ int -Pnl_InitPanel(Pnl_PanelParams * pParam) +Pnl_InitPanel(Pnl_PanelParams *pParam) { Pnl_PanelParams *pPtr; @@ -185,7 +185,7 @@ IoCtl(int fd, unsigned int fn, void *arg, int flag) } static void -z4l_ovly_unmap(Z4lPortPrivRec * pPriv) +z4l_ovly_unmap(Z4lPortPrivRec *pPriv) { int i, nbfrs; @@ -202,7 +202,7 @@ z4l_ovly_unmap(Z4lPortPrivRec * pPriv) } static void -z4l_ovly_map(Z4lPortPrivRec * pPriv, int dir) +z4l_ovly_map(Z4lPortPrivRec *pPriv, int dir) { long offset, bsz; int i, fd; @@ -269,7 +269,7 @@ z4l_ovly_map(Z4lPortPrivRec * pPriv, int dir) } static int -z4l_ovly_dqbuf(Z4lPortPrivRec * pPriv) +z4l_ovly_dqbuf(Z4lPortPrivRec *pPriv) { int stat; struct v4l2_buffer bfr; @@ -295,7 +295,7 @@ z4l_ovly_dqbuf(Z4lPortPrivRec * pPriv) } static int -z4l_open_device(Z4lPortPrivRec * pPriv) +z4l_open_device(Z4lPortPrivRec *pPriv) { int enable; @@ -315,7 +315,7 @@ z4l_open_device(Z4lPortPrivRec * pPriv) } static int -z4l_close_device(Z4lPortPrivRec * pPriv) +z4l_close_device(Z4lPortPrivRec *pPriv) { int ret = 0; @@ -333,7 +333,7 @@ z4l_close_device(Z4lPortPrivRec * pPriv) } static int -z4l_ovly_reset(Z4lPortPrivRec * pPriv) +z4l_ovly_reset(Z4lPortPrivRec *pPriv) { int ret = 0; @@ -370,7 +370,7 @@ z4l_fourcc_pixfmt(int fourcc) } static void -z4l_ovly_pixfmt(Z4lPortPrivRec * pPriv, unsigned int pixfmt) +z4l_ovly_pixfmt(Z4lPortPrivRec *pPriv, unsigned int pixfmt) { struct v4l2_framebuffer fbuf; @@ -384,7 +384,7 @@ z4l_ovly_pixfmt(Z4lPortPrivRec * pPriv, unsigned int pixfmt) } static void -z4l_ovly_bfr(Z4lPortPrivRec * pPriv, int width, int height) +z4l_ovly_bfr(Z4lPortPrivRec *pPriv, int width, int height) { struct v4l2_format fmt; @@ -399,7 +399,7 @@ z4l_ovly_bfr(Z4lPortPrivRec * pPriv, int width, int height) } static void -z4l_ovly_rect(Z4lPortPrivRec * pPriv, +z4l_ovly_rect(Z4lPortPrivRec *pPriv, int src_x, int src_y, int src_w, int src_h, int drw_x, int drw_y, int drw_w, int drw_h) { @@ -510,7 +510,7 @@ z4l_ovly_pitch(unsigned int pixfmt, int w, int h, int *py_pitch, } static int -z4l_ovly_set_colorkey(Z4lPortPrivRec * pPriv, int key) +z4l_ovly_set_colorkey(Z4lPortPrivRec *pPriv, int key) { struct v4l2_format fmt; @@ -527,7 +527,7 @@ z4l_ovly_set_colorkey(Z4lPortPrivRec * pPriv, int key) } static int -z4l_ovly_get_colorkey(Z4lPortPrivRec * pPriv, int *key) +z4l_ovly_get_colorkey(Z4lPortPrivRec *pPriv, int *key) { struct v4l2_format fmt; @@ -541,7 +541,7 @@ z4l_ovly_get_colorkey(Z4lPortPrivRec * pPriv, int *key) } static int -z4l_ovly_set_keymode(Z4lPortPrivRec * pPriv, int enable) +z4l_ovly_set_keymode(Z4lPortPrivRec *pPriv, int enable) { struct v4l2_framebuffer fbuf; @@ -563,7 +563,7 @@ z4l_ovly_set_keymode(Z4lPortPrivRec * pPriv, int enable) } static int -z4l_ovly_get_keymode(Z4lPortPrivRec * pPriv, int *enable) +z4l_ovly_get_keymode(Z4lPortPrivRec *pPriv, int *enable) { struct v4l2_framebuffer fbuf; @@ -576,7 +576,7 @@ z4l_ovly_get_keymode(Z4lPortPrivRec * pPriv, int *enable) } static int -z4l_ovly_set_encoding(Z4lPortPrivRec * pPriv, int id) +z4l_ovly_set_encoding(Z4lPortPrivRec *pPriv, int id) { int l, n, inp; const char *cp; @@ -634,7 +634,7 @@ z4l_ovly_set_encoding(Z4lPortPrivRec * pPriv, int id) } static int -z4l_ovly_get_encoding(Z4lPortPrivRec * pPriv, int *id) +z4l_ovly_get_encoding(Z4lPortPrivRec *pPriv, int *id) { XF86VideoEncodingPtr enc = pPriv->enc; @@ -643,7 +643,7 @@ z4l_ovly_get_encoding(Z4lPortPrivRec * pPriv, int *id) } static void -z4l_ovly_stop(Z4lPortPrivRec * pPriv) +z4l_ovly_stop(Z4lPortPrivRec *pPriv) { int type, enable, fd; @@ -669,7 +669,7 @@ z4l_ovly_stop(Z4lPortPrivRec * pPriv) } static void -z4l_ovly_start(Z4lPortPrivRec * pPriv, int dir) +z4l_ovly_start(Z4lPortPrivRec *pPriv, int dir) { int enable; @@ -721,7 +721,7 @@ z4l_region_equal(RegionPtr ap, RegionPtr bp) } static void -z4l_setup_colorkey(Z4lPortPrivRec * pPriv, ScreenPtr pScrn, RegionPtr clipBoxes) +z4l_setup_colorkey(Z4lPortPrivRec *pPriv, ScreenPtr pScrn, RegionPtr clipBoxes) { if (pPriv->run > 0 && pPriv->dir <= 0 && pPriv->keymode != 0 && z4l_region_equal(&pPriv->clips, clipBoxes) == 0) { @@ -930,7 +930,7 @@ Z4lPutVideo(ScrnInfoPtr pScrni, short src_x, short src_y, short drw_x, } static XF86VideoEncodingPtr -Z4lNewEncoding(XF86VideoEncodingPtr * encs, int *nencs) +Z4lNewEncoding(XF86VideoEncodingPtr *encs, int *nencs) { XF86VideoEncodingPtr enc; XF86VideoEncodingPtr tencs = @@ -1026,7 +1026,7 @@ Z4lAddEncoding(XF86VideoEncodingPtr enc, const char *name, int id, int width, } static XF86ImagePtr -Z4lNewImage(XF86ImagePtr * imgs, int *nimgs) +Z4lNewImage(XF86ImagePtr *imgs, int *nimgs) { XF86ImagePtr img; XF86ImagePtr timgs = @@ -1052,7 +1052,7 @@ Z4lAddImage(XF86ImagePtr img, XF86ImagePtr ip) } static XF86AttributePtr -Z4lNewAttribute(XF86AttributePtr * attrs, int *nattrs) +Z4lNewAttribute(XF86AttributePtr *attrs, int *nattrs) { XF86AttributePtr attr; XF86AttributePtr tattrs = @@ -1117,7 +1117,7 @@ Z4lAddAttribute(XF86AttributePtr attr, char *name, int min, int max, int flags) } static XF86VideoAdaptorPtr -Z4lNewAdaptor(XF86VideoAdaptorPtr ** adpts, int *nadpts, int nattrs) +Z4lNewAdaptor(XF86VideoAdaptorPtr **adpts, int *nadpts, int nattrs) { int n; Z4lPortPrivRec *pPriv; @@ -1273,7 +1273,7 @@ Z4lGetPortAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 *value, return Success; } -static void (*oldAdjustFrame) (ScrnInfoPtr pScrni, int x, int y) = NULL; +static void (*oldAdjustFrame)(ScrnInfoPtr pScrni, int x, int y) = NULL; static void Z4lAdjustFrame(ScrnInfoPtr pScrni, int x, int y) @@ -1302,7 +1302,7 @@ Z4lAdjustFrame(ScrnInfoPtr pScrni, int x, int y) } static int -Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) +Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr **adaptors) { int i, id, fd, dev, enable, has_video, has_colorkey; int ctl, cinp, inp, std, fmt, has_image; @@ -1500,7 +1500,7 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) goto fail; Z4lAttributeName(&attr_name[0], sizeof(attr_name), - (char *)&queryctrl.name[0]); + (char *) &queryctrl.name[0]); if (Z4lAddAttribute(attr, &attr_name[0], queryctrl.minimum, queryctrl.maximum, XvSettable | XvGettable) == 0) @@ -1509,9 +1509,10 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) attrIds[nattrs] = ATTR_ENCODING_ID; if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) goto fail; - Z4lAttributeName(&attr_name[0], sizeof(attr_name), (char *)ATTR_ENCODING); - if (Z4lAddAttribute(attr, &attr_name[0], 0, nencs - 1, - XvSettable | XvGettable) == 0) + Z4lAttributeName(&attr_name[0], sizeof(attr_name), + (char *) ATTR_ENCODING); + if (Z4lAddAttribute + (attr, &attr_name[0], 0, nencs - 1, XvSettable | XvGettable) == 0) goto fail; memset(&fbuf, 0, sizeof(fbuf)); if (IoCtl(fd, VIDIOC_G_FBUF, &fbuf, 1) < 0) @@ -1522,16 +1523,19 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) attrIds[nattrs] = ATTR_KEYMODE_ID; if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) goto fail; - Z4lAttributeName(&attr_name[0], sizeof(attr_name), (char *)ATTR_KEYMODE); - if (Z4lAddAttribute(attr, &attr_name[0], 0, 1, - XvSettable | XvGettable) == 0) + Z4lAttributeName(&attr_name[0], sizeof(attr_name), + (char *) ATTR_KEYMODE); + if (Z4lAddAttribute + (attr, &attr_name[0], 0, 1, XvSettable | XvGettable) == 0) goto fail; attrIds[nattrs] = ATTR_COLORKEY_ID; if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) goto fail; - Z4lAttributeName(&attr_name[0], sizeof(attr_name), (char *)ATTR_COLORKEY); - if (Z4lAddAttribute(attr, &attr_name[0], 0, 0xffffff, - XvSettable | XvGettable) == 0) + Z4lAttributeName(&attr_name[0], sizeof(attr_name), + (char *) ATTR_COLORKEY); + if (Z4lAddAttribute + (attr, &attr_name[0], 0, 0xffffff, + XvSettable | XvGettable) == 0) goto fail; has_colorkey = 1; } @@ -1614,7 +1618,7 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) if (encs != NULL) { for (i = 0; i < nencs; ++i) { if (encs[i].name != NULL) - free((char *)encs[i].name); + free((char *) encs[i].name); } free(encs); } @@ -1626,7 +1630,7 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) for (i = 0; i < nadpts; ++i) { if ((adpt = adpts[i]) != NULL) { if (adpt->name != NULL) - free((char *)adpt->name); + free((char *) adpt->name); if ((attrs = adpt->pAttributes) != NULL) { for (i = 0; i < adpt->nAttributes; ++i) if (attrs[i].name != NULL) @@ -1636,7 +1640,7 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) if ((encs = adpt->pEncodings) != NULL) { for (i = 0; i < adpt->nEncodings; ++i, ++enc) if (encs[i].name != NULL) - free((char *)encs[i].name); + free((char *) encs[i].name); free(encs); } if ((imgs = adpt->pImages) != NULL) |