diff -ur xorg-ati/xserver-xorg-video-ati-6.6.3/src/Makefile.am xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/Makefile.am --- xorg-ati/xserver-xorg-video-ati-6.6.3/src/Makefile.am 2006-10-03 15:49:13.000000000 +0100 +++ xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/Makefile.am 2007-05-28 16:26:12.000000000 +0100 @@ -96,6 +96,15 @@ theatre_drv_la_SOURCES = \ theatre.c theatre_module.c +theater_out_drv_la_LTLIBRARIES = theater_out_drv.la +theater_out_drv_la_LDFLAGS = -module -avoid-version +theater_out_drv_ladir = @moduledir@/multimedia +theater_out_drv_la_CFLAGS = \ + $(AM_CFLAGS) -DMICROC_DIR=\"$(theater_out_drv_ladir)\" +theater_out_drv_la_SOURCES = \ + theater_out.c theater_out_module.c + + theatre200_drv_la_LTLIBRARIES = theatre200_drv.la theatre200_drv_la_LDFLAGS = -module -avoid-version theatre200_drv_ladir = @moduledir@/multimedia @@ -190,6 +199,7 @@ radeon_sarea.h \ radeon_version.h \ radeon_video.h \ + theater_out.h \ theatre200.h \ theatre_detect.h \ theatre.h \ Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: Makefile.am.orig diff -ur xorg-ati/xserver-xorg-video-ati-6.6.3/src/Makefile.in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/Makefile.in --- xorg-ati/xserver-xorg-video-ati-6.6.3/src/Makefile.in 2006-10-03 16:02:17.000000000 +0100 +++ xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/Makefile.in 2007-05-28 15:44:05.000000000 +0100 @@ -93,6 +93,7 @@ theatre_drv_laLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(ati_drv_la_LTLIBRARIES) $(atimisc_drv_la_LTLIBRARIES) \ $(r128_drv_la_LTLIBRARIES) $(radeon_drv_la_LTLIBRARIES) \ + $(theater_out_drv_la_LTLIBRARIES) \ $(theatre200_drv_la_LTLIBRARIES) \ $(theatre_detect_drv_la_LTLIBRARIES) \ $(theatre_drv_la_LTLIBRARIES) @@ -148,6 +149,10 @@ radeon_video.lo radeon_bios.lo radeon_mm_i2c.lo radeon_vip.lo \ radeon_misc.lo $(am__objects_7) $(am__objects_8) radeon_drv_la_OBJECTS = $(am_radeon_drv_la_OBJECTS) +theater_out_drv_la_LIBADD = +am_theater_out_drv_la_OBJECTS = theater_out_drv_la-theater_out.lo \ + theater_out_drv_la-theater_out_module.lo +theater_out_drv_la_OBJECTS = $(am_theater_out_drv_la_OBJECTS) theatre200_drv_la_LIBADD = am_theatre200_drv_la_OBJECTS = theatre200_drv_la-theatre200.lo \ theatre200_drv_la-theatre200_module.lo @@ -172,12 +177,15 @@ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(ati_drv_la_SOURCES) $(atimisc_drv_la_SOURCES) \ $(r128_drv_la_SOURCES) $(radeon_drv_la_SOURCES) \ + $(theater_out_drv_la_SOURCES) \ $(theatre200_drv_la_SOURCES) $(theatre_detect_drv_la_SOURCES) \ $(theatre_drv_la_SOURCES) DIST_SOURCES = $(am__ati_drv_la_SOURCES_DIST) \ $(am__atimisc_drv_la_SOURCES_DIST) \ $(am__r128_drv_la_SOURCES_DIST) \ - $(am__radeon_drv_la_SOURCES_DIST) $(theatre200_drv_la_SOURCES) \ + $(am__radeon_drv_la_SOURCES_DIST) + $(theater_out_drv_la_SOURCES) \ + $(theatre200_drv_la_SOURCES) \ $(theatre_detect_drv_la_SOURCES) $(theatre_drv_la_SOURCES) ETAGS = etags CTAGS = ctags @@ -379,6 +387,16 @@ theatre_drv_la_SOURCES = \ theatre.c theatre_module.c +theater_out_drv_la_LTLIBRARIES = theater_out_drv.la +theater_out_drv_la_LDFLAGS = -module -avoid-version +theater_out_drv_ladir = @moduledir@/multimedia +theater_out_drv_la_CFLAGS = \ + $(AM_CFLAGS) -DMICROC_DIR=\"$(theater_out_drv_ladir)\" + +theater_out_drv_la_SOURCES = \ + theater_out.c theater_out_module.c + + theatre200_drv_la_LTLIBRARIES = theatre200_drv.la theatre200_drv_la_LDFLAGS = -module -avoid-version theatre200_drv_ladir = @moduledir@/multimedia @@ -474,6 +492,7 @@ radeon_sarea.h \ radeon_version.h \ radeon_video.h \ + theater_out.h \ theatre200.h \ theatre_detect.h \ theatre.h \ @@ -621,6 +640,35 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done +theater_out_drv_laLTLIBRARIES_INSTALL = $(INSTALL) +install-theater_out_drv_laLTLIBRARIES: $(theater_out_drv_la_LTLIBRARIES) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(theater_out_drv_ladir) + @list='$(theater_out_drv_la_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(LIBTOOL) --mode=install $(theater_out_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(theater_out_drv_ladir)/$$f"; \ + $(LIBTOOL) --mode=install $(theater_out_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(theater_out_drv_ladir)/$$f; \ + else :; fi; \ + done + +uninstall-theater_out_drv_laLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(theater_out_drv_la_LTLIBRARIES)'; for p in $$list; do \ + p="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(theater_out_drv_ladir)/$$p"; \ + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(theater_out_drv_ladir)/$$p; \ + done + +clean-theater_out_drv_laLTLIBRARIES: + -test -z "$(theater_out_drv_la_LTLIBRARIES)" || rm -f $(theater_out_drv_la_LTLIBRARIES) + @list='$(theater_out_drv_la_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" = "$$p" && dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done + install-theatre200_drv_laLTLIBRARIES: $(theatre200_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(theatre200_drv_ladir)" || $(mkdir_p) "$(DESTDIR)$(theatre200_drv_ladir)" @@ -710,6 +758,8 @@ $(LINK) -rpath $(r128_drv_ladir) $(r128_drv_la_LDFLAGS) $(r128_drv_la_OBJECTS) $(r128_drv_la_LIBADD) $(LIBS) radeon_drv.la: $(radeon_drv_la_OBJECTS) $(radeon_drv_la_DEPENDENCIES) $(LINK) -rpath $(radeon_drv_ladir) $(radeon_drv_la_LDFLAGS) $(radeon_drv_la_OBJECTS) $(radeon_drv_la_LIBADD) $(LIBS) +theater_out_drv.la: $(theater_out_drv_la_OBJECTS) $(theater_out_drv_la_DEPENDENCIES) + $(LINK) -rpath $(theater_out_drv_ladir) $(theater_out_drv_la_LDFLAGS) $(theater_out_drv_la_OBJECTS) $(theater_out_drv_la_LIBADD) $(LIBS) theatre200_drv.la: $(theatre200_drv_la_OBJECTS) $(theatre200_drv_la_DEPENDENCIES) $(LINK) -rpath $(theatre200_drv_ladir) $(theatre200_drv_la_LDFLAGS) $(theatre200_drv_la_OBJECTS) $(theatre200_drv_la_LIBADD) $(LIBS) theatre_detect_drv.la: $(theatre_detect_drv_la_OBJECTS) $(theatre_detect_drv_la_DEPENDENCIES) @@ -791,6 +841,8 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_probe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_vip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theater_out_drv_la-theater_out.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theater_out_drv_la-theater_out_module.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theatre.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theatre200_drv_la-theatre200.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/theatre200_drv_la-theatre200_module.Plo@am__quote@ @@ -819,6 +871,72 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +theater_out_drv_la-theater_out.o: theater_out.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -MT theater_out_drv_la-theater_out.o -MD -MP -MF "$(DEPDIR)/theater_out_drv_la-theater_out.Tpo" \ +@am__fastdepCC_TRUE@ -c -o theater_out_drv_la-theater_out.o `test -f 'theater_out.c' || echo '$(srcdir)/'`theater_out.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/theater_out_drv_la-theater_out.Tpo" "$(DEPDIR)/theater_out_drv_la-theater_out.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/theater_out_drv_la-theater_out.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='theater_out.c' object='theater_out_drv_la-theater_out.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/theater_out_drv_la-theater_out.Po' tmpdepfile='$(DEPDIR)/theater_out_drv_la-theater_out.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -c -o theater_out_drv_la-theater_out.o `test -f 'theater_out.c' || echo '$(srcdir)/'`theater_out.c + +theater_out_drv_la-theater_out.obj: theater_out.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -MT theater_out_drv_la-theater_out.obj -MD -MP -MF "$(DEPDIR)/theater_out_drv_la-theater_out.Tpo" \ +@am__fastdepCC_TRUE@ -c -o theater_out_drv_la-theater_out.obj `if test -f 'theater_out.c'; then $(CYGPATH_W) 'theater_out.c'; else $(CYGPATH_W) '$(srcdir)/theater_out.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/theater_out_drv_la-theater_out.Tpo" "$(DEPDIR)/theater_out_drv_la-theater_out.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/theater_out_drv_la-theater_out.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='theater_out.c' object='theater_out_drv_la-theater_out.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/theater_out_drv_la-theater_out.Po' tmpdepfile='$(DEPDIR)/theater_out_drv_la-theater_out.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -c -o theater_out_drv_la-theater_out.obj `if test -f 'theater_out.c'; then $(CYGPATH_W) 'theater_out.c'; else $(CYGPATH_W) '$(srcdir)/theater_out.c'; fi` + +theater_out_drv_la-theater_out.lo: theater_out.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -MT theater_out_drv_la-theater_out.lo -MD -MP -MF "$(DEPDIR)/theater_out_drv_la-theater_out.Tpo" \ +@am__fastdepCC_TRUE@ -c -o theater_out_drv_la-theater_out.lo `test -f 'theater_out.c' || echo '$(srcdir)/'`theater_out.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/theater_out_drv_la-theater_out.Tpo" "$(DEPDIR)/theater_out_drv_la-theater_out.Plo"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/theater_out_drv_la-theater_out.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='theater_out.c' object='theater_out_drv_la-theater_out.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/theater_out_drv_la-theater_out.Plo' tmpdepfile='$(DEPDIR)/theater_out_drv_la-theater_out.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -c -o theater_out_drv_la-theater_out.lo `test -f 'theater_out.c' || echo '$(srcdir)/'`theater_out.c + +theater_out_drv_la-theater_out_module.o: theater_out_module.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -MT theater_out_drv_la-theater_out_module.o -MD -MP -MF "$(DEPDIR)/theater_out_drv_la-theater_out_module.Tpo" \ +@am__fastdepCC_TRUE@ -c -o theater_out_drv_la-theater_out_module.o `test -f 'theater_out_module.c' || echo '$(srcdir)/'`theater_out_module.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/theater_out_drv_la-theater_out_module.Tpo" "$(DEPDIR)/theater_out_drv_la-theater_out_module.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/theater_out_drv_la-theater_out_module.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='theater_out_module.c' object='theater_out_drv_la-theater_out_module.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/theater_out_drv_la-theater_out_module.Po' tmpdepfile='$(DEPDIR)/theater_out_drv_la-theater_out_module.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -c -o theater_out_drv_la-theater_out_module.o `test -f 'theater_out_module.c' || echo '$(srcdir)/'`theater_out_module.c + +theater_out_drv_la-theater_out_module.obj: theater_out_module.c +@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -MT theater_out_drv_la-theater_out_module.obj -MD -MP -MF "$(DEPDIR)/theater_out_drv_la-theater_out_module.Tpo" \ +@am__fastdepCC_TRUE@ -c -o theater_out_drv_la-theater_out_module.obj `if test -f 'theater_out_module.c'; then $(CYGPATH_W) 'theater_out_module.c'; else $(CYGPATH_W) '$(srcdir)/theater_out_module.c'; fi`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/theater_out_drv_la-theater_out_module.Tpo" "$(DEPDIR)/theater_out_drv_la-theater_out_module.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/theater_out_drv_la-theater_out_module.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='theater_out_module.c' object='theater_out_drv_la-theater_out_module.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/theater_out_drv_la-theater_out_module.Po' tmpdepfile='$(DEPDIR)/theater_out_drv_la-theater_out_module.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -c -o theater_out_drv_la-theater_out_module.obj `if test -f 'theater_out_module.c'; then $(CYGPATH_W) 'theater_out_module.c'; else $(CYGPATH_W) '$(srcdir)/theater_out_module.c'; fi` + +theater_out_drv_la-theater_out_module.lo: theater_out_module.c +@am__fastdepCC_TRUE@ if $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -MT theater_out_drv_la-theater_out_module.lo -MD -MP -MF "$(DEPDIR)/theater_out_drv_la-theater_out_module.Tpo" \ +@am__fastdepCC_TRUE@ -c -o theater_out_drv_la-theater_out_module.lo `test -f 'theater_out_module.c' || echo '$(srcdir)/'`theater_out_module.c; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/theater_out_drv_la-theater_out_module.Tpo" "$(DEPDIR)/theater_out_drv_la-theater_out_module.Plo"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/theater_out_drv_la-theater_out_module.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='theater_out_module.c' object='theater_out_drv_la-theater_out_module.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/theater_out_drv_la-theater_out_module.Plo' tmpdepfile='$(DEPDIR)/theater_out_drv_la-theater_out_module.TPlo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theater_out_drv_la_CFLAGS) $(CFLAGS) -c -o theater_out_drv_la-theater_out_module.lo `test -f 'theater_out_module.c' || echo '$(srcdir)/'`theater_out_module.c + theatre200_drv_la-theatre200.lo: theatre200.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(theatre200_drv_la_CFLAGS) $(CFLAGS) -MT theatre200_drv_la-theatre200.lo -MD -MP -MF "$(DEPDIR)/theatre200_drv_la-theatre200.Tpo" -c -o theatre200_drv_la-theatre200.lo `test -f 'theatre200.c' || echo '$(srcdir)/'`theatre200.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/theatre200_drv_la-theatre200.Tpo" "$(DEPDIR)/theatre200_drv_la-theatre200.Plo"; else rm -f "$(DEPDIR)/theatre200_drv_la-theatre200.Tpo"; exit 1; fi @@ -922,7 +1040,7 @@ check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: - for dir in "$(DESTDIR)$(ati_drv_ladir)" "$(DESTDIR)$(atimisc_drv_ladir)" "$(DESTDIR)$(r128_drv_ladir)" "$(DESTDIR)$(radeon_drv_ladir)" "$(DESTDIR)$(theatre200_drv_ladir)" "$(DESTDIR)$(theatre_detect_drv_ladir)" "$(DESTDIR)$(theatre_drv_ladir)"; do \ + for dir in "$(DESTDIR)$(ati_drv_ladir)" "$(DESTDIR)$(atimisc_drv_ladir)" "$(DESTDIR)$(r128_drv_ladir)" "$(DESTDIR)$(radeon_drv_ladir)" $(DESTDIR)$(theater_out_drv_ladir) "$(DESTDIR)$(theatre200_drv_ladir)" "$(DESTDIR)$(theatre_detect_drv_ladir)" "$(DESTDIR)$(theatre_drv_ladir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am @@ -954,6 +1072,7 @@ clean-am: clean-ati_drv_laLTLIBRARIES clean-atimisc_drv_laLTLIBRARIES \ clean-generic clean-libtool clean-r128_drv_laLTLIBRARIES \ clean-radeon_drv_laLTLIBRARIES \ + clean-theater_out_drv_laLTLIBRARIES \ clean-theatre200_drv_laLTLIBRARIES \ clean-theatre_detect_drv_laLTLIBRARIES \ clean-theatre_drv_laLTLIBRARIES mostlyclean-am @@ -978,6 +1097,7 @@ install-atimisc_drv_laLTLIBRARIES \ install-r128_drv_laLTLIBRARIES \ install-radeon_drv_laLTLIBRARIES \ + install-theater_out_drv_laLTLIBRARIES \ install-theatre200_drv_laLTLIBRARIES \ install-theatre_detect_drv_laLTLIBRARIES \ install-theatre_drv_laLTLIBRARIES @@ -1012,6 +1132,7 @@ uninstall-atimisc_drv_laLTLIBRARIES uninstall-info-am \ uninstall-r128_drv_laLTLIBRARIES \ uninstall-radeon_drv_laLTLIBRARIES \ + uninstall-theater_out_drv_laLTLIBRARIES \ uninstall-theatre200_drv_laLTLIBRARIES \ uninstall-theatre_detect_drv_laLTLIBRARIES \ uninstall-theatre_drv_laLTLIBRARIES @@ -1020,6 +1141,7 @@ clean-ati_drv_laLTLIBRARIES clean-atimisc_drv_laLTLIBRARIES \ clean-generic clean-libtool clean-r128_drv_laLTLIBRARIES \ clean-radeon_drv_laLTLIBRARIES \ + clean-theater_out_drv_laLTLIBRARIES \ clean-theatre200_drv_laLTLIBRARIES \ clean-theatre_detect_drv_laLTLIBRARIES \ clean-theatre_drv_laLTLIBRARIES ctags distclean \ @@ -1030,6 +1152,7 @@ install-exec install-exec-am install-info install-info-am \ install-man install-r128_drv_laLTLIBRARIES \ install-radeon_drv_laLTLIBRARIES install-strip \ + install-theater_out_drv_laLTLIBRARIES \ install-theatre200_drv_laLTLIBRARIES \ install-theatre_detect_drv_laLTLIBRARIES \ install-theatre_drv_laLTLIBRARIES installcheck installcheck-am \ @@ -1040,6 +1163,7 @@ uninstall-atimisc_drv_laLTLIBRARIES uninstall-info-am \ uninstall-r128_drv_laLTLIBRARIES \ uninstall-radeon_drv_laLTLIBRARIES \ + uninstall-theater_out_drv_laLTLIBRARIES \ uninstall-theatre200_drv_laLTLIBRARIES \ uninstall-theatre_detect_drv_laLTLIBRARIES \ uninstall-theatre_drv_laLTLIBRARIES Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: Makefile.in~ Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: Makefile.in.orig Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: Makefile.in.rej diff -ur xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon_driver.c xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon_driver.c --- xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon_driver.c 2006-10-03 15:49:31.000000000 +0100 +++ xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon_driver.c 2007-05-28 15:59:15.000000000 +0100 @@ -76,6 +76,7 @@ #include "radeon_macros.h" #include "radeon_probe.h" #include "radeon_version.h" +#include "theater_out.h" #include "radeon_mergedfb.h" #ifdef XF86DRI @@ -196,6 +197,7 @@ { OPTION_RAGE_THEATRE_COMPOSITE_PORT, "RageTheatreCompositePort", OPTV_INTEGER, {0}, FALSE }, { OPTION_RAGE_THEATRE_SVIDEO_PORT, "RageTheatreSVideoPort", OPTV_INTEGER, {0}, FALSE }, { OPTION_TUNER_TYPE, "TunerType", OPTV_INTEGER, {0}, FALSE }, + { OPTION_TV_OUTPUT, "TVOutput", OPTV_ANYSTR, {0}, FALSE }, { OPTION_RAGE_THEATRE_MICROC_PATH, "RageTheatreMicrocPath", OPTV_STRING, {0}, FALSE }, { OPTION_RAGE_THEATRE_MICROC_TYPE, "RageTheatreMicrocType", OPTV_STRING, {0}, FALSE }, #endif @@ -5733,6 +5735,31 @@ info->PaletteSavedOnVT = FALSE; + RADEONTRACE(("Allocating VIP interface")); + info->VIP = RADEONAllocateVIP(pScrn); + + if ((s = xf86GetOptValString(info->Options , OPTION_TV_OUTPUT)) != NULL && xf86NameCmp(s , "NOLOAD") != 0) + { + RADEONTRACE(("TVOutput opt = %s\n" , s)); + if(!xf86LoadSubModule(pScrn , "theater_out")) + { + RADEONTRACE(("Failed to find theater_out module\n")); + xf86DrvMsg(pScrn->scrnIndex , X_ERROR , "Unable to load TV output module\n"); + info->theaterOut = NULL; + } + else + { + RADEONTRACE(("Found theater_out module\n")); + xf86LoaderReqSymbols(THEATER_OUT_SYMBOLS , NULL); + + info->theaterOut = xf86_detectTheaterOut(pScrn , FALSE,info->VIP); + if (info->theaterOut != NULL) + xf86_initTheaterOut(info->theaterOut , s); + } + + } + + RADEONSave(pScrn); if ((!info->IsSecondary) && info->IsMobility) { @@ -6173,7 +6200,8 @@ /* Init Xv */ RADEONTRACE(("Initializing Xv\n")); - RADEONInitVideo(pScreen); +// RADEONInitVideo(pScreen); + RADEONInitVideo(pScreen , info->VIP , TRUE); if(info->MergedFB) /* need this here to fix up sarea values */ @@ -6413,7 +6441,11 @@ OUTREG(RADEON_OVR_WID_TOP_BOTTOM, restore->ovr_wid_top_bottom); OUTREG(RADEON_OV0_SCALE_CNTL, restore->ov0_scale_cntl); OUTREG(RADEON_SUBPIC_CNTL, restore->subpic_cntl); - OUTREG(RADEON_VIPH_CONTROL, restore->viph_control); +// OUTREG(RADEON_VIPH_CONTROL, restore->viph_control); + /* + * fulivi: removed. It messes the VIP access up + */ + OUTREG(RADEON_I2C_CNTL_1, restore->i2c_cntl_1); OUTREG(RADEON_GEN_INT_CNTL, restore->gen_int_cntl); OUTREG(RADEON_CAP0_TRIG_CNTL, restore->cap0_trig_cntl); @@ -6499,6 +6531,7 @@ OUTREG(RADEON_CRTC_OFFSET, restore->crtc_offset); OUTREG(RADEON_CRTC_OFFSET_CNTL, restore->crtc_offset_cntl); OUTREG(RADEON_CRTC_PITCH, restore->crtc_pitch); + OUTREG(RADEON_DISP_OUTPUT_CNTL, restore->disp_output_cntl); OUTREG(RADEON_DISP_MERGE_CNTL, restore->disp_merge_cntl); OUTREG(RADEON_CRTC_MORE_CNTL, restore->crtc_more_cntl); @@ -6681,12 +6714,43 @@ ~(RADEON_P2PLL_ATOMIC_UPDATE_W)); } +static CARD8 RADEONComputePLLGain(CARD16 reference_freq, + CARD16 ref_div, + CARD16 fb_div) +{ + unsigned vcoFreq; + + vcoFreq = ((unsigned)reference_freq * fb_div) / ref_div; + + /* + * This is orribly crude: the VCO frequency range is divided into + * 3 parts, each part having a fixed PLL gain value. + */ + if (vcoFreq >= 30000) + /* + * [300..max] MHz : 7 + */ + return 7; + else if (vcoFreq >= 18000) + /* + * [180..300) MHz : 4 + */ + return 4; + else + /* + * [0..180) MHz : 1 + */ + return 1; +} + + /* Write PLL registers */ static void RADEONRestorePLLRegisters(ScrnInfoPtr pScrn, RADEONSavePtr restore) { RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; + CARD8 pllGain; if (info->IsMobility) { /* A temporal workaround for the occational blanking on certain laptop panels. @@ -6709,15 +6773,23 @@ OUTPLLP(pScrn, RADEON_VCLK_ECP_CNTL, RADEON_VCLK_SRC_SEL_CPUCLK, ~(RADEON_VCLK_SRC_SEL_MASK)); + pllGain = RADEONComputePLLGain(info->pll.reference_freq, + restore->ppll_ref_div & RADEON_PPLL_REF_DIV_MASK, + restore->ppll_div_3 & RADEON_PPLL_FB3_DIV_MASK); + + OUTPLLP(pScrn, RADEON_PPLL_CNTL, RADEON_PPLL_RESET | RADEON_PPLL_ATOMIC_UPDATE_EN - | RADEON_PPLL_VGA_ATOMIC_UPDATE_EN, + | RADEON_PPLL_VGA_ATOMIC_UPDATE_EN + | ((CARD32)pllGain << RADEON_PPLL_PVG_SHIFT), ~(RADEON_PPLL_RESET | RADEON_PPLL_ATOMIC_UPDATE_EN - | RADEON_PPLL_VGA_ATOMIC_UPDATE_EN)); + | RADEON_PPLL_VGA_ATOMIC_UPDATE_EN + | RADEON_PPLL_PVG_MASK)); + OUTREGP(RADEON_CLOCK_CNTL_INDEX, RADEON_PLL_DIV_SEL, @@ -6777,9 +6849,10 @@ usleep(50000); /* Let the clock to lock */ - OUTPLLP(pScrn, RADEON_VCLK_ECP_CNTL, - RADEON_VCLK_SRC_SEL_PPLLCLK, - ~(RADEON_VCLK_SRC_SEL_MASK)); + OUTPLL(pScrn, RADEON_VCLK_ECP_CNTL , restore->vclk_ecp_cntl); + + RADEONTRACE(("VCLK_ECP_CNTL = %08X\n" , restore->vclk_ecp_cntl)); + } @@ -7202,6 +7275,7 @@ save->crtc_offset = INREG(RADEON_CRTC_OFFSET); save->crtc_offset_cntl = INREG(RADEON_CRTC_OFFSET_CNTL); save->crtc_pitch = INREG(RADEON_CRTC_PITCH); + save->disp_output_cntl = INREG(RADEON_DISP_OUTPUT_CNTL); save->disp_merge_cntl = INREG(RADEON_DISP_MERGE_CNTL); save->crtc_more_cntl = INREG(RADEON_CRTC_MORE_CNTL); @@ -7271,6 +7345,7 @@ save->ppll_ref_div = INPLL(pScrn, RADEON_PPLL_REF_DIV); save->ppll_div_3 = INPLL(pScrn, RADEON_PPLL_DIV_3); save->htotal_cntl = INPLL(pScrn, RADEON_HTOTAL_CNTL); + save->vclk_ecp_cntl= INPLL(pScrn, RADEON_VCLK_ECP_CNTL); RADEONTRACE(("Read: 0x%08x 0x%08x 0x%08lx\n", save->ppll_ref_div, @@ -7280,6 +7355,7 @@ save->ppll_ref_div & RADEON_PPLL_REF_DIV_MASK, save->ppll_div_3 & RADEON_PPLL_FB3_DIV_MASK, (save->ppll_div_3 & RADEON_PPLL_POST3_DIV_MASK) >> 16)); + RADEONTRACE(("Read VCLK_ECP_CNTL = %08x\n" , save->vclk_ecp_cntl)); } /* Read PLL registers */ @@ -7388,6 +7464,12 @@ RADEONSaveMode(pScrn, save); if (!info->IsSecondary) RADEONSaveSurfaces(pScrn, save); + + /* + * Save initial RT state + */ + if(info->theaterOut != NULL) + xf86_theaterOutSave(info->theaterOut , pScrn); } /* Restore the original (text) mode */ @@ -7430,6 +7512,11 @@ if (!info->IsSecondary) RADEONRestoreSurfaces(pScrn, restore); + /* + * Restore RT state + */ + if (info->theaterOut != NULL) + xf86_theaterOutRestore(info->theaterOut , pScrn); #if 0 /* Temp fix to "solve" VT switch problems. When switching VTs on * some systems, the console can either hang or the fonts can be @@ -8180,7 +8267,10 @@ save->crtc2_gen_cntl = (RADEON_CRTC2_EN | (format << 8)); save->fp2_h_sync_strt_wid = save->crtc2_h_sync_strt_wid; save->fp2_v_sync_strt_wid = save->crtc2_v_sync_strt_wid; - save->fp2_gen_cntl = info->SavedReg.fp2_gen_cntl | RADEON_FP2_ON; + save->fp2_gen_cntl = info->SavedReg.fp2_gen_cntl + | RADEON_FP2_SRC_SEL_CRTC2 + | RADEON_FP2_ON; + save->fp2_gen_cntl &= ~(RADEON_FP2_BLANK_EN); if ((info->ChipFamily == CHIP_FAMILY_R200) || @@ -8526,15 +8616,17 @@ pll->reference_freq); save->post_div = post_div->divider; - RADEONTRACE(("dc=%ld, of=%ld, fd=%d, pd=%d\n", + /* RADEONTRACE(("dc=%ld, of=%ld, fd=%d, pd=%d\n", save->dot_clock_freq, save->pll_output_freq, save->feedback_div, save->post_div)); - + fergal, don't know why this is commented out + */ save->ppll_ref_div = pll->reference_div; save->ppll_div_3 = (save->feedback_div | (post_div->bitvalue << 16)); save->htotal_cntl = 0; + save->vclk_ecp_cntl = (save->vclk_ecp_cntl & ~RADEON_VCLK_SRC_SEL_MASK) | RADEON_VCLK_SRC_SEL_PPLLCLK; } /* Define PLL2 registers for requested video mode */ @@ -8588,12 +8680,13 @@ pll->reference_freq); save->post_div_2 = post_div->divider; - RADEONTRACE(("dc=%ld, of=%ld, fd=%d, pd=%d\n", + /* RADEONTRACE(("dc=%ld, of=%ld, fd=%d, pd=%d\n", save->dot_clock_freq_2, save->pll_output_freq_2, save->feedback_div_2, save->post_div_2)); - + fergal don't know why this is either + */ save->p2pll_ref_div = pll->reference_div; save->p2pll_div_0 = (save->feedback_div_2 | (post_div->bitvalue << 16)); @@ -8667,6 +8760,12 @@ #endif info->Flags = mode->Flags; + /* + * Some registers are initialized from text mode state + */ + save->disp_output_cntl = RADEONPTR(pScrn)->SavedReg.disp_output_cntl; + save->vclk_ecp_cntl = RADEONPTR(pScrn)->SavedReg.vclk_ecp_cntl; + RADEONInitMemMapRegisters(pScrn, save, info); RADEONInitCommonRegisters(save, info); @@ -8735,9 +8834,25 @@ if (!RADEONInit(pScrn, mode, &info->ModeReg)) return FALSE; + /* + * Define RT state + */ + if (info->theaterOut != NULL) + { + Bool res = xf86_theaterOutInit(info->theaterOut , mode , &info->ModeReg); + RADEONTRACE(("theaterOutInit returns %d\n" , res)); + } + pScrn->vtSema = TRUE; RADEONBlank(pScrn); RADEONRestoreMode(pScrn, &info->ModeReg); + + /* + * Set RT to new mode + */ + if (info->theaterOut != NULL) + xf86_theaterOutRestoreMode(info->theaterOut , pScrn); + RADEONUnblank(pScrn); info->CurrentLayout.mode = mode; @@ -10131,3 +10246,81 @@ pScrn->FreeScreen = RADEONFreeScreen; pScrn->ValidMode = RADEONValidMode; } + + +/* + * fulivi: interface functions between RADEONSet/GetPortAttribute (in radeon_video.c) and + * theater_out module. + */ +static void RADEONRedoSwitchMode(ScrnInfoPtr pScrn) +{ + int scrnIndex = pScrn->scrnIndex; + + /* + * It seems that last parameter (flags) is not used + */ + RADEONSwitchMode(scrnIndex , pScrn->currentMode , 0); +} + +void RADEONTheaterOutSetStandard(ScrnInfoPtr pScrn, + TVStd std) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + RADEONTRACE(("RADEONTheaterOutSetStandard std = %d" , std)); + + if (info->theaterOut != NULL && xf86_theaterOutSetStandard(info->theaterOut , std)) + RADEONRedoSwitchMode(pScrn); +} + +TVStd RADEONTheaterOutGetStandard(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->theaterOut != NULL) + return xf86_theaterOutGetStandard(info->theaterOut); + else + return TV_STD_KEEP_OFF; +} + +Bool RADEONTheaterOutGetCompatMode(ScrnInfoPtr pScrn) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->theaterOut != NULL) + return xf86_theaterOutGetCompatMode(info->theaterOut); + else + return FALSE; +} + +void RADEONTheaterOutSetAttr(ScrnInfoPtr pScrn, + TheaterOutAttr attr, + int value) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->theaterOut != NULL) + xf86_theaterOutSetAttr(info->theaterOut , attr , value); +} + +int RADEONTheaterOutGetAttr(ScrnInfoPtr pScrn, + TheaterOutAttr attr) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->theaterOut != NULL) + return xf86_theaterOutGetAttr(info->theaterOut , attr); + else + return 0; +} + +void RADEONTheaterOutGetAttrLimits(ScrnInfoPtr pScrn, + TheaterOutAttr attr, + int *maxValue, + int *minValue) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + if (info->theaterOut != NULL) + xf86_theaterOutGetAttrLimits(info->theaterOut , attr , maxValue , minValue); +} Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: radeon_driver.c~ Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: radeon_driver.c.orig Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: radeon_driver.c.rej diff -ur xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon.h xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon.h --- xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon.h 2006-10-03 15:49:13.000000000 +0100 +++ xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon.h 2007-05-28 16:00:51.000000000 +0100 @@ -38,6 +38,7 @@ #ifndef _RADEON_H_ #define _RADEON_H_ +#include "radeon_version.h" #include /* For abs() */ #include /* For usleep() */ @@ -45,6 +46,7 @@ #include "compiler.h" #include "xf86fbman.h" +#include "generic_bus.h" /* PCI support */ #include "xf86Pci.h" @@ -132,3 +132,4 @@ OPTION_TUNER_TYPE, + OPTION_TV_OUTPUT, OPTION_RAGE_THEATRE_MICROC_PATH, OPTION_RAGE_THEATRE_MICROC_TYPE, @@ -292,6 +294,8 @@ unsigned ppll_div_3; CARD32 htotal_cntl; + CARD32 vclk_ecp_cntl; + /* Computed values for PLL2 */ CARD32 dot_clock_freq_2; CARD32 pll_output_freq_2; @@ -710,6 +714,8 @@ char* RageTheatreMicrocPath; char* RageTheatreMicrocType; Bool MM_TABLE_valid; + GENERIC_BUS_Ptr VIP; + struct TheaterOut *theaterOut; struct { CARD8 table_revision; CARD8 table_size; @@ -806,6 +812,8 @@ info->fifo_slots -= entries; \ } while (0) +#include "theater_out.h" + extern RADEONEntPtr RADEONEntPriv(ScrnInfoPtr pScrn); extern void RADEONWaitForFifoFunction(ScrnInfoPtr pScrn, int entries); extern void RADEONWaitForIdleMMIO(ScrnInfoPtr pScrn); @@ -816,6 +824,13 @@ extern void RADEONDoAdjustFrame(ScrnInfoPtr pScrn, int x, int y, int clone); +extern void RADEONTheaterOutSetStandard(ScrnInfoPtr, TVStd); +extern TVStd RADEONTheaterOutGetStandard(ScrnInfoPtr); +extern Bool RADEONTheaterOutGetCompatMode(ScrnInfoPtr); +extern void RADEONTheaterOutSetAttr(ScrnInfoPtr, TheaterOutAttr, int); +extern int RADEONTheaterOutGetAttr(ScrnInfoPtr, TheaterOutAttr); +extern void RADEONTheaterOutGetAttrLimits(ScrnInfoPtr, TheaterOutAttr, int *, int *); + extern void RADEONEngineReset(ScrnInfoPtr pScrn); extern void RADEONEngineFlush(ScrnInfoPtr pScrn); extern void RADEONEngineRestore(ScrnInfoPtr pScrn); @@ -847,7 +862,9 @@ extern int RADEONMinBits(int val); -extern void RADEONInitVideo(ScreenPtr pScreen); +extern GENERIC_BUS_Ptr RADEONAllocateVIP(ScrnInfoPtr pScrn); + +extern void RADEONInitVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre); extern void RADEONResetVideo(ScrnInfoPtr pScrn); extern void R300CGWorkaround(ScrnInfoPtr pScrn); Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: radeon.h~ Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: radeon.h.orig Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: radeon.h.rej diff -ur xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon_reg.h xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon_reg.h --- xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon_reg.h 2006-10-03 15:49:13.000000000 +0100 +++ xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon_reg.h 2007-05-28 16:26:12.000000000 +0100 @@ -1223,6 +1223,9 @@ # define RADEON_PPLL_SLEEP (1 << 1) # define RADEON_PPLL_ATOMIC_UPDATE_EN (1 << 16) # define RADEON_PPLL_VGA_ATOMIC_UPDATE_EN (1 << 17) +# define RADEON_PPLL_PVG_MASK (7 << 11) +# define RADEON_PPLL_PVG_SHIFT 11 + # define RADEON_PPLL_ATOMIC_UPDATE_VSYNC (1 << 18) #define RADEON_PPLL_DIV_0 0x0004 /* PLL */ #define RADEON_PPLL_DIV_1 0x0005 /* PLL */ diff -ur xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon_video.c xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon_video.c --- xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon_video.c 2006-10-03 15:49:13.000000000 +0100 +++ xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon_video.c 2007-05-28 16:26:12.000000000 +0100 @@ -75,7 +75,7 @@ static void RADEONInitOffscreenImages(ScreenPtr); -static XF86VideoAdaptorPtr RADEONSetupImageVideo(ScreenPtr); +static XF86VideoAdaptorPtr RADEONSetupImageVideo(ScreenPtr , GENERIC_BUS_Ptr , Bool); static int RADEONSetPortAttribute(ScrnInfoPtr, Atom, INT32, pointer); static int RADEONGetPortAttribute(ScrnInfoPtr, Atom ,INT32 *, pointer); static void RADEONStopVideo(ScrnInfoPtr, pointer, Bool); @@ -117,6 +117,23 @@ static Atom xvOvAlpha, xvGrAlpha, xvAlphaMode; +static Atom xvTvoStandard , xvTvoModeCompat; + +typedef struct +{ + char *name; + TheaterOutAttr attr; + Atom atom; +} TVOAttr; + +static +TVOAttr theaterOutAttrs[] = +{ + {"XV_TVO_HPOS" , THEATER_OUT_HPOS , 0 }, + {"XV_TVO_VPOS" , THEATER_OUT_VPOS , 0 }, + {"XV_TVO_HSIZE" , THEATER_OUT_HSIZE , 0 } +}; +#define N_TVO_ATTRS (sizeof(theaterOutAttrs) / sizeof(theaterOutAttrs[ 0 ])) #define GET_PORT_PRIVATE(pScrn) \ (RADEONPortPrivPtr)((RADEONPTR(pScrn))->adaptor->pPortPrivates[0].ptr) @@ -135,14 +152,14 @@ } #endif /* USE_EXA */ -void RADEONInitVideo(ScreenPtr pScreen) +void RADEONInitVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; XF86VideoAdaptorPtr newAdaptor = NULL; int num_adaptors; - newAdaptor = RADEONSetupImageVideo(pScreen); + newAdaptor = RADEONSetupImageVideo(pScreen , VIP , loadTheatre); RADEONInitOffscreenImages(pScreen); num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors); @@ -235,7 +252,8 @@ #endif -#define NUM_ATTRIBUTES 22 +//#define NUM_ATTRIBUTES 22 +#define NUM_ATTRIBUTES 22+5 #define NUM_DEC_ATTRIBUTES (NUM_ATTRIBUTES+12) static XF86AttributeRec Attributes[NUM_DEC_ATTRIBUTES+1] = @@ -251,6 +269,13 @@ {XvSettable | XvGettable, 0, 255, "XV_OVERLAY_ALPHA"}, {XvSettable | XvGettable, 0, 255, "XV_GRAPHICS_ALPHA"}, {XvSettable | XvGettable, 0, 1, "XV_ALPHA_MODE"}, + + {XvSettable | XvGettable, 0, TV_STD_N_STANDARDS-1, "XV_TVO_STANDARD"}, + { XvGettable, 0, ~0, "XV_TVO_MODE_COMPAT"}, + {XvSettable | XvGettable, -1000, 1000, "XV_TVO_HPOS"}, + {XvSettable | XvGettable, -1000, 1000, "XV_TVO_VPOS"}, + {XvSettable | XvGettable, -1000, 1000, "XV_TVO_HSIZE"}, + {XvSettable | XvGettable, -1000, 1000, "XV_BRIGHTNESS"}, {XvSettable | XvGettable, -1000, 1000, "XV_CONTRAST"}, {XvSettable | XvGettable, -1000, 1000, "XV_SATURATION"}, @@ -1056,6 +1081,7 @@ RADEONPortPrivPtr pPriv = info->adaptor->pPortPrivates[0].ptr; char tmp[200]; + unsigned i; /* this function is called from ScreenInit. pScreen is used by XAA internally, but not valid until ScreenInit finishs. */ @@ -1069,6 +1095,18 @@ xvLocationID = MAKE_ATOM("XV_LOCATION_ID"); xvDumpStatus = MAKE_ATOM("XV_DUMP_STATUS"); + xvTvoStandard = MAKE_ATOM("XV_TVO_STANDARD"); + xvTvoModeCompat = MAKE_ATOM("XV_TVO_MODE_COMPAT"); + + for (i = 0; i < N_TVO_ATTRS; i++) + { + char *name; + name = theaterOutAttrs[ i ].name; + theaterOutAttrs[ i ].atom = MakeAtom(name, strlen(name), TRUE); + + RADEONTRACE(("RADEONResetVideo,name=%s,atom=%d\n",name,theaterOutAttrs[ i ].atom)); + } + xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); xvSaturation = MAKE_ATOM("XV_SATURATION"); xvColor = MAKE_ATOM("XV_COLOR"); @@ -1270,7 +1308,7 @@ } static XF86VideoAdaptorPtr -RADEONAllocAdaptor(ScrnInfoPtr pScrn) +RADEONAllocAdaptor(ScrnInfoPtr pScrn, GENERIC_BUS_Ptr VIP) { XF86VideoAdaptorPtr adapt; RADEONInfoPtr info = RADEONPTR(pScrn); @@ -1396,7 +1434,9 @@ #endif /* Initialize VIP bus */ - RADEONVIP_init(pScrn, pPriv); +// RADEONVIP_init(pScrn, pPriv); + pPriv->VIP = VIP; + info->adaptor = adapt; if(!xf86LoadSubModule(pScrn,"theatre_detect")) @@ -1478,13 +1518,14 @@ } static XF86VideoAdaptorPtr -RADEONSetupImageVideo(ScreenPtr pScreen) +RADEONSetupImageVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; RADEONPortPrivPtr pPriv; XF86VideoAdaptorPtr adapt; + unsigned i; - if(!(adapt = RADEONAllocAdaptor(pScrn))) + if(!(adapt = RADEONAllocAdaptor(pScrn, VIP))) return NULL; adapt->type = XvWindowMask | XvInputMask | XvImageMask; @@ -1510,6 +1551,26 @@ adapt->PutImage = RADEONPutImage; adapt->QueryImageAttributes = RADEONQueryImageAttributes; + /* + * fulivi: set limits of theater_out attributes + */ + for (i = 0; i < N_TVO_ATTRS; i++) + { + int maxValue; + int minValue; + unsigned j; + + RADEONTheaterOutGetAttrLimits(pScrn , theaterOutAttrs[ i ].attr , &maxValue , &minValue); + + for (j = 0; i < NUM_DEC_ATTRIBUTES; j++) + if (strcmp(theaterOutAttrs[ i ].name , Attributes[ j ].name) == 0) + { + Attributes[ j ].min_value = minValue; + Attributes[ j ].max_value = maxValue; + break; + } + } + pPriv = (RADEONPortPrivPtr)(adapt->pPortPrivates[0].ptr); REGION_NULL(pScreen, &(pPriv->clip)); @@ -1812,8 +1873,24 @@ RADEON_TDA9885_SetEncoding(pPriv); } } - else - return BadMatch; + else if (attribute == xvTvoStandard) + { + value = ClipValue(value , 0 , TV_STD_N_STANDARDS-1); + RADEONTheaterOutSetStandard(pScrn , (TVStd)value); + } + else + { + unsigned i; + + for (i = 0; i < N_TVO_ATTRS; i++) + if (theaterOutAttrs[ i ].atom == attribute) + { + RADEONTheaterOutSetAttr(pScrn , theaterOutAttrs[ i ].attr , value); + break; + } + if (i == N_TVO_ATTRS) + return BadMatch; + } if (setTransform) { @@ -1917,8 +1994,22 @@ *value = pPriv->instance_id; else if(attribute == xvAdjustment) *value = pPriv->adjustment; - else - return BadMatch; + else if(attribute == xvTvoStandard) + *value = (INT32)RADEONTheaterOutGetStandard(pScrn); + else if(attribute == xvTvoModeCompat) + *value = (INT32)RADEONTheaterOutGetCompatMode(pScrn); + else { + unsigned i; + + for (i = 0; i < N_TVO_ATTRS; i++) { + if (theaterOutAttrs[ i ].atom == attribute) { + *value = (INT32)RADEONTheaterOutGetAttr(pScrn , theaterOutAttrs[ i].attr); + break; + } + } + if (i == N_TVO_ATTRS) + return BadMatch; + } return Success; } Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: radeon_video.c.orig diff -ur xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon_video.h xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon_video.h --- xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon_video.h 2006-06-19 08:38:36.000000000 +0100 +++ xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon_video.h 2007-05-28 16:26:12.000000000 +0100 @@ -47,6 +47,8 @@ GENERIC_BUS_Ptr VIP; TheatrePtr theatre; +/* TheaterOutPtr theaterOut; */ + Bool video_stream_active; int encoding; CARD32 frequency; diff -ur xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon_vip.c xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon_vip.c --- xorg-ati/xserver-xorg-video-ati-6.6.3/src/radeon_vip.c 2006-09-16 17:19:21.000000000 +0100 +++ xorg-ati.my/xserver-xorg-video-ati-6.6.3/src/radeon_vip.c 2007-05-28 16:26:12.000000000 +0100 @@ -342,6 +342,7 @@ void RADEONVIP_init(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { +/* pPriv->VIP=xcalloc(1,sizeof(GENERIC_BUS_Rec)); pPriv->VIP->scrnIndex=pScrn->scrnIndex; pPriv->VIP->DriverPrivate.ptr=pPriv; @@ -350,6 +351,33 @@ pPriv->VIP->write=RADEONVIP_write; pPriv->VIP->fifo_read=RADEONVIP_fifo_read; pPriv->VIP->fifo_write=RADEONVIP_fifo_write; - RADEONVIP_reset(pScrn, pPriv); +*/ +pPriv->VIP = RADEONAllocateVIP(pScrn); } + +/* + * fulivi: This new function was created because I needed VIP access from radeon_driver module + * (where port private data doesn't exist) + */ +GENERIC_BUS_Ptr +RADEONAllocateVIP( + ScrnInfoPtr pScrn + ) +{ + GENERIC_BUS_Ptr VIP=NULL; + + VIP = xcalloc(1 , sizeof(GENERIC_BUS_Rec)); + VIP->DriverPrivate.ptr = NULL; /* Nobody seems to use this */ + VIP->scrnIndex = pScrn->scrnIndex; + VIP->ioctl = RADEONVIP_ioctl; + VIP->read = RADEONVIP_read; + VIP->write = RADEONVIP_write; + VIP->fifo_read=RADEONVIP_fifo_read; + VIP->fifo_write=RADEONVIP_fifo_write; + + RADEONVIP_reset(pScrn,NULL); + + return VIP; +} + \ No newline at end of file Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: radeon_vip.c.orig Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: README.tvout Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: theater_out.c Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: theater_out.h Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: theater_out_module.c Only in xorg-ati.my/xserver-xorg-video-ati-6.6.3/src: tvo_set