Reset the CCE/CP on engine reset, and make the ATIDRIDMA functions take a
more useful argument.
This commit is contained in:
parent
fcd52d276f
commit
27b5a65f05
|
@ -371,10 +371,13 @@ void
|
|||
ATIDRICloseScreen(ScreenPtr pScreen);
|
||||
|
||||
void
|
||||
ATIDRIDMAStart(ScreenPtr pScreen);
|
||||
ATIDRIDMAStart(ATIScreenInfo *atis);
|
||||
|
||||
void
|
||||
ATIDRIDMAStop(ScreenPtr pScreen);
|
||||
ATIDRIDMAStop(ATIScreenInfo *atis);
|
||||
|
||||
void
|
||||
ATIDRIDMAReset(ATIScreenInfo *atis);
|
||||
|
||||
void
|
||||
ATIDRIDispatchIndirect(ATIScreenInfo *atis, Bool discard);
|
||||
|
|
|
@ -222,6 +222,12 @@ ATIEngineReset(ATIScreenInfo *atis)
|
|||
OUTPLL(mmio, R128_REG_MCLK_CNTL, mclkcntl);
|
||||
MMIO_OUT32(mmio, ATI_REG_CLOCK_CNTL_INDEX, clockcntlindex);
|
||||
}
|
||||
#ifdef USE_DRI
|
||||
if (atis->using_dri) {
|
||||
ATIDRIDMAReset(atis);
|
||||
ATIDRIDMAStart(atis);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -937,7 +943,7 @@ ATIDMASetup(ScreenPtr pScreen)
|
|||
|
||||
#ifdef USE_DRI
|
||||
if (atis->using_dri)
|
||||
ATIDRIDMAStart(pScreen);
|
||||
ATIDRIDMAStart(atis);
|
||||
#endif /* USE_DRI */
|
||||
|
||||
if (!atis->using_dri) {
|
||||
|
@ -981,7 +987,7 @@ ATIDMATeardown(ScreenPtr pScreen)
|
|||
|
||||
#ifdef USE_DRI
|
||||
if (atis->using_dri)
|
||||
ATIDRIDMAStop(pScreen);
|
||||
ATIDRIDMAStop(atis);
|
||||
#endif /* USE_DRI */
|
||||
|
||||
if (atis->using_dma)
|
||||
|
|
|
@ -1033,11 +1033,9 @@ ATIDRICloseScreen(ScreenPtr pScreen)
|
|||
}
|
||||
|
||||
void
|
||||
ATIDRIDMAStart(ScreenPtr pScreen)
|
||||
ATIDRIDMAStart(ATIScreenInfo *atis)
|
||||
{
|
||||
KdScreenPriv(pScreen);
|
||||
ATICardInfo(pScreenPriv);
|
||||
ATIScreenInfo(pScreenPriv);
|
||||
ATICardInfo *atic = atis->atic;
|
||||
int ret;
|
||||
|
||||
if (atic->is_radeon)
|
||||
|
@ -1055,11 +1053,9 @@ ATIDRIDMAStart(ScreenPtr pScreen)
|
|||
* same for both R128 and Radeon, so we can just use the name of one of them.
|
||||
*/
|
||||
void
|
||||
ATIDRIDMAStop(ScreenPtr pScreen)
|
||||
ATIDRIDMAStop(ATIScreenInfo *atis)
|
||||
{
|
||||
KdScreenPriv(pScreen);
|
||||
ATICardInfo(pScreenPriv);
|
||||
ATIScreenInfo(pScreenPriv);
|
||||
ATICardInfo *atic = atis->atic;
|
||||
drmRadeonCPStop stop;
|
||||
int ret;
|
||||
|
||||
|
@ -1078,6 +1074,21 @@ ATIDRIDMAStop(ScreenPtr pScreen)
|
|||
atis->dma_started = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
ATIDRIDMAReset(ATIScreenInfo *atis)
|
||||
{
|
||||
ATICardInfo *atic = atis->atic;
|
||||
int ret;
|
||||
|
||||
ret = drmCommandNone(atic->drmFd, atic->is_radeon ?
|
||||
DRM_RADEON_CP_RESET : DRM_R128_CCE_RESET);
|
||||
|
||||
if (ret != 0)
|
||||
FatalError("Failed to reset CCE/CP\n");
|
||||
|
||||
atis->dma_started = FALSE;
|
||||
}
|
||||
|
||||
/* The R128 and Radeon Indirect ioctls differ only in the ioctl number */
|
||||
void
|
||||
ATIDRIDispatchIndirect(ATIScreenInfo *atis, Bool discard)
|
||||
|
|
Loading…
Reference in New Issue
Block a user