mirror of
https://github.com/X11Libre/xf86-video-mach64.git
synced 2026-03-24 01:24:33 +00:00
Strip trailing whitespace from source files
Performed with: `git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'`
`git diff -w` & `git diff -b` show no diffs from this change
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-mach64/-/merge_requests/23>
This commit is contained in:
committed by
Enrico Weigelt, metux IT consult
parent
a8c660e51f
commit
aed6105f43
4
.gitignore
vendored
4
.gitignore
vendored
@@ -71,8 +71,8 @@ core
|
||||
*.tar.bz2
|
||||
*.tar.gz
|
||||
#
|
||||
# Add & Override patterns for xf86-video-mach64
|
||||
# Add & Override patterns for xf86-video-mach64
|
||||
#
|
||||
# Edit the following section as needed
|
||||
# For example, !report.pc overrides *.pc. See 'man gitignore'
|
||||
#
|
||||
#
|
||||
|
||||
@@ -174,7 +174,7 @@ if test "x$EXA" = xyes; then
|
||||
CPPFLAGS="$SAVE_CPPFLAGS"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
|
||||
|
||||
@@ -314,7 +314,7 @@ ATIProcessOptions
|
||||
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 25
|
||||
# define boolean bool
|
||||
#endif
|
||||
|
||||
|
||||
# define ProbeSparse PublicOption[ATI_OPTION_PROBE_SPARSE].value.boolean
|
||||
# define Accel PublicOption[ATI_OPTION_ACCEL].value.boolean
|
||||
# define BIOSDisplay PrivateOption[ATI_OPTION_BIOS_DISPLAY].value.boolean
|
||||
@@ -446,9 +446,9 @@ ATIProcessOptions
|
||||
else {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Unknown dma_mode: '%s'\n", DMAMode);
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Valid dma_mode options are: 'async','sync','mmio'\n");
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Defaulting to async DMA mode\n");
|
||||
pATI->OptionDMAMode = MACH64_MODE_DMA_ASYNC;
|
||||
}
|
||||
|
||||
146
src/aticonsole.c
146
src/aticonsole.c
@@ -137,28 +137,28 @@ ATIProbeAndSetActiveDisplays
|
||||
if (pVbe) {
|
||||
/* LT Pro, XL, Mobility specific BIOS functions */
|
||||
if (pATI->Chip == ATI_CHIP_264LTPRO ||
|
||||
pATI->Chip == ATI_CHIP_264XL ||
|
||||
pATI->Chip == ATI_CHIP_264XL ||
|
||||
pATI->Chip == ATI_CHIP_MOBILITY) {
|
||||
|
||||
|
||||
/* Get attached display(s) - LTPro, XL, Mobility */
|
||||
pVbe->pInt10->num = 0x10;
|
||||
pVbe->pInt10->ax = 0xa083;
|
||||
pVbe->pInt10->cx = 0x0700; /* ch=0x07 - probe all, 0x01 CRT, 0x02 TV, 0x04 LCD */
|
||||
xf86ExecX86int10(pVbe->pInt10);
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"Attached displays: ax=0x%04x, cx=0x%04x\n",
|
||||
pVbe->pInt10->ax, pVbe->pInt10->cx);
|
||||
|
||||
tv_attached = crt_attached = lcd_attached = FALSE;
|
||||
if (pVbe->pInt10->ax & 0xff00) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Failed to detect attached displays\n");
|
||||
} else {
|
||||
|
||||
|
||||
if (pVbe->pInt10->cx & 0x3)
|
||||
{
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
" CRT attached\n");
|
||||
crt_attached = TRUE;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ ATIProbeAndSetActiveDisplays
|
||||
|
||||
if ((pVbe->pInt10->cx >> 2) & 0x3)
|
||||
{
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
" DFP/LCD attached\n");
|
||||
lcd_attached = TRUE;
|
||||
}
|
||||
@@ -176,27 +176,27 @@ ATIProbeAndSetActiveDisplays
|
||||
|
||||
switch ((pVbe->pInt10->cx >> 4) & 0x3) {
|
||||
case 0:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
" No TV attached\n");
|
||||
break;
|
||||
case 1:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
" TV attached (composite connector)\n");
|
||||
tv_attached = TRUE;
|
||||
break;
|
||||
case 2:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
" TV attached (S-video connector)\n");
|
||||
tv_attached = TRUE;
|
||||
break;
|
||||
case 3:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
" TV attached (S-video/composite connectors)\n");
|
||||
tv_attached = TRUE;
|
||||
break;
|
||||
default:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Unrecognized return code: 0x%04x\n",
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Unrecognized return code: 0x%04x\n",
|
||||
pVbe->pInt10->cx);
|
||||
}
|
||||
|
||||
@@ -208,25 +208,25 @@ ATIProbeAndSetActiveDisplays
|
||||
pVbe->pInt10->bx = 0x0000; /* bh=0x00 get active, bh=0x01 set active */
|
||||
xf86ExecX86int10(pVbe->pInt10);
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"Active displays: ax=0x%04x, bx=0x%04x, cx=0x%04x\n",
|
||||
pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx);
|
||||
|
||||
if (pVbe->pInt10->ax & 0xff00) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Failed to detect active display\n");
|
||||
} else {
|
||||
if (pVbe->pInt10->bx & 0x1)
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
if (pVbe->pInt10->bx & 0x1)
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
" DFP/LCD is active\n");
|
||||
|
||||
if (pVbe->pInt10->bx & 0x2)
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
if (pVbe->pInt10->bx & 0x2)
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
" CRT is active\n");
|
||||
|
||||
if (pVbe->pInt10->bx & 0x4) {
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
" TV is active\n");
|
||||
|
||||
if (!tv_attached) {
|
||||
@@ -240,14 +240,14 @@ ATIProbeAndSetActiveDisplays
|
||||
pVbe->pInt10->num = 0x10;
|
||||
pVbe->pInt10->ax = 0xa084;
|
||||
pVbe->pInt10->bx = 0x0100; /* bh=0x01 set active */
|
||||
pVbe->pInt10->cx = disp_request;
|
||||
pVbe->pInt10->cx = disp_request;
|
||||
xf86ExecX86int10(pVbe->pInt10);
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV not present, disabling: ax=0x%04x, bx=0x%04x, cx=0x%04x\n",
|
||||
pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx);
|
||||
if (pVbe->pInt10->ax & 0xff00) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Disabling TV failed\n");
|
||||
}
|
||||
} else {
|
||||
@@ -272,12 +272,12 @@ ATIProbeAndSetActiveDisplays
|
||||
pVbe->pInt10->bx = 0x0100; /* bh=0x01 set active */
|
||||
pVbe->pInt10->cx = disp_request; /* try to activate TV */
|
||||
xf86ExecX86int10(pVbe->pInt10);
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"Setting TV active: ax=0x%04x, bx=0x%04x, cx=0x%04x\n",
|
||||
pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx);
|
||||
if (pVbe->pInt10->ax & 0xff00) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Setting TV active failed\n");
|
||||
} else {
|
||||
pATI->tvActive = TRUE;
|
||||
@@ -295,12 +295,12 @@ ATIProbeAndSetActiveDisplays
|
||||
tv_attached = FALSE;
|
||||
|
||||
if (pVbe->pInt10->ax & 0xff00) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Failed to detect TV-Out BIOS\n");
|
||||
} else {
|
||||
switch (pVbe->pInt10->ax & 0x0003) {
|
||||
case 3:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV-Out BIOS detected and active\n");
|
||||
|
||||
/* TV attached query */
|
||||
@@ -310,44 +310,44 @@ ATIProbeAndSetActiveDisplays
|
||||
xf86ExecX86int10(pVbe->pInt10);
|
||||
|
||||
if (pVbe->pInt10->ax & 0xff00) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Failed to detect if TV is attached\n");
|
||||
} else {
|
||||
switch (pVbe->pInt10->cx & 0x0003) {
|
||||
case 3:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV attached to composite and S-video connectors\n");
|
||||
tv_attached = TRUE;
|
||||
break;
|
||||
case 2:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV attached to S-video connector\n");
|
||||
tv_attached = TRUE;
|
||||
break;
|
||||
case 1:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV attached to composite connector\n");
|
||||
tv_attached = TRUE;
|
||||
break;
|
||||
default:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV is not attached\n");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV-Out BIOS service is not available due to"
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV-Out BIOS service is not available due to"
|
||||
"a system BIOS error or TV-Out hardware not being installed\n");
|
||||
break;
|
||||
default:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"No TV-Out BIOS or hardware detected\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Return TV-Out configuration
|
||||
/* Return TV-Out configuration
|
||||
* see Programmer's Guide under "TV Out Specific Functions"
|
||||
* It's not clear exactly which adapters support these
|
||||
*/
|
||||
@@ -356,45 +356,45 @@ ATIProbeAndSetActiveDisplays
|
||||
pVbe->pInt10->bx = 0x00;
|
||||
xf86ExecX86int10(pVbe->pInt10);
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV-Out query: ax=0x%04x, bx=0x%04x, cx=0x%04x, dx=0x%04x\n",
|
||||
pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx, pVbe->pInt10->dx);
|
||||
|
||||
if (pVbe->pInt10->ax & 0xff00) {
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Failed to detect TV-Out configuration.\n");
|
||||
|
||||
} else if (pVbe->pInt10->bx == 0) {
|
||||
if (pVbe->pInt10->dx == 0) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV-Out is not detected.\n");
|
||||
} else {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV-Out is detected but not supported.\n");
|
||||
}
|
||||
|
||||
} else if ((pVbe->pInt10->cx & 0xff) == 0) {
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV-Out is currently disabled.\n");
|
||||
if (tv_attached && pATI->Chip < ATI_CHIP_264LTPRO) {
|
||||
/* Try to enable TV-Out */
|
||||
pVbe->pInt10->num = 0x10;
|
||||
pVbe->pInt10->ax = 0xa070;
|
||||
pVbe->pInt10->bx = 0x0001; /* Sub-function: Select TV Out */
|
||||
/* cl=0x001 enable, cl=0x000 disable,
|
||||
* cl=0x080 disable with feature connector bit preserved
|
||||
/* cl=0x001 enable, cl=0x000 disable,
|
||||
* cl=0x080 disable with feature connector bit preserved
|
||||
*/
|
||||
pVbe->pInt10->cx = 0x0001;
|
||||
|
||||
|
||||
xf86ExecX86int10(pVbe->pInt10);
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"Setting TV active: ax=0x%04x, bx=0x%04x, cx=0x%04x\n",
|
||||
pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx);
|
||||
|
||||
if (pVbe->pInt10->ax & 0xff00) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Setting TV active failed\n");
|
||||
} else {
|
||||
pATI->tvActive = TRUE;
|
||||
@@ -404,7 +404,7 @@ ATIProbeAndSetActiveDisplays
|
||||
} else {
|
||||
pATI->tvActive = TRUE;
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV-Out is currently enabled (TV-Out revision code: %d).\n",
|
||||
(pVbe->pInt10->dx >> 8) & 0xff);
|
||||
|
||||
@@ -422,9 +422,9 @@ ATIProbeAndSetActiveDisplays
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Reference frequency 27.00000\n");
|
||||
break;
|
||||
default:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Unknown reference frequency cx=0x%04x\n", pVbe->pInt10->cx);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Return TV standard
|
||||
@@ -436,13 +436,13 @@ ATIProbeAndSetActiveDisplays
|
||||
pVbe->pInt10->bx = 0x00;
|
||||
xf86ExecX86int10(pVbe->pInt10);
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"TV standard query result: ax=0x%04x, bx=0x%04x, cx=0x%04x\n",
|
||||
pVbe->pInt10->ax, pVbe->pInt10->bx, pVbe->pInt10->cx);
|
||||
|
||||
if (pVbe->pInt10->ax & 0xff00) {
|
||||
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Failed to return TV standard.\n");
|
||||
} else {
|
||||
tv_std = pVbe->pInt10->cx & 0x00ff;
|
||||
@@ -455,45 +455,45 @@ ATIProbeAndSetActiveDisplays
|
||||
case ATI_TV_STD_PALCN:
|
||||
case ATI_TV_STD_PALN:
|
||||
case ATI_TV_STD_SCARTPAL:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"Current TV standard: %s\n", ATITVStandardNames[tv_std]);
|
||||
break;
|
||||
default:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Unrecognized TV standard return code cx=0x%04x\n",
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Unrecognized TV standard return code cx=0x%04x\n",
|
||||
pVbe->pInt10->cx);
|
||||
}
|
||||
|
||||
tv_std_request = pATI->OptionTvStd;
|
||||
if (tv_std_request < 0 ||
|
||||
tv_std_request > ATI_TV_STD_NONE ||
|
||||
tv_std_request == ATI_TV_STD_RESERVED1 ||
|
||||
if (tv_std_request < 0 ||
|
||||
tv_std_request > ATI_TV_STD_NONE ||
|
||||
tv_std_request == ATI_TV_STD_RESERVED1 ||
|
||||
tv_std_request == ATI_TV_STD_RESERVED2) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Invalid TV standard requested, please check configuration file\n");
|
||||
} else if (tv_std_request != ATI_TV_STD_NONE) {
|
||||
/* Set TV standard if requested (LT Pro not supported) */
|
||||
if (pATI->Chip != ATI_CHIP_264LTPRO &&
|
||||
tv_std_request != tv_std) {
|
||||
|
||||
|
||||
pVbe->pInt10->num = 0x10;
|
||||
pVbe->pInt10->ax = 0xa070;
|
||||
pVbe->pInt10->bx = 0x0003; /* sub-function: set TV standard */
|
||||
pVbe->pInt10->cx = tv_std_request;
|
||||
xf86ExecX86int10(pVbe->pInt10);
|
||||
if (pVbe->pInt10->ax & 0xff00)
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Failed to set TV standard\n");
|
||||
else
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_CONFIG,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_CONFIG,
|
||||
"Set TV standard to %s\n", ATITVStandardNames[tv_std_request]);
|
||||
} else {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING,
|
||||
"Setting TV standard not supported on ATI Rage LT Pro\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "VBE module not loaded\n");
|
||||
@@ -535,7 +535,7 @@ ATIEnterGraphics
|
||||
|
||||
if (pATI->pVBE) {
|
||||
if (VBEGetVBEMode(pATI->pVBE, &pATI->vbemode)) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Saving VESA mode: 0x%x\n",
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Saving VESA mode: 0x%x\n",
|
||||
pATI->vbemode);
|
||||
}
|
||||
}
|
||||
@@ -546,7 +546,7 @@ ATIEnterGraphics
|
||||
ATIModeSave(pScreenInfo, pATI, &pATI->OldHW);
|
||||
|
||||
#ifdef TV_OUT
|
||||
if (pATI->OptionTvOut)
|
||||
if (pATI->OptionTvOut)
|
||||
ATIProbeAndSetActiveDisplays(pScreenInfo, pATI);
|
||||
#endif /* TV_OUT */
|
||||
|
||||
@@ -585,7 +585,7 @@ ATILeaveGraphics
|
||||
ATIModeSave(pScreenInfo, pATI, &pATI->NewHW);
|
||||
|
||||
#ifdef TV_OUT
|
||||
if (pATI->OptionTvOut)
|
||||
if (pATI->OptionTvOut)
|
||||
ATIProbeAndSetActiveDisplays(pScreenInfo, pATI);
|
||||
#endif /* TV_OUT */
|
||||
|
||||
@@ -637,7 +637,7 @@ ATISwitchMode(SWITCH_MODE_ARGS_DECL)
|
||||
|
||||
#ifdef XF86DRI_DEVEL
|
||||
|
||||
if (pATI->directRenderingEnabled)
|
||||
if (pATI->directRenderingEnabled)
|
||||
{
|
||||
DRILock(pScreenInfo->pScreen,0);
|
||||
ATIDRIWaitForIdle(pATI);
|
||||
@@ -655,7 +655,7 @@ ATISwitchMode(SWITCH_MODE_ARGS_DECL)
|
||||
|
||||
#ifdef XF86DRI_DEVEL
|
||||
|
||||
if (pATI->directRenderingEnabled)
|
||||
if (pATI->directRenderingEnabled)
|
||||
{
|
||||
DRIUnlock(pScreenInfo->pScreen);
|
||||
}
|
||||
@@ -691,7 +691,7 @@ ATIEnterVT(ScrnInfoPtr pScreenInfo)
|
||||
|
||||
#ifdef XF86DRI_DEVEL
|
||||
|
||||
if (pATI->directRenderingEnabled)
|
||||
if (pATI->directRenderingEnabled)
|
||||
{
|
||||
/* get the Mach64 back into shape after resume */
|
||||
ATIDRIResume(pScreen);
|
||||
@@ -711,7 +711,7 @@ ATIEnterVT(ScrnInfoPtr pScreenInfo)
|
||||
|
||||
#ifdef XF86DRI_DEVEL
|
||||
|
||||
if (pATI->directRenderingEnabled)
|
||||
if (pATI->directRenderingEnabled)
|
||||
{
|
||||
/* get the Mach64 back into shape after resume */
|
||||
ATIDRIResume(pScreen);
|
||||
@@ -737,7 +737,7 @@ ATILeaveVT(ScrnInfoPtr pScreenInfo)
|
||||
|
||||
#ifdef XF86DRI_DEVEL
|
||||
|
||||
if (pATI->directRenderingEnabled)
|
||||
if (pATI->directRenderingEnabled)
|
||||
{
|
||||
DRILock(pScreen,0);
|
||||
ATIDRIWaitForIdle(pATI);
|
||||
|
||||
30
src/atidri.c
30
src/atidri.c
@@ -77,7 +77,7 @@ static void ATIDestroyContext( ScreenPtr pScreen, drm_context_t hwContext,
|
||||
|
||||
/* Called when the X server is woken up to allow the last client's
|
||||
* context to be saved and the X server's context to be loaded.
|
||||
* The client detects when it's context is not currently loaded and
|
||||
* The client detects when it's context is not currently loaded and
|
||||
* then loads it itself. The X server's context is loaded in the
|
||||
* XAA Sync callback if NeedDRISync is set.
|
||||
*/
|
||||
@@ -86,7 +86,7 @@ static void ATIEnterServer( ScreenPtr pScreen )
|
||||
ScrnInfoPtr pScreenInfo = xf86ScreenToScrn(pScreen);
|
||||
ATIPtr pATI = ATIPTR(pScreenInfo);
|
||||
|
||||
if ( pATI->directRenderingEnabled ) {
|
||||
if ( pATI->directRenderingEnabled ) {
|
||||
ATIDRIMarkSyncInt(pScreenInfo);
|
||||
ATIDRIMarkSyncExt(pScreenInfo);
|
||||
}
|
||||
@@ -94,7 +94,7 @@ static void ATIEnterServer( ScreenPtr pScreen )
|
||||
|
||||
/* Called when the X server goes to sleep to allow the X server's
|
||||
* context to be saved and the last client's context to be loaded.
|
||||
* The client detects when it's context is not currently loaded and
|
||||
* The client detects when it's context is not currently loaded and
|
||||
* then loads it itself. The X server keeps track of it's own state.
|
||||
*/
|
||||
static void ATILeaveServer( ScreenPtr pScreen )
|
||||
@@ -166,9 +166,9 @@ static void ATIDRIInitBuffers( WindowPtr pWin, RegionPtr prgn, CARD32 indx )
|
||||
}
|
||||
|
||||
/* Copy the back and depth buffers when the X server moves a window.
|
||||
*
|
||||
*
|
||||
* Note: this function was copied from the Radeon driver...
|
||||
*
|
||||
*
|
||||
* This routine is a modified form of XAADoBitBlt with the calls to
|
||||
* ScreenToScreenBitBlt built in. My routine has the prgnSrc as source
|
||||
* instead of destination. My origin is upside down so the ydir cases
|
||||
@@ -231,10 +231,10 @@ static Bool ATIDRISetAgpMode( ScreenPtr pScreen )
|
||||
|
||||
if (pATI->OptionAGPMode > 0 && pATI->OptionAGPMode <= ATI_AGP_MAX_MODE) {
|
||||
pATIDRIServer->agpMode = pATI->OptionAGPMode;
|
||||
xf86DrvMsg( pScreen->myNum, X_CONFIG, "[agp] Using AGP %dx Mode\n",
|
||||
xf86DrvMsg( pScreen->myNum, X_CONFIG, "[agp] Using AGP %dx Mode\n",
|
||||
pATIDRIServer->agpMode );
|
||||
} else if (pATI->OptionAGPMode > 0) {
|
||||
xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Illegal AGP Mode: %d\n",
|
||||
xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] Illegal AGP Mode: %d\n",
|
||||
pATI->OptionAGPMode );
|
||||
return FALSE;
|
||||
} else {
|
||||
@@ -244,7 +244,7 @@ static Bool ATIDRISetAgpMode( ScreenPtr pScreen )
|
||||
} else if ( mode & AGP_MODE_1X ) {
|
||||
pATIDRIServer->agpMode = 1;
|
||||
}
|
||||
xf86DrvMsg( pScreen->myNum, X_DEFAULT, "[agp] Using AGP %dx Mode\n",
|
||||
xf86DrvMsg( pScreen->myNum, X_DEFAULT, "[agp] Using AGP %dx Mode\n",
|
||||
pATIDRIServer->agpMode );
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ static Bool ATIDRISetAgpMode( ScreenPtr pScreen )
|
||||
case 8:
|
||||
case 4:
|
||||
pATIDRIServer->agpSize = pATI->OptionAGPSize;
|
||||
xf86DrvMsg( pScreen->myNum, X_CONFIG, "[agp] Using %d MB AGP aperture\n",
|
||||
xf86DrvMsg( pScreen->myNum, X_CONFIG, "[agp] Using %d MB AGP aperture\n",
|
||||
pATIDRIServer->agpSize );
|
||||
break;
|
||||
default:
|
||||
@@ -272,7 +272,7 @@ static Bool ATIDRISetAgpMode( ScreenPtr pScreen )
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
xf86DrvMsg( pScreen->myNum, X_DEFAULT, "[agp] Using %d MB AGP aperture\n",
|
||||
xf86DrvMsg( pScreen->myNum, X_DEFAULT, "[agp] Using %d MB AGP aperture\n",
|
||||
pATIDRIServer->agpSize );
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ static Bool ATIDRIAgpInit( ScreenPtr pScreen )
|
||||
/* Reserve space for the vertex buffer */
|
||||
pATIDRIServer->bufferStart = pATIDRIServer->ringStart + pATIDRIServer->ringMapSize;
|
||||
pATIDRIServer->bufferMapSize = pATIDRIServer->bufferSize*1024*1024;
|
||||
|
||||
|
||||
/* Reserve the rest for AGP textures */
|
||||
pATIDRIServer->agpTexStart = pATIDRIServer->bufferStart + pATIDRIServer->bufferMapSize;
|
||||
s = (pATIDRIServer->agpSize*1024*1024 - pATIDRIServer->agpTexStart);
|
||||
@@ -569,7 +569,7 @@ static Bool ATIDRIKernelInit( ScreenPtr pScreen )
|
||||
info.buffers_offset = pATIDRIServer->bufferHandle;
|
||||
info.agp_textures_offset = pATIDRIServer->agpTexHandle;
|
||||
|
||||
if ( drmCommandWrite( pATI->drmFD, DRM_MACH64_INIT,
|
||||
if ( drmCommandWrite( pATI->drmFD, DRM_MACH64_INIT,
|
||||
&info, sizeof(drmMach64Init) ) < 0 ) {
|
||||
return FALSE;
|
||||
} else {
|
||||
@@ -832,7 +832,7 @@ Bool ATIDRIScreenInit( ScreenPtr pScreen )
|
||||
"[dri] DRIScreenInit Failed\n" );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Check the DRM lib version.
|
||||
drmGetLibVersion was not supported in version 1.0, so check for
|
||||
symbol first to avoid possible crash or hang.
|
||||
@@ -968,9 +968,9 @@ Bool ATIDRIFinishScreenInit( ScreenPtr pScreen )
|
||||
|
||||
/* Initialize the kernel data structures */
|
||||
if ( !ATIDRIKernelInit( pScreen ) ) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
|
||||
"[drm] Failed to initialize the mach64.o kernel module\n");
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_ERROR,
|
||||
"[drm] Check the system log for more information.\n");
|
||||
ATIDRICloseScreen( pScreen );
|
||||
return FALSE;
|
||||
|
||||
@@ -82,7 +82,7 @@ ATIUnlock
|
||||
#ifdef XF86DRI_DEVEL
|
||||
|
||||
if (pATI->irq > 0)
|
||||
outr(CRTC_INT_CNTL, (inr(CRTC_INT_CNTL) & ~CRTC_INT_ACKS) |
|
||||
outr(CRTC_INT_CNTL, (inr(CRTC_INT_CNTL) & ~CRTC_INT_ACKS) |
|
||||
CRTC_VBLANK_INT_EN); /* Enable VBLANK interrupt - handled by DRM */
|
||||
|
||||
#endif /* XF86DRI_DEVEL */
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/*
|
||||
/*
|
||||
* DRI support by:
|
||||
* Manuel Teira
|
||||
* Leif Delgass <ldelgass@retinalburn.net>
|
||||
@@ -225,7 +225,7 @@ ATIMach64PreInit
|
||||
|
||||
#ifdef XF86DRI_DEVEL
|
||||
|
||||
/* Changing the FIFO depth seems to interfere with DMA, so use
|
||||
/* Changing the FIFO depth seems to interfere with DMA, so use
|
||||
* default of 128 entries (0x01)
|
||||
*/
|
||||
pATIHW->gui_cntl = (inm(GUI_CNTL) & ~CMDFIFO_SIZE_MODE) | 0x01;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/*
|
||||
/*
|
||||
* DRI support by:
|
||||
* Manuel Teira
|
||||
* Leif Delgass <ldelgass@retinalburn.net>
|
||||
@@ -174,7 +174,7 @@ ATIMach64Sync
|
||||
|
||||
outr( BUS_CNTL, pATIHW->bus_cntl );
|
||||
|
||||
/* DRI uses GUI_TRAJ_CNTL, which is a composite of
|
||||
/* DRI uses GUI_TRAJ_CNTL, which is a composite of
|
||||
* src_cntl, dst_cntl, pat_cntl, and host_cntl
|
||||
*/
|
||||
outf( SRC_CNTL, pATIHW->src_cntl );
|
||||
@@ -227,7 +227,7 @@ ATIMach64Sync
|
||||
ATIMach64WaitForIdle(pATI);
|
||||
|
||||
if (pATI->OptionMMIOCache && pATI->OptionTestMMIOCache) {
|
||||
|
||||
|
||||
/* Only check registers we didn't restore */
|
||||
TestRegisterCaching(PAT_REG0);
|
||||
TestRegisterCaching(PAT_REG1);
|
||||
@@ -245,7 +245,7 @@ ATIMach64Sync
|
||||
#endif /* XF86DRI_DEVEL */
|
||||
{
|
||||
ATIMach64WaitForIdle(pATI);
|
||||
|
||||
|
||||
if (pATI->OptionMMIOCache && pATI->OptionTestMMIOCache)
|
||||
{
|
||||
/*
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
/*
|
||||
/*
|
||||
* DRI support by:
|
||||
* Manuel Teira
|
||||
* Leif Delgass <ldelgass@retinalburn.net>
|
||||
@@ -214,8 +214,8 @@ Mach64PrepareCopy
|
||||
outf(DP_WRITE_MASK, planemask);
|
||||
outf(DP_PIX_WIDTH, dp_pix_width);
|
||||
outf(SRC_OFF_PITCH, src_pitch_offset);
|
||||
outf(DST_OFF_PITCH, dst_pitch_offset);
|
||||
|
||||
outf(DST_OFF_PITCH, dst_pitch_offset);
|
||||
|
||||
outf(DP_SRC, DP_MONO_SRC_ALLONES |
|
||||
SetBits(SRC_BLIT, DP_FRGD_SRC) | SetBits(SRC_BKGD, DP_BKGD_SRC));
|
||||
outf(DP_MIX, SetBits(ATIMach64ALU[alu], DP_FRGD_MIX));
|
||||
@@ -304,8 +304,8 @@ static Bool
|
||||
Mach64PrepareSolid
|
||||
(
|
||||
PixmapPtr pPixmap,
|
||||
int alu,
|
||||
Pixel planemask,
|
||||
int alu,
|
||||
Pixel planemask,
|
||||
Pixel fg
|
||||
)
|
||||
{
|
||||
@@ -323,7 +323,7 @@ Mach64PrepareSolid
|
||||
ATIMach64WaitForFIFO(pATI, 7);
|
||||
outf(DP_WRITE_MASK, planemask);
|
||||
outf(DP_PIX_WIDTH, dp_pix_width);
|
||||
outf(DST_OFF_PITCH, dst_pitch_offset);
|
||||
outf(DST_OFF_PITCH, dst_pitch_offset);
|
||||
|
||||
outf(DP_SRC, DP_MONO_SRC_ALLONES |
|
||||
SetBits(SRC_FRGD, DP_FRGD_SRC) | SetBits(SRC_BKGD, DP_BKGD_SRC));
|
||||
@@ -341,10 +341,10 @@ Mach64PrepareSolid
|
||||
static void
|
||||
Mach64Solid
|
||||
(
|
||||
PixmapPtr pPixmap,
|
||||
int x1,
|
||||
int y1,
|
||||
int x2,
|
||||
PixmapPtr pPixmap,
|
||||
int x1,
|
||||
int y1,
|
||||
int x2,
|
||||
int y2
|
||||
)
|
||||
{
|
||||
|
||||
@@ -207,7 +207,7 @@ extern void ATIMach64PollEngineStatus(ATIPtr);
|
||||
ATIMach64PollEngineStatus(_pATI)
|
||||
|
||||
#ifdef XF86DRI_DEVEL
|
||||
|
||||
|
||||
/*
|
||||
* DRI Sync and Lock definitions.
|
||||
*/
|
||||
@@ -279,7 +279,7 @@ do \
|
||||
ATIDRIMarkSyncExt(_pScrInfo); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define ATIDRIUnlock(_pScrInfo) \
|
||||
do \
|
||||
{ \
|
||||
@@ -292,12 +292,12 @@ do \
|
||||
|
||||
#else /* XF86DRI_DEVEL */
|
||||
|
||||
|
||||
|
||||
#define ATIDRIWaitForIdle(_pATI)
|
||||
#define ATIDRILock(_pScrInfo)
|
||||
#define ATIDRIUnlock(_pScrInfo)
|
||||
#define ATIDRISync(_pScrInfo)
|
||||
|
||||
|
||||
#endif /* XF86DRI_DEVEL */
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
*
|
||||
* A texture unit combines the fragment color (VERTEX_?_ARGB) coming in from
|
||||
* triangle rasterization with the texel from the texture according to the
|
||||
* texture environment (TEX_LIGHT_FCN_). "1x1 R" textures may come in as
|
||||
* texture environment (TEX_LIGHT_FCN_). "1x1 R" textures may come in as
|
||||
* fragment colors, eliminating the need for multitexturing in all interesting
|
||||
* cases (via also uses this optimization).
|
||||
*
|
||||
|
||||
@@ -730,7 +730,7 @@ ATISetVBEMode
|
||||
int vbemode, modekey;
|
||||
|
||||
/* Find a suitable VESA VBE mode, if one exists */
|
||||
modekey = (pScreenInfo->depth << 16) |
|
||||
modekey = (pScreenInfo->depth << 16) |
|
||||
(pScreenInfo->currentMode->HDisplay);
|
||||
|
||||
switch (modekey) {
|
||||
@@ -768,8 +768,8 @@ ATISetVBEMode
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"Mode not supported for TV-Out: depth: %d HDisplay: %d\n",
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"Mode not supported for TV-Out: depth: %d HDisplay: %d\n",
|
||||
modekey>>16, modekey & 0xffff);
|
||||
return;
|
||||
}
|
||||
@@ -780,10 +780,10 @@ ATISetVBEMode
|
||||
vbemode |= (1<<15);
|
||||
|
||||
if (VBESetVBEMode(pATI->pVBE, vbemode, NULL)) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO,
|
||||
"VBESetMode: 0x%X (width: %d, pitch: %d, depth: %d)\n",
|
||||
vbemode,
|
||||
pScreenInfo->currentMode->HDisplay,
|
||||
vbemode,
|
||||
pScreenInfo->currentMode->HDisplay,
|
||||
pScreenInfo->displayWidth,
|
||||
pScreenInfo->depth);
|
||||
outr(CRTC_OFF_PITCH,
|
||||
@@ -798,7 +798,7 @@ ATISetVBEMode
|
||||
/* restore text mode with VBESetMode */
|
||||
if (pATI->pVBE) {
|
||||
if (VBESetVBEMode(pATI->pVBE, pATI->vbemode, NULL)) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Restoring VESA mode: 0x%x\n",
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_INFO, "Restoring VESA mode: 0x%x\n",
|
||||
pATI->vbemode);
|
||||
} else {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_WARNING, "VBESetMode failed.\n");
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
enum region_type {
|
||||
REGION_MEM,
|
||||
REGION_IO
|
||||
REGION_IO
|
||||
};
|
||||
|
||||
#ifndef XSERVER_LIBPCIACCESS
|
||||
|
||||
@@ -100,7 +100,7 @@ ATIRefreshArea
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* ATIScreenInit --
|
||||
*
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "sarea.h"
|
||||
#include "xf86drm.h"
|
||||
#include "dri.h"
|
||||
|
||||
|
||||
#endif /* XF86DRI_DEVEL */
|
||||
|
||||
#ifdef TV_OUT
|
||||
@@ -480,7 +480,7 @@ typedef struct _ATIRec
|
||||
ATIDRIServerInfoPtr pDRIServerInfo;
|
||||
Bool NeedDRISync;
|
||||
Bool have3DWindows;
|
||||
|
||||
|
||||
/* offscreen memory management */
|
||||
CARD8 OptionIsPCI; /* Force PCI mode */
|
||||
CARD8 OptionDMAMode; /* async, sync, mmio */
|
||||
|
||||
Reference in New Issue
Block a user