mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-07 21:38:05 +02:00
Merged trunk into branch.
This commit is contained in:
parent
edfdc14215
commit
95c7f54a07
12 changed files with 39 additions and 26 deletions
|
|
@ -1,4 +1,4 @@
|
|||
XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile,v 1.2 2000/08/16 01:45:31 dawes Exp $
|
||||
XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile,v 1.3 2000/10/27 16:59:40 dawes Exp $
|
||||
|
||||
#include <Server.tmpl>
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ LinkSourceFile(drm.h,$(XF86OSSRC)/linux/drm/kernel)
|
|||
LinkSourceFile(i810_drm.h,$(XF86OSSRC)/linux/drm/kernel)
|
||||
LinkSourceFile(mga_drm.h,$(XF86OSSRC)/linux/drm/kernel)
|
||||
LinkSourceFile(r128_drm.h,$(XF86OSSRC)/linux/drm/kernel)
|
||||
LinkSourceFile(sis_drm_public.h,$(XF86OSSRC)/linux/drm/kernel)
|
||||
LinkSourceFile(sis_drm.h,$(XF86OSSRC)/linux/drm/kernel)
|
||||
|
||||
|
||||
XCOMM This is a kludge until we determine how best to build the
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
* Authors: Rickard E. (Rik) Faith <faith@valinux.com>
|
||||
* Kevin E. Martin <martin@valinux.com>
|
||||
*
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.16 2000/08/28 16:55:52 dawes Exp $
|
||||
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.17 2000/09/24 13:51:32 alanh Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ int mga_release(struct inode *inode, struct file *filp)
|
|||
if (dev->dev_private)
|
||||
((drm_mga_private_t *)dev->dev_private)
|
||||
->dispatch_status &= MGA_IN_DISPATCH;
|
||||
|
||||
|
||||
drm_lock_free(dev,
|
||||
&dev->lock.hw_lock->lock,
|
||||
_DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock));
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ static drm_ioctl_desc_t sis_ioctls[] = {
|
|||
[DRM_IOCTL_NR(DRM_IOCTL_UNBLOCK)] = { drm_unblock, 1, 1 },
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_AUTH_MAGIC)] = { drm_authmagic, 1, 1 },
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_ADD_MAP)] = { drm_addmap, 1, 1 },
|
||||
|
||||
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_ADD_CTX)] = { sis_addctx, 1, 1 },
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RM_CTX)] = { sis_rmctx, 1, 1 },
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MOD_CTX)] = { sis_modctx, 1, 1 },
|
||||
|
|
@ -242,7 +242,7 @@ static int sis_takedown(drm_device_t *dev)
|
|||
if (dev->agp) {
|
||||
drm_agp_mem_t *temp;
|
||||
drm_agp_mem_t *temp_next;
|
||||
|
||||
|
||||
temp = dev->agp->memory;
|
||||
while(temp != NULL) {
|
||||
temp_next = temp->next;
|
||||
|
|
@ -423,7 +423,7 @@ int sis_open(struct inode *inode, struct file *filp)
|
|||
{
|
||||
drm_device_t *dev = &sis_device;
|
||||
int retcode = 0;
|
||||
|
||||
|
||||
DRM_DEBUG("open_count = %d\n", dev->open_count);
|
||||
if (!(retcode = drm_open_helper(inode, filp, dev))) {
|
||||
#if LINUX_VERSION_CODE < 0x020333
|
||||
|
|
@ -667,7 +667,7 @@ int sis_unlock(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
|
||||
if (copy_from_user(&lock, (drm_lock_t *)arg, sizeof(lock)))
|
||||
return -EFAULT;
|
||||
|
||||
|
||||
if (lock.context == DRM_KERNEL_CONTEXT) {
|
||||
DRM_ERROR("Process %d using kernel context %d\n",
|
||||
current->pid, lock.context);
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
#
|
||||
#
|
||||
# ***** NOTE NOTE NOTE NOTE NOTE *****
|
||||
# To override the automatic Linux source tree determination, pass the
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ int drm_agp_enable(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
|
||||
if (copy_from_user(&mode, (drm_agp_mode_t *)arg, sizeof(mode)))
|
||||
return -EFAULT;
|
||||
|
||||
|
||||
dev->agp->mode = mode.mode;
|
||||
drm_agp->enable(mode.mode);
|
||||
dev->agp->base = dev->agp->agp_info.aper_base;
|
||||
|
|
@ -201,7 +201,7 @@ int drm_agp_bind(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
drm_agp_mem_t *entry;
|
||||
int retcode;
|
||||
int page;
|
||||
|
||||
|
||||
if (!dev->agp->acquired || !drm_agp->bind_memory) return -EINVAL;
|
||||
if (copy_from_user(&request, (drm_agp_binding_t *)arg, sizeof(request)))
|
||||
return -EFAULT;
|
||||
|
|
@ -271,9 +271,9 @@ drm_agp_head_t *drm_agp_init(void)
|
|||
|
||||
#if LINUX_VERSION_CODE >= 0x020400
|
||||
case VIA_MVP4: head->chipset = "VIA MVP4"; break;
|
||||
case VIA_APOLLO_KX133: head->chipset = "VIA Apollo KX133";
|
||||
case VIA_APOLLO_KX133: head->chipset = "VIA Apollo KX133";
|
||||
break;
|
||||
case VIA_APOLLO_KT133: head->chipset = "VIA Apollo KT133";
|
||||
case VIA_APOLLO_KT133: head->chipset = "VIA Apollo KT133";
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -405,6 +405,7 @@ int drm_dma_enqueue(drm_device_t *dev, drm_dma_t *d)
|
|||
schedule();
|
||||
if (signal_pending(current)) {
|
||||
atomic_dec(&q->use_count);
|
||||
remove_wait_queue(&q->write_queue, &entry);
|
||||
return -EINTR;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ int mga_release(struct inode *inode, struct file *filp)
|
|||
if (dev->dev_private)
|
||||
((drm_mga_private_t *)dev->dev_private)
|
||||
->dispatch_status &= MGA_IN_DISPATCH;
|
||||
|
||||
|
||||
drm_lock_free(dev,
|
||||
&dev->lock.hw_lock->lock,
|
||||
_DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock));
|
||||
|
|
|
|||
|
|
@ -60,7 +60,9 @@ int r128_addbufs_agp(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
|
||||
if (!dma) return -EINVAL;
|
||||
|
||||
if (copy_from_user(&request, (drm_buf_desc_t *)arg, sizeof(request)))
|
||||
if (copy_from_user(&request,
|
||||
(drm_buf_desc_t *)arg,
|
||||
sizeof(request)))
|
||||
return -EFAULT;
|
||||
|
||||
count = request.count;
|
||||
|
|
@ -171,7 +173,9 @@ int r128_addbufs_agp(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
request.count = entry->buf_count;
|
||||
request.size = size;
|
||||
|
||||
if (copy_to_user((drm_buf_desc_t *)arg, &request, sizeof(request)))
|
||||
if (copy_to_user((drm_buf_desc_t *)arg,
|
||||
&request,
|
||||
sizeof(request)))
|
||||
return -EFAULT;
|
||||
|
||||
dma->flags = _DRM_DMA_USE_AGP;
|
||||
|
|
@ -191,7 +195,9 @@ int r128_addbufs(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
|
||||
if (!dev_priv || dev_priv->is_pci) return -EINVAL;
|
||||
|
||||
if (copy_from_user(&request, (drm_buf_desc_t *)arg, sizeof(request)))
|
||||
if (copy_from_user(&request,
|
||||
(drm_buf_desc_t *)arg,
|
||||
sizeof(request)))
|
||||
return -EFAULT;
|
||||
|
||||
#if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE)
|
||||
|
|
@ -228,7 +234,9 @@ int r128_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
++dev->buf_use; /* Can't allocate more after this call */
|
||||
spin_unlock(&dev->count_lock);
|
||||
|
||||
if (copy_from_user(&request, (drm_buf_map_t *)arg, sizeof(request)))
|
||||
if (copy_from_user(&request,
|
||||
(drm_buf_map_t *)arg,
|
||||
sizeof(request)))
|
||||
return -EFAULT;
|
||||
|
||||
if (request.count >= dma->buf_count) {
|
||||
|
|
@ -292,7 +300,9 @@ int r128_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
request.count = dma->buf_count;
|
||||
DRM_DEBUG("%d buffers, retcode = %d\n", request.count, retcode);
|
||||
|
||||
if (copy_to_user((drm_buf_map_t *)arg, &request, sizeof(request)))
|
||||
if (copy_to_user((drm_buf_map_t *)arg,
|
||||
&request,
|
||||
sizeof(request)))
|
||||
return -EFAULT;
|
||||
|
||||
return retcode;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,9 @@ int r128_resctx(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
memset(&ctx, 0, sizeof(ctx));
|
||||
for (i = 0; i < DRM_RESERVED_CONTEXTS; i++) {
|
||||
ctx.handle = i;
|
||||
if (copy_to_user(&res.contexts[i], &i, sizeof(i)))
|
||||
if (copy_to_user(&res.contexts[i],
|
||||
&i,
|
||||
sizeof(i)))
|
||||
return -EFAULT;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
* Rickard E. (Rik) Faith <faith@valinux.com>
|
||||
* Daryll Strauss <daryll@valinux.com>
|
||||
* Sung-Ching Lin <sclin@sis.com.tw>
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#define __NO_VERSION__
|
||||
|
|
@ -142,7 +142,7 @@ int sis_addctx(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
/* Should this return -EBUSY instead? */
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
/* new added */
|
||||
sis_init_context(ctx.handle);
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ static drm_ioctl_desc_t sis_ioctls[] = {
|
|||
[DRM_IOCTL_NR(DRM_IOCTL_UNBLOCK)] = { drm_unblock, 1, 1 },
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_AUTH_MAGIC)] = { drm_authmagic, 1, 1 },
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_ADD_MAP)] = { drm_addmap, 1, 1 },
|
||||
|
||||
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_ADD_CTX)] = { sis_addctx, 1, 1 },
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RM_CTX)] = { sis_rmctx, 1, 1 },
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MOD_CTX)] = { sis_modctx, 1, 1 },
|
||||
|
|
@ -242,7 +242,7 @@ static int sis_takedown(drm_device_t *dev)
|
|||
if (dev->agp) {
|
||||
drm_agp_mem_t *temp;
|
||||
drm_agp_mem_t *temp_next;
|
||||
|
||||
|
||||
temp = dev->agp->memory;
|
||||
while(temp != NULL) {
|
||||
temp_next = temp->next;
|
||||
|
|
@ -423,7 +423,7 @@ int sis_open(struct inode *inode, struct file *filp)
|
|||
{
|
||||
drm_device_t *dev = &sis_device;
|
||||
int retcode = 0;
|
||||
|
||||
|
||||
DRM_DEBUG("open_count = %d\n", dev->open_count);
|
||||
if (!(retcode = drm_open_helper(inode, filp, dev))) {
|
||||
#if LINUX_VERSION_CODE < 0x020333
|
||||
|
|
@ -667,7 +667,7 @@ int sis_unlock(struct inode *inode, struct file *filp, unsigned int cmd,
|
|||
|
||||
if (copy_from_user(&lock, (drm_lock_t *)arg, sizeof(lock)))
|
||||
return -EFAULT;
|
||||
|
||||
|
||||
if (lock.context == DRM_KERNEL_CONTEXT) {
|
||||
DRM_ERROR("Process %d using kernel context %d\n",
|
||||
current->pid, lock.context);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue