/*
*/
/*
* 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>
*
*/
#include "drmP.h"
#include "drm_io32.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
{
#ifdef _MULTI_DATAMODEL
} else
#endif
if (dev->unique_len == 0) {
DRM_ERROR("drm_getunique: dev->unique_len = 0");
return (EFAULT);
}
return (EFAULT);
}
#ifdef _MULTI_DATAMODEL
} else
#endif
return (0);
}
/*
* Deprecated in DRM version 1.1, and will return EBUSY when setversion has
* requested version 1.1 or greater.
*/
/*ARGSUSED*/
int
{
return (EINVAL);
}
static int
{
DRM_LOCK();
DRM_UNLOCK();
return (EBUSY);
}
DRM_UNLOCK();
return (ENOMEM);
}
DRM_UNLOCK();
return (0);
}
/*ARGSUSED*/
int
{
int idx;
int i = 0;
#ifdef _MULTI_DATAMODEL
} else
#endif
DRM_LOCK();
if (idx < 0) {
DRM_UNLOCK();
return (EINVAL);
}
if (i == idx) {
break;
}
i++;
}
DRM_UNLOCK();
return (EINVAL);
#ifdef _MULTI_DATAMODEL
} else
#endif
return (0);
}
/*ARGSUSED*/
int
{
int idx;
int i = 0;
#ifdef _MULTI_DATAMODEL
sizeof (client32));
} else
#endif
sizeof (client));
DRM_LOCK();
if (i == idx) {
DRM_UNLOCK();
#ifdef _MULTI_DATAMODEL
sizeof (client32));
} else
#endif
DRM_COPYTO_WITH_RETURN((void *)data,
return (0);
}
i++;
}
DRM_UNLOCK();
return (EINVAL);
}
/*ARGSUSED*/
int
{
int i;
DRM_LOCK();
} else
}
DRM_UNLOCK();
#ifdef _MULTI_DATAMODEL
for (i = 0; i < 15; i++) {
}
sizeof (stats32));
} else
#endif
return (0);
}
/*ARGSUSED*/
int
{
int if_version;
return (EINVAL);
/*
* Version 1.1 includes tying of DRM to specific device
*/
(void) drm_set_busid(dev);
}
}
sv.drm_dd_minor < 0 ||
return (EINVAL);
}
return (0);
}
/*ARGSUSED*/
int
{
DRM_DEBUG("drm_noop\n");
return (0);
}
/*ARGSUSED*/
int
{
#ifdef _MULTI_DATAMODEL
(void *)data, sizeof (drm_version_32_t));
} else
#endif
sizeof (version));
return (EFAULT); \
}
#ifdef _MULTI_DATAMODEL
sizeof (drm_version_32_t));
} else
#endif
sizeof (version));
return (0);
}