mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 05:50:12 +01:00
- Merge trunk into ati branch
- Fix texture allocation to use both AGP and local textures (still need to
fix LRU algorithm to choose from both local and AGP heaps for texture
swapping)
This commit is contained in:
parent
b093c88f38
commit
3f84bbb3c1
4 changed files with 19 additions and 5 deletions
|
|
@ -218,6 +218,20 @@ static int drmOpenByName(const char *name)
|
|||
group = xf86ConfigDRI.group ? xf86ConfigDRI.group : DRM_DEV_GID;
|
||||
#endif
|
||||
|
||||
#if defined(XFree86Server)
|
||||
if (!drmAvailable()) {
|
||||
/* try to load the kernel module now */
|
||||
if (!xf86LoadKernelModule(name)) {
|
||||
ErrorF("[drm] failed to load kernel module \"%s\"\n",
|
||||
name);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (!drmAvailable())
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
if (!geteuid()) {
|
||||
dirmode = mode;
|
||||
if (dirmode & S_IRUSR) dirmode |= S_IXUSR;
|
||||
|
|
@ -773,13 +787,13 @@ int drmAgpAlloc(int fd, unsigned long size, unsigned long type,
|
|||
unsigned long *address, unsigned long *handle)
|
||||
{
|
||||
drm_agp_buffer_t b;
|
||||
*handle = 0;
|
||||
*handle = 0;
|
||||
b.size = size;
|
||||
b.handle = 0;
|
||||
b.type = type;
|
||||
if (ioctl(fd, DRM_IOCTL_AGP_ALLOC, &b)) return -errno;
|
||||
if (address != 0UL) *address = b.physical;
|
||||
*handle = b.handle;
|
||||
*handle = b.handle;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ typedef struct drm_clip_rect {
|
|||
unsigned short y2;
|
||||
} drm_clip_rect_t;
|
||||
|
||||
/* Seperate include files for the i810/mga specific structures */
|
||||
/* Seperate include files for the i810/mga/r128 specific structures */
|
||||
#include "mga_drm.h"
|
||||
#include "i810_drm.h"
|
||||
#include "r128_drm.h"
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ typedef struct drm_clip_rect {
|
|||
unsigned short y2;
|
||||
} drm_clip_rect_t;
|
||||
|
||||
/* Seperate include files for the i810/mga specific structures */
|
||||
/* Seperate include files for the i810/mga/r128 specific structures */
|
||||
#include "mga_drm.h"
|
||||
#include "i810_drm.h"
|
||||
#include "r128_drm.h"
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ typedef struct drm_clip_rect {
|
|||
unsigned short y2;
|
||||
} drm_clip_rect_t;
|
||||
|
||||
/* Seperate include files for the i810/mga specific structures */
|
||||
/* Seperate include files for the i810/mga/r128 specific structures */
|
||||
#include "mga_drm.h"
|
||||
#include "i810_drm.h"
|
||||
#include "r128_drm.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue