gatos-cvs Mailing List for GATOS (Page 8)
Status: Beta
Brought to you by:
volodya
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(35) |
Feb
(67) |
Mar
(41) |
Apr
(4) |
May
(7) |
Jun
(9) |
Jul
(7) |
Aug
(2) |
Sep
(9) |
Oct
(3) |
Nov
(5) |
Dec
(30) |
| 2004 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
(9) |
Jun
(6) |
Jul
(8) |
Aug
(3) |
Sep
(5) |
Oct
(15) |
Nov
(25) |
Dec
(14) |
| 2005 |
Jan
(11) |
Feb
(5) |
Mar
(8) |
Apr
(5) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(3) |
Dec
|
| 2006 |
Jan
(2) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(2) |
| 2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: <gat...@li...> - 2003-12-14 09:43:19
|
Update of /cvsroot/gatos/avview In directory sc8-pr-cvs1:/tmp/cvs-serv8214 Modified Files: avview.scp Log Message: Change defaults to more reasonable values for AIW cards. Add snapshot command to right-click menu. Index: avview.scp =================================================================== RCS file: /cvsroot/gatos/avview/avview.scp,v retrieving revision 1.141 retrieving revision 1.142 diff -u -d -r1.141 -r1.142 --- avview.scp 1 Dec 2003 22:44:06 -0000 1.141 +++ avview.scp 14 Dec 2003 04:38:52 -0000 1.142 @@ -36,11 +36,11 @@ remember_fullscreen_state "false" always_start_fullscreen "false" display_setup_window_on_startup "false" - current_v4l_mode "single-frame" + current_v4l_mode "double-interpolate" v4l_capture_on "false" current_video_codec "MPEG-1" current_audio_codec "MPEG-2" - current_v4l_rrate "as is" + current_v4l_rrate "one half" current_v4l_device "none" current_av_format "MPEG" current_port "none" @@ -752,6 +752,8 @@ .video_menu add cascade -menu .video_menu.interface_menu -label "User interface" .video_menu add separator .video_menu add command -label "Exit AVview" -command exit_avview +.video_menu add separator +.video_menu add command -label "Snapshot" -command capture_snapshot .video_menu add separator .video_menu add command -label "Dismiss this menu" |
|
From: <gat...@li...> - 2003-12-14 08:50:49
|
Update of /cvsroot/gatos/km
In directory sc8-pr-cvs1:/tmp/cvs-serv4868
Modified Files:
km_api.c test1.tcl
Added Files:
test3.tcl
Log Message:
Add Tcl/Tk script to exercise *_STREAM_ACTIVE options.
Cleanup invocation of Tcl/Tk interpreter.
--- NEW FILE: test3.tcl ---
#!/usr/bin/env tclsh
set file [open "/proc/km/control0" w+]
puts $file "STATUS"
flush $file
foreach field {
"VSYNC_COUNT"
"VBLANK_COUNT"
"VLINE_COUNT"
"VIDEO_STREAM_DATA_UNIT"
"VIDEO_STREAM_INFO_DATA_UNIT"
"VIDEO_STREAM_ACTIVE"
"VBI_STREAM_ACTIVE"
} {
puts $file "REPORT $field"
flush $file
}
puts $file "VIDEO_STREAM_ACTIVE=1"
flush $file
puts $file "VIDEO_STREAM_ACTIVE=0"
flush $file
while { 1} {
gets $file line
puts "$line"
}
Index: km_api.c
===================================================================
RCS file: /cvsroot/gatos/km/km_api.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- km_api.c 14 Dec 2003 03:55:14 -0000 1.34
+++ km_api.c 14 Dec 2003 04:31:31 -0000 1.35
@@ -61,8 +61,8 @@
for(i=0;(i<length)&& s[i] && (s[i]!=' ') && (s[i]!='\n') && (s[i]!='=');i++){
r=(r*KM_MULTIPLE+s[i]) % KM_MODULUS;
}
-if(i>=length){
- printk("%s %s: length limit reached for string %s\n",__FILE__, __FUNCTION__, s);
+if((i>=length)&& s[i]){
+ printk("%s function %s: length limit reached for string %s\n",__FILE__, __FUNCTION__, s);
}
return r;
}
@@ -329,6 +329,7 @@
char *value;
KM_FIELD *kf;
KM_FIELD_DATA *kfd;
+u32 int_value;
spin_lock(&(kmd->lock));
hash=km_command_hash(command, count);
@@ -354,7 +355,7 @@
}
} else {
i=kmd->command_hash[hash];
- while((i>=0) && strncmp(kmd->fields[i].name, command, count))i=kmd->fields[i].next_command;
+ while((i>=0) && (count>=kmd->fields[i].length) && strncmp(kmd->fields[i].name, command, kmd->fields[i].length))i=kmd->fields[i].next_command;
if(i<0)goto exit; /* nothing matched */
kf=&(kmd->fields[i]);
@@ -369,12 +370,15 @@
break;
}
}
+
+ int_value=simple_strtol(value,NULL,j);
+ printk("Processing \"%s\"=\"%s\" int_value=%d\n", kf->name, value, int_value);
switch(kf->type){
case KM_FIELD_TYPE_PROGRAMMABLE:
printk("Performing KM_FIELD_PROGRAMMABLE action \"%s\" is not implemented [yet]\n", kmd->fields[i].name);
break;
case KM_FIELD_TYPE_LEVEL_TRIGGER:
- if(!j || (*value=='0')){
+ if(!j || (int_value==0)){
/* trigger lowered */
if(!kfd->t.requested){ goto exit; /* redundant */ }
kfd->t.requested=0;
@@ -385,7 +389,7 @@
if(kfd->t.requested){ goto exit; /* redundant */ }
kfd->t.requested=1;
kf->data.t.count++;
- if(!kf->data.t.count)kf->data.t.zero2one(kf);
+ if(kf->data.t.count)kf->data.t.zero2one(kf);
}
break;
}
Index: test1.tcl
===================================================================
RCS file: /cvsroot/gatos/km/test1.tcl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- test1.tcl 29 Dec 2002 06:51:28 -0000 1.5
+++ test1.tcl 14 Dec 2003 04:31:31 -0000 1.6
@@ -1,4 +1,4 @@
-#!/usr/local/bin/wish
+#!/usr/bin/env tclsh
set file [open "/proc/km/control0" w+]
|
|
From: <gat...@li...> - 2003-12-14 08:49:27
|
Update of /cvsroot/gatos/km
In directory sc8-pr-cvs1:/tmp/cvs-serv32198
Modified Files:
km_api.c
Log Message:
On the way to implementing support for level trigger.
Index: km_api.c
===================================================================
RCS file: /cvsroot/gatos/km/km_api.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- km_api.c 14 Dec 2003 03:18:32 -0000 1.33
+++ km_api.c 14 Dec 2003 03:55:14 -0000 1.34
@@ -201,6 +201,15 @@
kmfpd->kfd=kmalloc(sizeof(*(kmfpd->kfd))*kmd->num_fields, GFP_KERNEL);
memset(kmfpd->kfd, 0, sizeof(*(kmfpd->kfd))*kmd->num_fields);
+/* initialize field values */
+for(i=0;i<kmd->num_fields;i++)
+ switch(kmd->fields[i].type){
+ case KM_FIELD_TYPE_LEVEL_TRIGGER:
+ kmfpd->kfd[i].t.requested=0;
+ kmfpd->kfd[i].t.old_count=0;
+ break;
+ }
+
spin_lock_init(&(kmfpd->lock));
file->private_data=kmfpd;
@@ -215,6 +224,20 @@
char temp[32];
KM_FILE_PRIVATE_DATA *kmfpd=file->private_data;
KM_DEVICE *kmd=kmfpd->kmd;
+int i;
+
+spin_lock(&(kmd->lock));
+/* cleanup first, as some fields need to relinquish their state */
+for(i=0;i<kmd->num_fields;i++){
+ switch(kmd->fields[i].type){
+ case KM_FIELD_TYPE_LEVEL_TRIGGER:
+ if(kmfpd->kfd[i].t.requested){
+ kmd->fields[i].data.t.count--;
+ if(!kmd->fields[i].data.t.count)kmd->fields[i].data.t.one2zero(&(kmd->fields[i]));
+ }
+ break;
+ }
+ }
kfree(kmfpd->field_flags);
kmfpd->field_flags=NULL;
@@ -225,7 +248,6 @@
kfree(kmfpd);
kmfpd=NULL;
file->private_data=NULL;
-spin_lock(&(kmd->lock));
kmd->use_count--;
if(kmd->use_count<=0){
devices[kmd->number]=NULL;
@@ -301,9 +323,14 @@
void km_fo_control_perform_command(KM_FILE_PRIVATE_DATA *kmfpd, const char *command, size_t count)
{
KM_DEVICE *kmd=kmfpd->kmd;
-int i;
+int i,j;
int field_length;
unsigned hash;
+char *value;
+KM_FIELD *kf;
+KM_FIELD_DATA *kfd;
+
+spin_lock(&(kmd->lock));
hash=km_command_hash(command, count);
if((hash==kmd->status_hash) && !strncmp("STATUS\n", command, count)){
spin_lock(&(kmfpd->lock));
@@ -313,7 +340,7 @@
} else
if((hash==kmd->report_hash)&& (count>8) && !strncmp("REPORT ", command, 7)){
field_length=count-8; /* exclude trailing \n */
- if(field_length<=0)return; /* bogus command */
+ if(field_length<=0)goto exit; /* bogus command */
for(i=0;i<kmd->num_fields;i++){
if(!strncmp(command+7, kmd->fields[i].name, field_length)&&
!kmd->fields[i].name[field_length]){
@@ -322,22 +349,50 @@
spin_unlock(&(kmfpd->lock));
kmd_signal_state_change(kmd->number);
printk("Reporting field %d = %s\n", i, kmd->fields[i].name);
- return;
+ goto exit;
}
}
} else {
i=kmd->command_hash[hash];
while((i>=0) && strncmp(kmd->fields[i].name, command, count))i=kmd->fields[i].next_command;
- if(i<0)return; /* nothing matched */
+ if(i<0)goto exit; /* nothing matched */
- printk("Performing action %s [not implemented]\n", kmd->fields[i].name);
- switch(kmd->fields[i].type){
+ kf=&(kmd->fields[i]);
+ kfd=&(kmfpd->kfd[i]);
+
+ value=&(command[kf->length]);
+ j=count-kf->length;
+ while((*value=='=')||(*value==' ')||(*value=='\t')){
+ j--;
+ value++;
+ if(!j){
+ break;
+ }
+ }
+ switch(kf->type){
case KM_FIELD_TYPE_PROGRAMMABLE:
+ printk("Performing KM_FIELD_PROGRAMMABLE action \"%s\" is not implemented [yet]\n", kmd->fields[i].name);
break;
case KM_FIELD_TYPE_LEVEL_TRIGGER:
+ if(!j || (*value=='0')){
+ /* trigger lowered */
+ if(!kfd->t.requested){ goto exit; /* redundant */ }
+ kfd->t.requested=0;
+ kf->data.t.count--;
+ if(!kf->data.t.count)kf->data.t.one2zero(kf);
+ } else {
+ /* trigger raised */
+ if(kfd->t.requested){ goto exit; /* redundant */ }
+ kfd->t.requested=1;
+ kf->data.t.count++;
+ if(!kf->data.t.count)kf->data.t.zero2one(kf);
+ }
break;
}
}
+
+exit:
+spin_unlock(&(kmd->lock));
}
static ssize_t km_fo_control_write(struct file * file, const char * buffer, size_t count, loff_t *ppos)
|
|
From: <gat...@li...> - 2003-12-14 08:35:22
|
Update of /cvsroot/gatos/km
In directory sc8-pr-cvs1:/tmp/cvs-serv22684
Modified Files:
km_api.c
Log Message:
Warn when length limit is reached when computing hash.
Index: km_api.c
===================================================================
RCS file: /cvsroot/gatos/km/km_api.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- km_api.c 30 Nov 2003 04:35:19 -0000 1.31
+++ km_api.c 14 Dec 2003 03:08:27 -0000 1.32
@@ -60,7 +60,10 @@
r=0;
for(i=0;(i<length)&& s[i] && (s[i]!=' ') && (s[i]!='\n') && (s[i]!='=');i++){
r=(r*KM_MULTIPLE+s[i]) % KM_MODULUS;
- }
+ }
+if(i>=length){
+ printk("%s %s: length limit reached for string %s\n",__FILE__, __FUNCTION__, s);
+ }
return r;
}
|
|
From: <gat...@li...> - 2003-12-14 08:35:06
|
Update of /cvsroot/gatos/km
In directory sc8-pr-cvs1:/tmp/cvs-serv1906
Modified Files:
km_api.c km_api.h
Log Message:
Fix an bogus field overwrite bug.
Add a field to hold length of field name, for convenience.
Index: km_api.c
===================================================================
RCS file: /cvsroot/gatos/km/km_api.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- km_api.c 14 Dec 2003 03:08:27 -0000 1.32
+++ km_api.c 14 Dec 2003 03:18:32 -0000 1.33
@@ -334,6 +334,8 @@
switch(kmd->fields[i].type){
case KM_FIELD_TYPE_PROGRAMMABLE:
break;
+ case KM_FIELD_TYPE_LEVEL_TRIGGER:
+ break;
}
}
}
@@ -403,17 +405,21 @@
kmd->command_hash=kmalloc(sizeof(*(kmd->command_hash))*KM_MODULUS, GFP_KERNEL);
for(i=0;i<KM_MODULUS;i++)kmd->command_hash[i]=-1;
while((kf=&(kmd->fields[kmd->num_fields]))->type!=KM_FIELD_TYPE_EOL){
- kmd->num_fields++;
- kmd->fields[i].next_command=-1;
- if(kf->type==KM_FIELD_TYPE_PROGRAMMABLE){
- h=km_command_hash(kf->name, 10000); /*names longer than that are bogus, really ! */
- i=kmd->command_hash[h];
- if(i<0)kmd->command_hash[h]=kmd->num_fields;
- else {
- while(kmd->fields[i].next_command>=0)i=kmd->fields[i].next_command;
- kmd->fields[i].next_command=kmd->num_fields;
- }
+ kf->next_command=-1;
+ kf->length=strlen(kf->name);
+ switch(kf->type){
+ case KM_FIELD_TYPE_PROGRAMMABLE:
+ case KM_FIELD_TYPE_LEVEL_TRIGGER:
+ h=km_command_hash(kf->name, kf->length);
+ i=kmd->command_hash[h];
+ if(i<0)kmd->command_hash[h]=kmd->num_fields;
+ else {
+ while(kmd->fields[i].next_command>=0)i=kmd->fields[i].next_command;
+ kmd->fields[i].next_command=kmd->num_fields;
+ }
+ break;
}
+ kmd->num_fields++;
}
kmd->priv=priv;
spin_lock_init(&(kmd->lock));
Index: km_api.h
===================================================================
RCS file: /cvsroot/gatos/km/km_api.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- km_api.h 30 Nov 2003 04:35:19 -0000 1.20
+++ km_api.h 14 Dec 2003 03:18:32 -0000 1.21
@@ -75,6 +75,7 @@
typedef struct S_KM_FIELD {
int type;
char *name;
+ int length;
int changed;
spinlock_t *lock;
void *priv;
|
|
From: <gat...@li...> - 2003-12-07 22:49:58
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv7982
Modified Files:
radeon_video.c
Log Message:
Merge patch from Jan Veninga.
Index: radeon_video.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_video.c,v
retrieving revision 1.98
retrieving revision 1.99
diff -u -d -r1.98 -r1.99
--- radeon_video.c 2 Dec 2003 19:04:51 -0000 1.98
+++ radeon_video.c 7 Dec 2003 22:49:55 -0000 1.99
@@ -3319,17 +3319,17 @@
case 1:
xf86_RT_SetConnector(pPriv->theatre,DEC_COMPOSITE, 0);
xf86_RT_SetStandard(pPriv->theatre,DEC_PAL | extPAL);
- pPriv->v=24;
+ pPriv->v=25;
break;
case 2:
xf86_RT_SetConnector(pPriv->theatre,DEC_TUNER,0);
xf86_RT_SetStandard(pPriv->theatre,DEC_PAL | extPAL);
- pPriv->v=24;
+ pPriv->v=25;
break;
case 3:
xf86_RT_SetConnector(pPriv->theatre,DEC_SVIDEO,0);
xf86_RT_SetStandard(pPriv->theatre,DEC_PAL | extPAL);
- pPriv->v=24;
+ pPriv->v=25;
break;
case 4:
xf86_RT_SetConnector(pPriv->theatre, DEC_COMPOSITE,0);
@@ -3364,17 +3364,17 @@
case 10:
xf86_RT_SetConnector(pPriv->theatre,DEC_COMPOSITE, 0);
xf86_RT_SetStandard(pPriv->theatre,DEC_PAL | extPAL_60);
- pPriv->v=24;
+ pPriv->v=25;
break;
case 11:
xf86_RT_SetConnector(pPriv->theatre,DEC_TUNER,0);
xf86_RT_SetStandard(pPriv->theatre,DEC_PAL | extPAL_60);
- pPriv->v=24;
+ pPriv->v=25;
break;
case 12:
xf86_RT_SetConnector(pPriv->theatre,DEC_SVIDEO,0);
xf86_RT_SetStandard(pPriv->theatre,DEC_PAL | extPAL_60);
- pPriv->v=24;
+ pPriv->v=25;
break;
default:
pPriv->v=0;
|
|
From: <gat...@li...> - 2003-12-02 19:04:55
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv17410
Modified Files:
radeon_video.c
Log Message:
Merge patch from Dmitri Katchalov.
Index: radeon_video.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_video.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- radeon_video.c 1 Dec 2003 20:56:50 -0000 1.97
+++ radeon_video.c 2 Dec 2003 19:04:51 -0000 1.98
@@ -948,22 +948,22 @@
/* reset status flags */
RADEONWaitForIdleMMIO(pScrn);
- reg = INREG8 (RADEON_I2C_CNTL_0 + 0) & 0xF8;
+ reg = INREG8 (RADEON_I2C_CNTL_0 + 0) & ~(I2C_DONE|I2C_NACK|I2C_HALT);
OUTREG8 (RADEON_I2C_CNTL_0 + 0, reg);
/* issue ABORT call */
RADEONWaitForIdleMMIO(pScrn);
reg = INREG8 (RADEON_I2C_CNTL_0 + 1) & 0xE7;
- OUTREG8 (RADEON_I2C_CNTL_0 + 1, (reg | 0x18));
+ OUTREG8 (RADEON_I2C_CNTL_0 + 1, (reg |((I2C_GO|I2C_ABORT) >> 8)));
/* wait for GO bit to go low */
RADEONWaitForIdleMMIO(pScrn);
- while (INREG8 (RADEON_I2C_CNTL_0 + 0) & I2C_GO)
+ while (INREG8 (RADEON_I2C_CNTL_0 + 1) & (I2C_GO>>8))
{
counter++;
if(counter>1000000)return;
}
-}
+}
static Bool RADEONI2CWriteRead(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite,
|
|
From: <gat...@li...> - 2003-12-02 03:25:01
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv24852
Modified Files:
radeon_driver.c radeon_reg.h radeon_video.c
Log Message:
Merge patch from Alex Deucher and necessary register definitions.
Index: radeon_driver.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_driver.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- radeon_driver.c 1 Mar 2003 08:02:15 -0000 1.16
+++ radeon_driver.c 1 Dec 2003 20:56:50 -0000 1.17
@@ -5281,7 +5281,7 @@
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 = (RADEON_FP2_SEL_CRTC2 |
+ save->fp2_gen_cntl = (RADEON_FP2_SRC_SEL_CRTC2 |
RADEON_FP2_PANEL_FORMAT |
RADEON_FP2_ON);
Index: radeon_reg.h
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_reg.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- radeon_reg.h 18 Nov 2003 22:19:23 -0000 1.13
+++ radeon_reg.h 1 Dec 2003 20:56:50 -0000 1.14
@@ -1,4 +1,4 @@
-/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h,v 1.25 2003/02/07 18:08:59 martin Exp $ */
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h,v 1.31 2003/11/10 18:41:23 tsi Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
* VA Linux Systems Inc., Fremont, California.
@@ -66,6 +66,8 @@
# define RADEON_AGP_APER_SIZE_4MB (0x3f << 0)
# define RADEON_AGP_APER_SIZE_MASK (0x3f << 0)
#define RADEON_AGP_COMMAND 0x0f60 /* PCI */
+#define RADEON_AGP_COMMAND_PCI_CONFIG 0x0060 /* offset in PCI config*/
+# define RADEON_AGP_ENABLE (1<<8)
#define RADEON_AGP_PLL_CNTL 0x000b /* PLL */
#define RADEON_AGP_STATUS 0x0f5c /* PCI */
# define RADEON_AGP_1X_MODE 0x01
@@ -230,6 +232,28 @@
# define RADEON_CONSTANT_COLOR_ZERO 0x00000000
#define RADEON_CRC_CMDFIFO_ADDR 0x0740
#define RADEON_CRC_CMDFIFO_DOUT 0x0744
+#define RADEON_GRPH_BUFFER_CNTL 0x02f0
+# define RADEON_GRPH_START_REQ_MASK (0x7f)
+# define RADEON_GRPH_START_REQ_SHIFT 0
+# define RADEON_GRPH_STOP_REQ_MASK (0x7f<<8)
+# define RADEON_GRPH_STOP_REQ_SHIFT 8
+# define RADEON_GRPH_CRITICAL_POINT_MASK (0x7f<<16)
+# define RADEON_GRPH_CRITICAL_POINT_SHIFT 16
+# define RADEON_GRPH_CRITICAL_CNTL (1<<28)
+# define RADEON_GRPH_BUFFER_SIZE (1<<29)
+# define RADEON_GRPH_CRITICAL_AT_SOF (1<<30)
+# define RADEON_GRPH_STOP_CNTL (1<<31)
+#define RADEON_GRPH2_BUFFER_CNTL 0x03f0
+# define RADEON_GRPH2_START_REQ_MASK (0x7f)
+# define RADEON_GRPH2_START_REQ_SHIFT 0
+# define RADEON_GRPH2_STOP_REQ_MASK (0x7f<<8)
+# define RADEON_GRPH2_STOP_REQ_SHIFT 8
+# define RADEON_GRPH2_CRITICAL_POINT_MASK (0x7f<<16)
+# define RADEON_GRPH2_CRITICAL_POINT_SHIFT 16
+# define RADEON_GRPH2_CRITICAL_CNTL (1<<28)
+# define RADEON_GRPH2_BUFFER_SIZE (1<<29)
+# define RADEON_GRPH2_CRITICAL_AT_SOF (1<<30)
+# define RADEON_GRPH2_STOP_CNTL (1<<31)
#define RADEON_CRTC_CRNT_FRAME 0x0214
#define RADEON_CRTC_EXT_CNTL 0x0054
# define RADEON_CRTC_VGA_XOVERSCAN (1 << 0)
@@ -270,6 +294,9 @@
# define RADEON_CRTC2_CSYNC_EN (1 << 27)
# define RADEON_CRTC2_HSYNC_DIS (1 << 28)
# define RADEON_CRTC2_VSYNC_DIS (1 << 29)
+#define RADEON_CRTC_MORE_CNTL 0x27c
+# define RADEON_CRTC_H_CUTOFF_ACTIVE_EN (1<<4)
+# define RADEON_CRTC_V_CUTOFF_ACTIVE_EN (1<<5)
#define RADEON_CRTC_GUI_TRIG_VLINE 0x0218
#define RADEON_CRTC_H_SYNC_STRT_WID 0x0204
# define RADEON_CRTC_H_SYNC_STRT_PIX (0x07 << 0)
@@ -354,7 +381,10 @@
#define RADEON_DAC_CNTL 0x0058
# define RADEON_DAC_RANGE_CNTL (3 << 0)
+# define RADEON_DAC_RANGE_CNTL_MASK 0x03
# define RADEON_DAC_BLANKING (1 << 2)
+# define RADEON_DAC_CMP_EN (1 << 3)
+# define RADEON_DAC_CMP_OUTPUT (1 << 7)
# define RADEON_DAC_8BIT_EN (1 << 8)
# define RADEON_DAC_VGA_ADR_EN (1 << 13)
# define RADEON_DAC_PDWN (1 << 15)
@@ -363,6 +393,12 @@
# define RADEON_DAC2_DAC_CLK_SEL (1 << 0)
# define RADEON_DAC2_DAC2_CLK_SEL (1 << 1)
# define RADEON_DAC2_PALETTE_ACC_CTL (1 << 5)
+#define RADEON_DAC_EXT_CNTL 0x0280
+# define RADEON_DAC_FORCE_BLANK_OFF_EN (1 << 4)
+# define RADEON_DAC_FORCE_DATA_EN (1 << 5)
+# define RADEON_DAC_FORCE_DATA_SEL_MASK (3 << 6)
+# define RADEON_DAC_FORCE_DATA_MASK 0x0003ff00
+# define RADEON_DAC_FORCE_DATA_SHIFT 8
#define RADEON_TV_DAC_CNTL 0x088c
# define RADEON_TV_DAC_STD_MASK 0x0300
# define RADEON_TV_DAC_RDACPD (1 << 24)
@@ -372,7 +408,9 @@
# define RADEON_CRT2_DISP1_SEL (1 << 5)
#define RADEON_DISP_OUTPUT_CNTL 0x0d64
# define RADEON_DISP_DAC_SOURCE_MASK 0x03
+# define RADEON_DISP_DAC2_SOURCE_MASK 0x0c
# define RADEON_DISP_DAC_SOURCE_CRTC2 0x01
+# define RADEON_DISP_DAC2_SOURCE_CRTC2 0x04
#define RADEON_DAC_CRC_SIG 0x02cc
#define RADEON_DAC_DATA 0x03c9 /* VGA */
#define RADEON_DAC_MASK 0x03c6 /* VGA */
@@ -390,6 +428,23 @@
#define RADEON_DEVICE_ID 0x0f02 /* PCI */
#define RADEON_DISP_MISC_CNTL 0x0d00
# define RADEON_SOFT_RESET_GRPH_PP (1 << 0)
+#define RADEON_DISP_MERGE_CNTL 0x0d60
+# define RADEON_DISP_ALPHA_MODE_MASK 0x03
+# define RADEON_DISP_ALPHA_MODE_KEY 0
+# define RADEON_DISP_ALPHA_MODE_PER_PIXEL 1
+# define RADEON_DISP_ALPHA_MODE_GLOBAL 2
+# define RADEON_DISP_RGB_OFFSET_EN (1<<8)
+# define RADEON_DISP_GRPH_ALPHA_MASK (0xff << 16)
+# define RADEON_DISP_OV0_ALPHA_MASK (0xff << 24)
+# define RADEON_DISP_LIN_TRANS_BYPASS (0x01 << 9)
+#define RADEON_DISP2_MERGE_CNTL 0x0d68
+# define RADEON_DISP2_RGB_OFFSET_EN (1<<8)
+#define RADEON_DISP_LIN_TRANS_GRPH_A 0x0d80
+#define RADEON_DISP_LIN_TRANS_GRPH_B 0x0d84
+#define RADEON_DISP_LIN_TRANS_GRPH_C 0x0d88
+#define RADEON_DISP_LIN_TRANS_GRPH_D 0x0d8c
+#define RADEON_DISP_LIN_TRANS_GRPH_E 0x0d90
+#define RADEON_DISP_LIN_TRANS_GRPH_F 0x0d98
#define RADEON_DP_BRUSH_BKGD_CLR 0x1478
#define RADEON_DP_BRUSH_FRGD_CLR 0x147c
#define RADEON_DP_CNTL 0x16c0
@@ -581,7 +636,10 @@
# define RADEON_FP2_BLANK_EN (1 << 1)
# define RADEON_FP2_ON (1 << 2)
# define RADEON_FP2_PANEL_FORMAT (1 << 3)
-# define RADEON_FP2_SEL_CRTC2 (1 << 13)
+# define RADEON_FP2_SOURCE_SEL_MASK (3 << 10)
+# define RADEON_FP2_SOURCE_SEL_CRTC2 (1 << 10)
+# define RADEON_FP2_SRC_SEL_MASK (3 << 13)
+# define RADEON_FP2_SRC_SEL_CRTC2 (1 << 13)
# define RADEON_FP2_FP_POL (1 << 16)
# define RADEON_FP2_LP_POL (1 << 17)
# define RADEON_FP2_SCK_POL (1 << 18)
@@ -589,6 +647,8 @@
# define RADEON_FP2_PAD_FLOP_EN (1 << 22)
# define RADEON_FP2_CRC_EN (1 << 23)
# define RADEON_FP2_CRC_READ_EN (1 << 24)
+# define RADEON_FP2_DV0_EN (1 << 25)
+# define RADEON_FP2_DV0_RATE_SEL_SDR (1 << 26)
#define RADEON_FP_H_SYNC_STRT_WID 0x02c4
#define RADEON_FP_H2_SYNC_STRT_WID 0x03c4
#define RADEON_FP_HORZ_STRETCH 0x028c
@@ -718,6 +778,12 @@
#define RADEON_MEM_ADDR_CONFIG 0x0148
#define RADEON_MEM_BASE 0x0f10 /* PCI */
#define RADEON_MEM_CNTL 0x0140
+# define RADEON_MEM_NUM_CHANNELS_MASK 0x01
+# define RADEON_MEM_USE_B_CH_ONLY (1<<1)
+# define RV100_HALF_MODE (1<<3)
+# define R300_MEM_NUM_CHANNELS_MASK 0x03
+# define R300_MEM_USE_CD_CH_ONLY (1<<2)
+#define RADEON_MEM_TIMING_CNTL 0x0144 /* EXT_MEM_CNTL */
#define RADEON_MEM_INIT_LAT_TIMER 0x0154
#define RADEON_MEM_INTF_CNTL 0x014c
#define RADEON_MEM_SDRAM_MODE_REG 0x0158
@@ -730,7 +796,13 @@
#define RADEON_MPLL_CNTL 0x000e /* PLL */
#define RADEON_MPP_TB_CONFIG 0x01c0 /* ? */
#define RADEON_MPP_GP_CONFIG 0x01c8 /* ? */
-
+#define R300_MC_IND_INDEX 0x01f8
+# define R300_MC_IND_ADDR_MASK 0x3f
+#define R300_MC_IND_DATA 0x01fc
+#define R300_MC_READ_CNTL_AB 0x017c
+# define R300_MEM_RBS_POSITION_A_MASK 0x03
+#define R300_MC_READ_CNTL_CD_mcind 0x24
+# define R300_MEM_RBS_POSITION_C_MASK 0x03
#define RADEON_N_VIF_COUNT 0x0248
@@ -1024,6 +1096,11 @@
# define RADEON_PIX2CLK_SRC_SEL_PSCANCLK 0x01
# define RADEON_PIX2CLK_SRC_SEL_BYTECLK 0x02
# define RADEON_PIX2CLK_SRC_SEL_P2PLLCLK 0x03
+# define RADEON_PIX2CLK_ALWAYS_ONb (1<<6)
+# define RADEON_PIX2CLK_DAC_ALWAYS_ONb (1<<7)
+# define RADEON_PIXCLK_TV_SRC_SEL (1 << 8)
+# define RADEON_PIXCLK_LVDS_ALWAYS_ONb (1 << 14)
+# define RADEON_PIXCLK_TMDS_ALWAYS_ONb (1 << 15)
#define RADEON_PLANE_3D_MASK_C 0x1d44
#define RADEON_PLL_TEST_CNTL 0x0013 /* PLL */
#define RADEON_PMI_CAP_ID 0x0f5c /* PCI */
@@ -1146,6 +1223,9 @@
#define RADEON_TEST_DEBUG_MUX 0x0124
#define RADEON_TEST_DEBUG_OUT 0x012c
#define RADEON_TMDS_PLL_CNTL 0x02a8
+#define RADEON_TMDS_TRANSMITTER_CNTL 0x02a4
+# define RADEON_TMDS_TRANSMITTER_PLLEN 1
+# define RADEON_TMDS_TRANSMITTER_PLLRST 2
#define RADEON_TRAIL_BRES_DEC 0x1614
#define RADEON_TRAIL_BRES_ERR 0x160c
#define RADEON_TRAIL_BRES_INC 0x1610
@@ -1158,6 +1238,9 @@
# define RADEON_VCLK_SRC_SEL_PSCANCLK 0x01
# define RADEON_VCLK_SRC_SEL_BYTECLK 0x02
# define RADEON_VCLK_SRC_SEL_PPLLCLK 0x03
+# define RADEON_PIXCLK_ALWAYS_ONb (1<<6)
+# define RADEON_PIXCLK_DAC_ALWAYS_ONb (1<<7)
+
#define RADEON_VENDOR_ID 0x0f00 /* PCI */
#define RADEON_VGA_DDA_CONFIG 0x02e8
#define RADEON_VGA_DDA_ON_OFF 0x02ec
@@ -1273,6 +1356,10 @@
# define RADEON_LOD_BIAS_SHIFT 8
# define RADEON_MAX_MIP_LEVEL_MASK (0x0f << 16)
# define RADEON_MAX_MIP_LEVEL_SHIFT 16
+# define RADEON_YUV_TO_RGB (1 << 20)
+# define RADEON_YUV_TEMPERATURE_COOL (0 << 21)
+# define RADEON_YUV_TEMPERATURE_HOT (1 << 21)
+# define RADEON_YUV_TEMPERATURE_MASK (1 << 21)
# define RADEON_WRAPEN_S (1 << 22)
# define RADEON_CLAMP_S_WRAP (0 << 23)
# define RADEON_CLAMP_S_MIRROR (1 << 23)
@@ -1280,6 +1367,8 @@
# define RADEON_CLAMP_S_MIRROR_CLAMP_LAST (3 << 23)
# define RADEON_CLAMP_S_CLAMP_BORDER (4 << 23)
# define RADEON_CLAMP_S_MIRROR_CLAMP_BORDER (5 << 23)
+# define RADEON_CLAMP_S_CLAMP_GL (6 << 23)
+# define RADEON_CLAMP_S_MIRROR_CLAMP_GL (7 << 23)
# define RADEON_CLAMP_S_MASK (7 << 23)
# define RADEON_WRAPEN_T (1 << 26)
# define RADEON_CLAMP_T_WRAP (0 << 27)
@@ -1288,6 +1377,8 @@
# define RADEON_CLAMP_T_MIRROR_CLAMP_LAST (3 << 27)
# define RADEON_CLAMP_T_CLAMP_BORDER (4 << 27)
# define RADEON_CLAMP_T_MIRROR_CLAMP_BORDER (5 << 27)
+# define RADEON_CLAMP_T_CLAMP_GL (6 << 27)
+# define RADEON_CLAMP_T_MIRROR_CLAMP_GL (7 << 27)
# define RADEON_CLAMP_T_MASK (7 << 27)
# define RADEON_BORDER_MODE_OGL (0 << 31)
# define RADEON_BORDER_MODE_D3D (1 << 31)
@@ -1303,6 +1394,11 @@
# define RADEON_TXFORMAT_ARGB8888 (6 << 0)
# define RADEON_TXFORMAT_RGBA8888 (7 << 0)
# define RADEON_TXFORMAT_Y8 (8 << 0)
+# define RADEON_TXFORMAT_VYUY422 (10 << 0)
+# define RADEON_TXFORMAT_YVYU422 (11 << 0)
+# define RADEON_TXFORMAT_DXT1 (12 << 0)
+# define RADEON_TXFORMAT_DXT23 (14 << 0)
+# define RADEON_TXFORMAT_DXT45 (15 << 0)
# define RADEON_TXFORMAT_FORMAT_MASK (31 << 0)
# define RADEON_TXFORMAT_FORMAT_SHIFT 0
# define RADEON_TXFORMAT_APPLE_YUV_MODE (1 << 5)
@@ -1390,6 +1486,10 @@
# define RADEON_SIGNED_RGB_SHIFT 30
# define RADEON_SIGNED_ALPHA_MASK (1 << 31)
# define RADEON_SIGNED_ALPHA_SHIFT 31
+#define RADEON_PP_TEX_PITCH_0 0x1d08 /* NPOT */
+#define RADEON_PP_TEX_PITCH_1 0x1d10 /* NPOT */
+#define RADEON_PP_TEX_PITCH_2 0x1d18 /* NPOT */
+/* note: bits 13-5: 32 byte aligned stride of texture map */
#define RADEON_PP_TXCBLEND_0 0x1c60
#define RADEON_PP_TXCBLEND_1 0x1c78
@@ -1994,12 +2094,11 @@
#define RADEON_AIC_CNTL 0x01d0
# define RADEON_PCIGART_TRANSLATE_EN (1 << 0)
+#define RADEON_AIC_LO_ADDR 0x01dc
/* Constants */
-#define RADEON_AGP_TEX_OFFSET 0x02000000
-
#define RADEON_LAST_FRAME_REG RADEON_GUI_SCRATCH_REG0
#define RADEON_LAST_CLEAR_REG RADEON_GUI_SCRATCH_REG2
@@ -2128,4 +2227,16 @@
#define RADEON_SS_HORZ_GUARD_DISCARD_ADJ_ADDR 51
#define RADEON_SS_SHININESS 60
+#define RADEON_TV_MASTER_CNTL 0x0800
+# define RADEON_TVCLK_ALWAYS_ONb (1 << 30)
+#define RADEON_TV_DAC_CNTL 0x088c
+# define RADEON_TV_DAC_CMPOUT (1 << 5)
+#define RADEON_TV_PRE_DAC_MUX_CNTL 0x0888
+# define RADEON_Y_RED_EN (1 << 0)
+# define RADEON_C_GRN_EN (1 << 1)
+# define RADEON_CMP_BLU_EN (1 << 2)
+# define RADEON_RED_MX_FORCE_DAC_DATA (6 << 4)
+# define RADEON_GRN_MX_FORCE_DAC_DATA (6 << 8)
+# define RADEON_BLU_MX_FORCE_DAC_DATA (6 << 12)
+# define RADEON_TV_FORCE_DAC_DATA_SHIFT 16
#endif
Index: radeon_video.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_video.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- radeon_video.c 16 Sep 2003 13:45:03 -0000 1.96
+++ radeon_video.c 1 Dec 2003 20:56:50 -0000 1.97
@@ -56,6 +56,7 @@
static void RADEONResetVideo(ScrnInfoPtr);
static void RADEONVideoTimerCallback(ScrnInfoPtr pScrn, Time now);
+static void RADEONSetOverlayAlpha(ScrnInfoPtr pScrn, int ov_alpha, int gr_alpha, int alpha_mode);
static int RADEONPutVideo(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, short drw_y,
short src_w, short src_h, short drw_w, short drw_h,
RegionPtr clipBoxes, pointer data);
@@ -70,6 +71,7 @@
xvTunerStatus, xvSAP, xvOverlayDeinterlacingMethod,
xvLocationID, xvDeviceID, xvInstanceID, xvDumpStatus,
xvAdjustment;
+static Atom xvOvAlpha, xvGrAlpha, xvAlphaMode;
typedef struct
{
@@ -96,6 +98,12 @@
int blue_intensity;
int ecp_div;
+ /* overlay composition mode */
+ int alpha_mode; /* 0 = key mode, 1 = global mode */
+ int ov_alpha;
+ int gr_alpha;
+
+
int dec_brightness;
int dec_saturation;
int dec_hue;
@@ -257,8 +265,8 @@
{15, DirectColor}, {16, DirectColor}, {24, DirectColor}
};
-#define NUM_DEC_ATTRIBUTES 20+4+4
-#define NUM_ATTRIBUTES 9+4+4
+#define NUM_DEC_ATTRIBUTES 20+4+4+3
+#define NUM_ATTRIBUTES 9+4+4+3
static XF86AttributeRec Attributes[NUM_DEC_ATTRIBUTES+1] =
{
@@ -270,6 +278,9 @@
{XvSettable | XvGettable, 0, 1, "XV_AUTOPAINT_COLORKEY"},
{XvSettable | XvGettable, 0, ~0, "XV_COLORKEY"},
{XvSettable | XvGettable, 0, 1, "XV_DOUBLE_BUFFER"},
+ {XvSettable | XvGettable, 0, 255, "XV_OVERLAY_ALPHA"},
+ {XvSettable | XvGettable, 0, 255, "XV_GRAPHICS_ALPHA"},
+ {XvSettable | XvGettable, 0, 1, "XV_ALPHA_MODE"},
{XvSettable | XvGettable, -1000, 1000, "XV_BRIGHTNESS"},
{XvSettable | XvGettable, -1000, 1000, "XV_CONTRAST"},
{XvSettable | XvGettable, -1000, 1000, "XV_SATURATION"},
@@ -619,6 +630,58 @@
OUTREG(RADEON_OV0_LIN_TRANS_F, dwOvBOff | dwOvBCr);
}
+static void RADEONSetOverlayAlpha(ScrnInfoPtr pScrn, int ov_alpha, int gr_alpha, int alpha_mode)
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ unsigned char *RADEONMMIO = info->MMIO;
+
+ if (alpha_mode == 0) { /* key mode */
+ OUTREG(RADEON_OV0_KEY_CNTL,
+ RADEON_GRAPHIC_KEY_FN_EQ | /* what does this do? */
+ RADEON_VIDEO_KEY_FN_FALSE | /* what does this do? */
+ RADEON_CMP_MIX_OR);
+ /* crtc 1 */
+ OUTREG(RADEON_DISP_MERGE_CNTL,
+ (RADEON_DISP_ALPHA_MODE_KEY &
+ RADEON_DISP_ALPHA_MODE_MASK) |
+ ((gr_alpha << 0x00000010) &
+ RADEON_DISP_GRPH_ALPHA_MASK) |
+ ((ov_alpha << 0x00000018) &
+ RADEON_DISP_OV0_ALPHA_MASK));
+ /* crtc 2 */
+ OUTREG(RADEON_DISP2_MERGE_CNTL,
+ (RADEON_DISP_ALPHA_MODE_KEY &
+ RADEON_DISP_ALPHA_MODE_MASK) |
+ ((gr_alpha << 0x00000010) &
+ RADEON_DISP_GRPH_ALPHA_MASK) |
+ ((ov_alpha << 0x00000018) &
+ RADEON_DISP_OV0_ALPHA_MASK));
+ } else { /* global mode */
+ OUTREG(RADEON_OV0_KEY_CNTL,
+ RADEON_GRAPHIC_KEY_FN_FALSE | /* what does this do? */
+ RADEON_VIDEO_KEY_FN_FALSE | /* what does this do? */
+ RADEON_CMP_MIX_AND);
+ /* crtc 2 */
+ OUTREG(RADEON_DISP2_MERGE_CNTL,
+ (RADEON_DISP_ALPHA_MODE_GLOBAL &
+ RADEON_DISP_ALPHA_MODE_MASK) |
+ ((gr_alpha << 0x00000010) &
+ RADEON_DISP_GRPH_ALPHA_MASK) |
+ ((ov_alpha << 0x00000018) &
+ RADEON_DISP_OV0_ALPHA_MASK));
+ /* crtc 1 */
+ OUTREG(RADEON_DISP_MERGE_CNTL,
+ (RADEON_DISP_ALPHA_MODE_GLOBAL &
+ RADEON_DISP_ALPHA_MODE_MASK) |
+ ((gr_alpha << 0x00000010) &
+ RADEON_DISP_GRPH_ALPHA_MASK) |
+ ((ov_alpha << 0x00000018) &
+ RADEON_DISP_OV0_ALPHA_MASK));
+ }
+ /* per-pixel mode - RADEON_DISP_ALPHA_MODE_PER_PIXEL */
+ /* not yet supported */
+}
+
static void RADEONSetColorKey(ScrnInfoPtr pScrn, CARD32 colorKey)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
@@ -724,6 +787,10 @@
xvDecColor = MAKE_ATOM("XV_DEC_COLOR");
xvDecContrast = MAKE_ATOM("XV_DEC_CONTRAST");
xvDecHue = MAKE_ATOM("XV_DEC_HUE");
+
+ xvOvAlpha = MAKE_ATOM("XV_OVERLAY_ALPHA");
+ xvGrAlpha = MAKE_ATOM("XV_GRAPHICS_ALPHA");
+ xvAlphaMode = MAKE_ATOM("XV_ALPHA_MODE");
xvAdjustment = MAKE_ATOM("XV_ADJUSTMENT");
@@ -1773,6 +1840,9 @@
pPriv->red_intensity = 0;
pPriv->green_intensity = 0;
pPriv->blue_intensity = 0;
+ pPriv->ov_alpha = 255;
+ pPriv->gr_alpha = 255;
+ pPriv->alpha_mode = 0;
pPriv->hue = 0;
pPriv->currentBuffer = 0;
pPriv->autopaint_colorkey = TRUE;
@@ -2108,6 +2178,7 @@
RADEONInfoPtr info = RADEONPTR(pScrn);
RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data;
Bool setTransform = FALSE;
+ Bool setAlpha = FALSE;
unsigned char *RADEONMMIO = info->MMIO;
info->accel->Sync(pScrn);
@@ -2133,6 +2204,9 @@
pPriv->red_intensity = 0;
pPriv->green_intensity = 0;
pPriv->blue_intensity = 0;
+ pPriv->ov_alpha = 255;
+ pPriv->gr_alpha = 255;
+ pPriv->alpha_mode = 0;
RADEONSetPortAttribute(pScrn, xvDecBrightness, 0, data);
RADEONSetPortAttribute(pScrn, xvDecSaturation, 0, data);
RADEONSetPortAttribute(pScrn, xvDecContrast, 0, data);
@@ -2179,6 +2253,21 @@
pPriv->blue_intensity = ClipValue (value, -1000, 1000);
setTransform = TRUE;
}
+ else if(attribute == xvOvAlpha)
+ {
+ pPriv->ov_alpha = ClipValue (value, 0, 255);
+ setAlpha = TRUE;
+ }
+ else if(attribute == xvGrAlpha)
+ {
+ pPriv->gr_alpha = ClipValue (value, 0, 255);
+ setAlpha = TRUE;
+ }
+ else if(attribute == xvAlphaMode)
+ {
+ pPriv->alpha_mode = ClipValue (value, 0, 1);
+ setAlpha = TRUE;
+ }
else if(attribute == xvDoubleBuffer)
{
pPriv->doubleBuffer = ClipValue (value, 0, 1);
@@ -2302,6 +2391,11 @@
RTFIntensity(pPriv->blue_intensity),
pPriv->transform_index);
}
+
+ if (setAlpha)
+ {
+ RADEONSetOverlayAlpha(pScrn, pPriv->ov_alpha, pPriv->gr_alpha, pPriv->alpha_mode);
+ }
return Success;
}
@@ -2333,6 +2427,12 @@
*value = pPriv->green_intensity;
else if(attribute == xvBlueIntensity)
*value = pPriv->blue_intensity;
+ else if(attribute == xvOvAlpha)
+ *value = pPriv->ov_alpha;
+ else if(attribute == xvGrAlpha)
+ *value = pPriv->gr_alpha;
+ else if(attribute == xvAlphaMode)
+ *value = pPriv->alpha_mode;
else if(attribute == xvDoubleBuffer)
*value = pPriv->doubleBuffer ? 1 : 0;
else if(attribute == xvColorKey)
|
|
From: <gat...@li...> - 2003-12-02 03:24:44
|
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv14856
Modified Files:
alsa.c avview.scp bindings.scp channel_scan.scp configure.in
xv.scp
Log Message:
Bump up version number.
Port to newer ALSA 1.0.0-pre3 library - note: this library will work with 0.9.x drivers.
Add "transparent when iconified" feature.
Index: alsa.c
===================================================================
RCS file: /cvsroot/gatos/avview/alsa.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- alsa.c 17 Jul 2003 07:01:04 -0000 1.35
+++ alsa.c 1 Dec 2003 22:44:06 -0000 1.36
@@ -520,6 +520,7 @@
long rate;
unsigned int buffer_time;
int dir;
+snd_pcm_uframes_t uframes;
snd_pcm_hw_params_alloca(&hwparams);
snd_pcm_sw_params_alloca(&swparams);
@@ -607,11 +608,11 @@
return -1;
}
fprintf(stderr,"stop_threshhold:%ld pid:%d\n",
- snd_pcm_sw_params_get_stop_threshold(swparams),
+ snd_pcm_sw_params_get_stop_threshold(swparams, &uframes),
getpid());
a=0;
-if(snd_pcm_sw_params_get_stop_threshold(swparams)<32768)
+if(snd_pcm_sw_params_get_stop_threshold(swparams, &uframes)<32768)
a=snd_pcm_sw_params_set_stop_threshold(ad->recording_handle, swparams, 32768);
if(a<0){
fprintf(stderr, "Unable to set stop threshold: %s\n", snd_strerror(a));
@@ -628,7 +629,7 @@
return -1;
}
fprintf(stderr,"stop_threshhold:%ld pid:%d\n",
- snd_pcm_sw_params_get_stop_threshold(swparams),
+ snd_pcm_sw_params_get_stop_threshold(swparams, &uframes),
getpid());
s->priv=ad;
Index: avview.scp
===================================================================
RCS file: /cvsroot/gatos/avview/avview.scp,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -d -r1.140 -r1.141
--- avview.scp 19 Jul 2003 05:20:46 -0000 1.140
+++ avview.scp 1 Dec 2003 22:44:06 -0000 1.141
@@ -61,6 +61,10 @@
warn_about_missing_km "true"
control_screen ""
startup_script ""
+ mute_when_minimized "false"
+ transparent_when_minimized "true"
+ transparency_ratio 200
+ is_minimized "false"
} {
global $variable
set $variable $value
@@ -121,6 +125,8 @@
place .video -relx 0.0 -rely 0.0 -relwidth 1.0 -relheight 1.0 -anchor nw
bind . <Configure> place_video_window
+bind . <Unmap> unmap_video_window
+bind . <Map> map_video_window
proc place_video_window {} {
global aspect_ratio use_physical_screen_size
@@ -148,6 +154,47 @@
-relw $rw -relh $rh -anchor nw
}
+proc unmap_video_window {} {
+global is_minimized mute_when_minimized transparent_when_minimized transparency_ratio \
+ fullscreen_mode mute_index overlay_alpha_index alpha_mode_index previous_mute_value \
+ VIDEO_WINDOW current_port in_set_fullscreen
+
+if { $is_minimized || $fullscreen_mode || $in_set_fullscreen || ([wm state .]=="normal")} { return }
+set is_minimized true
+
+if { $mute_when_minimized && ($mute_index >= 0 )} {
+ catch {
+ set previous_mute_value [xv_getportattribute $VIDEO_WINDOW $current_port "XV_MUTE"]
+ set_attribute_by_index $mute_index 1
+ }
+ }
+if { $transparent_when_minimized && ($overlay_alpha_index >=0 ) && ($alpha_mode_index >= 0) } {
+ set_attribute_by_index $overlay_alpha_index $transparency_ratio
+ set_attribute_by_index $alpha_mode_index 1
+ }
+}
+
+proc map_video_window {} {
+global is_minimized mute_when_minimized transparent_when_minimized transparency_ratio \
+ fullscreen_mode mute_index overlay_alpha_index alpha_mode_index previous_mute_value \
+ VIDEO_WINDOW current_port in_set_fullscreen
+
+if { (! $is_minimized) || $fullscreen_mode || $in_set_fullscreen } { return }
+set is_minimized false
+
+if { $mute_when_minimized && ($mute_index >= 0 )} {
+ catch {
+ set_attribute_by_index $mute_index $previous_mute_value
+ }
+ unset previous_mute_value
+ }
+
+if { $transparent_when_minimized && ($overlay_alpha_index >=0 ) && ($alpha_mode_index >= 0) } {
+ set_attribute_by_index $overlay_alpha_index 255
+ set_attribute_by_index $alpha_mode_index 0
+ }
+}
+
frame .video.onscreen_display -background [.video cget -background]
eval .video.onscreen_display configure [get_settings .video.onscreen_display AVview]
place .video.onscreen_display -relx 0.05 -rely 0.05 -anchor nw
@@ -392,7 +439,8 @@
show_control_window always_start_fullscreen remember_fullscreen_state
display_setup_window_on_startup file_save_path dpms_off_on_fullscreen_power_off
disable_fullscreen_switching use_physical_screen_size message_visible_secs
- on_screen_cc_page save_settings_on_exit} {
+ on_screen_cc_page save_settings_on_exit transparent_when_minimized mute_when_minimized
+ transparency_ratio} {
global $variable
puts $fileid "\nglobal $variable"
puts $fileid "set $variable \"[set $variable]\""
@@ -860,6 +908,11 @@
"Always start fullscreen" checkbutton always_start_fullscreen \
"Disable fullscreen switching" checkbutton disable_fullscreen_switching \
"Remote power off button turns off monitor in fullscreen mode" checkbutton dpms_off_on_fullscreen_power_off
+
+add_parameter_pane "/Configuration/User interface settings/Minimize behaviour" "Minimize behaviour" \
+ "Turn transparent when minimized" checkbutton transparent_when_minimized \
+ "Mute when minimized" checkbutton mute_when_minimized \
+ "Transparency" scale { transparency_ratio 0 255 }
Tree:open .setup.tree "/Configuration"
Tree:open .setup.tree "/Configuration/User interface settings"
Index: bindings.scp
===================================================================
RCS file: /cvsroot/gatos/avview/bindings.scp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- bindings.scp 6 Mar 2003 06:00:14 -0000 1.22
+++ bindings.scp 1 Dec 2003 22:44:06 -0000 1.23
@@ -99,19 +99,15 @@
proc toggle_mute {} {
global VIDEO_WINDOW
-global current_port
+global current_port mute_index
if { $current_port == "none" } { return }
set num_attributes [xv_num_port_attributes $VIDEO_WINDOW $current_port]
-for { set i 0 } { $i < $num_attributes } { incr i } {
- set name [xv_port_attribute_name $VIDEO_WINDOW $current_port $i]
- if { $name == "XV_MUTE" } {
- set variable [find_attribute_variable $VIDEO_WINDOW $current_port $i]
- global $variable
- catch {
- if { [xv_getportattribute $VIDEO_WINDOW $current_port $name] } { set $variable 0 } { set $variable 1 }
- on_attribute_change XV_MUTE $variable a b
- }
- return
+if { $mute_index >= 0 } {
+ set variable [find_attribute_variable $VIDEO_WINDOW $current_port $mute_index]
+ global $variable
+ catch {
+ if { [xv_getportattribute $VIDEO_WINDOW $current_port "XV_MUTE"] } { set $variable 0 } { set $variable 1 }
+ on_attribute_change XV_MUTE $variable a b
}
}
}
Index: channel_scan.scp
===================================================================
RCS file: /cvsroot/gatos/avview/channel_scan.scp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- channel_scan.scp 10 Mar 2003 00:31:17 -0000 1.11
+++ channel_scan.scp 1 Dec 2003 22:44:06 -0000 1.12
@@ -24,8 +24,8 @@
-showvalue false
eval $A.progress_scale configure [get_settings $A.progress_scale ChannelList]
button $A.scan_now_button -text "Scan" -command do_scan -state disabled
-global tuner_status_present
-if { [set tuner_status_present] } {
+global tuner_status_index
+if { $tuner_status_index >= 0 } {
$A.scan_now_button configure -state normal
}
eval $A.scan_now_button configure [get_settings $A.scan_now_button ChannelList]
Index: configure.in
===================================================================
RCS file: /cvsroot/gatos/avview/configure.in,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- configure.in 18 Jul 2003 20:16:12 -0000 1.53
+++ configure.in 1 Dec 2003 22:44:06 -0000 1.54
@@ -4,7 +4,7 @@
# Note to self: always bump version number when there are changes
# in setup window or avview_shell
#
-AC_INIT([AVview], [0.12.5], [gat...@li...])
+AC_INIT([AVview], [0.12.6], [gat...@li...])
#
# For now I'll be happier without NEWS and Changelog files.
#
@@ -71,8 +71,9 @@
if test "$ac_cv_lib_asound_snd_card_get_name" = "yes" ; then
AC_TRY_LINK([#include <alsa/asoundlib.h>
- #if (SND_LIB_MAJOR != 0) || (SND_LIB_MINOR < 9)
- #error "Avview requires ALSA version 0.9.x"
+ /* #if (SND_LIB_MAJOR != 0) || (SND_LIB_MINOR < 9) */
+ #if (SND_LIB_MAJOR != 1)
+ #error "Avview requires ALSA version 1.0.x"
#endif], ,AC_DEFINE(USE_ALSA,1,[use alsa libraries]) ALSA_PRESENT=yes,)
fi
Index: xv.scp
===================================================================
RCS file: /cvsroot/gatos/avview/xv.scp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- xv.scp 19 Jul 2003 04:11:29 -0000 1.21
+++ xv.scp 1 Dec 2003 22:44:06 -0000 1.22
@@ -4,7 +4,7 @@
set type1 [xv_port_attribute_type $video_window $port $attribute]
set range [xv_port_attribute_range $video_window $port $attribute]
set name [xv_port_attribute_name $video_window $port $attribute]
-if { [regexp {^XV_(LOCATION_ID|DEVICE_ID|INSTANCE_ID|ENCODING|AUTOPAINT_COLORKEY|COLORKEY|TUNER_STATUS)$} $name] } { return "none"}
+if { [regexp {^XV_(LOCATION_ID|DEVICE_ID|INSTANCE_ID|ENCODING|AUTOPAINT_COLORKEY|COLORKEY|TUNER_STATUS|OVERLAY_ALPHA|ALPHA_MODE)$} $name] } { return "none"}
if { [lsearch $type1 "gettable"] < 0 } {
if { ("$range" == "0 1") && ([lsearch $type1 "settable"] >=0 ) } {
return "button"
@@ -124,10 +124,12 @@
LOCATION_ID "XV_PORT:$current_port"
INSTANCE_ID "XV_PORT:$current_port"
DEVICE_ID "XV_PORT:$current_port"
- freq_present false
- mute_present false
- tuner_status_present false
- autopaint_colorkey_present false
+ freq_index -1
+ mute_index -1
+ tuner_status_index -1
+ autopaint_colorkey_index -1
+ overlay_alpha_index -1
+ alpha_mode_index -1
}] {
global $var
set $var $value
@@ -153,16 +155,22 @@
set LOCATION_ID [winfo atomname $atom]
}
"XV_FREQ" {
- set freq_present true
+ set freq_index $i
}
"XV_MUTE" {
- set mute_present true
+ set mute_index $i
}
"XV_TUNER_STATUS" {
- set tuner_status_present true
+ set tuner_status_index $i
}
"XV_AUTOPAINT_COLORKEY" {
- set autopaint_colorkey_present true
+ set autopaint_colorkey_index $i
+ }
+ "XV_OVERLAY_ALPHA" {
+ set overlay_alpha_index $i
+ }
+ "XV_ALPHA_MODE" {
+ set alpha_mode_index $i
}
}
global $attr_var
|
|
From: <gat...@li...> - 2003-11-30 04:35:23
|
Update of /cvsroot/gatos/km
In directory sc8-pr-cvs1:/tmp/cvs-serv4404
Modified Files:
km_api.c km_api.h
Log Message:
Small progress..
Index: km_api.c
===================================================================
RCS file: /cvsroot/gatos/km/km_api.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- km_api.c 30 Nov 2003 02:20:48 -0000 1.30
+++ km_api.c 30 Nov 2003 04:35:19 -0000 1.31
@@ -48,11 +48,12 @@
EXPORT_SYMBOL(km_data_destroy_kdufpd);
EXPORT_SYMBOL(km_data_generic_stream_read);
EXPORT_SYMBOL(km_data_generic_stream_poll);
+EXPORT_SYMBOL(km_fo_control_perform_command);
#define KM_MODULUS 255
#define KM_MULTIPLE 23
-unsigned km_command_hash(char *s, int length)
+unsigned km_command_hash(const char *s, int length)
{
int i;
unsigned r;
@@ -292,44 +293,52 @@
return 0;
}
-static ssize_t km_fo_control_write(struct file * file, const char * buffer, size_t count, loff_t *ppos)
+/* for now only process one command per string */
+
+void km_fo_control_perform_command(KM_FILE_PRIVATE_DATA *kmfpd, const char *command, size_t count)
{
-KM_FILE_PRIVATE_DATA *kmfpd=file->private_data;
KM_DEVICE *kmd=kmfpd->kmd;
int i;
int field_length;
unsigned hash;
-hash=km_command_hash(buffer, count);
-if((hash==kmd->status_hash) && !strncmp("STATUS\n", buffer, count)){
+hash=km_command_hash(command, count);
+if((hash==kmd->status_hash) && !strncmp("STATUS\n", command, count)){
spin_lock(&(kmfpd->lock));
kmfpd->request_flags|=KM_STATUS_REQUESTED;
spin_unlock(&(kmfpd->lock));
kmd_signal_state_change(kmd->number);
} else
-if((hash==kmd->report_hash)&& (count>8) && !strncmp("REPORT ", buffer, 7)){
+if((hash==kmd->report_hash)&& (count>8) && !strncmp("REPORT ", command, 7)){
field_length=count-8; /* exclude trailing \n */
- if(field_length<=0)return count; /* bogus command */
+ if(field_length<=0)return; /* bogus command */
for(i=0;i<kmd->num_fields;i++){
- if(!strncmp(buffer+7, kmd->fields[i].name, field_length)&&
+ if(!strncmp(command+7, kmd->fields[i].name, field_length)&&
!kmd->fields[i].name[field_length]){
spin_lock(&(kmfpd->lock));
kmfpd->field_flags[i]|=KM_FIELD_UPDATE_REQUESTED;
spin_unlock(&(kmfpd->lock));
kmd_signal_state_change(kmd->number);
printk("Reporting field %d = %s\n", i, kmd->fields[i].name);
- return count;
+ return;
}
}
} else {
i=kmd->command_hash[hash];
- while((i>=0) && strncmp(kmd->fields[i].name, buffer, count))i=kmd->fields[i].next_command;
- if(i<0)return count; /* nothing matched, gobble up rest of input */
+ while((i>=0) && strncmp(kmd->fields[i].name, command, count))i=kmd->fields[i].next_command;
+ if(i<0)return; /* nothing matched */
+
printk("Performing action %s [not implemented]\n", kmd->fields[i].name);
switch(kmd->fields[i].type){
case KM_FIELD_TYPE_PROGRAMMABLE:
break;
}
}
+}
+
+static ssize_t km_fo_control_write(struct file * file, const char * buffer, size_t count, loff_t *ppos)
+{
+KM_FILE_PRIVATE_DATA *kmfpd=file->private_data;
+km_fo_control_perform_command(kmfpd, buffer, count);
return count;
}
Index: km_api.h
===================================================================
RCS file: /cvsroot/gatos/km/km_api.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- km_api.h 30 Nov 2003 02:20:48 -0000 1.19
+++ km_api.h 30 Nov 2003 04:35:19 -0000 1.20
@@ -135,13 +135,15 @@
int add_km_device(KM_FIELD *kmfl, void *priv);
int remove_km_device(int num);
void kmd_signal_state_change(int num);
+void km_fo_control_perform_command(KM_FILE_PRIVATE_DATA *kmfpd, const char *command, size_t count);
+
#if 1
#define KM_CHECKPOINT printk("**CKPT %s %s %d\n", __FILE__, __FUNCTION__, __LINE__);
-#define KM_API_DEBUG if(0)printk
+#define KM_API_DEBUG printk
#else
#define KM_CHECKPOINT
-#define KM_API_DEBUG if(0)printk
+#define KM_API_DEBUG if(0)printk
#endif
#endif
|
|
From: <gat...@li...> - 2003-11-30 02:20:51
|
Update of /cvsroot/gatos/km
In directory sc8-pr-cvs1:/tmp/cvs-serv18531
Modified Files:
Makefile km_api.c km_api.h
Log Message:
Start adding support for LEVEL_TRIGGER attributes for control interface.
Next item: get km_v4l.c to use them.
Index: Makefile
===================================================================
RCS file: /cvsroot/gatos/km/Makefile,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Makefile 23 Oct 2002 17:23:17 -0000 1.16
+++ Makefile 30 Nov 2003 02:20:48 -0000 1.17
@@ -1,5 +1,5 @@
KM_FLAGS=
-CFLAGS = -m486 -O2 -Wall -Wstrict-prototypes -pipe -fno-strict-aliasing -fno-common $(KM_FLAGS)
+CFLAGS = -march=i586 -O2 -Wall -Wstrict-prototypes -pipe -fno-strict-aliasing -fno-common $(KM_FLAGS)
LDFLAGS = -s -N
CC=gcc
Index: km_api.c
===================================================================
RCS file: /cvsroot/gatos/km/km_api.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- km_api.c 8 Feb 2003 16:19:52 -0000 1.29
+++ km_api.c 30 Nov 2003 02:20:48 -0000 1.30
@@ -103,6 +103,12 @@
if(kmfpd->br_free+field_length>=kmfpd->br_size)expand_buffer(kmfpd, field_length);
kmfpd->br_free+=sprintf(kmfpd->buffer_read+kmfpd->br_free, "%s=%s\n", f->name, kmfpd->kfd[i].s.old_string);
break;
+ case KM_FIELD_TYPE_LEVEL_TRIGGER:
+ kmfpd->kfd[i].t.old_count=f->data.t.count;
+ field_length=strlen(f->name)+20;
+ if(kmfpd->br_free+field_length>=kmfpd->br_size)expand_buffer(kmfpd, field_length);
+ kmfpd->br_free+=sprintf(kmfpd->buffer_read+kmfpd->br_free, "%s=%u\n", f->name, kmfpd->kfd[i].t.old_count);
+ break;
}
}
if(kmfpd->br_free+10>=kmfpd->br_size)expand_buffer(kmfpd, 14);
@@ -142,6 +148,16 @@
kmfpd->buffer_read[kmfpd->br_free]=':';
kmfpd->br_free++;
kmfpd->br_free+=sprintf(kmfpd->buffer_read+kmfpd->br_free, "%s=%s\n", f->name, b);
+ break;
+ case KM_FIELD_TYPE_LEVEL_TRIGGER:
+ a=f->data.t.count;
+ if(a==kmfpd->kfd[i].t.old_count)continue;
+ kmfpd->kfd[i].t.old_count=a;
+ field_length=strlen(f->name)+22;
+ if(kmfpd->br_free+field_length>=kmfpd->br_size)expand_buffer(kmfpd, field_length);
+ kmfpd->buffer_read[kmfpd->br_free]=':';
+ kmfpd->br_free++;
+ kmfpd->br_free+=sprintf(kmfpd->buffer_read+kmfpd->br_free, "%s=%u\n", f->name, a);
break;
}
}
Index: km_api.h
===================================================================
RCS file: /cvsroot/gatos/km/km_api.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- km_api.h 8 Feb 2003 16:19:52 -0000 1.18
+++ km_api.h 30 Nov 2003 02:20:48 -0000 1.19
@@ -19,6 +19,8 @@
#define KM_FIELD_TYPE_DYNAMIC_STRING 3 /* handle to string */
#define KM_FIELD_TYPE_PROGRAMMABLE 4 /* user specified behaviour */
#define KM_FIELD_TYPE_MEMORY_AREA 5 /* area of memory that can be mmaped */
+#define KM_FIELD_TYPE_LEVEL_TRIGGER 6 /* 1 if any client requested to be 1,
+ 0 if no clients requested to be 0 */
typedef struct {
char *string;
@@ -64,6 +66,12 @@
long size;
} KM_FIELD_MEMORY_AREA;
+typedef struct {
+ u32 count;
+ void (*zero2one)(struct S_KM_FIELD *kmf);
+ void (*one2zero)(struct S_KM_FIELD *kmf);
+ } KM_FIELD_LEVEL_TRIGGER;
+
typedef struct S_KM_FIELD {
int type;
char *name;
@@ -77,6 +85,7 @@
KM_FIELD_DYNAMIC_STRING s;
KM_FIELD_PROGRAMMABLE p;
KM_FIELD_MEMORY_AREA m;
+ KM_FIELD_LEVEL_TRIGGER t;
} data;
int next_command;
} KM_FIELD;
@@ -95,12 +104,17 @@
} KM_DEVICE;
typedef union {
+ /* union members correspond to members of KM_FIELD */
struct {
u32 old_value;
} i;
struct {
char *old_string; /* pointer only, no access to data */
} s;
+ struct {
+ u32 old_count;
+ int requested;
+ } t;
} KM_FIELD_DATA;
#define KM_STATUS_REQUESTED 1
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv14548
Modified Files:
Tag: tv_output
README.tvout radeon.h radeon_driver.c radeon_reg.h
theater_out.c theater_out.h
Log Message:
Support for ERT added
Index: README.tvout
===================================================================
RCS file: /cvsroot/gatos/ati.2/README.tvout,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- README.tvout 28 Sep 2003 21:42:36 -0000 1.1
+++ README.tvout 26 Nov 2003 19:50:08 -0000 1.1.2.1
@@ -16,26 +16,24 @@
2. Status of the driver
-----------------------
-The driver is in early development stage. It currently works only with
-those cards having a Rage Theater chip for TV output. There are not
-many models having this arrangement, to my knowledge just a few models
-of the 7000 series have it. It certainly works on my 7200 card with PAL
-standard.
-I'm working on extending the driver so that it works on those cards
-that have a scaled-down version of Rage Theater embedded into the Radeon chip.
-As far as I know, all 9000 series cards has this configuration. So, stay
-tuned.. ;)
+The driver is in early development stage. It currently works with
+those cards having a Rage Theater chip for TV output or with cards
+having the tv module inside the Radeon chip (ERT, Embedded Rage
+Theater, is my name for the latter).
+The driver was successfully tested on these cards:
+- Radeon 7200 / European model (TV out hw: RT 100)
+- Radeon 9000 (TV out hw: ERT)
+- Radeon 9200SE (TV out hw: ERT)
3. Making it work
-----------------
-The driver is normally disabled, so that you can use the usual video
-grabbing functions of AIW cards (the main reason for developping ati.2
-drivers, I guess). Video grabbing functions and TV output are mutually
-exclusive because they both access the RT chip and, for the moment, I
-don't want to think about integrating these functions. In principle
-integration should be possible but I've no AIW card for testing (does
-anyone have a spare card? :) ).
+The driver is always loaded by the Radeon driver. If you need to
+disable this auto-loading mechanism, just set the "TVOutput" option
+(see below) to "NOLOAD".
+In principle the driver should coexist with video grabbing functions,
+especially on those AIW cards where TV output is done by ERT
+inside Radeon.
Principle of operation of the driver is very simple. Driver enables
tv output whenever the current screen resolution and tv standard match
@@ -64,10 +62,13 @@
"PAL-N"
"PAL-60"
+If "TVOutput" is not present or its value is invalid, TV output is kept disabled.
+
In the current version of the driver these are the recognized TV standard &
resolution combinations:
PAL 800x600
+NTSC 800x600
More combinations will be added in future releases.
@@ -79,10 +80,6 @@
utility. I'm planning to write a small CLI utility to manipulate these
values.
-XV_TVO_ENABLE Settable/Gettable
- Driver is disabled or enabled when this attribute has, respectively,
- a 0 or 1 value.
-
XV_TVO_STANDARD Settable/Gettable
This is the tv standard in use by the driver. Its value is encoded
according to this table:
@@ -94,6 +91,7 @@
4 NTSC-J
5 PAL-CN
6 PAL-N
+ 7 Keep TV off
XV_TVO_MODE_COMPAT Gettable
This attribute is set to 1 whenever the current resolution & tv
@@ -117,11 +115,9 @@
ATI manuals recommend checking for 50 Hz compatibility (they take
60 Hz for granted).
-One last thing: keep in mind that my testing was done on a radeon 7200.
-This card has no provision for a second head (this is the reason why the
-driver only works in clone mode). Neither it has a DVI or LCD display
-output, so I'm not sure about the driver behaviour with this kind of
-displays. Be warned.
+One last thing: I did no testing on cards having DVI/LCD outputs
+so I'm not sure about the driver behaviour with this kind of displays.
+Be warned.
6. Credits
----------
@@ -142,3 +138,7 @@
Initial release
+2003-11-26
+==========
+
+Support for ERT added
Index: radeon.h
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon.h,v
retrieving revision 1.8.2.2
retrieving revision 1.8.2.3
diff -u -d -r1.8.2.2 -r1.8.2.3
--- radeon.h 17 Oct 2003 22:28:37 -0000 1.8.2.2
+++ radeon.h 26 Nov 2003 19:50:09 -0000 1.8.2.3
@@ -68,8 +68,8 @@
#include "picturestr.h"
#endif
-/* #define RADEON_DEBUG 0 /\* Turn off debugging output *\/ */
-#define RADEON_DEBUG 1 /* Turn on debugging output */
+#define RADEON_DEBUG 0 /* Turn off debugging output */
+/* #define RADEON_DEBUG 1 /\* Turn on debugging output *\/ */
#define RADEON_IDLE_RETRY 16 /* Fall out of idle loops after this count */
#define RADEON_TIMEOUT 2000000 /* Fall out of wait loops after this count */
#define RADEON_MMIOSIZE 0x80000
Index: radeon_driver.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_driver.c,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -u -d -r1.16.2.1 -r1.16.2.2
--- radeon_driver.c 28 Sep 2003 22:07:56 -0000 1.16.2.1
+++ radeon_driver.c 26 Nov 2003 19:50:10 -0000 1.16.2.2
@@ -922,8 +922,14 @@
if (tmp & 0x08) info->DisplayType = MT_DFP;
else if (tmp & 0x04) info->DisplayType = MT_LCD;
else if (tmp & 0x0200) info->DisplayType = MT_CRT;
+ /*
+ * fulivi: removed, X wouldn't start when coming from
+ * text mode and tv output is enabled.
+ */
+#if 0
else if (tmp & 0x10) info->DisplayType = MT_CTV;
else if (tmp & 0x20) info->DisplayType = MT_STV;
+#endif
else info->DisplayType = MT_NONE;
if (info->DisplayType == MT_NONE) {
@@ -3620,7 +3626,6 @@
RADEONInfoPtr info = RADEONPTR(pScrn);
BoxRec MemBox;
int y2;
- Bool loadTheatre;
const char *s;
RADEONTRACE(("RADEONScreenInit %x %d\n",
@@ -3645,33 +3650,34 @@
info->PaletteSavedOnVT = FALSE;
/*
- * Load RT tv output module when TV_Output option is set
+ * Load tv output module when TV_Output is not set to "NOLOAD"
* CHECK: is this the correct place? Should it be moved to preinit?
*/
RADEONTRACE(("Allocating VIP interface"));
info->VIP = RADEONAllocateVIP(pScrn);
- loadTheatre = TRUE;
- if ((s = xf86GetOptValString(info->Options , OPTION_TV_OUTPUT)) != NULL)
+ if ((s = xf86GetOptValString(info->Options , OPTION_TV_OUTPUT)) == NULL || xf86NameCmp(s , "NOLOAD") != 0)
{
RADEONTRACE(("TVOutput opt = %s\n" , s));
if(!xf86LoadSubModule(pScrn , "theater_out"))
{
- xf86DrvMsg(pScrn->scrnIndex , X_ERROR , "Unable to load Rage Theatre TV output module\n");
+ xf86DrvMsg(pScrn->scrnIndex , X_ERROR , "Unable to load TV output module\n");
info->theaterOut = NULL;
}
else
{
- loadTheatre = FALSE;
xf86LoaderReqSymbols(THEATER_OUT_SYMBOLS , NULL);
- info->theaterOut = xf86_detectTheaterOut(info->VIP);
+ /*
+ * TEST TEST TEST TEST TEST TEST TEST TEST TEST
+ */
+ info->theaterOut = xf86_detectTheaterOut(pScrn , FALSE);
if (info->theaterOut != NULL)
xf86_initTheaterOut(info->theaterOut , s);
}
}
else
{
- RADEONTRACE(("TVOutput opt = NULL\n"));
+ RADEONTRACE(("TV output module loading skipped\n"));
}
RADEONSave(pScrn);
@@ -4164,7 +4170,7 @@
/*
* TEST TEST TEST TEST TEST TEST TEST TEST TEST
*/
- RADEONInitVideo(pScreen , info->VIP , loadTheatre);
+ RADEONInitVideo(pScreen , info->VIP , TRUE);
/* Provide SaveScreen */
pScreen->SaveScreen = RADEONSaveScreen;
@@ -4469,25 +4475,67 @@
~(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;
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);
+
+ RADEONTRACE(("PLL Gain = %u\n" , pllGain));
+
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,
@@ -4957,7 +5005,7 @@
* Save initial RT state
*/
if (info->theaterOut != NULL)
- xf86_theaterOutSave(info->theaterOut);
+ xf86_theaterOutSave(info->theaterOut , pScrn);
}
/* Restore the original (text) mode */
Index: radeon_reg.h
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_reg.h,v
retrieving revision 1.12
retrieving revision 1.12.2.1
diff -u -d -r1.12 -r1.12.2.1
--- radeon_reg.h 7 Mar 2003 16:18:41 -0000 1.12
+++ radeon_reg.h 26 Nov 2003 19:50:10 -0000 1.12.2.1
@@ -1024,6 +1024,8 @@
# define RADEON_PPLL_ATOMIC_UPDATE_EN (1 << 16)
# define RADEON_PPLL_VGA_ATOMIC_UPDATE_EN (1 << 17)
# define RADEON_PPLL_ATOMIC_UPDATE_VSYNC (1 << 18)
+# define RADEON_PPLL_PVG_MASK (7 << 11)
+# define RADEON_PPLL_PVG_SHIFT 11
#define RADEON_PPLL_DIV_0 0x0004 /* PLL */
#define RADEON_PPLL_DIV_1 0x0005 /* PLL */
#define RADEON_PPLL_DIV_2 0x0006 /* PLL */
Index: theater_out.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/theater_out.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- theater_out.c 17 Oct 2003 22:28:37 -0000 1.1.2.1
+++ theater_out.c 26 Nov 2003 19:50:10 -0000 1.1.2.2
@@ -23,9 +23,27 @@
* AUTHORS: F.Ulivi
* NOTES:
* $Log$
- * Revision 1.1.2.1 2003/10/17 22:28:37 fulivi
+ * Revision 1.1.2.2 2003/11/26 19:50:10 fulivi
+ * Support for ERT added
+ *
+ * Revision 1.1.1.1.2.9 2003/11/25 20:46:44 fede
+ * "enabled" state removed
+ * Handling of disabled tv output fixed
+ *
[...1473 lines suppressed...]
RTTRACE(("Entering theaterOutSetOnOff (on = %d)\n" , on));
- t->enabled = on;
-
- /*
- * TEST TEST TEST TEST TEST TEST TEST TEST TEST
- */
- return changed && t->compatibleMode;
+ return FALSE;
}
/**********************************************************************
@@ -1830,7 +2487,7 @@
TheaterOutPtr t
)
{
- return t->enabled;
+ return TRUE;
}
/**********************************************************************
Index: theater_out.h
===================================================================
RCS file: /cvsroot/gatos/ati.2/theater_out.h,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- theater_out.h 28 Sep 2003 21:42:37 -0000 1.1
+++ theater_out.h 26 Nov 2003 19:50:10 -0000 1.1.2.1
@@ -23,6 +23,18 @@
* AUTHORS: F.Ulivi
* NOTES:
* $Log$
+ * Revision 1.1.2.1 2003/11/26 19:50:10 fulivi
+ * Support for ERT added
+ *
+ * Revision 1.1.2.6 2003/11/25 20:44:00 fede
+ * TV_STD_KEEP_OFF added
+ *
+ * Revision 1.1.2.5 2003/10/14 18:41:32 fede
+ * forceERT changed to forceVIP
+ *
+ * Revision 1.1.2.4 2003/10/11 12:30:30 fede
+ * Support for ERT added
+ *
* Revision 1.1 2003/09/28 21:42:37 fulivi
* Theater_out module added
*
@@ -65,6 +77,7 @@
TV_STD_NTSC_J,
TV_STD_PAL_CN,
TV_STD_PAL_N,
+ TV_STD_KEEP_OFF
} TVStd;
/**********************************************************************
@@ -78,7 +91,8 @@
extern
TheaterOutPtr
detectTheaterOut(
- GENERIC_BUS_Ptr b
+ ScrnInfoPtr pScrn,
+ Bool forceVIP
);
/**********************************************************************
@@ -111,7 +125,8 @@
extern
void
theaterOutSave(
- TheaterOutPtr t
+ TheaterOutPtr t,
+ ScrnInfoPtr pScrn
);
/**********************************************************************
@@ -276,9 +291,9 @@
#ifdef XFree86LOADER
-#define xf86_detectTheaterOut ((TheaterOutPtr (*)(GENERIC_BUS_Ptr))LoaderSymbol("detectTheaterOut"))
+#define xf86_detectTheaterOut ((TheaterOutPtr (*)(ScrnInfoPtr , Bool))LoaderSymbol("detectTheaterOut"))
#define xf86_initTheaterOut ((void (*)(TheaterOutPtr , const char*))LoaderSymbol("initTheaterOut"))
-#define xf86_theaterOutSave ((void (*)(TheaterOutPtr))LoaderSymbol("theaterOutSave"))
+#define xf86_theaterOutSave ((void (*)(TheaterOutPtr , ScrnInfoPtr))LoaderSymbol("theaterOutSave"))
#define xf86_theaterOutRestore ((void (*)(TheaterOutPtr , ScrnInfoPtr))LoaderSymbol("theaterOutRestore"))
#define xf86_theaterOutInit ((Bool (*)(TheaterOutPtr , DisplayModePtr , RADEONSavePtr))LoaderSymbol("theaterOutInit"))
#define xf86_theaterOutRestoreMode ((void (*)(TheaterOutPtr , ScrnInfoPtr))LoaderSymbol("theaterOutRestoreMode"))
|
|
From: <gat...@li...> - 2003-11-18 22:19:26
|
Update of /cvsroot/gatos/ati.2 In directory sc8-pr-cvs1:/tmp/cvs-serv21249 Modified Files: radeon_reg.h Log Message: Add definitions for RADEON_DISP_MERGE_CNTL. Index: radeon_reg.h =================================================================== RCS file: /cvsroot/gatos/ati.2/radeon_reg.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- radeon_reg.h 7 Mar 2003 16:18:41 -0000 1.12 +++ radeon_reg.h 18 Nov 2003 22:19:23 -0000 1.13 @@ -984,6 +984,20 @@ #define RADEON_IDCT_AUTH_CONTROL 0x1F88 #define RADEON_IDCT_AUTH 0x1F8C +/* display merge */ +#define RADEON_DISP_MERGE_CNTL 0x0D60 +# define RADEON_DISP_MERGE_CNTL_MODE_KEY 0 +# define RADEON_DISP_MERGE_CNTL_MODE_PER_PIXEL_ALPHA 1 +# define RADEON_DISP_MERGE_CNTL_MODE_GLOBAL_ALPHA 2 +# define RADEON_DISP_MERGE_CNTL_MODE_GRAPH_ALPHA (0<<2) +# define RADEON_DISP_MERGE_CNTL_MODE_OV_ALPHA (1<<2) +# define RADEON_DISP_MERGE_CNTL_MODE_ABSOLUTE_GRAPHICS (1<<3) +# define RADEON_DISP_MERGE_CNTL_MODE_NO_CLAMPING (1<<8) +# define RADEON_DISP_MERGE_CNTL_MODE_GRAPH_ALPHA_MASK (0xff<<16) +# define RADEON_DISP_MERGE_CNTL_MODE_GRAPH_ALPHA_SHIFT 16 +# define RADEON_DISP_MERGE_CNTL_MODE_OV0_ALPHA_MASK (0xff<<24) +# define RADEON_DISP_MERGE_CNTL_MODE_OV0_ALPHA_SHIFT 24 + #define RADEON_P2PLL_CNTL 0x002a /* P2PLL */ # define RADEON_P2PLL_RESET (1 << 0) |
|
From: <gat...@li...> - 2003-11-16 18:28:31
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv5652
Modified Files:
atixv.c
Log Message:
Reinitialize I2C bus upon come back to video mode as other places in the driver
(atilock.c) mess with I2C registers.
Index: atixv.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/atixv.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- atixv.c 5 May 2003 01:16:38 -0000 1.30
+++ atixv.c 16 Nov 2003 18:27:47 -0000 1.31
@@ -428,6 +428,36 @@
ATIResetVideo(pScrn);
}
+/* I2C_CNTL_0 bits */
+#define I2C_DONE (1<<0)
+#define I2C_NACK (1<<1)
+#define I2C_HALT (1<<2)
+#define I2C_SOFT_RST (1<<5)
+#define I2C_START (1<<8)
+#define I2C_STOP (1<<9)
+#define I2C_RECEIVE (1<<11)
+#define I2C_ABORT (1<<12)
+#define I2C_GO (1<<10)
+
+/* I2C_CNTL_1 bits */
+#define I2C_SEL (1<<22)
+#define I2C_EN (1<<17)
+
+
+#define MPP_WRITE 0x80038CB0
+#define MPP_WRITEINC 0x80338CB0
+#define MPP_READ 0x84038CB0
+#define MPP_READINC 0x84338CB0
+
+#define IMPACTTV_I2C_CNTL 0x0015
+
+#define TB_SDA_GET 0x40
+#define TB_SDA_SET 0x20
+#define TB_SDA_DIR 0x10
+#define TB_SCL_GET 0x04
+#define TB_SCL_SET 0x02
+#define TB_SCL_DIR 0x01
+
void ATIResetVideo(ScrnInfoPtr pScrn)
{
@@ -481,37 +511,13 @@
outf(OVERLAY_GRAPHICS_KEY_CLR, pPriv->colorKey);
outf(OVERLAY_KEY_CNTL, 0x50);
outf(SCALER_TEST, 0);
-}
-
-/* I2C_CNTL_0 bits */
-#define I2C_DONE (1<<0)
-#define I2C_NACK (1<<1)
-#define I2C_HALT (1<<2)
-#define I2C_SOFT_RST (1<<5)
-#define I2C_START (1<<8)
-#define I2C_STOP (1<<9)
-#define I2C_RECEIVE (1<<11)
-#define I2C_ABORT (1<<12)
-#define I2C_GO (1<<10)
-/* I2C_CNTL_1 bits */
-#define I2C_SEL (1<<22)
-#define I2C_EN (1<<17)
-
-
-#define MPP_WRITE 0x80038CB0
-#define MPP_WRITEINC 0x80338CB0
-#define MPP_READ 0x84038CB0
-#define MPP_READINC 0x84338CB0
-
-#define IMPACTTV_I2C_CNTL 0x0015
-
-#define TB_SDA_GET 0x40
-#define TB_SDA_SET 0x20
-#define TB_SDA_DIR 0x10
-#define TB_SCL_GET 0x04
-#define TB_SCL_SET 0x02
-#define TB_SCL_DIR 0x01
+ if((pATI->Chip >= ATI_CHIP_264GTPRO) && (pATI->Chip <= ATI_CHIP_MOBILITY))
+ {
+ out8(I2C_CNTL_1+2, (I2C_SEL >>16));
+ out8(I2C_CNTL_0+0, (I2C_DONE | I2C_NACK | I2C_HALT | I2C_SOFT_RST ));
+ }
+}
static Bool MPP_wait(ATIPtr pATI)
{
|
|
From: <gat...@li...> - 2003-10-17 22:28:42
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv23651
Modified Files:
Tag: tv_output
radeon.h theater_out.c
Log Message:
Support for NTSC added
Index: radeon.h
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon.h,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -d -r1.8.2.1 -r1.8.2.2
--- radeon.h 28 Sep 2003 22:07:56 -0000 1.8.2.1
+++ radeon.h 17 Oct 2003 22:28:37 -0000 1.8.2.2
@@ -68,8 +68,8 @@
#include "picturestr.h"
#endif
-#define RADEON_DEBUG 0 /* Turn off debugging output */
-/* #define RADEON_DEBUG 1 /\* Turn on debugging output *\/ */
+/* #define RADEON_DEBUG 0 /\* Turn off debugging output *\/ */
+#define RADEON_DEBUG 1 /* Turn on debugging output */
#define RADEON_IDLE_RETRY 16 /* Fall out of idle loops after this count */
#define RADEON_TIMEOUT 2000000 /* Fall out of wait loops after this count */
#define RADEON_MMIOSIZE 0x80000
Index: theater_out.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/theater_out.c,v
retrieving revision 1.1
retrieving revision 1.1.2.1
diff -u -d -r1.1 -r1.1.2.1
--- theater_out.c 28 Sep 2003 21:42:37 -0000 1.1
+++ theater_out.c 17 Oct 2003 22:28:37 -0000 1.1.2.1
@@ -23,6 +23,9 @@
* AUTHORS: F.Ulivi
* NOTES:
* $Log$
+ * Revision 1.1.2.1 2003/10/17 22:28:37 fulivi
+ * Support for NTSC added
+ *
* Revision 1.1 2003/09/28 21:42:37 fulivi
* Theater_out module added
*
@@ -83,14 +86,7 @@
*/
#define REF_FREQUENCY 27000
-/*
- * Values for TV PLL for PAL color burst (nominally 4433618.75 Hz)
- * These values apply to 27 MHz reference freq.
- */
-#define TV_PLL_N_PAL_27000 668
-#define TV_PLL_M_PAL_27000 113
-#define TV_PLL_PD_PAL_27000 3
-#define TV_PLL_FINE_PAL_27000 0x10000000
+#define TV_PLL_FINE_INI 0X10000000
/*
* VIP_TV_PLL_CNTL
@@ -155,11 +151,6 @@
#define VIP_RGB_CNTL_RGB_IS_888_PACK MASK_N_BIT(0)
/*
- * Value for VIP_VFTOTAL
- */
-#define VIP_VFTOTAL_INI 3
-
-/*
* Value for VIP_VSCALER_CNTL2
*/
#define VIP_VSCALER_CNTL2_INI 0x10000000
@@ -213,25 +204,13 @@
#define VIP_TIMING_CNTL_H_INC_SHIFT 0
/*
- * Value for VIP_MODULATOR_CNTL1
- */
-#define VIP_MODULATOR_CNTL1_INI 0x60bb3bcc
-
-/*
- * Value for VIP_MODULATOR_CNTL2
- */
-#define VIP_MODULATOR_CNTL2_INI 0x003e01b2
-
-/*
* Value for VIP_PRE_DAC_MUX_CNTL
*/
#define VIP_PRE_DAC_MUX_CNTL_INI 0x0000000f
/*
- * Value for VIP_TV_DAC_CNTL
+ * VIP_TV_DAC_CNTL
*/
-#define VIP_TV_DAC_CNTL_ON_INI 0x00000013
-#define VIP_TV_DAC_CNTL_OFF_INI 0x0000004a
#define VIP_TV_DAC_CNTL_NBLANK MASK_N_BIT(0)
#define VIP_TV_DAC_CNTL_DASLEEP MASK_N_BIT(3)
#define VIP_TV_DAC_CNTL_BGSLEEP MASK_N_BIT(6)
@@ -469,6 +448,63 @@
/**********************************************************************
*
+ * TVConstants
+ *
+ * Constants that depend on tv standard only
+ *
+ **********************************************************************/
+
+typedef struct
+{
+ CARD8 tvPLL_M;
+ CARD16 tvPLL_N;
+ CARD8 tvPLL_postDiv;
+ CARD32 modulatorCntl1;
+ CARD32 modulatorCntl2;
+ CARD32 tvDAC_Cntl;
+ CARD32 vftotal;
+} TVConstants;
+
+/**********************************************************************
+ *
+ * tvStdConsts
+ *
+ * Table of constants for tv standards (index is a TVStd)
+ *
+ **********************************************************************/
+
+static
+const
+TVConstants tvStdConsts[] =
+ {
+ /*
+ * NTSC
+ */
+ {
+ 22, /* tvPLL_M */
+ 175, /* tvPLL_N */
+ 5, /* tvPLL_postDiv */
+ 0x60bb468c, /* modulatorCntl1 */
+ 0x00000191, /* modulatorCntl2 */
+ 0x00000113, /* tvDAC_Cntl */
+ 1 /* vftotal */
+ },
+ /*
+ * PAL
+ */
+ {
+ 113, /* tvPLL_M */
+ 668, /* tvPLL_N */
+ 3, /* tvPLL_postDiv */
+ 0x60bb3bcc, /* modulatorCntl1 */
+ 0x003e01b2, /* modulatorCntl2 */
+ 0x00000013, /* tvDAC_Cntl */
+ 3 /* vftotal */
+ }
+ };
+
+/**********************************************************************
+ *
* availableModes
*
* Table of all allowed modes for tv output
@@ -477,7 +513,51 @@
static
const
-TimingTableEl horCodeTimingBIOS[] =
+TimingTableEl horTimingNTSC_BIOS[] =
+ {
+ 0x0007,
+ 0x003f,
+ 0x0263,
+ 0x0a24,
+ 0x2a6b,
+ 0x0a36,
+ 0x126d,
+ 0x1bfe,
+ 0x1a8f,
+ 0x1ec7,
+ 0x3863,
+ 0x1bfe,
+ 0x1bfe,
+ 0x1a2a,
+ 0x1e95,
+ 0x0e31,
+ 0x201b,
+ 0
+ };
+
+static
+const
+TimingTableEl verTimingNTSC_BIOS[] =
+ {
+ 0x2001,
+ 0x200d,
+ 0x1006,
+ 0x0c06,
+ 0x1006,
+ 0x1818,
+ 0x21e3,
+ 0x1006,
+ 0x0c06,
+ 0x1006,
+ 0x1817,
+ 0x21d4,
+ 0x0002,
+ 0
+ };
+
+static
+const
+TimingTableEl horTimingPAL_BIOS[] =
{
0x0007,
0x0058,
@@ -501,7 +581,7 @@
static
const
-TimingTableEl verCodeTimingBIOS[] =
+TimingTableEl verTimingPAL_BIOS[] =
{
0x2001,
0x200c,
@@ -528,6 +608,31 @@
{
800, /* horResolution */
600, /* verResolution */
+ TV_STD_NTSC, /* standard */
+ 990, /* horTotal */
+ 740, /* verTotal */
+ 813, /* horStart */
+ 0, /* dFRestart */
+ 902, /* dHRestart */
+ 631, /* dVRestart */
+ 0x0900b46b, /* vScalerCntl1 */
+ 0x00012c00, /* yRiseCntl */
+ 0x10002d1a, /* ySawtoothCntl */
+ 1658, /* hInc */
+ 592, /* crtcPLL_N */
+ 91, /* crtcPLL_M */
+ TRUE, /* crtcPLL_divBy2 */
+ 0, /* crtcPLL_byteClkDiv */
+ FALSE, /* use888RGB */
+ 1, /* byteClkDelay */
+ 0x0a0b0907, /* tvoDataDelayA */
+ 0x060a090a, /* tvoDataDelayB */
+ horTimingNTSC_BIOS,/* horTimingTable */
+ verTimingNTSC_BIOS/* verTimingTable */
+ },
+ {
+ 800, /* horResolution */
+ 600, /* verResolution */
TV_STD_PAL, /* standard */
1144, /* horTotal */
706, /* verTotal */
@@ -547,8 +652,8 @@
1, /* byteClkDelay */
0x0a0b0907, /* tvoDataDelayA */
0x060a090a, /* tvoDataDelayB */
- horCodeTimingBIOS,/* horTimingTable */
- verCodeTimingBIOS /* verTimingTable */
+ horTimingPAL_BIOS,/* horTimingTable */
+ verTimingPAL_BIOS /* verTimingTable */
}
};
@@ -1239,12 +1344,14 @@
void
RT_Init(
const ModeConstants *constPtr,
+ TVStd tvStd,
Bool enable,
TheaterStatePtr save
)
{
unsigned i;
CARD32 tmp;
+ const TVConstants *pTvStd = &tvStdConsts[ tvStd ];
save->clkout_cntl = VIP_CLKOUT_CNTL_INI;
@@ -1283,8 +1390,8 @@
save->master_cntl = VIP_MASTER_CNTL_ON_INI;
/* save->master_cntl = enable ? VIP_MASTER_CNTL_ON_INI : VIP_MASTER_CNTL_OFF_INI; */
- save->modulator_cntl1 = VIP_MODULATOR_CNTL1_INI;
- save->modulator_cntl2 = VIP_MODULATOR_CNTL2_INI;
+ save->modulator_cntl1 = pTvStd->modulatorCntl1;
+ save->modulator_cntl2 = pTvStd->modulatorCntl2;
save->pll_cntl0 = VIP_PLL_CNTL0_INI;
save->pll_test_cntl = VIP_PLL_TEST_CNTL_INI;
@@ -1319,14 +1426,18 @@
else
save->tvo_sync_threshold = constPtr->horResolution;
- save->tv_dac_cntl = enable ? VIP_TV_DAC_CNTL_ON_INI : VIP_TV_DAC_CNTL_OFF_INI;
+ if (enable)
+ save->tv_dac_cntl = pTvStd->tvDAC_Cntl;
+ else
+ save->tv_dac_cntl = (pTvStd->tvDAC_Cntl & ~VIP_TV_DAC_CNTL_NBLANK) |
+ (VIP_TV_DAC_CNTL_DASLEEP | VIP_TV_DAC_CNTL_BGSLEEP);
- tmp = ((CARD32)TV_PLL_M_PAL_27000 << VIP_TV_PLL_CNTL_M_SHIFT) |
- (((CARD32)TV_PLL_N_PAL_27000 & VIP_TV_PLL_CNTL_NLO) << VIP_TV_PLL_CNTL_NLO_SHIFT) |
- (((CARD32)TV_PLL_N_PAL_27000 & VIP_TV_PLL_CNTL_NHI) << VIP_TV_PLL_CNTL_NHI_SHIFT) |
- ((CARD32)TV_PLL_PD_PAL_27000 << VIP_TV_PLL_CNTL_P_SHIFT);
+ tmp = ((CARD32)(pTvStd->tvPLL_M) << VIP_TV_PLL_CNTL_M_SHIFT) |
+ (((CARD32)(pTvStd->tvPLL_N) & VIP_TV_PLL_CNTL_NLO) << VIP_TV_PLL_CNTL_NLO_SHIFT) |
+ (((CARD32)(pTvStd->tvPLL_N) & VIP_TV_PLL_CNTL_NHI) << VIP_TV_PLL_CNTL_NHI_SHIFT) |
+ ((CARD32)(pTvStd->tvPLL_postDiv) << VIP_TV_PLL_CNTL_P_SHIFT);
save->tv_pll_cntl = tmp;
- save->tv_pll_fine_cntl = TV_PLL_FINE_PAL_27000;
+ save->tv_pll_fine_cntl = TV_PLL_FINE_INI;
save->upsamp_and_gain_cntl = VIP_UPSAMP_AND_GAIN_CNTL_INI;
@@ -1335,7 +1446,7 @@
save->uv_adr = VIP_UV_ADR_INI;
save->vdisp = constPtr->verResolution - 1;
- save->vftotal = VIP_VFTOTAL_INI;
+ save->vftotal = pTvStd->vftotal;
save->vscaler_cntl1 = constPtr->vScalerCntl1;
save->vscaler_cntl2 = VIP_VSCALER_CNTL2_INI;
@@ -1599,7 +1710,7 @@
if (t->enabled)
{
- RT_Init(p , TRUE , &t->modeState);
+ RT_Init(p , t->standard , TRUE , &t->modeState);
RT_InitCRTC(p , save);
return TRUE;
@@ -1614,7 +1725,7 @@
* First parameter is dummy when setting for no tv output, so any mode
* will do (here first mode in table is passed).
*/
- RT_Init(availableModes , FALSE , &t->modeState);
+ RT_Init(availableModes , TV_STD_NTSC , FALSE , &t->modeState);
return FALSE;
}
|
|
From: <gat...@li...> - 2003-10-14 07:42:21
|
Update of /cvsroot/gatos/ati.2 In directory sc8-pr-cvs1:/tmp/cvs-serv11819 Modified Files: README.gatos Log Message: Update README.gatos with new XFree86 version requirement. Index: README.gatos =================================================================== RCS file: /cvsroot/gatos/ati.2/README.gatos,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- README.gatos 7 Feb 2003 02:09:59 -0000 1.6 +++ README.gatos 14 Oct 2003 07:42:15 -0000 1.7 @@ -20,7 +20,7 @@ diff -u --unidirectional-new-file ati.2.orig ati.2 > ati.2.patch - - ati.2 is based on XFree86 CVS of February 06 2003 - 4.2.901+ + - ati.2 is based on XFree86 4.3.0 source Your mileage with later trees may vary ** Hint from Marko Skofljanec: |
Update of /cvsroot/gatos/avview
In directory sc8-pr-cvs1:/tmp/cvs-serv8798
Modified Files:
aclocal.m4 depcomp formats.c install-sh main.c missing
mkinstalldirs packet_stream.c setup.scp
Log Message:
Fix warnings..
Index: aclocal.m4
===================================================================
RCS file: /cvsroot/gatos/avview/aclocal.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- aclocal.m4 16 Feb 2003 18:42:13 -0000 1.3
+++ aclocal.m4 3 Oct 2003 13:04:30 -0000 1.4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.7.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.7.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
# Free Software Foundation, Inc.
@@ -16,7 +16,7 @@
# This macro actually does too much some checks are only needed if
# your package does certain things. But this isn't really a big deal.
-# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -34,7 +34,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
-# serial 8
+# serial 9
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -86,8 +86,8 @@
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
- AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
- AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
@@ -108,6 +108,7 @@
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
@@ -130,7 +131,16 @@
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright 2002 Free Software Foundation, Inc.
@@ -160,7 +170,7 @@
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.7.2])])
+ [AM_AUTOMAKE_VERSION([1.7.3])])
# Helper functions for option handling. -*- Autoconf -*-
@@ -446,9 +456,42 @@
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# serial 4 -*- Autoconf -*-
+# -*- Autoconf -*-
+# Copyright (C) 2003 Free Software Foundation, Inc.
-# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# serial 5 -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -540,11 +583,17 @@
if depmode=$depmode \
source=conftest.c object=conftest.o \
depfile=conftest.Po tmpdepfile=conftest.TPo \
- $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
+ $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
+ >/dev/null 2>conftest.err &&
grep conftest.h conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- am_cv_$1_dependencies_compiler_type=$depmode
- break
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored.
+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
fi
done
@@ -566,16 +615,8 @@
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
-[rm -f .deps 2>/dev/null
-mkdir .deps 2>/dev/null
-if test -d .deps; then
- DEPDIR=.deps
-else
- # MS-DOS does not allow filenames that begin with a dot.
- DEPDIR=_deps
-fi
-rmdir .deps 2>/dev/null
-AC_SUBST([DEPDIR])
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
Index: depcomp
===================================================================
RCS file: /cvsroot/gatos/avview/depcomp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- depcomp 25 Aug 2002 20:48:10 -0000 1.1
+++ depcomp 3 Oct 2003 13:04:30 -0000 1.2
@@ -1,7 +1,7 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -172,19 +172,25 @@
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. This file always lives in the current directory.
- # Also, the AIX compiler puts `$object:' at the start of each line;
- # $object doesn't have directory information.
- stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
- outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
-
stat=$?
+
+ if test -f "$tmpdepfile"; then :
+ else
+ stripped=`echo "$stripped" | sed 's,^.*/,,'`
+ tmpdepfile="$stripped.u"
+ fi
+
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
@@ -192,6 +198,7 @@
fi
if test -f "$tmpdepfile"; then
+ outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
@@ -206,6 +213,44 @@
rm -f "$tmpdepfile"
;;
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -240,8 +285,8 @@
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a space and a tab in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
@@ -254,7 +299,7 @@
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o.
+ # always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
@@ -265,9 +310,7 @@
shift
fi
- # Remove `-o $object'. We will use -o /dev/null later,
- # however we can't do the remplacement now because
- # `-o $object' might simply not be used
+ # Remove `-o $object'.
IFS=" "
for arg
do
@@ -287,7 +330,11 @@
done
test -z "$dashmflag" && dashmflag=-M
- "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
@@ -306,6 +353,13 @@
makedepend)
"$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
# X makedepend
shift
cleared=no
@@ -318,7 +372,9 @@
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
- -*)
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
@@ -339,7 +395,7 @@
cpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout.
+ # always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
@@ -381,7 +437,7 @@
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the proprocessed file to stdout, regardless of -o,
+ # always write the preprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
Index: formats.c
===================================================================
RCS file: /cvsroot/gatos/avview/formats.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- formats.c 14 Dec 2002 22:58:03 -0000 1.10
+++ formats.c 3 Oct 2003 13:04:30 -0000 1.11
@@ -3,6 +3,7 @@
#endif
#include <stdio.h>
+#include <string.h>
#include "global.h"
#include "formats.h"
Index: install-sh
===================================================================
RCS file: /cvsroot/gatos/avview/install-sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- install-sh 25 Aug 2002 20:45:30 -0000 1.1
+++ install-sh 3 Oct 2003 13:04:30 -0000 1.2
@@ -1,19 +1,37 @@
#!/bin/sh
#
# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
#
-# Copyright 1991 by the Massachusetts Institute of Technology
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
+#
+# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -56,7 +74,7 @@
while [ x"$1" != x ]; do
case $1 in
- -c) instcmd="$cpprog"
+ -c) instcmd=$cpprog
shift
continue;;
@@ -79,7 +97,7 @@
shift
continue;;
- -s) stripcmd="$stripprog"
+ -s) stripcmd=$stripprog
shift
continue;;
@@ -106,7 +124,7 @@
if [ x"$src" = x ]
then
- echo "install: no input file specified"
+ echo "$0: no input file specified" >&2
exit 1
else
:
@@ -115,8 +133,8 @@
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
-
- if [ -d $dst ]; then
+
+ if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
@@ -125,20 +143,20 @@
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
+# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
- echo "install: $src does not exist"
+ echo "$0: $src does not exist" >&2
exit 1
fi
-
+
if [ x"$dst" = x ]
then
- echo "install: no destination specified"
+ echo "$0: no destination specified" >&2
exit 1
else
:
@@ -147,16 +165,16 @@
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
- if [ -d $dst ]
+ if [ -d "$dst" ]
then
- dst="$dst"/`basename $src`
+ dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
@@ -165,69 +183,73 @@
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
-IFS="${IFS-${defaultIFS}}"
+IFS="${IFS-$defaultIFS}"
-oIFS="${IFS}"
+oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
- pathcomp="${pathcomp}${1}"
+ pathcomp=$pathcomp$1
shift
- if [ ! -d "${pathcomp}" ] ;
+ if [ ! -d "$pathcomp" ] ;
then
- $mkdirprog "${pathcomp}"
+ $mkdirprog "$pathcomp"
else
:
fi
- pathcomp="${pathcomp}/"
+ pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
- $doit $instcmd $dst &&
+ $doit $instcmd "$dst" &&
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
- if [ x"$transformarg" = x ]
+ if [ x"$transformarg" = x ]
then
- dstfile=`basename $dst`
+ dstfile=`basename "$dst"`
else
- dstfile=`basename $dst $transformbasename |
+ dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
- if [ x"$dstfile" = x ]
+ if [ x"$dstfile" = x ]
then
- dstfile=`basename $dst`
+ dstfile=`basename "$dst"`
else
:
fi
-# Make a temp file name in the proper directory.
+# Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/#inst.$$#
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
-# Move or copy the file name to the temp name
+# Trap to clean up temp files at exit.
- $doit $instcmd $src $dsttmp &&
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
- trap "rm -f ${dsttmp}" 0 &&
+# Move or copy the file name to the temp name
+
+ $doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
@@ -235,17 +257,38 @@
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
- if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# Now remove or move aside any old file at destination location. We try this
+# two ways since rm can't unlink itself on some systems and the destination
+# file might be busy for other reasons. In this case, the final cleanup
+# might fail but the new file should still install successfully.
+
+{
+ if [ -f "$dstdir/$dstfile" ]
+ then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+ $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+ {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+} &&
# Now rename the file to the real destination.
- $doit $rmcmd -f $dstdir/$dstfile &&
- $doit $mvcmd $dsttmp $dstdir/$dstfile
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
+# The final little trick to "correctly" pass the exit status to the exit trap.
-exit 0
+{
+ (exit 0); exit
+}
Index: main.c
===================================================================
RCS file: /cvsroot/gatos/avview/main.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- main.c 16 Feb 2003 06:22:03 -0000 1.16
+++ main.c 3 Oct 2003 13:04:30 -0000 1.17
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <X11/X.h>
#include <X11/Xlib.h>
Index: missing
===================================================================
RCS file: /cvsroot/gatos/avview/missing,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- missing 25 Aug 2002 21:12:53 -0000 1.1
+++ missing 3 Oct 2003 13:04:30 -0000 1.2
@@ -1,6 +1,6 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pi...@ir...>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -165,7 +165,7 @@
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them.
- You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+ You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
@@ -326,7 +326,7 @@
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequirements for installing
+ it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
Index: mkinstalldirs
===================================================================
RCS file: /cvsroot/gatos/avview/mkinstalldirs,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mkinstalldirs 25 Aug 2002 21:13:46 -0000 1.1
+++ mkinstalldirs 3 Oct 2003 13:04:30 -0000 1.2
@@ -12,18 +12,29 @@
# process command line arguments
while test $# -gt 0 ; do
- case "${1}" in
- -h | --help | --h* ) # -h for help
- echo "${usage}" 1>&2; exit 0 ;;
- -m ) # -m PERM arg
- shift
- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
- dirmode="${1}"
- shift ;;
- -- ) shift; break ;; # stop option processing
- -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
- * ) break ;; # first non-opt arg
- esac
+ case $1 in
+ -h | --help | --h*) # -h for help
+ echo "$usage" 1>&2
+ exit 0
+ ;;
+ -m) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --) # stop option processing
+ shift
+ break
+ ;;
+ -*) # unknown option
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *) # first non-opt arg
+ break
+ ;;
+ esac
done
for file
@@ -36,64 +47,65 @@
done
case $# in
-0) exit 0 ;;
+ 0) exit 0 ;;
esac
case $dirmode in
-'')
- if mkdir -p -- . 2>/dev/null; then
- echo "mkdir -p -- $*"
- exec mkdir -p -- "$@"
- fi ;;
-*)
- if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
- echo "mkdir -m $dirmode -p -- $*"
- exec mkdir -m "$dirmode" -p -- "$@"
- fi ;;
+ '')
+ if mkdir -p -- . 2>/dev/null; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ fi
+ ;;
+ *)
+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ fi
+ ;;
esac
for file
do
- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
- shift
-
- pathcomp=
- for d
- do
- pathcomp="$pathcomp$d"
- case "$pathcomp" in
- -* ) pathcomp=./$pathcomp ;;
- esac
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp"
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case $pathcomp in
+ -*) pathcomp=./$pathcomp ;;
+ esac
- mkdir "$pathcomp" || lasterr=$?
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- else
- if test ! -z "$dirmode"; then
- echo "chmod $dirmode $pathcomp"
+ mkdir "$pathcomp" || lasterr=$?
- lasterr=""
- chmod "$dirmode" "$pathcomp" || lasterr=$?
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
- fi
- fi
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
- pathcomp="$pathcomp/"
- done
+ pathcomp="$pathcomp/"
+ done
done
exit $errstatus
# Local Variables:
# mode: shell-script
-# sh-indentation: 3
+# sh-indentation: 2
# End:
# mkinstalldirs ends here
Index: packet_stream.c
===================================================================
RCS file: /cvsroot/gatos/avview/packet_stream.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- packet_stream.c 18 Feb 2003 11:43:57 -0000 1.27
+++ packet_stream.c 3 Oct 2003 13:04:30 -0000 1.28
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <string.h>
#include "packet_stream.h"
#include "global.h"
Index: setup.scp
===================================================================
RCS file: /cvsroot/gatos/avview/setup.scp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- setup.scp 19 Jul 2003 04:11:29 -0000 1.14
+++ setup.scp 3 Oct 2003 13:04:30 -0000 1.15
@@ -91,7 +91,6 @@
global diag_pane_count
set PANE_FRAME $SETUP_MAIN.f.pane$diag_pane_count
frame $PANE_FRAME
-puts stderr "Adding pane $PANE_FRAME $key $title"
make_title $PANE_FRAME.title "$title"
grid $PANE_FRAME.title -sticky news -pady 2
frame $PANE_FRAME.f
|
|
From: <gat...@li...> - 2003-09-29 02:50:25
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv20615
Modified Files:
Tag: tv_output
Imakefile
Log Message:
Theater_out module added
Index: Imakefile
===================================================================
RCS file: /cvsroot/gatos/ati.2/Imakefile,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -d -r1.8 -r1.8.2.1
--- Imakefile 1 Mar 2003 08:02:11 -0000 1.8
+++ Imakefile 28 Sep 2003 22:57:04 -0000 1.8.2.1
@@ -42,6 +42,7 @@
MODSRC_TDA9850 = tda9850_module.c
MODSRC_TDA8425 = tda8425_module.c
MODSRC_TDA9885 = tda9885_module.c
+MODSRC_THEATER_OUT = theater_out_module.c
MODOBJS1 = atimodule.o
MODOBJS2 = atiload.o atimisc.o
@@ -55,6 +56,7 @@
MODOBJ_TDA9850 = tda9850_module.o
MODOBJ_TDA8425 = tda8425_module.o
MODOBJ_TDA9885 = tda9885_module.o
+MODOBJ_THEATER_OUT = theater_out_module.o
#endif
@@ -183,6 +185,7 @@
SRCS_TDA9850 = tda9850.c $(MODSRC_TDA9850)
SRCS_TDA8425 = tda8425.c $(MODSRC_TDA8425)
SRCS_TDA9885 = tda9885.c $(MODSRC_TDA9885)
+SRCS_THEATER_OUT = theater_out.c $(MODSRC_THEATER_OUT)
OBJS1 = ati.o atiadapter.o atibus.o atichip.o atiident.o atioption.o \
atiprobe.o atividmem.o $(CPIOOBJS1) $(MODOBJS1) \
@@ -205,13 +208,14 @@
OBJS_TDA9850 = tda9850.o $(MODOBJ_TDA9850)
OBJS_TDA8425 = tda8425.o $(MODOBJ_TDA8425)
OBJS_TDA9885 = tda9885.o $(MODOBJ_TDA9885)
+OBJS_THEATER_OUT = theater_out.o $(MODOBJ_THEATER_OUT)
SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) $(SRCS_FI1236) \
$(SRCS_MSP3430) $(SRCS_THEATRE) $(SRCS_BT829) $(SRCS_TDA9850) \
- $(SRCS_TDA8425) $(SRCS_TDA9885) $(SRCS_SAA7114)
+ $(SRCS_TDA8425) $(SRCS_TDA9885) $(SRCS_SAA7114) $(SRCS_THEATER_OUT)
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS_FI1236) \
$(OBJS_MSP3430) $(OBJS_THEATRE) $(OBJS_BT829) $(OBJS_TDA9850) \
- $(OBJS_TDA8425) $(OBJS_TDA9885) $(OBJS_SAA7114)
+ $(OBJS_TDA8425) $(OBJS_TDA9885) $(OBJS_SAA7114) $(OBJS_THEATER_OUT)
#if defined(XF86DriverSDK)
INCLUDES = -I. -I../../include
@@ -248,7 +252,7 @@
ObjectModuleTarget(tda9850, $(OBJS_TDA9850))
ObjectModuleTarget(tda8425, $(OBJS_TDA8425))
ObjectModuleTarget(tda9885, $(OBJS_TDA9885))
-
+ObjectModuleTarget(theater_out, $(OBJS_THEATER_OUT))
InstallObjectModule(ati,$(MODULEDIR),drivers)
InstallObjectModule(atimisc,$(MODULEDIR),drivers)
@@ -262,6 +266,7 @@
InstallObjectModule(tda9850,$(MODULEDIR),multimedia)
InstallObjectModule(tda8425,$(MODULEDIR),multimedia)
InstallObjectModule(tda9885,$(MODULEDIR),multimedia)
+InstallObjectModule(theater_out,$(MODULEDIR),multimedia)
#if 0
InstallModuleManPage(ati)
@@ -404,6 +409,10 @@
InstallDriverSDKNonExecFile(tda9885_module.c,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(tda9885.h,$(DRIVERSDKDIR)/drivers/ati)
+InstallDriverSDKNonExecFile(theater_out.c,$(DRIVERSDKDIR)/drivers/ati)
+InstallDriverSDKNonExecFile(theater_out_module.c,$(DRIVERSDKDIR)/drivers/ati)
+InstallDriverSDKNonExecFile(theater_out.h,$(DRIVERSDKDIR)/drivers/ati)
+
InstallDriverSDKNonExecFile(radeon.h,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(radeon_accel.c,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(radeon_cursor.c,$(DRIVERSDKDIR)/drivers/ati)
@@ -426,6 +435,7 @@
InstallDriverSDKObjectModule(atimisc,$(DRIVERSDKMODULEDIR),drivers)
InstallDriverSDKObjectModule(r128,$(DRIVERSDKMODULEDIR),drivers)
InstallDriverSDKObjectModule(theatre,$(DRIVERSDKMODULEDIR),drivers)
+InstallDriverSDKObjectModule(theater_out,$(DRIVERSDKMODULEDIR),drivers)
InstallDriverSDKObjectModule(radeon,$(DRIVERSDKMODULEDIR),drivers)
InstallDriverSDKObjectModule(fi1236,$(MODULEDIR),multimedia)
InstallDriverSDKObjectModule(msp3430,$(MODULEDIR),multimedia)
|
|
From: <gat...@li...> - 2003-09-28 22:08:11
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv11539
Modified Files:
Tag: tv_output
ati.h radeon.h radeon_driver.c
Log Message:
Theater_out module added
Index: ati.h
===================================================================
RCS file: /cvsroot/gatos/ati.2/ati.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.8.1
diff -u -d -r1.1.1.1 -r1.1.1.1.8.1
--- ati.h 16 Jul 2001 04:09:58 -0000 1.1.1.1
+++ ati.h 28 Sep 2003 22:07:56 -0000 1.1.1.1.8.1
@@ -24,7 +24,7 @@
#ifndef ___ATI_H___
#define ___ATI_H___ 1
-#include "xf86Pci.h"
+#include "bus/xf86Pci.h"
#include "xf86PciInfo.h"
#include "xf86.h"
Index: radeon.h
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon.h,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -d -r1.8 -r1.8.2.1
--- radeon.h 1 Mar 2003 08:02:14 -0000 1.8
+++ radeon.h 28 Sep 2003 22:07:56 -0000 1.8.2.1
@@ -38,7 +38,9 @@
#ifndef _RADEON_H_
#define _RADEON_H_
+#include "radeon_version.h"
#include "xf86str.h"
+#include "generic_bus.h"
/* PCI support */
#include "xf86Pci.h"
@@ -66,7 +68,8 @@
#include "picturestr.h"
#endif
-#define RADEON_DEBUG 0 /* Turn off debugging output */
+#define RADEON_DEBUG 0 /* Turn off debugging output */
+/* #define RADEON_DEBUG 1 /\* Turn on debugging output *\/ */
#define RADEON_IDLE_RETRY 16 /* Fall out of idle loops after this count */
#define RADEON_TIMEOUT 2000000 /* Fall out of wait loops after this count */
#define RADEON_MMIOSIZE 0x80000
@@ -186,6 +189,7 @@
CARD32 ppll_ref_div;
CARD32 ppll_div_3;
CARD32 htotal_cntl;
+ CARD32 vclk_ecp_cntl;
/* Computed values for PLL2 */
CARD32 dot_clock_freq_2;
@@ -536,6 +540,8 @@
int RageTheatreCompositePort;
int RageTheatreSVideoPort;
int tunerType;
+ GENERIC_BUS_Ptr VIP;
+ struct TheaterOut *theaterOut;
/* general */
Bool showCache;
@@ -560,6 +566,9 @@
extern void RADEONDoAdjustFrame(ScrnInfoPtr pScrn, int x, int y,
int clone);
+extern void RADEONTheaterOutSetOnOff(ScrnInfoPtr, Bool);
+extern Bool RADEONTheaterOutGetOnOff(ScrnInfoPtr);
+extern Bool RADEONTheaterOutGetCompatMode(ScrnInfoPtr);
extern void RADEONEngineReset(ScrnInfoPtr pScrn);
extern void RADEONEngineFlush(ScrnInfoPtr pScrn);
@@ -578,7 +587,8 @@
extern int RADEONMinBits(int val);
-extern void RADEONInitVideo(ScreenPtr pScreen);
+extern void RADEONInitVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre);
+extern GENERIC_BUS_Ptr RADEONAllocateVIP(ScrnInfoPtr pScrn);
#ifdef XvExtension
extern void RADEONResetVideo(ScrnInfoPtr pScrn);
extern void RADEONLeaveVT_Video(ScrnInfoPtr pScrn);
Index: radeon_driver.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_driver.c,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -d -r1.16 -r1.16.2.1
--- radeon_driver.c 1 Mar 2003 08:02:15 -0000 1.16
+++ radeon_driver.c 28 Sep 2003 22:07:56 -0000 1.16.2.1
@@ -64,6 +64,7 @@
#include "radeon_probe.h"
#include "radeon_reg.h"
#include "radeon_version.h"
+#include "theater_out.h"
#ifdef XF86DRI
#define _XF86DRI_SERVER_
@@ -147,7 +148,8 @@
OPTION_RAGE_THEATRE_TUNER_PORT,
OPTION_RAGE_THEATRE_COMPOSITE_PORT,
OPTION_RAGE_THEATRE_SVIDEO_PORT,
- OPTION_TUNER_TYPE
+ OPTION_TUNER_TYPE,
+ OPTION_TV_OUTPUT
#endif
} RADEONOpts;
@@ -183,6 +185,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 },
#endif
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@@ -3617,6 +3620,8 @@
RADEONInfoPtr info = RADEONPTR(pScrn);
BoxRec MemBox;
int y2;
+ Bool loadTheatre;
+ const char *s;
RADEONTRACE(("RADEONScreenInit %x %d\n",
pScrn->memPhysBase, pScrn->fbOffset));
@@ -3639,6 +3644,36 @@
info->PaletteSavedOnVT = FALSE;
+ /*
+ * Load RT tv output module when TV_Output option is set
+ * CHECK: is this the correct place? Should it be moved to preinit?
+ */
+ RADEONTRACE(("Allocating VIP interface"));
+ info->VIP = RADEONAllocateVIP(pScrn);
+
+ loadTheatre = TRUE;
+ if ((s = xf86GetOptValString(info->Options , OPTION_TV_OUTPUT)) != NULL)
+ {
+ RADEONTRACE(("TVOutput opt = %s\n" , s));
+ if(!xf86LoadSubModule(pScrn , "theater_out"))
+ {
+ xf86DrvMsg(pScrn->scrnIndex , X_ERROR , "Unable to load Rage Theatre TV output module\n");
+ info->theaterOut = NULL;
+ }
+ else
+ {
+ loadTheatre = FALSE;
+ xf86LoaderReqSymbols(THEATER_OUT_SYMBOLS , NULL);
+ info->theaterOut = xf86_detectTheaterOut(info->VIP);
+ if (info->theaterOut != NULL)
+ xf86_initTheaterOut(info->theaterOut , s);
+ }
+ }
+ else
+ {
+ RADEONTRACE(("TVOutput opt = NULL\n"));
+ }
+
RADEONSave(pScrn);
if (info->FBDev) {
unsigned char *RADEONMMIO = info->MMIO;
@@ -4126,7 +4161,10 @@
xf86DPMSInit(pScreen, RADEONDisplayPowerManagementSet, 0);
#endif
- RADEONInitVideo(pScreen);
+ /*
+ * TEST TEST TEST TEST TEST TEST TEST TEST TEST
+ */
+ RADEONInitVideo(pScreen , info->VIP , loadTheatre);
/* Provide SaveScreen */
pScreen->SaveScreen = RADEONSaveScreen;
@@ -4206,7 +4244,10 @@
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);
+ /*
+ * fulivi: removed. It messes the VIP access up
+ */
+/* OUTREG(RADEON_VIPH_CONTROL, restore->viph_control); */
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);
@@ -4289,6 +4330,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);
}
/* Write CRTC2 registers */
@@ -4503,9 +4545,9 @@
usleep(5000); /* Let the clock to lock */
- OUTPLLP(pScrn, RADEON_VCLK_ECP_CNTL,
- RADEON_VCLK_SRC_SEL_PPLLCLK,
- ~(RADEON_VCLK_SRC_SEL_MASK));
+ OUTPLL(RADEON_VCLK_ECP_CNTL , restore->vclk_ecp_cntl);
+
+ RADEONTRACE(("VCLK_ECP_CNTL = %08x\n" , restore->vclk_ecp_cntl));
}
@@ -4745,6 +4787,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);
}
/* Read flat panel registers */
@@ -4772,7 +4815,6 @@
unsigned char *RADEONMMIO = info->MMIO;
save->dac2_cntl = INREG(RADEON_DAC_CNTL2);
- save->disp_output_cntl = INREG(RADEON_DISP_OUTPUT_CNTL);
save->disp_hw_debug = INREG (RADEON_DISP_HW_DEBUG);
save->crtc2_gen_cntl = INREG(RADEON_CRTC2_GEN_CNTL);
@@ -4796,6 +4838,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%08x\n",
save->ppll_ref_div,
@@ -4805,6 +4848,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 */
@@ -4908,6 +4952,12 @@
}
RADEONSaveMode(pScrn, save);
+
+ /*
+ * Save initial RT state
+ */
+ if (info->theaterOut != NULL)
+ xf86_theaterOutSave(info->theaterOut);
}
/* Restore the original (text) mode */
@@ -4947,6 +4997,12 @@
RADEONRestoreMode(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
@@ -5489,15 +5545,16 @@
pll->reference_freq);
save->post_div = post_div->divider;
- RADEONTRACE(("dc=%d, of=%d, fd=%d, pd=%d\n",
- save->dot_clock_freq,
- save->pll_output_freq,
- save->feedback_div,
- save->post_div));
+/* RADEONTRACE(("dc=%d, of=%d, fd=%d, pd=%d\n", */
+/* save->dot_clock_freq, */
+/* save->pll_output_freq, */
+/* save->feedback_div, */
+/* save->post_div)); */
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 */
@@ -5540,11 +5597,11 @@
pll->reference_freq);
save->post_div_2 = post_div->divider;
- RADEONTRACE(("dc=%d, of=%d, fd=%d, pd=%d\n",
- save->dot_clock_freq_2,
- save->pll_output_freq_2,
- save->feedback_div_2,
- save->post_div_2));
+/* RADEONTRACE(("dc=%d, of=%d, fd=%d, pd=%d\n", */
+/* save->dot_clock_freq_2, */
+/* save->pll_output_freq_2, */
+/* save->feedback_div_2, */
+/* save->post_div_2)); */
save->p2pll_ref_div = pll->reference_div;
save->p2pll_div_0 = (save->feedback_div_2 |
@@ -5620,6 +5677,12 @@
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;
+
if (info->IsSecondary) {
if (!RADEONInitCrtc2Registers(pScrn, save, mode, info))
return FALSE;
@@ -5662,9 +5725,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;
@@ -6107,4 +6186,63 @@
#endif
}
+/*
+ * 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
+RADEONTheaterOutSetOnOff(
+ ScrnInfoPtr pScrn,
+ Bool on
+ )
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+
+ RADEONTRACE(("RADEONTheaterOutSetOnOff on = %d" , on));
+ if (info->theaterOut != NULL && xf86_theaterOutSetOnOff(info->theaterOut , on))
+ RADEONRedoSwitchMode(pScrn);
+}
+
+Bool
+RADEONTheaterOutGetOnOff(
+ ScrnInfoPtr pScrn
+ )
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+
+ if (info->theaterOut != NULL)
+ return xf86_theaterOutGetOnOff(info->theaterOut);
+ else
+ return FALSE;
+}
+
+Bool
+RADEONTheaterOutGetCompatMode(
+ ScrnInfoPtr pScrn
+ )
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+
+ if (info->theaterOut != NULL)
+ return xf86_theaterOutGetCompatMode(info->theaterOut);
+ else
+ return FALSE;
+}
+
+
+
|
|
From: <gat...@li...> - 2003-09-28 22:05:15
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv11103
Modified Files:
Tag: tv_output
radeon_video.c
Log Message:
Theater_out module added
Index: radeon_video.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_video.c,v
retrieving revision 1.94
retrieving revision 1.94.2.1
diff -u -d -r1.94 -r1.94.2.1
--- radeon_video.c 30 Jun 2003 18:59:55 -0000 1.94
+++ radeon_video.c 28 Sep 2003 22:05:04 -0000 1.94.2.1
@@ -35,12 +35,21 @@
extern int gRADEONEntityIndex;
#ifndef XvExtension
-void RADEONInitVideo(ScreenPtr pScreen) {}
+void RADEONInitVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre) { }
+
+GENERIC_BUS_Ptr
+RADEONAllocateVIP(
+ ScrnInfoPtr pScrn
+ )
+{
+ return NULL;
+}
+
#else
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);
@@ -71,6 +80,8 @@
xvLocationID, xvDeviceID, xvInstanceID, xvDumpStatus,
xvAdjustment;
+static Atom xvTvoEnable , xvTvoStandard , xvTvoModeCompat;
+
typedef struct
{
BYTE table_revision;
@@ -124,7 +135,9 @@
GENERIC_BUS_Ptr VIP;
TheatrePtr theatre;
-
+
+/* TheaterOutPtr theaterOut; */
+
Bool video_stream_active;
int encoding;
CARD32 frequency;
@@ -163,14 +176,14 @@
void RADEONSetColorKey(ScrnInfoPtr pScrn, CARD32 pixel);
static void RADEONResetI2C(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv);
void RADEONShutdownVideo(ScrnInfoPtr pScrn);
-void RADEONVIP_reset(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv);
+void RADEONVIP_reset(ScrnInfoPtr pScrn /* , RADEONPortPrivPtr pPriv */);
#define GET_PORT_PRIVATE(pScrn) \
(RADEONPortPrivPtr)((RADEONPTR(pScrn))->adaptor->pPortPrivates[0].ptr)
-void RADEONInitVideo(ScreenPtr pScreen)
+void RADEONInitVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RADEONInfoPtr info = RADEONPTR(pScrn);
@@ -181,7 +194,7 @@
if(info->accel && info->accel->FillSolidRects)
{
- newAdaptor = RADEONSetupImageVideo(pScreen);
+ newAdaptor = RADEONSetupImageVideo(pScreen , VIP , loadTheatre);
RADEONInitOffscreenImages(pScreen);
}
num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
@@ -232,15 +245,15 @@
InputVideoEncodings[] =
{
{ 0, "XV_IMAGE", 2048,2048,{1,1}},
- { 1, "pal-composite", 720, 240, { 1, 50 }},
- { 2, "pal-tuner", 720, 240, { 1, 50 }},
- { 3, "pal-svideo", 720, 240, { 1, 50 }},
+ { 1, "pal-composite", 720, 288, { 1, 50 }},
+ { 2, "pal-tuner", 720, 288, { 1, 50 }},
+ { 3, "pal-svideo", 720, 288, { 1, 50 }},
{ 4, "ntsc-composite", 640, 240, { 1001, 60000 }},
{ 5, "ntsc-tuner", 640, 240, { 1001, 60000 }},
{ 6, "ntsc-svideo", 640, 240, { 1001, 60000 }},
- { 7, "secam-composite", 720, 240, { 1, 50 }},
- { 8, "secam-tuner", 720, 240, { 1, 50 }},
- { 9, "secam-svideo", 720, 240, { 1, 50 }},
+ { 7, "secam-composite", 720, 288, { 1, 50 }},
+ { 8, "secam-tuner", 720, 288, { 1, 50 }},
+ { 9, "secam-svideo", 720, 288, { 1, 50 }},
{ 10,"pal_60-composite", 768, 288, { 1, 50 }},
{ 11,"pal_60-tuner", 768, 288, { 1, 50 }},
{ 12,"pal_60-svideo", 768, 288, { 1, 50 }}
@@ -257,8 +270,8 @@
{15, DirectColor}, {16, DirectColor}, {24, DirectColor}
};
-#define NUM_DEC_ATTRIBUTES 20+4+4
-#define NUM_ATTRIBUTES 9+4+4
+#define NUM_DEC_ATTRIBUTES 20+4+4+3
+#define NUM_ATTRIBUTES 9+4+4+3
static XF86AttributeRec Attributes[NUM_DEC_ATTRIBUTES+1] =
{
@@ -270,6 +283,9 @@
{XvSettable | XvGettable, 0, 1, "XV_AUTOPAINT_COLORKEY"},
{XvSettable | XvGettable, 0, ~0, "XV_COLORKEY"},
{XvSettable | XvGettable, 0, 1, "XV_DOUBLE_BUFFER"},
+ {XvSettable | XvGettable, 0, 1, "XV_TVO_ENABLE"},
+ {XvSettable | XvGettable, 0, 1, "XV_TVO_STANDARD"},
+ { XvGettable, 0, ~0, "XV_TVO_MODE_COMPAT"},
{XvSettable | XvGettable, -1000, 1000, "XV_BRIGHTNESS"},
{XvSettable | XvGettable, -1000, 1000, "XV_CONTRAST"},
{XvSettable | XvGettable, -1000, 1000, "XV_SATURATION"},
@@ -736,7 +752,11 @@
xvDeviceID = MAKE_ATOM("XV_DEVICE_ID");
xvLocationID = MAKE_ATOM("XV_LOCATION_ID");
xvDumpStatus = MAKE_ATOM("XV_DUMP_STATUS");
-
+
+ xvTvoEnable = MAKE_ATOM("XV_TVO_ENABLE");
+ xvTvoStandard = MAKE_ATOM("XV_TVO_STANDARD");
+ xvTvoModeCompat = MAKE_ATOM("XV_TVO_MODE_COMPAT");
+
sprintf(tmp, "RXXX:%d.%d.%d", info->PciInfo->vendor, info->PciInfo->chipType, info->PciInfo->chipRev);
pPriv->device_id = MAKE_ATOM(tmp);
sprintf(tmp, "PCI:%02d:%02d.%d", info->PciInfo->bus, info->PciInfo->device, info->PciInfo->func);
@@ -799,8 +819,8 @@
}
}
if(pPriv->VIP!=NULL){
- RADEONVIP_reset(pScrn,pPriv);
- }
+ RADEONVIP_reset(pScrn /* ,pPriv*/ );
+ }
if(pPriv->theatre != NULL) {
xf86_InitTheatre(pPriv->theatre);
@@ -1503,30 +1523,56 @@
return TRUE;
}
-void RADEONVIP_reset(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
+void RADEONVIP_reset(ScrnInfoPtr pScrn /* , RADEONPortPrivPtr pPriv (not really needed) */)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
RADEONWaitForIdleMMIO(pScrn);
- OUTREG(VIPH_CONTROL, 0x003F0004); /* slowest, timeout in 16 phases */
- OUTREG(VIPH_TIMEOUT_STAT, (INREG(VIPH_TIMEOUT_STAT) & 0xFFFFFF00) | VIPH_TIMEOUT_STAT__VIPH_REGR_DIS);
- OUTREG(VIPH_DV_LAT, 0x444400FF); /* set timeslice */
- OUTREG(VIPH_BM_CHUNK, 0x151);
- OUTREG(RADEON_TEST_DEBUG_CNTL, INREG(RADEON_TEST_DEBUG_CNTL) & (~TEST_DEBUG_CNTL__TEST_DEBUG_OUT_EN));
+ switch(info->ChipFamily){
+ case CHIP_FAMILY_RV250:
+ OUTREG(VIPH_CONTROL, 0x003F0009); /* slowest, timeout in 16 phases */
+ OUTREG(VIPH_TIMEOUT_STAT, (INREG(VIPH_TIMEOUT_STAT) & 0xFFFFFF00) | VIPH_TIMEOUT_STAT__VIPH_REGR_DIS);
+ OUTREG(VIPH_DV_LAT, 0x444400FF); /* set timeslice */
+ OUTREG(VIPH_BM_CHUNK, 0x0);
+ OUTREG(RADEON_TEST_DEBUG_CNTL, INREG(RADEON_TEST_DEBUG_CNTL) & (~TEST_DEBUG_CNTL__TEST_DEBUG_OUT_EN));
+ break;
+ default:
+ OUTREG(VIPH_CONTROL, 0x003F0004); /* slowest, timeout in 16 phases */
+ OUTREG(VIPH_TIMEOUT_STAT, (INREG(VIPH_TIMEOUT_STAT) & 0xFFFFFF00) | VIPH_TIMEOUT_STAT__VIPH_REGR_DIS);
+ OUTREG(VIPH_DV_LAT, 0x444400FF); /* set timeslice */
+ OUTREG(VIPH_BM_CHUNK, 0x151);
+ OUTREG(RADEON_TEST_DEBUG_CNTL, INREG(RADEON_TEST_DEBUG_CNTL) & (~TEST_DEBUG_CNTL__TEST_DEBUG_OUT_EN));
+ }
}
-static void RADEONVIP_init(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
+/*
+ * 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
+ )
{
- pPriv->VIP=xcalloc(1,sizeof(GENERIC_BUS_Rec));
- pPriv->VIP->scrnIndex=pScrn->scrnIndex;
- pPriv->VIP->DriverPrivate.ptr=pPriv;
- pPriv->VIP->ioctl=RADEONVIP_ioctl;
- pPriv->VIP->read=RADEONVIP_read;
- pPriv->VIP->write=RADEONVIP_write;
+ GENERIC_BUS_Ptr VIP;
+
+ 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;
- RADEONVIP_reset(pScrn, pPriv);
+ RADEONVIP_reset(pScrn);
+
+ return VIP;
+}
+
+static void RADEONVIP_init(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
+{
+ pPriv->VIP = RADEONAllocateVIP(pScrn);
}
static int RADEON_eeprom_addresses[] = { 0xA8, 0x70, 0x40, 0x78, 0x72, 0x42, 0};
@@ -1804,7 +1850,7 @@
}
static XF86VideoAdaptorPtr
-RADEONSetupImageVideo(ScreenPtr pScreen)
+RADEONSetupImageVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RADEONPortPrivPtr pPriv;
@@ -1826,35 +1872,40 @@
pPriv = (RADEONPortPrivPtr)(adapt->pPortPrivates[0].ptr);
RADEONReadMM_TABLE(pScrn,pPriv);
- RADEONVIP_init(pScrn,pPriv);
+ pPriv->VIP = VIP;
+/* RADEONVIP_init(pScrn,pPriv); */
- if(!xf86LoadSubModule(pScrn,"theatre"))
- {
- xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Unable to load Rage Theatre module\n");
- pPriv->i2c=NULL;
- return NULL;
- }
- xf86LoaderReqSymbols(TheatreSymbolsList, NULL);
- pPriv->i2c=NULL;
+ pPriv->i2c = NULL;
pPriv->theatre=NULL;
- /* do not try to access i2c bus or Rage Theatre on radeon mobility */
- switch(info->Chipset){
+ if (loadTheatre)
+ {
+ if(!xf86LoadSubModule(pScrn,"theatre"))
+ {
+ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Unable to load Rage Theatre module\n");
+ return NULL;
+ }
+ xf86LoaderReqSymbols(TheatreSymbolsList, NULL);
+
+ /* do not try to access i2c bus or Rage Theatre on radeon mobility */
+ switch(info->Chipset){
case PCI_CHIP_RADEON_LY:
case PCI_CHIP_RADEON_LZ:
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Detected Radeon Mobility M6, disabling i2c and Rage Theatre\n");
- break;
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Detected Radeon Mobility M6, disabling i2c and Rage Theatre\n");
+ break;
case PCI_CHIP_RADEON_LW:
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Detected Radeon Mobility M7, disabling i2c and Rage Theatre\n");
- break;
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Detected Radeon Mobility M7, disabling i2c and Rage Theatre\n");
+ break;
default:
- if(!pPriv->MM_TABLE_valid){
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Multimedia table is not valid and no forced settings have been specified\n");
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Skipping i2c and Rage Theatre initialization code.\n");
- } else {
- pPriv->theatre=xf86_DetectTheatre(pPriv->VIP);
- RADEONInitI2C(pScrn,pPriv);
- }
+ if(!pPriv->MM_TABLE_valid){
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Multimedia table is not valid and no forced settings have been specified\n");
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Skipping i2c and Rage Theatre initialization code.\n");
+ } else {
+ pPriv->theatre=xf86_DetectTheatre(pPriv->VIP);
+ RADEONInitI2C(pScrn,pPriv);
+ }
}
+ }
+
/* overlay scaler line length differs for different revisions
this needs to be maintained by hand */
switch(info->ChipFamily){
@@ -2277,8 +2328,19 @@
RADEON_TDA9885_SetEncoding(pPriv);
}
}
- else
- return BadMatch;
+ else if (attribute == xvTvoEnable)
+ {
+ value = ClipValue(value , 0 , 1);
+ RADEONTheaterOutSetOnOff(pScrn , (Bool)value);
+ }
+ else if (attribute == xvTvoStandard)
+ {
+ /*
+ * TEST TEST TEST TEST TEST TEST TEST TEST TEST
+ */
+ }
+ else
+ return BadMatch;
if (setTransform)
{
@@ -2377,8 +2439,23 @@
} else
if(attribute == xvAdjustment) {
*value = pPriv->adjustment;
- } else
- return BadMatch;
+ } else if (attribute == xvTvoEnable)
+ {
+ *value = (INT32)RADEONTheaterOutGetOnOff(pScrn);
+ }
+ else if (attribute == xvTvoStandard)
+ {
+ /*
+ * TEST TEST TEST TEST TEST TEST TEST TEST TEST
+ */
+ *value = 0;
+ }
+ else if (attribute == xvTvoModeCompat)
+ {
+ *value = (INT32)RADEONTheaterOutGetCompatMode(pScrn);
+ }
+ else
+ return BadMatch;
return Success;
}
@@ -3195,14 +3272,16 @@
}
}
- /* Disable VBI capture for anything but TV tuner */
- if(pPriv->encoding==5)pPriv->capture_vbi_data=1;
- else pPriv->capture_vbi_data=0;
}
void RADEON_RT_SetEncoding(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
{
+int width, height;
RADEONWaitForIdleMMIO(pScrn);
+/* Disable VBI capture for anything but TV tuner */
+if(pPriv->encoding==5)pPriv->capture_vbi_data=1;
+ else pPriv->capture_vbi_data=0;
+
switch(pPriv->encoding){
case 1:
xf86_RT_SetConnector(pPriv->theatre,DEC_COMPOSITE, 0);
@@ -3268,6 +3347,10 @@
pPriv->v=0;
return;
}
+xf86_RT_SetInterlace(pPriv->theatre, 1);
+width = InputVideoEncodings[pPriv->encoding].width;
+height = InputVideoEncodings[pPriv->encoding].height;
+xf86_RT_SetOutputVideoSize(pPriv->theatre, width, height*2, 0, pPriv->capture_vbi_data);
}
void RADEON_MSP_SetEncoding(RADEONPortPrivPtr pPriv)
@@ -3659,8 +3742,6 @@
if(pPriv->theatre != NULL)
{
RADEON_RT_SetEncoding(pScrn, pPriv);
- xf86_RT_SetInterlace(pPriv->theatre, 1);
- xf86_RT_SetOutputVideoSize(pPriv->theatre, width, height*2, 0, pPriv->capture_vbi_data);
}
if(pPriv->msp3430 != NULL) RADEON_MSP_SetEncoding(pPriv);
if(pPriv->tda9885 != NULL) RADEON_TDA9885_SetEncoding(pPriv);
@@ -3983,5 +4064,6 @@
xf86XVRegisterOffscreenImages(pScreen, offscreenImages, 1);
}
+
#endif /* !XvExtension */
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv7052
Modified Files:
Imakefile ati.h radeon.h radeon_driver.c radeon_video.c
Added Files:
README.tvout theater_out.c theater_out.h theater_out_module.c
Log Message:
Theater_out module added
--- NEW FILE: README.tvout ---
*******************************************************
** XFree86 driver for TV output on ATI Radeon cards **
*******************************************************
Copyright (c) 2003, by Federico Ulivi <fu...@ly...>
Released under the GNU General Public License, version 2.
1. About this driver
--------------------
This driver was developped as a part of ati.2 project. Its purpose
is to enable the TV output of ATI Radeon cards when running the
XFree86 graphical environment.
2. Status of the driver
-----------------------
The driver is in early development stage. It currently works only with
those cards having a Rage Theater chip for TV output. There are not
many models having this arrangement, to my knowledge just a few models
of the 7000 series have it. It certainly works on my 7200 card with PAL
standard.
I'm working on extending the driver so that it works on those cards
that have a scaled-down version of Rage Theater embedded into the Radeon chip.
As far as I know, all 9000 series cards has this configuration. So, stay
tuned.. ;)
3. Making it work
-----------------
The driver is normally disabled, so that you can use the usual video
grabbing functions of AIW cards (the main reason for developping ati.2
drivers, I guess). Video grabbing functions and TV output are mutually
exclusive because they both access the RT chip and, for the moment, I
don't want to think about integrating these functions. In principle
integration should be possible but I've no AIW card for testing (does
anyone have a spare card? :) ).
Principle of operation of the driver is very simple. Driver enables
tv output whenever the current screen resolution and tv standard match
one of a set of pre-computed combinations. In all other cases tv output
is simply kept disabled.
The driver currently works in the so-called "clone" mode only. This means
that the image on the TV screen is exactly the same as the one on the
monitor.
The driver is enabled by adding a "TVOutput" line in the "device"
section of XF86Config-4 file (this file is usually located in /etc/X11
directory). Syntax of this option is very simple:
Section "Device"
..
..
Option "TVOuput" "<name of tv standard>"
EndSection
Names of recognized TV standards are:
"NTSC"
"NTSC-J"
"PAL"
"PAL-CN"
"PAL-M"
"PAL-N"
"PAL-60"
In the current version of the driver these are the recognized TV standard &
resolution combinations:
PAL 800x600
More combinations will be added in future releases.
4. XV Interface
---------------
The driver has an external interface through some new Xv attributes. You
can read the value of these attributes by using the standard "xvinfo"
utility. I'm planning to write a small CLI utility to manipulate these
values.
XV_TVO_ENABLE Settable/Gettable
Driver is disabled or enabled when this attribute has, respectively,
a 0 or 1 value.
XV_TVO_STANDARD Settable/Gettable
This is the tv standard in use by the driver. Its value is encoded
according to this table:
0 NTSC
1 PAL
2 PAL-M
3 PAL-60
4 NTSC-J
5 PAL-CN
6 PAL-N
XV_TVO_MODE_COMPAT Gettable
This attribute is set to 1 whenever the current resolution & tv
standard combination is recognized by the driver. Tv output is
enabled when both this attribute and XV_TVO_ENABLE are set to 1.
5. WARNING
----------
It's important that you are aware of the fact that, when TV output is active,
the monitor is driven at the same vertical refresh frequency as that of the
TV output. This means 50 or 60 Hz according to the standard you're using.
NO CHECK IS DONE IN THE DRIVER ABOUT THE CAPABILITY OF THE MONITOR TO
SUSTAIN THESE FREQUENCIES. You should look up in the monitor manual
and check that 50/60 Hz is within the limits. IT IS POTENTIALLY HARMFUL
TO THE MONITOR TO BE DRIVEN AT A FREQUENCY OUTSIDE ITS OPERATING RANGE.
Note, however, that most monitors should accept a 60 Hz vertical frequency,
since this is used in standard VGA modes. You should really check for 50 Hz
compatibility if you are going to use any related standard (PAL mostly).
ATI manuals recommend checking for 50 Hz compatibility (they take
60 Hz for granted).
One last thing: keep in mind that my testing was done on a radeon 7200.
This card has no provision for a second head (this is the reason why the
driver only works in clone mode). Neither it has a DVI or LCD display
output, so I'm not sure about the driver behaviour with this kind of
displays. Be warned.
6. Credits
----------
Vladimir Dergachev For leading the GATOS project, for all the good
advices he gave me about dealing with ATI and for
all his precious technical hints.
ATI external developer office
For providing me the Rage Theater documentation.
7. Revision history
--------------------
2003-09-23
==========
Initial release
--- NEW FILE: theater_out.c ---
/*********************************************************************
*
* $Id: theater_out.c,v 1.1 2003/09/28 21:42:37 fulivi Exp $
*
* Main file for tv output handling of ATI Rage Theater chip
*
* Copyright (C) 2003 Federico Ulivi
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
[...1700 lines suppressed...]
)
{
return t->enabled;
}
/**********************************************************************
*
* theaterOutGetCompatMode
*
* Return whether the current mode is compatible with tv output or not
*
**********************************************************************/
Bool
theaterOutGetCompatMode(
TheaterOutPtr t
)
{
return t->compatibleMode;
}
--- NEW FILE: theater_out.h ---
/*********************************************************************
*
* $Id: theater_out.h,v 1.1 2003/09/28 21:42:37 fulivi Exp $
*
* Interface file for theater_out module
*
* Copyright (C) 2003 Federico Ulivi
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* AUTHORS: F.Ulivi
* NOTES:
* $Log: theater_out.h,v $
* Revision 1.1 2003/09/28 21:42:37 fulivi
* Theater_out module added
*
* Revision 1.1.2.3 2003/09/28 15:26:09 fede
* Minor aesthetic changes
*
* Revision 1.1.2.1 2003/08/31 13:36:35 fede
* *** empty log message ***
*
*
*********************************************************************/
#ifndef _THEATER_OUT_H
#define _THEATER_OUT_H
#include "radeon.h"
/**********************************************************************
*
* TheaterOutPtr
*
* Pointer to TheaterOut struct. Actual definition is in theater_out.c
*
**********************************************************************/
typedef struct TheaterOut *TheaterOutPtr;
/**********************************************************************
*
* TVStd
*
* Tv standard
*
**********************************************************************/
typedef enum
{
TV_STD_NTSC,
TV_STD_PAL,
TV_STD_PAL_M,
TV_STD_PAL_60,
TV_STD_NTSC_J,
TV_STD_PAL_CN,
TV_STD_PAL_N,
} TVStd;
/**********************************************************************
*
* detectTheaterOut
*
* Detect presence of a RT chip
*
**********************************************************************/
extern
TheaterOutPtr
detectTheaterOut(
GENERIC_BUS_Ptr b
);
/**********************************************************************
*
* initTheaterOut
*
* Initialization of module
*
* 's' should be the value of TV_Output option (i.e. the initial TV
* standard)
*
**********************************************************************/
extern
void
initTheaterOut(
TheaterOutPtr t,
const char *s
);
/**********************************************************************
*
* theaterOutSave
*
* Save current state of RT as initial state (the one that is restored
* when switching back to text mode)
*
**********************************************************************/
extern
void
theaterOutSave(
TheaterOutPtr t
);
/**********************************************************************
*
* theaterOutRestore
*
* Restore state of RT from initial state (the one saved through
* theaterOutSave)
*
**********************************************************************/
extern
void
theaterOutRestore(
TheaterOutPtr t,
ScrnInfoPtr pScrn
);
/**********************************************************************
*
* theaterOutInit
*
* Define state for cloning current CRTC mode on TV output
* It works in this way:
* 1. It checks if resolution in "mode" parameter is one of those
* allowing tv output
* 2. If resolution is OK, define RT state according to resolution and
* and current settings (tv standard etc.)
* If resolution is not ok, define RT state to turn tv output off
* 3. If resolution is OK, modify Radeon state to make it correct for
* tv output (this is needed,e.g., to set vertical frequency to 50/60 Hz)
*
* Return value is TRUE when mode is OK for cloning on tv and tv output
* is enabled, FALSE otherwise
*
**********************************************************************/
extern
Bool
theaterOutInit(
TheaterOutPtr t,
DisplayModePtr mode,
RADEONSavePtr save
);
/**********************************************************************
*
* theaterOutRestoreMode
*
* Set state of RT to the one defined by last call to theaterOutInit
*
**********************************************************************/
extern
void
theaterOutRestoreMode(
TheaterOutPtr t,
ScrnInfoPtr pScrn
);
/**********************************************************************
*
* theaterOutSetStandard
*
* Set TV output standard
*
* Return value is TRUE when video mode should be set again
*
**********************************************************************/
extern
Bool
theaterOutSetStandard(
TheaterOutPtr t,
TVStd std
);
/**********************************************************************
*
* theaterOutSetOnOff
*
* Set module on/off
*
* Return value is TRUE when video mode should be set again
*
**********************************************************************/
extern
Bool
theaterOutSetOnOff(
TheaterOutPtr t,
Bool on
);
/**********************************************************************
*
* theaterOutGetStandard
*
* Get current TV output standard
*
**********************************************************************/
extern
TVStd
theaterOutGetStandard(
TheaterOutPtr t
);
/**********************************************************************
*
* theaterOutGetOnOff
*
* Return whether module is enabled or not
* WARNING: TRUE does not necessarily mean that tv output is enabled.
* That information comes from logical AND between theaterOutGetOnOff and
* theaterOutGetCompatMode.
*
**********************************************************************/
extern
Bool
theaterOutGetOnOff(
TheaterOutPtr t
);
/**********************************************************************
*
* theaterOutGetCompatMode
*
* Return whether the current mode is compatible with tv output or not
*
**********************************************************************/
extern
Bool
theaterOutGetCompatMode(
TheaterOutPtr t
);
/**********************************************************************
*
* THEATER_OUT_SYMBOLS
*
* Symbol list for module loading
*
**********************************************************************/
#define THEATER_OUT_SYMBOLS "detectTheaterOut", \
"initTheaterOut", \
"theaterOutSave", \
"theaterOutRestore", \
"theaterOutInit", \
"theaterOutRestoreMode", \
"theaterOutSetStandard", \
"theaterOutSetOnOff", \
"theaterOutGetStandard", \
"theaterOutGetOnOff" , \
"theaterOutGetCompatMode"
/**********************************************************************
*
* External access to module functions
*
**********************************************************************/
#ifdef XFree86LOADER
#define xf86_detectTheaterOut ((TheaterOutPtr (*)(GENERIC_BUS_Ptr))LoaderSymbol("detectTheaterOut"))
#define xf86_initTheaterOut ((void (*)(TheaterOutPtr , const char*))LoaderSymbol("initTheaterOut"))
#define xf86_theaterOutSave ((void (*)(TheaterOutPtr))LoaderSymbol("theaterOutSave"))
#define xf86_theaterOutRestore ((void (*)(TheaterOutPtr , ScrnInfoPtr))LoaderSymbol("theaterOutRestore"))
#define xf86_theaterOutInit ((Bool (*)(TheaterOutPtr , DisplayModePtr , RADEONSavePtr))LoaderSymbol("theaterOutInit"))
#define xf86_theaterOutRestoreMode ((void (*)(TheaterOutPtr , ScrnInfoPtr))LoaderSymbol("theaterOutRestoreMode"))
#define xf86_theaterOutSetStandard ((Bool (*)(TheaterOutPtr , TVStd))LoaderSymbol("theaterOutSetStandard"))
#define xf86_theaterOutSetOnOff ((Bool (*)(TheaterOutPtr , Bool))LoaderSymbol("theaterOutSetOnOff"))
#define xf86_theaterOutGetStandard ((TVStd (*)(TheaterOutPtr))LoaderSymbol("theaterOutGetStandard"))
#define xf86_theaterOutGetOnOff ((Bool (*)(TheaterOutPtr))LoaderSymbol("theaterOutGetOnOff"))
#define xf86_theaterOutGetCompatMode ((Bool (*)(TheaterOutPtr))LoaderSymbol("theaterOutGetCompatMode"))
#else
#define xf86_detectTheaterOut detectTheaterOut
#define xf86_initTheaterOut initTheaterOut
#define xf86_theaterOutSave theaterOutSave
#define xf86_theaterOutRestore theaterOutRestore
#define xf86_theaterOutInit theaterOutInit
#define xf86_theaterOutRestoreMode theaterOutRestoreMode
#define xf86_theaterOutSetStandard theaterOutSetStandard
#define xf86_theaterOutSetOnOff theaterOutSetOnOff
#define xf86_theaterOutGetStandard theaterOutGetStandard
#define xf86_theaterOutGetOnOff theaterOutGetOnOff
#define xf86_theaterOutGetCompatMode theaterOutGetCompatMode
#endif /* XFree86LOADER */
#endif /* _THEATER_OUT_H */
--- NEW FILE: theater_out_module.c ---
#include "xf86Module.h"
static MODULESETUPPROTO(theaterOutSetup);
static
XF86ModuleVersionInfo
theaterVersRec =
{
"theater_out", /* modname */
MODULEVENDORSTRING, /* vendor */
MODINFOSTRING1, /* _modinfo1_ */
MODINFOSTRING2, /* _modinfo2_ */
XF86_VERSION_CURRENT, /* xf86version */
1, /* majorversion */
0, /* minorversion */
0, /* patchlevel */
ABI_CLASS_VIDEODRV, /* abiclass */
ABI_VIDEODRV_VERSION, /* abiversion */
MOD_CLASS_NONE, /* moduleclass */
{ 0 , 0 , 0 , 0 } /* checksum */
};
XF86ModuleData
theater_outModuleData =
{
&theaterVersRec,
theaterOutSetup,
NULL
};
static
pointer
theaterOutSetup(
pointer module,
pointer opts,
int *errmaj,
int *errmin
)
{
return (pointer)1;
}
Index: Imakefile
===================================================================
RCS file: /cvsroot/gatos/ati.2/Imakefile,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- Imakefile 1 Mar 2003 08:02:11 -0000 1.8
+++ Imakefile 28 Sep 2003 21:42:36 -0000 1.9
@@ -42,6 +42,7 @@
MODSRC_TDA9850 = tda9850_module.c
MODSRC_TDA8425 = tda8425_module.c
MODSRC_TDA9885 = tda9885_module.c
+MODSRC_THEATER_OUT = theater_out_module.c
MODOBJS1 = atimodule.o
MODOBJS2 = atiload.o atimisc.o
@@ -55,6 +56,7 @@
MODOBJ_TDA9850 = tda9850_module.o
MODOBJ_TDA8425 = tda8425_module.o
MODOBJ_TDA9885 = tda9885_module.o
+MODOBJ_THEATER_OUT = theater_out_module.o
#endif
@@ -183,6 +185,7 @@
SRCS_TDA9850 = tda9850.c $(MODSRC_TDA9850)
SRCS_TDA8425 = tda8425.c $(MODSRC_TDA8425)
SRCS_TDA9885 = tda9885.c $(MODSRC_TDA9885)
+SRCS_THEATER_OUT = theater_out.c $(MODSRC_THEATER_OUT)
OBJS1 = ati.o atiadapter.o atibus.o atichip.o atiident.o atioption.o \
atiprobe.o atividmem.o $(CPIOOBJS1) $(MODOBJS1) \
@@ -205,13 +208,14 @@
OBJS_TDA9850 = tda9850.o $(MODOBJ_TDA9850)
OBJS_TDA8425 = tda8425.o $(MODOBJ_TDA8425)
OBJS_TDA9885 = tda9885.o $(MODOBJ_TDA9885)
+OBJS_THEATER_OUT = theater_out.o $(MODOBJ_THEATER_OUT)
SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) $(SRCS_FI1236) \
$(SRCS_MSP3430) $(SRCS_THEATRE) $(SRCS_BT829) $(SRCS_TDA9850) \
- $(SRCS_TDA8425) $(SRCS_TDA9885) $(SRCS_SAA7114)
+ $(SRCS_TDA8425) $(SRCS_TDA9885) $(SRCS_SAA7114) $(SRCS_THEATER_OUT)
OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS_FI1236) \
$(OBJS_MSP3430) $(OBJS_THEATRE) $(OBJS_BT829) $(OBJS_TDA9850) \
- $(OBJS_TDA8425) $(OBJS_TDA9885) $(OBJS_SAA7114)
+ $(OBJS_TDA8425) $(OBJS_TDA9885) $(OBJS_SAA7114) $(OBJS_THEATER_OUT)
#if defined(XF86DriverSDK)
INCLUDES = -I. -I../../include
@@ -248,7 +252,7 @@
ObjectModuleTarget(tda9850, $(OBJS_TDA9850))
ObjectModuleTarget(tda8425, $(OBJS_TDA8425))
ObjectModuleTarget(tda9885, $(OBJS_TDA9885))
-
+ObjectModuleTarget(theater_out, $(OBJS_THEATER_OUT))
InstallObjectModule(ati,$(MODULEDIR),drivers)
InstallObjectModule(atimisc,$(MODULEDIR),drivers)
@@ -262,6 +266,7 @@
InstallObjectModule(tda9850,$(MODULEDIR),multimedia)
InstallObjectModule(tda8425,$(MODULEDIR),multimedia)
InstallObjectModule(tda9885,$(MODULEDIR),multimedia)
+InstallObjectModule(theater_out,$(MODULEDIR),multimedia)
#if 0
InstallModuleManPage(ati)
@@ -404,6 +409,10 @@
InstallDriverSDKNonExecFile(tda9885_module.c,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(tda9885.h,$(DRIVERSDKDIR)/drivers/ati)
+InstallDriverSDKNonExecFile(theater_out.c,$(DRIVERSDKDIR)/drivers/ati)
+InstallDriverSDKNonExecFile(theater_out_module.c,$(DRIVERSDKDIR)/drivers/ati)
+InstallDriverSDKNonExecFile(theater_out.h,$(DRIVERSDKDIR)/drivers/ati)
+
InstallDriverSDKNonExecFile(radeon.h,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(radeon_accel.c,$(DRIVERSDKDIR)/drivers/ati)
InstallDriverSDKNonExecFile(radeon_cursor.c,$(DRIVERSDKDIR)/drivers/ati)
@@ -426,6 +435,7 @@
InstallDriverSDKObjectModule(atimisc,$(DRIVERSDKMODULEDIR),drivers)
InstallDriverSDKObjectModule(r128,$(DRIVERSDKMODULEDIR),drivers)
InstallDriverSDKObjectModule(theatre,$(DRIVERSDKMODULEDIR),drivers)
+InstallDriverSDKObjectModule(theater_out,$(DRIVERSDKMODULEDIR),drivers)
InstallDriverSDKObjectModule(radeon,$(DRIVERSDKMODULEDIR),drivers)
InstallDriverSDKObjectModule(fi1236,$(MODULEDIR),multimedia)
InstallDriverSDKObjectModule(msp3430,$(MODULEDIR),multimedia)
Index: ati.h
===================================================================
RCS file: /cvsroot/gatos/ati.2/ati.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- ati.h 16 Jul 2001 04:09:58 -0000 1.1.1.1
+++ ati.h 28 Sep 2003 21:42:36 -0000 1.2
@@ -24,7 +24,7 @@
#ifndef ___ATI_H___
#define ___ATI_H___ 1
-#include "xf86Pci.h"
+#include "bus/xf86Pci.h"
#include "xf86PciInfo.h"
#include "xf86.h"
Index: radeon.h
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- radeon.h 1 Mar 2003 08:02:14 -0000 1.8
+++ radeon.h 28 Sep 2003 21:42:36 -0000 1.9
@@ -38,7 +38,9 @@
#ifndef _RADEON_H_
#define _RADEON_H_
+#include "radeon_version.h"
#include "xf86str.h"
+#include "generic_bus.h"
/* PCI support */
#include "xf86Pci.h"
@@ -66,7 +68,8 @@
#include "picturestr.h"
#endif
-#define RADEON_DEBUG 0 /* Turn off debugging output */
+#define RADEON_DEBUG 0 /* Turn off debugging output */
+/* #define RADEON_DEBUG 1 /\* Turn on debugging output *\/ */
#define RADEON_IDLE_RETRY 16 /* Fall out of idle loops after this count */
#define RADEON_TIMEOUT 2000000 /* Fall out of wait loops after this count */
#define RADEON_MMIOSIZE 0x80000
@@ -186,6 +189,7 @@
CARD32 ppll_ref_div;
CARD32 ppll_div_3;
CARD32 htotal_cntl;
+ CARD32 vclk_ecp_cntl;
/* Computed values for PLL2 */
CARD32 dot_clock_freq_2;
@@ -536,6 +540,8 @@
int RageTheatreCompositePort;
int RageTheatreSVideoPort;
int tunerType;
+ GENERIC_BUS_Ptr VIP;
+ struct TheaterOut *theaterOut;
/* general */
Bool showCache;
@@ -560,6 +566,9 @@
extern void RADEONDoAdjustFrame(ScrnInfoPtr pScrn, int x, int y,
int clone);
+extern void RADEONTheaterOutSetOnOff(ScrnInfoPtr, Bool);
+extern Bool RADEONTheaterOutGetOnOff(ScrnInfoPtr);
+extern Bool RADEONTheaterOutGetCompatMode(ScrnInfoPtr);
extern void RADEONEngineReset(ScrnInfoPtr pScrn);
extern void RADEONEngineFlush(ScrnInfoPtr pScrn);
@@ -578,7 +587,8 @@
extern int RADEONMinBits(int val);
-extern void RADEONInitVideo(ScreenPtr pScreen);
+extern void RADEONInitVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre);
+extern GENERIC_BUS_Ptr RADEONAllocateVIP(ScrnInfoPtr pScrn);
#ifdef XvExtension
extern void RADEONResetVideo(ScrnInfoPtr pScrn);
extern void RADEONLeaveVT_Video(ScrnInfoPtr pScrn);
Index: radeon_driver.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_driver.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- radeon_driver.c 1 Mar 2003 08:02:15 -0000 1.16
+++ radeon_driver.c 28 Sep 2003 21:42:36 -0000 1.17
@@ -64,6 +64,7 @@
#include "radeon_probe.h"
#include "radeon_reg.h"
#include "radeon_version.h"
+#include "theater_out.h"
#ifdef XF86DRI
#define _XF86DRI_SERVER_
@@ -147,7 +148,8 @@
OPTION_RAGE_THEATRE_TUNER_PORT,
OPTION_RAGE_THEATRE_COMPOSITE_PORT,
OPTION_RAGE_THEATRE_SVIDEO_PORT,
- OPTION_TUNER_TYPE
+ OPTION_TUNER_TYPE,
+ OPTION_TV_OUTPUT
#endif
} RADEONOpts;
@@ -183,6 +185,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 },
#endif
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@@ -3617,6 +3620,8 @@
RADEONInfoPtr info = RADEONPTR(pScrn);
BoxRec MemBox;
int y2;
+ Bool loadTheatre;
+ const char *s;
RADEONTRACE(("RADEONScreenInit %x %d\n",
pScrn->memPhysBase, pScrn->fbOffset));
@@ -3639,6 +3644,36 @@
info->PaletteSavedOnVT = FALSE;
+ /*
+ * Load RT tv output module when TV_Output option is set
+ * CHECK: is this the correct place? Should it be moved to preinit?
+ */
+ RADEONTRACE(("Allocating VIP interface"));
+ info->VIP = RADEONAllocateVIP(pScrn);
+
+ loadTheatre = TRUE;
+ if ((s = xf86GetOptValString(info->Options , OPTION_TV_OUTPUT)) != NULL)
+ {
+ RADEONTRACE(("TVOutput opt = %s\n" , s));
+ if(!xf86LoadSubModule(pScrn , "theater_out"))
+ {
+ xf86DrvMsg(pScrn->scrnIndex , X_ERROR , "Unable to load Rage Theatre TV output module\n");
+ info->theaterOut = NULL;
+ }
+ else
+ {
+ loadTheatre = FALSE;
+ xf86LoaderReqSymbols(THEATER_OUT_SYMBOLS , NULL);
+ info->theaterOut = xf86_detectTheaterOut(info->VIP);
+ if (info->theaterOut != NULL)
+ xf86_initTheaterOut(info->theaterOut , s);
+ }
+ }
+ else
+ {
+ RADEONTRACE(("TVOutput opt = NULL\n"));
+ }
+
RADEONSave(pScrn);
if (info->FBDev) {
unsigned char *RADEONMMIO = info->MMIO;
@@ -4126,7 +4161,10 @@
xf86DPMSInit(pScreen, RADEONDisplayPowerManagementSet, 0);
#endif
- RADEONInitVideo(pScreen);
+ /*
+ * TEST TEST TEST TEST TEST TEST TEST TEST TEST
+ */
+ RADEONInitVideo(pScreen , info->VIP , loadTheatre);
/* Provide SaveScreen */
pScreen->SaveScreen = RADEONSaveScreen;
@@ -4206,7 +4244,10 @@
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);
+ /*
+ * fulivi: removed. It messes the VIP access up
+ */
+/* OUTREG(RADEON_VIPH_CONTROL, restore->viph_control); */
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);
@@ -4289,6 +4330,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);
}
/* Write CRTC2 registers */
@@ -4503,9 +4545,9 @@
usleep(5000); /* Let the clock to lock */
- OUTPLLP(pScrn, RADEON_VCLK_ECP_CNTL,
- RADEON_VCLK_SRC_SEL_PPLLCLK,
- ~(RADEON_VCLK_SRC_SEL_MASK));
+ OUTPLL(RADEON_VCLK_ECP_CNTL , restore->vclk_ecp_cntl);
+
+ RADEONTRACE(("VCLK_ECP_CNTL = %08x\n" , restore->vclk_ecp_cntl));
}
@@ -4745,6 +4787,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);
}
/* Read flat panel registers */
@@ -4772,7 +4815,6 @@
unsigned char *RADEONMMIO = info->MMIO;
save->dac2_cntl = INREG(RADEON_DAC_CNTL2);
- save->disp_output_cntl = INREG(RADEON_DISP_OUTPUT_CNTL);
save->disp_hw_debug = INREG (RADEON_DISP_HW_DEBUG);
save->crtc2_gen_cntl = INREG(RADEON_CRTC2_GEN_CNTL);
@@ -4796,6 +4838,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%08x\n",
save->ppll_ref_div,
@@ -4805,6 +4848,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 */
@@ -4908,6 +4952,12 @@
}
RADEONSaveMode(pScrn, save);
+
+ /*
+ * Save initial RT state
+ */
+ if (info->theaterOut != NULL)
+ xf86_theaterOutSave(info->theaterOut);
}
/* Restore the original (text) mode */
@@ -4947,6 +4997,12 @@
RADEONRestoreMode(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
@@ -5489,15 +5545,16 @@
pll->reference_freq);
save->post_div = post_div->divider;
- RADEONTRACE(("dc=%d, of=%d, fd=%d, pd=%d\n",
- save->dot_clock_freq,
- save->pll_output_freq,
- save->feedback_div,
- save->post_div));
+/* RADEONTRACE(("dc=%d, of=%d, fd=%d, pd=%d\n", */
+/* save->dot_clock_freq, */
+/* save->pll_output_freq, */
+/* save->feedback_div, */
+/* save->post_div)); */
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 */
@@ -5540,11 +5597,11 @@
pll->reference_freq);
save->post_div_2 = post_div->divider;
- RADEONTRACE(("dc=%d, of=%d, fd=%d, pd=%d\n",
- save->dot_clock_freq_2,
- save->pll_output_freq_2,
- save->feedback_div_2,
- save->post_div_2));
+/* RADEONTRACE(("dc=%d, of=%d, fd=%d, pd=%d\n", */
+/* save->dot_clock_freq_2, */
+/* save->pll_output_freq_2, */
+/* save->feedback_div_2, */
+/* save->post_div_2)); */
save->p2pll_ref_div = pll->reference_div;
save->p2pll_div_0 = (save->feedback_div_2 |
@@ -5620,6 +5677,12 @@
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;
+
if (info->IsSecondary) {
if (!RADEONInitCrtc2Registers(pScrn, save, mode, info))
return FALSE;
@@ -5662,9 +5725,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;
@@ -6107,4 +6186,63 @@
#endif
}
+/*
+ * 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
+RADEONTheaterOutSetOnOff(
+ ScrnInfoPtr pScrn,
+ Bool on
+ )
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+
+ RADEONTRACE(("RADEONTheaterOutSetOnOff on = %d" , on));
+ if (info->theaterOut != NULL && xf86_theaterOutSetOnOff(info->theaterOut , on))
+ RADEONRedoSwitchMode(pScrn);
+}
+
+Bool
+RADEONTheaterOutGetOnOff(
+ ScrnInfoPtr pScrn
+ )
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+
+ if (info->theaterOut != NULL)
+ return xf86_theaterOutGetOnOff(info->theaterOut);
+ else
+ return FALSE;
+}
+
+Bool
+RADEONTheaterOutGetCompatMode(
+ ScrnInfoPtr pScrn
+ )
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+
+ if (info->theaterOut != NULL)
+ return xf86_theaterOutGetCompatMode(info->theaterOut);
+ else
+ return FALSE;
+}
+
+
+
Index: radeon_video.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_video.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- radeon_video.c 16 Sep 2003 13:45:03 -0000 1.96
+++ radeon_video.c 28 Sep 2003 21:42:37 -0000 1.97
@@ -35,12 +35,21 @@
extern int gRADEONEntityIndex;
#ifndef XvExtension
-void RADEONInitVideo(ScreenPtr pScreen) {}
+void RADEONInitVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre) { }
+
+GENERIC_BUS_Ptr
+RADEONAllocateVIP(
+ ScrnInfoPtr pScrn
+ )
+{
+ return NULL;
+}
+
#else
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);
@@ -71,6 +80,8 @@
xvLocationID, xvDeviceID, xvInstanceID, xvDumpStatus,
xvAdjustment;
+static Atom xvTvoEnable , xvTvoStandard , xvTvoModeCompat;
+
typedef struct
{
BYTE table_revision;
@@ -124,7 +135,9 @@
GENERIC_BUS_Ptr VIP;
TheatrePtr theatre;
-
+
+/* TheaterOutPtr theaterOut; */
+
Bool video_stream_active;
int encoding;
CARD32 frequency;
@@ -163,14 +176,14 @@
void RADEONSetColorKey(ScrnInfoPtr pScrn, CARD32 pixel);
static void RADEONResetI2C(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv);
void RADEONShutdownVideo(ScrnInfoPtr pScrn);
-void RADEONVIP_reset(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv);
+void RADEONVIP_reset(ScrnInfoPtr pScrn /* , RADEONPortPrivPtr pPriv */);
#define GET_PORT_PRIVATE(pScrn) \
(RADEONPortPrivPtr)((RADEONPTR(pScrn))->adaptor->pPortPrivates[0].ptr)
-void RADEONInitVideo(ScreenPtr pScreen)
+void RADEONInitVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RADEONInfoPtr info = RADEONPTR(pScrn);
@@ -181,7 +194,7 @@
if(info->accel && info->accel->FillSolidRects)
{
- newAdaptor = RADEONSetupImageVideo(pScreen);
+ newAdaptor = RADEONSetupImageVideo(pScreen , VIP , loadTheatre);
RADEONInitOffscreenImages(pScreen);
}
num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors);
@@ -257,8 +270,8 @@
{15, DirectColor}, {16, DirectColor}, {24, DirectColor}
};
-#define NUM_DEC_ATTRIBUTES 20+4+4
-#define NUM_ATTRIBUTES 9+4+4
+#define NUM_DEC_ATTRIBUTES 20+4+4+3
+#define NUM_ATTRIBUTES 9+4+4+3
static XF86AttributeRec Attributes[NUM_DEC_ATTRIBUTES+1] =
{
@@ -270,6 +283,9 @@
{XvSettable | XvGettable, 0, 1, "XV_AUTOPAINT_COLORKEY"},
{XvSettable | XvGettable, 0, ~0, "XV_COLORKEY"},
{XvSettable | XvGettable, 0, 1, "XV_DOUBLE_BUFFER"},
+ {XvSettable | XvGettable, 0, 1, "XV_TVO_ENABLE"},
+ {XvSettable | XvGettable, 0, 1, "XV_TVO_STANDARD"},
+ { XvGettable, 0, ~0, "XV_TVO_MODE_COMPAT"},
{XvSettable | XvGettable, -1000, 1000, "XV_BRIGHTNESS"},
{XvSettable | XvGettable, -1000, 1000, "XV_CONTRAST"},
{XvSettable | XvGettable, -1000, 1000, "XV_SATURATION"},
@@ -736,7 +752,11 @@
xvDeviceID = MAKE_ATOM("XV_DEVICE_ID");
xvLocationID = MAKE_ATOM("XV_LOCATION_ID");
xvDumpStatus = MAKE_ATOM("XV_DUMP_STATUS");
-
+
+ xvTvoEnable = MAKE_ATOM("XV_TVO_ENABLE");
+ xvTvoStandard = MAKE_ATOM("XV_TVO_STANDARD");
+ xvTvoModeCompat = MAKE_ATOM("XV_TVO_MODE_COMPAT");
+
sprintf(tmp, "RXXX:%d.%d.%d", info->PciInfo->vendor, info->PciInfo->chipType, info->PciInfo->chipRev);
pPriv->device_id = MAKE_ATOM(tmp);
sprintf(tmp, "PCI:%02d:%02d.%d", info->PciInfo->bus, info->PciInfo->device, info->PciInfo->func);
@@ -799,8 +819,8 @@
}
}
if(pPriv->VIP!=NULL){
- RADEONVIP_reset(pScrn,pPriv);
- }
+ RADEONVIP_reset(pScrn /* ,pPriv*/ );
+ }
if(pPriv->theatre != NULL) {
xf86_InitTheatre(pPriv->theatre);
@@ -1503,7 +1523,7 @@
return TRUE;
}
-void RADEONVIP_reset(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
+void RADEONVIP_reset(ScrnInfoPtr pScrn /* , RADEONPortPrivPtr pPriv (not really needed) */)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
unsigned char *RADEONMMIO = info->MMIO;
@@ -1527,16 +1547,32 @@
}
}
-static void RADEONVIP_init(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
+/*
+ * 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
+ )
{
- pPriv->VIP=xcalloc(1,sizeof(GENERIC_BUS_Rec));
- pPriv->VIP->scrnIndex=pScrn->scrnIndex;
- pPriv->VIP->DriverPrivate.ptr=pPriv;
- pPriv->VIP->ioctl=RADEONVIP_ioctl;
- pPriv->VIP->read=RADEONVIP_read;
- pPriv->VIP->write=RADEONVIP_write;
+ GENERIC_BUS_Ptr VIP;
+
+ 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;
- RADEONVIP_reset(pScrn, pPriv);
+ RADEONVIP_reset(pScrn);
+
+ return VIP;
+}
+
+static void RADEONVIP_init(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
+{
+ pPriv->VIP = RADEONAllocateVIP(pScrn);
}
static int RADEON_eeprom_addresses[] = { 0xA8, 0x70, 0x40, 0x78, 0x72, 0x42, 0};
@@ -1814,7 +1850,7 @@
}
static XF86VideoAdaptorPtr
-RADEONSetupImageVideo(ScreenPtr pScreen)
+RADEONSetupImageVideo(ScreenPtr pScreen , GENERIC_BUS_Ptr VIP , Bool loadTheatre)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RADEONPortPrivPtr pPriv;
@@ -1836,35 +1872,40 @@
pPriv = (RADEONPortPrivPtr)(adapt->pPortPrivates[0].ptr);
RADEONReadMM_TABLE(pScrn,pPriv);
- RADEONVIP_init(pScrn,pPriv);
+ pPriv->VIP = VIP;
+/* RADEONVIP_init(pScrn,pPriv); */
- if(!xf86LoadSubModule(pScrn,"theatre"))
- {
- xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Unable to load Rage Theatre module\n");
- pPriv->i2c=NULL;
- return NULL;
- }
- xf86LoaderReqSymbols(TheatreSymbolsList, NULL);
- pPriv->i2c=NULL;
+ pPriv->i2c = NULL;
pPriv->theatre=NULL;
- /* do not try to access i2c bus or Rage Theatre on radeon mobility */
- switch(info->Chipset){
+ if (loadTheatre)
+ {
+ if(!xf86LoadSubModule(pScrn,"theatre"))
+ {
+ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"Unable to load Rage Theatre module\n");
+ return NULL;
+ }
+ xf86LoaderReqSymbols(TheatreSymbolsList, NULL);
+
+ /* do not try to access i2c bus or Rage Theatre on radeon mobility */
+ switch(info->Chipset){
case PCI_CHIP_RADEON_LY:
case PCI_CHIP_RADEON_LZ:
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Detected Radeon Mobility M6, disabling i2c and Rage Theatre\n");
- break;
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Detected Radeon Mobility M6, disabling i2c and Rage Theatre\n");
+ break;
case PCI_CHIP_RADEON_LW:
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Detected Radeon Mobility M7, disabling i2c and Rage Theatre\n");
- break;
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Detected Radeon Mobility M7, disabling i2c and Rage Theatre\n");
+ break;
default:
- if(!pPriv->MM_TABLE_valid){
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Multimedia table is not valid and no forced settings have been specified\n");
- xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Skipping i2c and Rage Theatre initialization code.\n");
- } else {
- pPriv->theatre=xf86_DetectTheatre(pPriv->VIP);
- RADEONInitI2C(pScrn,pPriv);
- }
+ if(!pPriv->MM_TABLE_valid){
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Multimedia table is not valid and no forced settings have been specified\n");
+ xf86DrvMsg(pScrn->scrnIndex,X_INFO,"Skipping i2c and Rage Theatre initialization code.\n");
+ } else {
+ pPriv->theatre=xf86_DetectTheatre(pPriv->VIP);
+ RADEONInitI2C(pScrn,pPriv);
+ }
}
+ }
+
/* overlay scaler line length differs for different revisions
this needs to be maintained by hand */
switch(info->ChipFamily){
@@ -2287,8 +2328,19 @@
RADEON_TDA9885_SetEncoding(pPriv);
}
}
- else
- return BadMatch;
+ else if (attribute == xvTvoEnable)
+ {
+ value = ClipValue(value , 0 , 1);
+ RADEONTheaterOutSetOnOff(pScrn , (Bool)value);
+ }
+ else if (attribute == xvTvoStandard)
+ {
+ /*
+ * TEST TEST TEST TEST TEST TEST TEST TEST TEST
+ */
+ }
+ else
+ return BadMatch;
if (setTransform)
{
@@ -2387,8 +2439,23 @@
} else
if(attribute == xvAdjustment) {
*value = pPriv->adjustment;
- } else
- return BadMatch;
+ } else if (attribute == xvTvoEnable)
+ {
+ *value = (INT32)RADEONTheaterOutGetOnOff(pScrn);
+ }
+ else if (attribute == xvTvoStandard)
+ {
+ /*
+ * TEST TEST TEST TEST TEST TEST TEST TEST TEST
+ */
+ *value = 0;
+ }
+ else if (attribute == xvTvoModeCompat)
+ {
+ *value = (INT32)RADEONTheaterOutGetCompatMode(pScrn);
+ }
+ else
+ return BadMatch;
return Success;
}
@@ -3997,5 +4064,6 @@
xf86XVRegisterOffscreenImages(pScreen, offscreenImages, 1);
}
+
#endif /* !XvExtension */
|
|
From: <gat...@li...> - 2003-09-22 03:35:29
|
Update of /cvsroot/gatos/ati_remote In directory sc8-pr-cvs1:/tmp/cvs-serv15977 Modified Files: ati_remote26.c Log Message: Update legalese. Index: ati_remote26.c =================================================================== RCS file: /cvsroot/gatos/ati_remote/ati_remote26.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ati_remote26.c 21 Sep 2003 23:17:38 -0000 1.1 +++ ati_remote26.c 22 Sep 2003 03:35:23 -0000 1.2 @@ -1,6 +1,7 @@ /* * * Copyright (c) 2002 Vladimir Dergachev + * Copyright (c) 2003 Brian S. Julin (2.6 port) * * USB ATI Remote support * |
|
From: <gat...@li...> - 2003-09-21 23:17:52
|
Update of /cvsroot/gatos/ati_remote
In directory sc8-pr-cvs1:/tmp/cvs-serv6678
Modified Files:
Makefile README
Added Files:
README.Makefile ati_remote26.c
Log Message:
Add a separate file containing port to kernel 2.6 (-test4)
Use the kernel build system to create the module objects
--- NEW FILE: README.Makefile ---
Explanation of the tricks used in the Makefile:
First the KDIR and PWD variables are given default vaules if not
provided on the make commandline.
The first time through the file, KERNELRELEASE will be undefined --
it is defined by the toplevel makefile in the kernel source tree,
and we have not read that in yet. We test for this, in order to
detect whether we are recursing yet or not. If we are not recursing
already, then we install a .DEFAULT target that may get used to
build the module using the kernel tree's scripts.
The .PHONY directive at the bottom then prevents any of the
pseudotargets listed there from calling the .DEFAULT rule.
The magic happens when "modules" (or any other target not
listed as .PHONY) is made. This can happen either because you
ask for it explicitly, or because one of the other .PHONY targets
has asked for it. These targets execute the .DEFAULT rule.
The .DEFAULT rule calls make again from the kernel source tree
and sets the SUBDIRS variable to the ati_remote directory. That
causes the kernel build system to think that ati_remote is part
of the kernel source tree. The kernel build system then enters
the ati_remote directory and uses our makefile a second time.
On the second time through, KERNELRELEASE is now defined, so
our makefile does not install a .DEFAULT rule -- we let the
kernel build system supply the .DEFAULT rule among others.
The kernel scripts will build any modules listed in the variable
obj-m. We get our module built by putting ati_remote26.o or
ati_remote.o, depending on the kernel version as found in the
PATCHLEVEL variable, in obj-m. In the case of 2.4 we also need
to set the TOPDIR variable (KDIR is mostly just TOPDIR renamed)
and we then need to include the Rules.make global rules file from
the kernel tree. 2.6 kbuild does that part automatically so we
don't need to do any such thing in the 2.6 case. Note that in the
case of 2.6 a lot of files (.o, .mod.c, mod.o, .ko) are generated.
It is the .ko one that must be used for insmod.
2.6's kbuild really hasn't been thought out in this respect
however, so you get a few gratuitous things happenning like vmlinux
gets relinked. There are probably ways to trick that but it
is harmless for now and the 2.6 kbuild system is a moving target,
so we don't want to get too far into it until it stabilizes.
Once that happens we may be able to figure out how to get the
modules object files list to just contain our module -- right
now if you allow the "modules_install" target to fall through the
.DEFAULT rule and into the kernel build system, you install all
the modules in the kernel tree, but not the one in ati_remote :-/
--
Brian S. Julin
--- NEW FILE: ati_remote26.c ---
/*
*
* Copyright (c) 2002 Vladimir Dergachev
*
* USB ATI Remote support
*
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so by
* e-mail - mail your message to vo...@mi...
*
* This driver was derived from usbati_remote and usbkbd drivers by
* Vojtech Pavlik
*/
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/usb.h>
/*
* Version Information
*/
#define DRIVER_VERSION "2.1.1"
#define DRIVER_AUTHOR "Vladimir Dergachev <vo...@mi...>"
#define DRIVER_DESC "USB ATI Remote driver for 2.6 kernels"
#define DRIVER_LICENSE "GPL"
MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC );
MODULE_LICENSE( DRIVER_LICENSE );
int channel_mask=0;
#ifdef MODULE
MODULE_PARM(channel_mask, "i");
MODULE_PARM_DESC(channel_mask, "bitmask that determines which remote control channels to ignore");
#else
#error bootprompt parameter code TODO and probably other stuff too
#endif
/* Get hi and low bytes of a 16-bits int */
#define HI(a) ((unsigned char)((a) >> 8))
#define LO(a) ((unsigned char)((a) & 0xff))
#define SEND_FLAG_IN_PROGRESS 1
#define SEND_FLAG_COMPLETE 2
struct ati_remote {
unsigned char *data, *data_o;
dma_addr_t data_dma, data_dma_o;
char name[128];
char phys[64];
char input_name[16][160];
unsigned char old[16][2];
unsigned long old_jiffies[16];
struct usb_device *usbdev;
struct input_dev dev[16];
struct urb *irq, *out;
wait_queue_head_t wait;
int open;
int send_flags;
};
static char init1[]={
0x01, 0x00, 0x20, 0x14 };
static char init2[]={
0x01, 0x00, 0x20, 0x14, 0x20, 0x20, 0x20 };
#define KIND_END 0
#define KIND_LITERAL 1
#define KIND_FILTERED 2
#define KIND_LU 3
#define KIND_RU 4
#define KIND_LD 5
#define KIND_RD 6
#define KIND_ACCEL 7
static struct {
short kind;
unsigned char data1, data2;
int type;
unsigned int code;
int value;
} ati_remote_translation_table[]={
{KIND_LITERAL, 0x3d, 0x78, EV_KEY, BTN_LEFT, 1}, /* left ati_remote button */
{KIND_LITERAL, 0x3e, 0x79, EV_KEY, BTN_LEFT, 0},
{KIND_LITERAL, 0x41, 0x7c, EV_KEY, BTN_RIGHT, 1}, /* right ati_remote button */
{KIND_LITERAL, 0x42, 0x7d, EV_KEY, BTN_RIGHT, 0},
/* ati_remote */
{KIND_ACCEL, 0x35, 0x70, EV_REL, REL_X, -1}, /* left */
{KIND_ACCEL, 0x36, 0x71, EV_REL, REL_X, 1}, /* right */
{KIND_ACCEL, 0x37, 0x72, EV_REL, REL_Y, -1}, /* up */
{KIND_ACCEL, 0x38, 0x73, EV_REL, REL_Y, 1}, /* down */
{KIND_LU, 0x39, 0x74, EV_REL, 0, 0}, /* left up */
{KIND_RU, 0x3a, 0x75, EV_REL, 0, 0}, /* right up */
{KIND_LD, 0x3c, 0x77, EV_REL, 0, 0}, /* left down */
{KIND_RD, 0x3b, 0x76, EV_REL, 0, 0}, /* right down */
/* keyboard.. */
{KIND_FILTERED, 0xe2, 0x1d, EV_KEY, KEY_LEFT, 1}, /* key left */
{KIND_FILTERED, 0xe4, 0x1f, EV_KEY, KEY_RIGHT, 1}, /* key right */
{KIND_FILTERED, 0xe7, 0x22, EV_KEY, KEY_DOWN, 1}, /* key down */
{KIND_FILTERED, 0xdf, 0x1a, EV_KEY, KEY_UP, 1}, /* key left */
{KIND_FILTERED, 0xe3, 0x1e, EV_KEY, KEY_ENTER, 1}, /* key enter */
{KIND_FILTERED, 0xd2, 0x0d, EV_KEY, KEY_1, 1},
{KIND_FILTERED, 0xd3, 0x0e, EV_KEY, KEY_2, 1},
{KIND_FILTERED, 0xd4, 0x0f, EV_KEY, KEY_3, 1},
{KIND_FILTERED, 0xd5, 0x10, EV_KEY, KEY_4, 1},
{KIND_FILTERED, 0xd6, 0x11, EV_KEY, KEY_5, 1},
{KIND_FILTERED, 0xd7, 0x12, EV_KEY, KEY_6, 1},
{KIND_FILTERED, 0xd8, 0x13, EV_KEY, KEY_7, 1},
{KIND_FILTERED, 0xd9, 0x14, EV_KEY, KEY_8, 1},
{KIND_FILTERED, 0xda, 0x15, EV_KEY, KEY_9, 1},
{KIND_FILTERED, 0xdc, 0x17, EV_KEY, KEY_0, 1},
{KIND_FILTERED, 0xdd, 0x18, EV_KEY, KEY_KPENTER, 1}, /* key "checkbox" */
{KIND_FILTERED, 0xc5, 0x00, EV_KEY, KEY_A, 1},
{KIND_FILTERED, 0xc6, 0x01, EV_KEY, KEY_B, 1},
{KIND_FILTERED, 0xde, 0x19, EV_KEY, KEY_C, 1},
{KIND_FILTERED, 0xe0, 0x1b, EV_KEY, KEY_D, 1},
{KIND_FILTERED, 0xe6, 0x21, EV_KEY, KEY_E, 1},
{KIND_FILTERED, 0xe8, 0x23, EV_KEY, KEY_F, 1},
{KIND_FILTERED, 0xdb, 0x16, EV_KEY, KEY_MENU, 1}, /* key menu */
{KIND_FILTERED, 0xc7, 0x02, EV_KEY, KEY_POWER, 1}, /* key power */
{KIND_FILTERED, 0xc8, 0x03, EV_KEY, KEY_PROG1, 1}, /* key TV */
{KIND_FILTERED, 0xc9, 0x04, EV_KEY, KEY_PROG2, 1}, /* key DVD */
{KIND_FILTERED, 0xca, 0x05, EV_KEY, KEY_WWW, 1}, /* key Web */
{KIND_FILTERED, 0xcb, 0x06, EV_KEY, KEY_BOOKMARKS, 1}, /* key "open book" */
{KIND_FILTERED, 0xcc, 0x07, EV_KEY, KEY_EDIT, 1}, /* key "hand" */
{KIND_FILTERED, 0xe1, 0x1c, EV_KEY, KEY_COFFEE, 1}, /* key "timer" */
{KIND_FILTERED, 0xce, 0x09, EV_KEY, KEY_VOLUMEDOWN, 1},
{KIND_FILTERED, 0xcd, 0x08, EV_KEY, KEY_VOLUMEUP, 1},
{KIND_FILTERED, 0xcf, 0x0a, EV_KEY, KEY_MUTE, 1},
{KIND_FILTERED, 0xd1, 0x0c, EV_KEY, KEY_PAGEUP, 1}, /* next channel*/
{KIND_FILTERED, 0xd0, 0x0b, EV_KEY, KEY_PAGEDOWN, 1}, /* prev channel */
{KIND_FILTERED, 0xec, 0x27, EV_KEY, KEY_RECORD, 1},
{KIND_FILTERED, 0xea, 0x25, EV_KEY, KEY_PLAYCD, 1}, /* ke pay */
{KIND_FILTERED, 0xe9, 0x24, EV_KEY, KEY_REWIND, 1},
{KIND_FILTERED, 0xeb, 0x26, EV_KEY, KEY_FORWARD, 1},
{KIND_FILTERED, 0xed, 0x28, EV_KEY, KEY_STOP, 1},
{KIND_FILTERED, 0xee, 0x29, EV_KEY, KEY_PAUSE, 1},
{KIND_FILTERED, 0xe5, 0x20, EV_KEY, KEY_FRONT, 1}, /* maximize */
{KIND_END, 0x00, 0x00, EV_MAX+1, 0, 0} /* END */
};
/*
* Send a packet of bytes to the device
*/
static void send_packet(struct ati_remote *ati_remote, u16 cmd, unsigned char* data)
{
DECLARE_WAITQUEUE(wait, current);
int timeout = HZ; /* 1 second */
memcpy(ati_remote->out->transfer_buffer + 1, data, LO(cmd));
((char*)ati_remote->out->transfer_buffer)[0] = HI(cmd);
ati_remote->out->transfer_buffer_length = LO(cmd) + 1;
ati_remote->out->dev = ati_remote->usbdev;
ati_remote->send_flags=SEND_FLAG_IN_PROGRESS;
set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&ati_remote->wait, &wait);
if (usb_submit_urb(ati_remote->out, SLAB_ATOMIC)) {
set_current_state(TASK_RUNNING);
remove_wait_queue(&ati_remote->wait, &wait);
printk("done\n");
return;
}
while (timeout && (ati_remote->out->status == -EINPROGRESS) &&
!(ati_remote->send_flags & SEND_FLAG_COMPLETE)){
timeout = schedule_timeout(timeout);
rmb();
}
set_current_state(TASK_RUNNING);
remove_wait_queue(&ati_remote->wait, &wait);
usb_unlink_urb(ati_remote->out);
}
static void ati_remote_irq(struct urb *urb, struct pt_regs *regs)
{
struct ati_remote *ati_remote = urb->context;
unsigned char *data = ati_remote->data;
struct input_dev *dev = &(ati_remote->dev[0x0f]);
int i;
int accel;
int status;
int remote_num=0x0f;
switch (urb->status) {
case 0: /* success */
break;
case -ECONNRESET: /* unlink */
case -ENOENT:
case -ESHUTDOWN:
return;
/* -EPIPE: should clear the halt */
default: /* error */
goto resubmit;
}
if(urb->actual_length==4){
if((data[0]!=0x14)||((data[3] & 0x0f)!=0x00))
printk("** weird key=%02x%02x%02x%02x\n", data[0], data[1], data[2], data[3]);
remote_num=(data[3]>>4)&0x0f;
dev=&(ati_remote->dev[remote_num]);
if(channel_mask & (1<<(remote_num+1)))goto resubmit; /* ignore signals from this channel */
} else
if(urb->actual_length==1){
if((data[0]!=(unsigned char)0xff)&&(data[0]!=0x00))
printk("** weird byte=0x%02x\n", data[0]);
} else {
printk("length=%d %02x %02x %02x %02x %02x %02x %02x %02x\n",
urb->actual_length, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7]);
}
accel=1;
if((urb->actual_length==4) && (ati_remote->old[remote_num][0]==data[1])&&(ati_remote->old[remote_num][1]==data[2])){
if(ati_remote->old_jiffies[remote_num]+4*HZ<jiffies)accel=8;
else
if(ati_remote->old_jiffies[remote_num]+3*HZ<jiffies)accel=6;
else
if(ati_remote->old_jiffies[remote_num]+2*HZ<jiffies)accel=4;
else
if(ati_remote->old_jiffies[remote_num]+HZ<jiffies)accel=3;
else
if(ati_remote->old_jiffies[remote_num]+(HZ>>1)<jiffies)accel=2;
}
if((urb->actual_length==4) && (data[0]==0x14) && ((data[3]&0x0f)==0x00)){
for(i=0;ati_remote_translation_table[i].kind!=KIND_END;i++){
if((((ati_remote_translation_table[i].data1 & 0x0f)==(data[1] & 0x0f))) &&
((((ati_remote_translation_table[i].data1>>4)-(data[1]>>4)+remote_num)&0x0f)==0x0f) &&
(ati_remote_translation_table[i].data2==data[2])){
switch(ati_remote_translation_table[i].kind){
case KIND_LITERAL:
input_event(dev, ati_remote_translation_table[i].type,
ati_remote_translation_table[i].code,
ati_remote_translation_table[i].value);
break;
case KIND_ACCEL:
input_event(dev, ati_remote_translation_table[i].type,
ati_remote_translation_table[i].code,
ati_remote_translation_table[i].value*accel);
break;
case KIND_LU:
input_report_rel(dev, REL_X, -accel);
input_report_rel(dev, REL_Y, -accel);
break;
case KIND_RU:
input_report_rel(dev, REL_X, accel);
input_report_rel(dev, REL_Y, -accel);
break;
case KIND_LD:
input_report_rel(dev, REL_X, -accel);
input_report_rel(dev, REL_Y, accel);
break;
case KIND_RD:
input_report_rel(dev, REL_X, accel);
input_report_rel(dev, REL_Y, accel);
break;
case KIND_FILTERED:
if((ati_remote->old[remote_num][0]==data[1])&&(ati_remote->old[remote_num][1]==data[2])&&((ati_remote->old_jiffies[remote_num]+(HZ>>2))>jiffies)){
goto resubmit;
}
input_event(dev, ati_remote_translation_table[i].type,
ati_remote_translation_table[i].code,
1);
input_event(dev, ati_remote_translation_table[i].type,
ati_remote_translation_table[i].code,
0);
ati_remote->old_jiffies[remote_num]=jiffies;
break;
default:
printk("kind=%d\n", ati_remote_translation_table[i].kind);
}
break;
}
}
if(ati_remote_translation_table[i].kind==KIND_END){
printk("** unknown key=%02x%02x\n", data[1], data[2]);
}
if((ati_remote->old[remote_num][0]!=data[1])||(ati_remote->old[remote_num][1]!=data[2]))
ati_remote->old_jiffies[remote_num]=jiffies;
ati_remote->old[remote_num][0]=data[1];
ati_remote->old[remote_num][1]=data[2];
}
input_sync(dev);
resubmit:
status = usb_submit_urb (urb, SLAB_ATOMIC);
if (status)
err ("can't resubmit intr, %s-%s/input0, status %d",
ati_remote->usbdev->bus->bus_name,
ati_remote->usbdev->devpath, status);
}
static void ati_remote_usb_out(struct urb *urb, struct pt_regs *regs)
{
struct ati_remote *ati_remote = urb->context;
if (urb->status) return;
ati_remote->send_flags|=SEND_FLAG_COMPLETE;
wmb();
if (waitqueue_active(&ati_remote->wait))
wake_up(&ati_remote->wait);
}
static int ati_remote_open(struct input_dev *dev)
{
struct ati_remote *ati_remote = dev->private;
/* printk("ati_remote_open %d\n", ati_remote->open); */
if (ati_remote->open++)
return 0;
ati_remote->irq->dev = ati_remote->usbdev;
if (usb_submit_urb(ati_remote->irq, GFP_KERNEL)){
printk(KERN_ERR "ati_remote: error submitting urb\n");
ati_remote->open--;
return -EIO;
}
/* printk("done: ati_remote_open now open=%d\n", ati_remote->open); */
return 0;
}
static void ati_remote_close(struct input_dev *dev)
{
struct ati_remote *ati_remote = dev->private;
if (!--ati_remote->open) {
usb_unlink_urb(ati_remote->irq);
/* Technically should deal with pending wait queue here */
usb_unlink_urb(ati_remote->out);
}
}
static int ati_remote_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct usb_device *dev = interface_to_usbdev(intf);
struct usb_host_interface *interface;
struct usb_endpoint_descriptor *endpoint, *epout;
struct ati_remote *ati_remote;
int pipe, maxp;
char path[64]; /* Dunno why not use buf. Dumbly copy usbmouse.c */
char *buf;
int i,j;
int retval = -ENOMEM;
interface = &intf->altsetting[intf->act_altsetting];
if (interface->desc.bNumEndpoints != 2) return -ENODEV;
/* use the first endpoint only for now */
endpoint = &(interface->endpoint[0].desc);
if (!(endpoint->bEndpointAddress & 0x80))
return -ENODEV;
if ((endpoint->bmAttributes & 3) != 3)
return -ENODEV;
epout = &(interface->endpoint[1].desc);
pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
printk("maxp=%d endpoint=0x%02x\n", maxp, endpoint->bEndpointAddress);
/* Something still needed here?
usb_set_idle(dev, interface->bInterfaceNumber, 0, 0);
*/
if (!(ati_remote = kmalloc(sizeof(struct ati_remote), GFP_KERNEL)))
return -ENOMEM;
memset(ati_remote, 0, sizeof(struct ati_remote)+32);
ati_remote->data =
usb_buffer_alloc(dev, 8, SLAB_ATOMIC, &ati_remote->data_dma);
if (!ati_remote->data) goto bail0;
ati_remote->data_o =
usb_buffer_alloc(dev, 8, SLAB_ATOMIC, &ati_remote->data_dma_o);
if (!ati_remote->data_o) goto bail1;
retval = -ENODEV;
ati_remote->irq = usb_alloc_urb(0, GFP_KERNEL);
if (!ati_remote->irq) goto bail2;
ati_remote->out = usb_alloc_urb(0, GFP_KERNEL);
if (!ati_remote->out) goto bail3;
ati_remote->usbdev = dev;
retval = -ENOMEM;
if (!(buf = kmalloc(63, GFP_KERNEL))) goto bail4;
if (dev->descriptor.iManufacturer &&
usb_string(dev, dev->descriptor.iManufacturer, buf, 63) > 0)
strcat(ati_remote->name, buf);
if (dev->descriptor.iProduct &&
usb_string(dev, dev->descriptor.iProduct, buf, 63) > 0)
sprintf(ati_remote->name, "%s %s",
ati_remote->name, buf);
if (!strlen(ati_remote->name))
sprintf(ati_remote->name, "USB ATI (X10) remote %04x:%04x",
dev->descriptor.idVendor, dev->descriptor.idProduct);
usb_make_path(dev, path, 64);
sprintf(ati_remote->phys, "%s/input0", path);
kfree(buf);
for(i=0;i<16;i++){
for(j=0;ati_remote_translation_table[j].kind!=KIND_END;j++)
if(ati_remote_translation_table[j].type==EV_KEY)
set_bit(ati_remote_translation_table[j].code,
ati_remote->dev[i].keybit);
clear_bit(BTN_LEFT, ati_remote->dev[i].keybit);
clear_bit(BTN_RIGHT, ati_remote->dev[i].keybit);
ati_remote->dev[i].evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
ati_remote->dev[i].keybit[LONG(BTN_MOUSE)] =
BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
ati_remote->dev[i].relbit[0] = BIT(REL_X) | BIT(REL_Y);
ati_remote->dev[i].keybit[LONG(BTN_MOUSE)] |=
BIT(BTN_SIDE) | BIT(BTN_EXTRA);
ati_remote->dev[i].relbit[0] |= BIT(REL_WHEEL);
ati_remote->dev[i].private = ati_remote;
ati_remote->dev[i].open = ati_remote_open;
ati_remote->dev[i].close = ati_remote_close;
sprintf(ati_remote->input_name[i],
"%s remote channel %d", ati_remote->name, i+1);
ati_remote->dev[i].name = ati_remote->input_name[i];
ati_remote->dev[i].phys = ati_remote->phys;
ati_remote->dev[i].id.bustype = BUS_USB;
ati_remote->dev[i].id.vendor = dev->descriptor.idVendor;
ati_remote->dev[i].id.product = dev->descriptor.idProduct;
ati_remote->dev[i].id.version = dev->descriptor.bcdDevice;
ati_remote->old[i][0]=0;
ati_remote->old[i][1]=0;
ati_remote->old_jiffies[i]=jiffies;
}
init_waitqueue_head(&ati_remote->wait);
printk("bInterval=%d\n", endpoint->bInterval);
usb_fill_int_urb(ati_remote->irq, dev, pipe, ati_remote->data,
(maxp > 8 ? 8 : maxp),
ati_remote_irq, ati_remote, endpoint->bInterval);
usb_fill_int_urb(ati_remote->out, dev,
usb_sndintpipe(dev, epout->bEndpointAddress),
ati_remote->data_o, 32,
ati_remote_usb_out, ati_remote, epout->bInterval);
printk(KERN_INFO "input: %s on %s\n", ati_remote->name, path);
printk(KERN_INFO "See /proc/bus/input/devices for dev<->chan map\n");
for(i=0;i<16;i++) input_register_device(&(ati_remote->dev[i]));
send_packet(ati_remote, 0x8004, init1);
send_packet(ati_remote, 0x8007, init2);
usb_set_intfdata(intf, ati_remote);
return 0;
bail4:
usb_free_urb(ati_remote->out);
bail3:
usb_free_urb(ati_remote->irq);
bail2:
usb_buffer_free(dev, 8, ati_remote->data_o, ati_remote->data_dma_o);
bail1:
usb_buffer_free(dev, 8, ati_remote->data, ati_remote->data_dma);
bail0:
kfree(ati_remote);
return retval;
}
static void ati_remote_disconnect(struct usb_interface *intf)
{
struct ati_remote *ati_remote = usb_get_intfdata (intf);
usb_set_intfdata(intf, NULL);
if (ati_remote) {
int i;
usb_unlink_urb(ati_remote->irq);
usb_unlink_urb(ati_remote->out);
for(i=0;i<16;i++)
input_unregister_device(&(ati_remote->dev[i]));
usb_free_urb(ati_remote->irq);
usb_free_urb(ati_remote->out);
usb_buffer_free(interface_to_usbdev(intf), 8,
ati_remote->data, ati_remote->data_dma);
usb_buffer_free(interface_to_usbdev(intf), 8,
ati_remote->data_o, ati_remote->data_dma_o);
kfree(ati_remote);
}
}
static struct usb_device_id ati_remote_id_table [] = {
{ USB_DEVICE(0x0bc7, 0x004) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, ati_remote_id_table);
static struct usb_driver ati_remote_driver = {
.owner = THIS_MODULE,
.name "ati_remote",
.probe ati_remote_probe,
.disconnect ati_remote_disconnect,
.id_table ati_remote_id_table,
};
static int __init ati_remote_init(void)
{
int retval = usb_register(&ati_remote_driver);
if (retval == 0)
info(DRIVER_VERSION ":" DRIVER_DESC);
return retval;
}
static void __exit ati_remote_exit(void)
{
usb_deregister(&ati_remote_driver);
}
module_init(ati_remote_init);
module_exit(ati_remote_exit);
Index: Makefile
===================================================================
RCS file: /cvsroot/gatos/ati_remote/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Makefile 16 Feb 2002 22:59:36 -0000 1.1.1.1
+++ Makefile 21 Sep 2003 23:17:38 -0000 1.2
@@ -1,33 +1,49 @@
-CFLAGS = -m486 -O2 -Wall -Wstrict-prototypes -pipe -fno-strict-aliasing -fno-common
-LDFLAGS = -s -N
-CC=gcc
-TOPDIR=/usr/src/linux
+ifeq ($(KDIR),)
+ export KDIR := /usr/src/linux
+endif
-ATI_REMOTE_OBJS=km.o km_v4l.o km_memory.o radeon.o mach64.o rage128.o
+ifeq ($(PWD),)
+ export PWD := $(shell pwd)
+endif
-ATI_REMOTE_API_OBJS=km_api.o
+ifeq ($(KERNELRELEASE),)
-all: ati_remote.o
+ .DEFAULT:
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) $(@)
-ati_remote.o: ati_remote.c
- $(CC) $(CFLAGS) -DMODULE -D__KERNEL__ -DLINUX -I/usr/src/linux/include -c ati_remote.c
+else
+ ifeq ($(PATCHLEVEL),6)
+ obj-m := ati_remote26.o
+ endif
-test: ati_remote.o
- sync
- insmod ./ati_remote.o
+ ifeq ($(PATCHLEVEL),4)
+ obj-m := ati_remote.o
+ TOPDIR := $(KDIR)
+ include $(TOPDIR)/Rules.make
+ endif
-install:
- mkdir -p /lib/modules/`uname -r`/misc/
- install ati_remote.o /lib/modules/`uname -r`/misc/
+endif
-tarball:
- (cd .. ; tar cvf - ati_remote/*.[c,h] ati_remote/Makefile ati_remote/README | gzip - ) > ati_remote.tgz
+.PHONY: install test remove clean tarball
+
+all: modules
+
+install: modules
+ echo "Installation rule TODO (is tricky)"
+
+test: modules
+ sync
+ insmod $(PWD)/ati_remote26.ko || insmod $(PWD)/ati_remote.o
remove:
- rmmod ati_remote
+ sync
+ rmmod ati_remote26 || rmmod ati_remote
clean:
- rm -f *.o *.bck *.bak core
+ rm -f $(PWD)/*.o $(PWD)/*.ko $(PWD)/*.bck $(PWD)/*.bak $(PWD)/core
+ rm -f $(PWD)/*.mod.c $(PWD)/.*.cmd $(PWD)/.*.flags
+tarball:
+ (cd $(PWD)/.. ; tar cvf - ati_remote/ati_remote.c ati_remote/ati_remote26.c ati_remote/Makefile ati_remote/README ati_remote/README_LIRC ati_remote/README.Makefile | gzip - ) > $(PWD)/ati_remote.tgz
Index: README
===================================================================
RCS file: /cvsroot/gatos/ati_remote/README,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- README 25 Aug 2002 03:19:22 -0000 1.4
+++ README 21 Sep 2003 23:17:38 -0000 1.5
@@ -1,5 +1,4 @@
-
ATI USB Remote Control driver
This is an experimental driver.. who knows what it'll do ?
@@ -7,7 +6,8 @@
To use:
* turn on USB and "input" support in the kernel
- * make
+ * the kernel tree must be in a (partially) built state
+ * make KDIR=/path/to/kernel/tree/
* make test
* configure X to use /devfs/input/mice as a mouse
* start X - enjoy !
|
|
From: <gat...@li...> - 2003-09-16 13:45:43
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv29725
Modified Files:
r128_video.c radeon_video.c
Log Message:
Make rage128/radeon use full vertical resolution with Rage Theatre.
Patch submitted by Daniel Toth. Also, later, by Marcynek and Stanislav Brabec.
I wonder why this did not work before. Fixes in Rage Theatre code ?
Index: r128_video.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/r128_video.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- r128_video.c 10 Mar 2003 00:33:35 -0000 1.39
+++ r128_video.c 16 Sep 2003 13:45:03 -0000 1.40
@@ -197,15 +197,15 @@
InputVideoEncodings[] =
{
{ 0, "XV_IMAGE", 2048,2048,{1,1}},
- { 1, "pal-composite", 720, 240, { 1, 50 }},
- { 2, "pal-tuner", 720, 240, { 1, 50 }},
- { 3, "pal-svideo", 720, 240, { 1, 50 }},
+ { 1, "pal-composite", 720, 288, { 1, 50 }},
+ { 2, "pal-tuner", 720, 288, { 1, 50 }},
+ { 3, "pal-svideo", 720, 288, { 1, 50 }},
{ 4, "ntsc-composite", 640, 240, { 1001, 60000 }},
{ 5, "ntsc-tuner", 640, 240, { 1001, 60000 }},
{ 6, "ntsc-svideo", 640, 240, { 1001, 60000 }},
- { 7, "secam-composite", 720, 240, { 1, 50 }},
- { 8, "secam-tuner", 720, 240, { 1, 50 }},
- { 9, "secam-svideo", 720, 240, { 1, 50 }},
+ { 7, "secam-composite", 720, 288, { 1, 50 }},
+ { 8, "secam-tuner", 720, 288, { 1, 50 }},
+ { 9, "secam-svideo", 720, 288, { 1, 50 }},
{ 10,"pal_60-composite", 768, 288, { 1, 50 }},
{ 11,"pal_60-tuner", 768, 288, { 1, 50 }},
{ 12,"pal_60-svideo", 768, 288, { 1, 50 }},
Index: radeon_video.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_video.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- radeon_video.c 16 Sep 2003 13:33:29 -0000 1.95
+++ radeon_video.c 16 Sep 2003 13:45:03 -0000 1.96
@@ -232,15 +232,15 @@
InputVideoEncodings[] =
{
{ 0, "XV_IMAGE", 2048,2048,{1,1}},
- { 1, "pal-composite", 720, 240, { 1, 50 }},
- { 2, "pal-tuner", 720, 240, { 1, 50 }},
- { 3, "pal-svideo", 720, 240, { 1, 50 }},
+ { 1, "pal-composite", 720, 288, { 1, 50 }},
+ { 2, "pal-tuner", 720, 288, { 1, 50 }},
+ { 3, "pal-svideo", 720, 288, { 1, 50 }},
{ 4, "ntsc-composite", 640, 240, { 1001, 60000 }},
{ 5, "ntsc-tuner", 640, 240, { 1001, 60000 }},
{ 6, "ntsc-svideo", 640, 240, { 1001, 60000 }},
- { 7, "secam-composite", 720, 240, { 1, 50 }},
- { 8, "secam-tuner", 720, 240, { 1, 50 }},
- { 9, "secam-svideo", 720, 240, { 1, 50 }},
+ { 7, "secam-composite", 720, 288, { 1, 50 }},
+ { 8, "secam-tuner", 720, 288, { 1, 50 }},
+ { 9, "secam-svideo", 720, 288, { 1, 50 }},
{ 10,"pal_60-composite", 768, 288, { 1, 50 }},
{ 11,"pal_60-tuner", 768, 288, { 1, 50 }},
{ 12,"pal_60-svideo", 768, 288, { 1, 50 }}
|
|
From: <gat...@li...> - 2003-09-16 13:33:35
|
Update of /cvsroot/gatos/ati.2
In directory sc8-pr-cvs1:/tmp/cvs-serv28120
Modified Files:
radeon_video.c
Log Message:
On the way to getting Marcynek's card working.
Index: radeon_video.c
===================================================================
RCS file: /cvsroot/gatos/ati.2/radeon_video.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- radeon_video.c 30 Jun 2003 18:59:55 -0000 1.94
+++ radeon_video.c 16 Sep 2003 13:33:29 -0000 1.95
@@ -1510,11 +1510,21 @@
RADEONWaitForIdleMMIO(pScrn);
- OUTREG(VIPH_CONTROL, 0x003F0004); /* slowest, timeout in 16 phases */
- OUTREG(VIPH_TIMEOUT_STAT, (INREG(VIPH_TIMEOUT_STAT) & 0xFFFFFF00) | VIPH_TIMEOUT_STAT__VIPH_REGR_DIS);
- OUTREG(VIPH_DV_LAT, 0x444400FF); /* set timeslice */
- OUTREG(VIPH_BM_CHUNK, 0x151);
- OUTREG(RADEON_TEST_DEBUG_CNTL, INREG(RADEON_TEST_DEBUG_CNTL) & (~TEST_DEBUG_CNTL__TEST_DEBUG_OUT_EN));
+ switch(info->ChipFamily){
+ case CHIP_FAMILY_RV250:
+ OUTREG(VIPH_CONTROL, 0x003F0009); /* slowest, timeout in 16 phases */
+ OUTREG(VIPH_TIMEOUT_STAT, (INREG(VIPH_TIMEOUT_STAT) & 0xFFFFFF00) | VIPH_TIMEOUT_STAT__VIPH_REGR_DIS);
+ OUTREG(VIPH_DV_LAT, 0x444400FF); /* set timeslice */
+ OUTREG(VIPH_BM_CHUNK, 0x0);
+ OUTREG(RADEON_TEST_DEBUG_CNTL, INREG(RADEON_TEST_DEBUG_CNTL) & (~TEST_DEBUG_CNTL__TEST_DEBUG_OUT_EN));
+ break;
+ default:
+ OUTREG(VIPH_CONTROL, 0x003F0004); /* slowest, timeout in 16 phases */
+ OUTREG(VIPH_TIMEOUT_STAT, (INREG(VIPH_TIMEOUT_STAT) & 0xFFFFFF00) | VIPH_TIMEOUT_STAT__VIPH_REGR_DIS);
+ OUTREG(VIPH_DV_LAT, 0x444400FF); /* set timeslice */
+ OUTREG(VIPH_BM_CHUNK, 0x151);
+ OUTREG(RADEON_TEST_DEBUG_CNTL, INREG(RADEON_TEST_DEBUG_CNTL) & (~TEST_DEBUG_CNTL__TEST_DEBUG_OUT_EN));
+ }
}
static void RADEONVIP_init(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
@@ -3195,14 +3205,16 @@
}
}
- /* Disable VBI capture for anything but TV tuner */
- if(pPriv->encoding==5)pPriv->capture_vbi_data=1;
- else pPriv->capture_vbi_data=0;
}
void RADEON_RT_SetEncoding(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
{
+int width, height;
RADEONWaitForIdleMMIO(pScrn);
+/* Disable VBI capture for anything but TV tuner */
+if(pPriv->encoding==5)pPriv->capture_vbi_data=1;
+ else pPriv->capture_vbi_data=0;
+
switch(pPriv->encoding){
case 1:
xf86_RT_SetConnector(pPriv->theatre,DEC_COMPOSITE, 0);
@@ -3268,6 +3280,10 @@
pPriv->v=0;
return;
}
+xf86_RT_SetInterlace(pPriv->theatre, 1);
+width = InputVideoEncodings[pPriv->encoding].width;
+height = InputVideoEncodings[pPriv->encoding].height;
+xf86_RT_SetOutputVideoSize(pPriv->theatre, width, height*2, 0, pPriv->capture_vbi_data);
}
void RADEON_MSP_SetEncoding(RADEONPortPrivPtr pPriv)
@@ -3659,8 +3675,6 @@
if(pPriv->theatre != NULL)
{
RADEON_RT_SetEncoding(pScrn, pPriv);
- xf86_RT_SetInterlace(pPriv->theatre, 1);
- xf86_RT_SetOutputVideoSize(pPriv->theatre, width, height*2, 0, pPriv->capture_vbi_data);
}
if(pPriv->msp3430 != NULL) RADEON_MSP_SetEncoding(pPriv);
if(pPriv->tda9885 != NULL) RADEON_TDA9885_SetEncoding(pPriv);
|