From 39b43167f0650b9e09dccf6a3ee780d2ab567335 Mon Sep 17 00:00:00 2001 From: nick Date: Sun, 2 Dec 2001 11:45:44 +0000 Subject: [PATCH] Support for MTRR and 'swap_fourcc' flag git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3266 b3059339-0415-0410-9bf9-f77b7e298cf2 --- drivers/radeon/README | 27 ++++++++++++++++++++++++- drivers/radeon/radeon_vid.c | 40 ++++++++++++++++++++++++++++++------- 2 files changed, 59 insertions(+), 8 deletions(-) diff --git a/drivers/radeon/README b/drivers/radeon/README index f52d5c6d5c..96be727bfc 100644 --- a/drivers/radeon/README +++ b/drivers/radeon/README @@ -65,8 +65,27 @@ colour_key=hexval defines colour key deinterlace=on/off enables/disables adaprive deinterlacing deinterlace_pattern=hexval defines deinterlacing pattern +Driver parameters: +~~~~~~~~~~~~~~~~~~ + +You can use some additional parameters during module loading: +Example: +modprobe radeon_vid swap_fourcc=1 + +List of driver's parameters: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +mtrr=1/0 configures MTRR (if available) default = 1 +swap_fourcc=1/0 performs byte swapping of passed fourcc. + (It's required for compatibility with -vo mga) + +To know more about driver's parameters execute: +modinfo radeon_vid +or +modinfo rage128_vid + Note: ~~~~~ +For command line of mplayer: You can pass only options with can be recognized by vo_vesa driver. (Indeed radeon_vid and rage128_vid are stupid things and can create video overlay only. But mode switching and other adjustement performs @@ -77,4 +96,10 @@ Conslusion: This stuff (radeon(rage128)_vid) currently doesn't support any standards. So after implementing linux standards I'll fully rewrite this driver. -Enjoy \ No newline at end of file +Full example: +~~~~~~~~~~~~~ +modprobe radeon_vid mtrr=1 +echo "deinterlace_pattern=F0055555">>/dev/radeon_vid +mplayer -vo vesa:lvo:/dev/radeon_vid -fs -zoom -bpp 32 filename + +Enjoy! \ No newline at end of file diff --git a/drivers/radeon/radeon_vid.c b/drivers/radeon/radeon_vid.c index 4ea2518328..89aebb6ac2 100644 --- a/drivers/radeon/radeon_vid.c +++ b/drivers/radeon/radeon_vid.c @@ -53,6 +53,7 @@ #include #include #include +#include #include "radeon_vid.h" #include "radeon.h" @@ -80,6 +81,15 @@ MODULE_DESCRIPTION("Accelerated YUV BES driver for Radeons. Version: "RADEON_VID #ifdef MODULE_LICENSE MODULE_LICENSE("GPL"); #endif +#ifdef CONFIG_MTRR +MODULE_PARM(mtrr, "i"); +MODULE_PARM_DESC(mtrr, "Tune MTRR (touch=1(default))"); +static int mtrr __initdata = 1; +static struct { int vram; int vram_valid; } smtrr; +#endif +MODULE_PARM(swap_fourcc, "i"); +MODULE_PARM_DESC(swap_fourcc, "Swap fourcc (dont't swap=0(default))"); +static int swap_fourcc __initdata = 0; #ifdef RAGE128 #define RVID_MSG "rage128_vid: " @@ -260,14 +270,14 @@ static char *fourcc_format_name(int format) #define INREG(addr) readl((radeon_mmio_base)+addr) #define OUTREG(addr,val) writel(val, (radeon_mmio_base)+addr) -static void radeon_vid_save_state( void ) +static void __init radeon_vid_save_state( void ) { size_t i; for(i=0;i