drm_ioctl.c revision 60405de4d8688d96dd05157c28db3ade5c9bc234
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* drm_ioctl.h -- IOCTL processing for DRM -*- linux-c -*-
* Created: Fri Jan 8 09:01:26 1999 by faith@valinux.com
*/
/*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* 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.
*
* Authors:
* Rickard E. (Rik) Faith <faith@valinux.com>
* Gareth Hughes <gareth@valinux.com>
*
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "drmP.h"
/*
* Beginning in revision 1.1 of the DRM interface, getunique will return
* a unique in the form pci:oooo:bb:dd.f (o=domain, b=bus, d=device, f=function)
* before setunique has been called. The format for the bus-specific part of
* the unique is not defined for any other bus.
*/
/*ARGSUSED*/
int
{
(drm_unique32_t *)data,
sizeof (drm_unique32_t));
} else
if (dev->unique_len == 0) {
DRM_ERROR("drm_getunique: dev->unique_len = 0");
}
}
sizeof (drm_unique32_t));
} else
return (0);
}
/*
* Deprecated in DRM version 1.1, and will return EBUSY when setversion has
* requested version 1.1 or greater.
*/
/*ARGSUSED*/
int
{
}
static int
{
DRM_LOCK();
DRM_UNLOCK();
}
DRM_UNLOCK();
}
DRM_UNLOCK();
return (0);
}
/*ARGSUSED*/
int
{
int idx;
int i = 0;
(drm_map32_t *)data,
sizeof (drm_map32_t));
} else
DRM_LOCK();
if (idx < 0) {
DRM_UNLOCK();
}
if (i == idx) {
break;
}
i++;
}
DRM_UNLOCK();
sizeof (drm_map32_t));
} else
return (0);
}
/*ARGSUSED*/
int
{
drm_file_t *pt;
int idx;
int i = 0;
(drm_client32_t *)data,
sizeof (drm_client32_t));
} else
DRM_LOCK();
if (i == idx) {
DRM_UNLOCK();
sizeof (drm_client32_t));
} else
return (0);
}
i++;
}
DRM_UNLOCK();
}
/*ARGSUSED*/
int
{
int i;
DRM_LOCK();
} else
}
DRM_UNLOCK();
for (i = 0; i < 15; i++) {
}
sizeof (drm_stats32_t));
} else
return (0);
}
#define DRM_IF_MAJOR 1
#define DRM_IF_MINOR 2
/*ARGSUSED*/
int
{
int if_version;
/*
* Version 1.1 includes tying of DRM to specific device
*/
(void) drm_set_busid(dev);
}
}
}
return (0);
}
/*ARGSUSED*/
int
{
DRM_DEBUG("drm_noop\n");
return (0);
}
/*ARGSUSED*/
int
{
int len;
(drm_version32_t *)data,
sizeof (drm_version32_t));
} else
}
sizeof (drm_version32_t));
} else
return (0);
}