avivotool/avivotool.c | 4 +- avivotool/xf86i2c.c | 1 configure | 22 ++++++------- configure.ac | 4 +- debian/changelog | 7 ++++ debian/patches/implicit_declarations.diff | 43 ------------------------- debian/patches/map_mem_ctrl_mem_return.diff | 12 ------- debian/patches/output_init_return.diff | 19 ----------- debian/patches/series | 3 - include/avivo.h | 47 ++++++++++++++++------------ xorg/avivo.c | 34 ++++++++------------ xorg/avivo_bios.c | 4 +- xorg/avivo_common.c | 44 +++++++++++++------------- xorg/avivo_output.c | 19 ++++++++--- xorg/avivo_state.c | 6 +-- 15 files changed, 107 insertions(+), 162 deletions(-)
New commits: commit 207b0c4e407ce526a143dd9760e9c16d0f30de2a Author: Julien Cristau <[EMAIL PROTECTED]> Date: Fri Jul 6 20:34:37 2007 +0200 New upstream snapshot. All patches dropped, applied upstream. diff --git a/configure b/configure index 6a14fe7..0915a42 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for xf86-video-avivo 0.0.1. +# Generated by GNU Autoconf 2.61 for xf86-video-avivo 0.0.999. # # Report bugs to <http://home.fooishbar.org/wiki/Avivo>. # @@ -728,8 +728,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xf86-video-avivo' PACKAGE_TARNAME='xf86-video-avivo' -PACKAGE_VERSION='0.0.1' -PACKAGE_STRING='xf86-video-avivo 0.0.1' +PACKAGE_VERSION='0.0.999' +PACKAGE_STRING='xf86-video-avivo 0.0.999' PACKAGE_BUGREPORT='http://home.fooishbar.org/wiki/Avivo' ac_unique_file="Makefile.am" @@ -1417,7 +1417,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xf86-video-avivo 0.0.1 to adapt to many kinds of systems. +\`configure' configures xf86-video-avivo 0.0.999 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1487,7 +1487,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xf86-video-avivo 0.0.1:";; + short | recursive ) echo "Configuration of xf86-video-avivo 0.0.999:";; esac cat <<\_ACEOF @@ -1602,7 +1602,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xf86-video-avivo configure 0.0.1 +xf86-video-avivo configure 0.0.999 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1616,7 +1616,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xf86-video-avivo $as_me 0.0.1, which was +It was created by xf86-video-avivo $as_me 0.0.999, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2291,7 +2291,7 @@ fi # Define the identity of the package. PACKAGE='xf86-video-avivo' - VERSION='0.0.1' + VERSION='0.0.999' cat >>confdefs.h <<_ACEOF @@ -20381,7 +20381,7 @@ echo "${ECHO_T}yes" >&6; } : fi -CFLAGS="$CFLAGS $XORG_CFLAGS " +CFLAGS="$CFLAGS $XORG_CFLAGS -Wall" INCLUDES="$XORG_INCS -I${sdkdir} "'-I$(top_srcdir)/include' @@ -21225,7 +21225,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xf86-video-avivo $as_me 0.0.1, which was +This file was extended by xf86-video-avivo $as_me 0.0.999, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21278,7 +21278,7 @@ Report bugs to <[EMAIL PROTECTED]>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -xf86-video-avivo config.status 0.0.1 +xf86-video-avivo config.status 0.0.999 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/debian/changelog b/debian/changelog index f1ab581..2c05b20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xserver-xorg-video-avivo (0.0.999+git20070706-1) experimental; urgency=low + + * New upstream snapshot. + * Drop all patches, applied upstream. + + -- Julien Cristau <[EMAIL PROTECTED]> Fri, 06 Jul 2007 20:31:32 +0200 + xserver-xorg-video-avivo (0.0.1+git20070701-1) experimental; urgency=low * Use a separate build directory. diff --git a/debian/patches/implicit_declarations.diff b/debian/patches/implicit_declarations.diff deleted file mode 100644 index 37e95e5..0000000 --- a/debian/patches/implicit_declarations.diff +++ /dev/null @@ -1,43 +0,0 @@ -Index: xserver-xorg-video-avivo/include/avivo.h -=================================================================== ---- xserver-xorg-video-avivo.orig/include/avivo.h 2007-07-02 01:46:10.000000000 +0200 -+++ xserver-xorg-video-avivo/include/avivo.h 2007-07-02 01:47:47.000000000 +0200 -@@ -243,4 +243,13 @@ - */ - void avivo_cursor_init(ScreenPtr screen); - -+ -+void avivo_wait_idle(struct avivo_info *avivo); -+ -+Bool avivo_output_setup(ScrnInfoPtr screen_info); -+ -+Bool avivo_output_exist(ScrnInfoPtr screen_info, xf86ConnectorType type, -+ int number, unsigned long ddc_reg); -+ -+ - #endif /* _AVIVO_H_ */ -Index: xserver-xorg-video-avivo/avivotool/xf86i2c.c -=================================================================== ---- xserver-xorg-video-avivo.orig/avivotool/xf86i2c.c 2007-07-02 01:46:10.000000000 +0200 -+++ xserver-xorg-video-avivo/avivotool/xf86i2c.c 2007-07-02 01:46:21.000000000 +0200 -@@ -10,6 +10,7 @@ - #include <string.h> - #include <stdio.h> - #include <stdlib.h> -+#include <unistd.h> - #include "xf86i2c.h" - - #define I2C_TIMEOUT(x) /*(x)*/ /* Report timeouts */ -Index: xserver-xorg-video-avivo/xorg/avivo.c -=================================================================== ---- xserver-xorg-video-avivo.orig/xorg/avivo.c 2007-07-02 01:46:10.000000000 +0200 -+++ xserver-xorg-video-avivo/xorg/avivo.c 2007-07-02 01:46:21.000000000 +0200 -@@ -39,6 +39,8 @@ - #include "cursorstr.h" - #include "xf86Cursor.h" - #include "xf86str.h" -+#include "xf86RandR12.h" -+#include "xf86fbman.h" - - #ifdef WITH_VGAHW - #include "vgaHW.h" diff --git a/debian/patches/map_mem_ctrl_mem_return.diff b/debian/patches/map_mem_ctrl_mem_return.diff deleted file mode 100644 index db5f179..0000000 --- a/debian/patches/map_mem_ctrl_mem_return.diff +++ /dev/null @@ -1,12 +0,0 @@ -Index: xserver-xorg-video-avivo/xorg/avivo.c -=================================================================== ---- xserver-xorg-video-avivo.orig/xorg/avivo.c 2007-07-01 18:28:12.000000000 +0200 -+++ xserver-xorg-video-avivo/xorg/avivo.c 2007-07-01 18:28:25.000000000 +0200 -@@ -152,6 +152,7 @@ - "Couldn't map control memory at %p", avivo->ctrl_addr); - return 0; - } -+ return 1; - } - - static int diff --git a/debian/patches/output_init_return.diff b/debian/patches/output_init_return.diff deleted file mode 100644 index 608ec38..0000000 --- a/debian/patches/output_init_return.diff +++ /dev/null @@ -1,19 +0,0 @@ -Index: xserver-xorg-video-avivo/xorg/avivo_output.c -=================================================================== ---- xserver-xorg-video-avivo.orig/xorg/avivo_output.c 2007-07-01 18:28:13.000000000 +0200 -+++ xserver-xorg-video-avivo/xorg/avivo_output.c 2007-07-01 18:28:16.000000000 +0200 -@@ -325,7 +325,7 @@ - xf86DrvMsg(screen_info->scrnIndex, X_ERROR, - "Couldn't initialise I2C bus for %s connector %d\n", - xf86ConnectorGetName(type), number); -- return; -+ return FALSE; - } - avivo_output->type = type; - avivo_output->number = number; -@@ -362,4 +362,5 @@ - xf86DrvMsg(screen_info->scrnIndex, X_INFO, - "added %s connector %d (0x%04X)\n", - xf86ConnectorGetName(type), number, ddc_reg); -+ return TRUE; - } diff --git a/debian/patches/series b/debian/patches/series index d83f3ae..e69de29 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +0,0 @@ -implicit_declarations.diff -output_init_return.diff -map_mem_ctrl_mem_return.diff commit 8b28e959792caa4994d44b2c08780a06abe23571 Author: Jerome Glisse <[EMAIL PROTECTED]> Date: Mon Jul 2 20:09:29 2007 +0200 avivo: properly set version and bump version to 0.0.999. diff --git a/configure.ac b/configure.ac index 6673ba0..b193b73 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-video-avivo], - 0.0.1, + 0.0.999, [http://home.fooishbar.org/wiki/Avivo], xf86-video-avivo) diff --git a/include/avivo.h b/include/avivo.h index e74de92..13d5bed 100644 --- a/include/avivo.h +++ b/include/avivo.h @@ -39,9 +39,12 @@ #include <pciaccess.h> #endif -#define AVIVO_NAME "Avivo-v0.2.90" -#define AVIVO_DRIVER_NAME "avivo-v0.2.90" -#define AVIVO_DRIVER_VERSION 1000 +#define AVIVO_NAME "avivo" +#define AVIVO_DRIVER_NAME "avivo" +#define AVIVO_DRIVER_VERSION \ + ((PACKAGE_VERSION_MAJOR << 20) | \ + (PACKAGE_VERSION_MINOR << 10) | \ + (PACKAGE_VERSION_PATCHLEVEL)) #define RADEON_VBIOS_SIZE 0x00010000 diff --git a/xorg/avivo.c b/xorg/avivo.c index 2127e9d..2e69d46 100644 --- a/xorg/avivo.c +++ b/xorg/avivo.c @@ -239,8 +239,8 @@ avivo_identify(int flags) void fill_in_screen(ScrnInfoPtr screen_info) { screen_info->driverVersion = AVIVO_DRIVER_VERSION; - screen_info->driverName = "avivo"; - screen_info->name = "Avivo"; + screen_info->driverName = AVIVO_DRIVER_NAME; + screen_info->name = AVIVO_NAME; screen_info->Probe = avivo_old_probe; screen_info->PreInit = avivo_preinit; screen_info->ScreenInit = avivo_screen_init; commit 8a6fb613d6f18d33aef84460fac0fe59bc00f729 Author: Jerome Glisse <[EMAIL PROTECTED]> Date: Mon Jul 2 19:50:23 2007 +0200 avivo: code cleanup. diff --git a/configure.ac b/configure.ac index c8e1f29..6673ba0 100644 --- a/configure.ac +++ b/configure.ac @@ -58,7 +58,7 @@ PKG_CHECK_MODULES(XORG, xorg-server >= 1.2.99.901 xproto $REQUIRED_MODULES) sdkdir=$(pkg-config --variable=sdkdir xorg-server) PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.7.0]) -CFLAGS="$CFLAGS $XORG_CFLAGS " +CFLAGS="$CFLAGS $XORG_CFLAGS -Wall" INCLUDES="$XORG_INCS -I${sdkdir} "'-I$(top_srcdir)/include' AC_SUBST([CFLAGS]) AC_SUBST([INCLUDES]) diff --git a/include/avivo.h b/include/avivo.h index da54946..e74de92 100644 --- a/include/avivo.h +++ b/include/avivo.h @@ -39,8 +39,8 @@ #include <pciaccess.h> #endif -#define AVIVO_NAME "Avivo-v0.2.90" -#define AVIVO_DRIVER_NAME "avivo-v0.2.90" +#define AVIVO_NAME "Avivo-v0.2.90" +#define AVIVO_DRIVER_NAME "avivo-v0.2.90" #define AVIVO_DRIVER_VERSION 1000 #define RADEON_VBIOS_SIZE 0x00010000 @@ -195,8 +195,6 @@ struct avivo_info INT16 cursor_x, cursor_y; }; -int avivo_probe_info(ScrnInfoPtr screen_info); - /* * avivo chipset */ @@ -205,27 +203,29 @@ void avivo_get_chipset(struct avivo_info *avivo); /* * avivo common functions */ -void radeon_set_indexed(ScrnInfoPtr screen_info, - unsigned int index_offset, - unsigned int data_offset, - unsigned int offset, - unsigned int value); -unsigned int radeon_get_indexed(ScrnInfoPtr screen_info, - unsigned int index_offset, - unsigned int data_offset, - unsigned int offset); -unsigned int radeon_get_mc(ScrnInfoPtr screen_info, unsigned int offset); -void radeon_set_mc(ScrnInfoPtr screen_info, - unsigned int offset, - unsigned int value); +void avivo_set_indexed(ScrnInfoPtr screen_info, + unsigned int index_offset, + unsigned int data_offset, + unsigned int offset, + unsigned int value); +unsigned int avivo_get_indexed(ScrnInfoPtr screen_info, + unsigned int index_offset, + unsigned int data_offset, + unsigned int offset); +unsigned int avivo_get_mc(ScrnInfoPtr screen_info, unsigned int offset); +void avivo_set_mc(ScrnInfoPtr screen_info, + unsigned int offset, + unsigned int value); struct avivo_info *avivo_get_info(ScrnInfoPtr screen_info); - /* * avivo state handling */ +void avivo_wait_idle(struct avivo_info *avivo); void avivo_restore_state(ScrnInfoPtr screen_info); void avivo_save_state(ScrnInfoPtr screen_info); +void avivo_restore_cursor(ScrnInfoPtr screen_info); +void avivo_save_cursor(ScrnInfoPtr screen_info); /* * avivo crtc handling @@ -236,7 +236,7 @@ Bool avivo_crtc_create(ScrnInfoPtr screen_info); * avivo output handling */ Bool avivo_output_exist(ScrnInfoPtr screen_info, xf86ConnectorType type, - int number, unsigned long ddc_reg); + int number, unsigned long ddc_reg); Bool avivo_output_init(ScrnInfoPtr screen_info, xf86ConnectorType type, int number, unsigned long ddc_reg); @@ -247,16 +247,6 @@ Bool avivo_output_setup(ScrnInfoPtr screen_info); * avivo cursor handling */ void avivo_cursor_init(ScreenPtr screen); - - -void avivo_wait_idle(struct avivo_info *avivo); - -void avivo_probe_monitor(ScrnInfoPtr screen_info); - -void avivo_restore_cursor(ScrnInfoPtr screen_info); - -void avivo_save_cursor(ScrnInfoPtr screen_info); - void avivo_setup_cursor(struct avivo_info *avivo, int id, int enable); #endif /* _AVIVO_H_ */ diff --git a/xorg/avivo.c b/xorg/avivo.c index 1514258..2127e9d 100644 --- a/xorg/avivo.c +++ b/xorg/avivo.c @@ -74,9 +74,6 @@ static void avivo_adjust_frame(int index, int x, int y, int flags); static void avivo_free_screen(int index, int flags); static void avivo_free_info(ScrnInfoPtr screen_info); -static void avivo_dpms(ScrnInfoPtr screen_info, int mode, int flags); - - /* * This contains the functions needed by the server after loading the * driver module. It must be supplied, and gets added the driver list by @@ -136,7 +133,6 @@ static int avivo_map_ctrl_mem(ScrnInfoPtr screen_info) { struct avivo_info *avivo = avivo_get_info(screen_info); - int i; if (avivo->ctrl_base) return 1; @@ -161,7 +157,6 @@ static int avivo_map_fb_mem(ScrnInfoPtr screen_info) { struct avivo_info *avivo = avivo_get_info(screen_info); - int i = 0; if (avivo->fb_base) return 0; @@ -285,7 +280,6 @@ avivo_pci_probe(DriverPtr drv, int entity_num, struct pci_device *dev, static Bool avivo_old_probe(DriverPtr drv, int flags) { - struct avivo_info avivo; ScrnInfoPtr screen_info = NULL; GDevPtr *sections; Bool found_screen = FALSE; @@ -344,12 +338,7 @@ avivo_free_info(ScrnInfoPtr screen_info) static Bool avivo_preinit(ScrnInfoPtr screen_info, int flags) { - xf86CrtcConfigPtr config; struct avivo_info *avivo; - DisplayModePtr mode; - ClockRangePtr clock_ranges; - xf86MonPtr monitor; - char *mod = NULL; int i; Gamma gzeros = { 0.0, 0.0, 0.0 }; rgb rzeros = { 0, 0, 0 }; @@ -521,7 +510,7 @@ avivo_screen_init(int index, ScreenPtr screen, int argc, char **argv) struct avivo_info *avivo = avivo_get_info(screen_info); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(screen_info); VisualPtr visual; - int flags, i; + int i; unsigned int mc_memory_map; unsigned int mc_memory_map_end; @@ -532,7 +521,7 @@ avivo_screen_init(int index, ScreenPtr screen, int argc, char **argv) mc_memory_map_end = ((avivo->fb_addr + avivo->fb_size) >> 16) - 1; mc_memory_map |= (mc_memory_map_end << AVIVO_MC_MEMORY_MAP_END_SHIFT) & AVIVO_MC_MEMORY_MAP_END_MASK; - radeon_set_mc(screen_info, AVIVO_MC_MEMORY_MAP, mc_memory_map); + avivo_set_mc(screen_info, AVIVO_MC_MEMORY_MAP, mc_memory_map); OUTREG(AVIVO_VGA_MEMORY_BASE, (avivo->fb_addr >> 16) & AVIVO_MC_MEMORY_MAP_BASE_MASK); OUTREG(AVIVO_VGA_FB_START, avivo->fb_addr); @@ -723,7 +712,9 @@ avivo_close_screen(int index, ScreenPtr screen) struct avivo_info *avivo = avivo_get_info(screen_info); avivo_restore_state(screen_info); - + avivo_unmap_ctrl_mem(screen_info); + avivo_unmap_fb_mem(screen_info); + screen->CloseScreen = avivo->close_screen; return screen->CloseScreen(index, screen); } diff --git a/xorg/avivo_bios.c b/xorg/avivo_bios.c index 5f979e9..3eaadf3 100644 --- a/xorg/avivo_bios.c +++ b/xorg/avivo_bios.c @@ -185,6 +185,8 @@ avivo_output_setup(ScrnInfoPtr screen_info) if (!avivo_output_exist(screen_info, type, number, ddc_reg)) avivo_output_init(screen_info, type, number, ddc_reg); break; + default: + break; } } } diff --git a/xorg/avivo_common.c b/xorg/avivo_common.c index 43ee6f0..3f6855c 100644 --- a/xorg/avivo_common.c +++ b/xorg/avivo_common.c @@ -32,11 +32,11 @@ #include "radeon_reg.h" void -radeon_set_indexed(ScrnInfoPtr screen_info, - unsigned int index_offset, - unsigned int data_offset, - unsigned int offset, - unsigned int value) +avivo_set_indexed(ScrnInfoPtr screen_info, + unsigned int index_offset, + unsigned int data_offset, + unsigned int offset, + unsigned int value) { struct avivo_info *avivo = avivo_get_info(screen_info); @@ -45,10 +45,10 @@ radeon_set_indexed(ScrnInfoPtr screen_info, } unsigned int -radeon_get_indexed(ScrnInfoPtr screen_info, - unsigned int index_offset, - unsigned int data_offset, - unsigned int offset) +avivo_get_indexed(ScrnInfoPtr screen_info, + unsigned int index_offset, + unsigned int data_offset, + unsigned int offset) { struct avivo_info *avivo = avivo_get_info(screen_info); @@ -57,24 +57,24 @@ radeon_get_indexed(ScrnInfoPtr screen_info, } unsigned int -radeon_get_mc(ScrnInfoPtr screen_info, unsigned int offset) +avivo_get_mc(ScrnInfoPtr screen_info, unsigned int offset) { - return radeon_get_indexed(screen_info, - AVIVO_MC_INDEX, - AVIVO_MC_DATA, - offset | 0x007f0000); + return avivo_get_indexed(screen_info, + AVIVO_MC_INDEX, + AVIVO_MC_DATA, + offset | 0x007f0000); } void -radeon_set_mc(ScrnInfoPtr screen_info, - unsigned int offset, - unsigned int value) +avivo_set_mc(ScrnInfoPtr screen_info, + unsigned int offset, + unsigned int value) { - radeon_set_indexed(screen_info, - AVIVO_MC_INDEX, - AVIVO_MC_DATA, - offset | 0x00ff0000, - value); + avivo_set_indexed(screen_info, + AVIVO_MC_INDEX, + AVIVO_MC_DATA, + offset | 0x00ff0000, + value); } struct avivo_info * diff --git a/xorg/avivo_output.c b/xorg/avivo_output.c index 7e697c1..c10b916 100644 --- a/xorg/avivo_output.c +++ b/xorg/avivo_output.c @@ -167,6 +167,8 @@ avivo_output_dpms(xf86OutputPtr output, int mode) OUTREG(AVIVO_TMDS1_CNTL + avivo_output->output_offset, value5); break; } + default: + break; } } @@ -344,6 +346,8 @@ avivo_output_init(ScrnInfoPtr screen_info, xf86ConnectorType type, case XF86ConnectorDVI_A: avivo_output->output_offset = AVIVO_TMDS2_CNTL - AVIVO_TMDS1_CNTL; break; + default: + break; } } if (avivo_output->type == XF86ConnectorLFP) { diff --git a/xorg/avivo_state.c b/xorg/avivo_state.c index 56bbf94..21f5541 100644 --- a/xorg/avivo_state.c +++ b/xorg/avivo_state.c @@ -73,7 +73,7 @@ avivo_restore_state(ScrnInfoPtr screen_info) struct avivo_info *avivo = avivo_get_info(screen_info); struct avivo_state *state = &avivo->saved_state; - radeon_set_mc(screen_info, AVIVO_MC_MEMORY_MAP, state->mc_memory_map); + avivo_set_mc(screen_info, AVIVO_MC_MEMORY_MAP, state->mc_memory_map); OUTREG(AVIVO_VGA_MEMORY_BASE, state->vga_memory_base); OUTREG(AVIVO_VGA_FB_START, state->vga_fb_start); OUTREG(AVIVO_VGA_MYSTERY0, state->vga_mystery0); @@ -198,7 +198,7 @@ avivo_save_state(ScrnInfoPtr screen_info) avivo_save_cursor(screen_info); - state->mc_memory_map = radeon_get_mc(screen_info, AVIVO_MC_MEMORY_MAP); + state->mc_memory_map = avivo_get_mc(screen_info, AVIVO_MC_MEMORY_MAP); state->vga_memory_base = INREG(AVIVO_VGA_MEMORY_BASE); state->vga_fb_start = INREG(AVIVO_VGA_FB_START); state->vga_mystery0 = INREG(AVIVO_VGA_MYSTERY0); commit 214b9f80bf2b4935df8890cb9c6bb9aeb807ba80 Author: Julien Cristau <[EMAIL PROTECTED]> Date: Mon Jul 2 19:06:40 2007 +0200 avivo: compilations fix from Julien Cristau & Ludovic Rousseau. diff --git a/avivotool/avivotool.c b/avivotool/avivotool.c index b5e6955..9b53ea6 100644 --- a/avivotool/avivotool.c +++ b/avivotool/avivotool.c @@ -156,7 +156,7 @@ static void usage(void) void _i2c_set(unsigned long offset, unsigned int value) { if (debug_i2c) - printf("OUTREG(0x%08X, 0x%08X);\n", offset, value); + printf("OUTREG(0x%08lX, 0x%08X);\n", offset, value); SET_REG(offset, value); } @@ -166,7 +166,7 @@ unsigned int _i2c_get(unsigned long offset) value = GET_REG(offset); if (debug_i2c) - printf("tmp = INREG(0x%08X);\t/* should get 0x%08X */\n", + printf("tmp = INREG(0x%08lX);\t/* should get 0x%08X */\n", offset, value); return value; } diff --git a/avivotool/xf86i2c.c b/avivotool/xf86i2c.c index 082587c..ed82218 100644 --- a/avivotool/xf86i2c.c +++ b/avivotool/xf86i2c.c @@ -10,6 +10,7 @@ #include <string.h> #include <stdio.h> #include <stdlib.h> +#include <unistd.h> #include "xf86i2c.h" #define I2C_TIMEOUT(x) /*(x)*/ /* Report timeouts */ diff --git a/include/avivo.h b/include/avivo.h index 44f217c..da54946 100644 --- a/include/avivo.h +++ b/include/avivo.h @@ -235,12 +235,28 @@ Bool avivo_crtc_create(ScrnInfoPtr screen_info); /* * avivo output handling */ +Bool avivo_output_exist(ScrnInfoPtr screen_info, xf86ConnectorType type, + int number, unsigned long ddc_reg); + Bool avivo_output_init(ScrnInfoPtr screen_info, xf86ConnectorType type, int number, unsigned long ddc_reg); +Bool avivo_output_setup(ScrnInfoPtr screen_info); + /* * avivo cursor handling */ void avivo_cursor_init(ScreenPtr screen); + +void avivo_wait_idle(struct avivo_info *avivo); + +void avivo_probe_monitor(ScrnInfoPtr screen_info); + +void avivo_restore_cursor(ScrnInfoPtr screen_info); + +void avivo_save_cursor(ScrnInfoPtr screen_info); + +void avivo_setup_cursor(struct avivo_info *avivo, int id, int enable); + #endif /* _AVIVO_H_ */ diff --git a/xorg/avivo.c b/xorg/avivo.c index b73e8a7..1514258 100644 --- a/xorg/avivo.c +++ b/xorg/avivo.c @@ -39,6 +39,8 @@ #include "cursorstr.h" #include "xf86Cursor.h" #include "xf86str.h" +#include "xf86RandR12.h" +#include "xf86fbman.h" #ifdef WITH_VGAHW #include "vgaHW.h" @@ -149,9 +151,10 @@ avivo_map_ctrl_mem(ScrnInfoPtr screen_info) #endif if (!avivo->ctrl_base) { xf86DrvMsg(screen_info->scrnIndex, X_ERROR, - "Couldn't map control memory at %p", avivo->ctrl_addr); + "Couldn't map control memory at %p", (void *)avivo->ctrl_addr); return 0; } + return 1; } static int @@ -172,7 +175,7 @@ avivo_map_fb_mem(ScrnInfoPtr screen_info) #endif if (!avivo->fb_base) { xf86DrvMsg(screen_info->scrnIndex, X_ERROR, - "Couldn't map fb memory at %p", avivo->fb_addr); + "Couldn't map fb memory at %p", (void *)avivo->fb_addr); return 0; } screen_info->memPhysBase = 0; @@ -389,10 +392,10 @@ avivo_preinit(ScrnInfoPtr screen_info, int flags) #endif xf86DrvMsg(screen_info->scrnIndex, X_INFO, "Control memory at %p[size = %d, 0x%08X]\n", - avivo->ctrl_addr, avivo->ctrl_size, avivo->ctrl_size); + (void *)avivo->ctrl_addr, avivo->ctrl_size, avivo->ctrl_size); xf86DrvMsg(screen_info->scrnIndex, X_INFO, "Frame buffer memory at %p[size = %d, 0x%08X]\n", - avivo->fb_addr, avivo->fb_size, avivo->fb_size); + (void *)avivo->fb_addr, avivo->fb_size, avivo->fb_size); avivo_get_chipset(avivo); screen_info->chipset = "avivo"; diff --git a/xorg/avivo_bios.c b/xorg/avivo_bios.c index 31c0e6a..5f979e9 100644 --- a/xorg/avivo_bios.c +++ b/xorg/avivo_bios.c @@ -126,7 +126,7 @@ int avivo_output_clones(ScrnInfoPtr screen_info) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(screen_info); - int o, index_mask; + int o, index_mask = 0; for (o = 0; o < config->num_output; o++) { index_mask |= (1 << o); diff --git a/xorg/avivo_output.c b/xorg/avivo_output.c index 0c73a81..7e697c1 100644 --- a/xorg/avivo_output.c +++ b/xorg/avivo_output.c @@ -81,10 +81,11 @@ avivo_output_dpms(xf86OutputPtr output, int mode) { int value1, value2, value3; + value1 = 0; + value2 = 0; + value3 = 0; switch(mode) { case DPMSModeOn: - value1 = 0; - value2 = 0; value3 = AVIVO_DAC_EN; if (!avivo_output->output_offset) xf86DrvMsg(screen_info->scrnIndex, X_INFO, "enable DAC1\n"); @@ -96,7 +97,6 @@ avivo_output_dpms(xf86OutputPtr output, int mode) case DPMSModeOff: value1 = AVIVO_DAC_MYSTERY1_DIS; value2 = AVIVO_DAC_MYSTERY2_DIS; - value3 = 0; if (!avivo_output->output_offset) xf86DrvMsg(screen_info->scrnIndex, X_INFO, "disable DAC1\n"); else @@ -118,7 +118,10 @@ avivo_output_dpms(xf86OutputPtr output, int mode) { int value1, value2, value3, value4, value5; + value1 = 0; + value2 = 0; value3 = 0x10000011; + value4 = 0; value5 = 0x00001010; switch(mode) { case DPMSModeOn: @@ -325,7 +328,7 @@ avivo_output_init(ScrnInfoPtr screen_info, xf86ConnectorType type, xf86DrvMsg(screen_info->scrnIndex, X_ERROR, "Couldn't initialise I2C bus for %s connector %d\n", xf86ConnectorGetName(type), number); - return; + return FALSE; } avivo_output->type = type; avivo_output->number = number; @@ -360,6 +363,8 @@ avivo_output_init(ScrnInfoPtr screen_info, xf86ConnectorType type, output->interlaceAllowed = FALSE; output->doubleScanAllowed = FALSE; xf86DrvMsg(screen_info->scrnIndex, X_INFO, - "added %s connector %d (0x%04X)\n", + "added %s connector %d (0x%04lX)\n", xf86ConnectorGetName(type), number, ddc_reg); + + return TRUE; } diff --git a/xorg/avivo_state.c b/xorg/avivo_state.c index a3d33d0..56bbf94 100644 --- a/xorg/avivo_state.c +++ b/xorg/avivo_state.c @@ -55,7 +55,7 @@ avivo_save_cursor(ScrnInfoPtr screen_info) state->cursor1_position = INREG(AVIVO_CURSOR1_POSITION); } -static void +void avivo_restore_cursor(ScrnInfoPtr screen_info) { struct avivo_info *avivo = avivo_get_info(screen_info); -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]