--- /dev/null
+#ifndef DRIMEMSETIO_H
+#define DRIMEMSETIO_H
+/*
+* memset an area in I/O space
+* We need to be careful about this on some archs
+*/
+static __inline__ void drimemsetio(void* address, int c, int size)
+{
+#if defined(__powerpc__) || defined(__ia64__)
+ int i;
+ for(i=0;i<size;i++)
+ *((char *)address + i)=c;
+#else
+ memset(address,c,size);
+#endif
+}
+#endif
#include "driver.h"
#include "drm.h"
+#include "memops.h"
#include "mga_reg.h"
#include "mga.h"
* the clear ioctl to do this, but would need to setup hw state
* first.
*/
- memset((char *)ctx->FBAddress + pMga->frontOffset,
+ drimemsetio((char *)ctx->FBAddress + pMga->frontOffset,
0,
pMga->frontPitch * ctx->shared.virtualHeight );
- memset((char *)ctx->FBAddress + pMga->backOffset,
+ drimemsetio((char *)ctx->FBAddress + pMga->backOffset,
0,
pMga->backPitch * ctx->shared.virtualHeight );
#include "driver.h"
#include "drm.h"
+#include "memops.h"
#include "r128.h"
#include "r128_dri.h"
* the clear ioctl to do this, but would need to setup hw state
* first.
*/
- memset((char *)ctx->FBAddress + info->frontOffset,
+ drimemsetio((char *)ctx->FBAddress + info->frontOffset,
0,
info->frontPitch * ctx->cpp * ctx->shared.virtualHeight );
- memset((char *)ctx->FBAddress + info->backOffset,
+ drimemsetio((char *)ctx->FBAddress + info->backOffset,
0,
info->backPitch * ctx->cpp * ctx->shared.virtualHeight );
#include "driver.h"
#include "drm.h"
+#include "memops.h"
#include "radeon.h"
#include "radeon_dri.h"
* the clear ioctl to do this, but would need to setup hw state
* first.
*/
- memset((char *)ctx->FBAddress + info->frontOffset,
+ drimemsetio((char *)ctx->FBAddress + info->frontOffset,
0,
info->frontPitch * ctx->cpp * ctx->shared.virtualHeight );
- memset((char *)ctx->FBAddress + info->backOffset,
+ drimemsetio((char *)ctx->FBAddress + info->backOffset,
0,
info->backPitch * ctx->cpp * ctx->shared.virtualHeight );