/*
*/
#include "efb.h"
uint_t);
static void efb_ctx_unload_mappings(efb_context_t *);
devmap_cookie_t, void **,
devmap_cookie_t, void **);
DEVMAP_OPS_REV, /* devmap_rev */
efb_devmap_map, /* devmap_map */
efb_devmap_access, /* devmap_access */
efb_devmap_dup, /* devmap_dup */
efb_devmap_unmap /* devmap_unmap */
};
void *
{
return (&efb_devmap_callbacks);
}
void *
{
return (mi);
}
/* Process new user mapping */
static int
{
return (EIO);
}
radeon_priv = (struct drm_radeon_driver_file_fields *)
if (radeon_priv == NULL) {
return (EIO);
}
} else {
}
return (0);
}
void
{
int limit;
/*
* Wait until it's safe to do a context switch. Mutex
* must be established at this time.
*/
for (limit = 100;
/*
* Let the current context fault back in to give it
* a chance to finish the host_data write.
*/
efb_delay(1);
}
}
/*
* Page fault handler.
*/
static int
{
int rval;
return (rval);
}
/*
* If this mapping is not associated with a context, or that
* context is already current, simply validate the mapping.
*/
return (rval);
}
/*
* This is a context switch. Call devmap_do_ctxmgt().
*/
/*
* Release the mutex before calling devmap_do_ctxmgt(), because
* devmap_do_ctxmgt() may sleep for a while.
*/
}
/*
* Called by efb_devmap_access() (via devmap_do_ctxmgt), this function
* calls efb_ctx_make_current() and then validates the page.
*/
static int
{
int rval;
DRM_LOCK();
/* Make sure it's safe to do the context switch */
if (rval == 0) {
}
DRM_UNLOCK();
return (rval);
}
void
{
#if VIS_CONS_REV > 2
int i;
for (i = 0; i < EFB_CMAP_ENTRIES; i++) {
}
#endif /* VIS_CONS_REV */
}
void
{
#if VIS_CONS_REV > 2
int i;
for (i = 0; i < EFB_CMAP_ENTRIES; i++) {
}
return;
}
#endif /* VIS_CONS_REV */
}
/*
* Context management. This function does the actual context-swapping.
*/
int
{
return (0);
/*
* Invalidate all other context mappings.
* Finally, validate this mapping.
*
* Implementation note:
* When a brand new context faults in for the first time,
* all register settings are considered to be undefined.
* (The new context inherits whatever register values were
* left behind by the old context.)
*/
/* Unload the current context mappings */
}
}
/* Save current context */
}
/* Load new context */
}
return (0);
}
/* Here when user process forks */
static int
{
return (0);
}
/*
* For now, we do NOT create a new context. Since the parent
* and child processes share one minordev structure, they share
* the context.
*/
return (0);
}
/* User has released a mapping (or part of one). */
static void
{
return;
}
/*
* Part or all of this mapping is going away.
*
* If this mapinfo structure is destroyed, and this is the last
* mapinfo that belongs to the context, destroy the context.
*/
/* Unmapping after beginning? */
}
/* Unmapping before end? */
}
/* Now destroy the original */
/* All gone? */
} else {
;
(void *)ctx);
} else {
}
}
}
}
}
/* Unload all of the mappings to this context */
static void
{
int rval;
if (rval != 0) {
"efb: devmap_unload(%lx,%lx) returns %d",
}
}
}
/*
* Invalidate all user context mappings. It should be
* sufficient to unload the current context, if any, as
* the current context is the only one that is loaded.
* However, just to be sure, we unload everything.
*
* Note that this function only unloads mappings; the
* current context is still in hardware.
*/
void
{
}
}