Lines 54-68
Link Here
|
54 |
#include "GL/glxtokens.h" |
54 |
#include "GL/glxtokens.h" |
55 |
#include "sarea.h" |
55 |
#include "sarea.h" |
56 |
|
56 |
|
57 |
/* ?? HACK - for now, put this here... */ |
57 |
static size_t r128_drm_page_size; |
58 |
/* ?? Alpha - this may need to be a variable to handle UP1x00 vs TITAN */ |
|
|
59 |
#if defined(__alpha__) |
60 |
# define DRM_PAGE_SIZE 8192 |
61 |
#elif defined(__ia64__) |
62 |
# define DRM_PAGE_SIZE getpagesize() |
63 |
#else |
64 |
# define DRM_PAGE_SIZE 4096 |
65 |
#endif |
66 |
|
58 |
|
67 |
/* Initialize the visual configs that are supported by the hardware. |
59 |
/* Initialize the visual configs that are supported by the hardware. |
68 |
These are combined with the visual configs that the indirect |
60 |
These are combined with the visual configs that the indirect |
Lines 489-499
Link Here
|
489 |
|
481 |
|
490 |
/* Initialize the CCE ring buffer data */ |
482 |
/* Initialize the CCE ring buffer data */ |
491 |
info->ringStart = info->agpOffset; |
483 |
info->ringStart = info->agpOffset; |
492 |
info->ringMapSize = info->ringSize*1024*1024 + DRM_PAGE_SIZE; |
484 |
info->ringMapSize = info->ringSize*1024*1024 + r128_drm_page_size; |
493 |
info->ringSizeLog2QW = R128MinBits(info->ringSize*1024*1024/8) - 1; |
485 |
info->ringSizeLog2QW = R128MinBits(info->ringSize*1024*1024/8) - 1; |
494 |
|
486 |
|
495 |
info->ringReadOffset = info->ringStart + info->ringMapSize; |
487 |
info->ringReadOffset = info->ringStart + info->ringMapSize; |
496 |
info->ringReadMapSize = DRM_PAGE_SIZE; |
488 |
info->ringReadMapSize = r128_drm_page_size; |
497 |
|
489 |
|
498 |
/* Reserve space for vertex/indirect buffers */ |
490 |
/* Reserve space for vertex/indirect buffers */ |
499 |
info->bufStart = info->ringReadOffset + info->ringReadMapSize; |
491 |
info->bufStart = info->ringReadOffset + info->ringReadMapSize; |
Lines 642-652
Link Here
|
642 |
|
634 |
|
643 |
/* Initialize the CCE ring buffer data */ |
635 |
/* Initialize the CCE ring buffer data */ |
644 |
info->ringStart = info->agpOffset; |
636 |
info->ringStart = info->agpOffset; |
645 |
info->ringMapSize = info->ringSize*1024*1024 + DRM_PAGE_SIZE; |
637 |
info->ringMapSize = info->ringSize*1024*1024 + r128_drm_page_size; |
646 |
info->ringSizeLog2QW = R128MinBits(info->ringSize*1024*1024/8) - 1; |
638 |
info->ringSizeLog2QW = R128MinBits(info->ringSize*1024*1024/8) - 1; |
647 |
|
639 |
|
648 |
info->ringReadOffset = info->ringStart + info->ringMapSize; |
640 |
info->ringReadOffset = info->ringStart + info->ringMapSize; |
649 |
info->ringReadMapSize = DRM_PAGE_SIZE; |
641 |
info->ringReadMapSize = r128_drm_page_size; |
650 |
|
642 |
|
651 |
/* Reserve space for vertex/indirect buffers */ |
643 |
/* Reserve space for vertex/indirect buffers */ |
652 |
info->bufStart = info->ringReadOffset + info->ringReadMapSize; |
644 |
info->bufStart = info->ringReadOffset + info->ringReadMapSize; |
Lines 1003-1008
Link Here
|
1003 |
break; |
995 |
break; |
1004 |
} |
996 |
} |
1005 |
|
997 |
|
|
|
998 |
r128_drm_page_size = getpagesize(); |
999 |
|
1006 |
/* Create the DRI data structure, and fill it in before calling the |
1000 |
/* Create the DRI data structure, and fill it in before calling the |
1007 |
DRIScreenInit(). */ |
1001 |
DRIScreenInit(). */ |
1008 |
if (!(pDRIInfo = DRICreateInfoRec())) return FALSE; |
1002 |
if (!(pDRIInfo = DRICreateInfoRec())) return FALSE; |