Ejemplo n.º 1
0
/*
 * HHP: FIXME:
 * This should also be called when GMM/GTT is re-initialized, i.e. when
 * the Xorg server stops.  The PVR backed memory is invalid when this happens,
 * so if we call this function from msvdx_driver_unload() when the module is
 * removed, the "fw_mem_info" and "dev_mem_context" are invalid.
 */
void msvdx_pvr_deinit(void)
{
	drm_emgd_priv_t       *priv;
	igd_context_t          *context;
	platform_context_plb_t *platform;
	struct msvdx_pvr_info  *pvr;
	IMG_BOOL mem_destroyed;
	int pid=0;
	unsigned char *mmio;

	priv     = gpDrmDevice->dev_private;
	context  = priv->context;
	platform = (platform_context_plb_t *)context->platform_context;
    mmio = context->device_context.virt_mmadr;
	pvr = platform->msvdx_pvr;

    //Reset MTX before unloading firmware
    EMGD_WRITE32(0x00000001, mmio + PSB_MSVDX_MTX_SOFT_RESET);


	if (pvr) {
        kthread_stop(pvr->kthread);
		if (pvr->fw_mem_info)
			PVRSRVFreeDeviceMemKM(pvr->sgx_cookie,
						pvr->fw_mem_info);

		PVRSRVDestroyDeviceMemContextKM(pvr->sgx_cookie,
						pvr->dev_mem_context,
						&mem_destroyed);

	//	PVRSRVPerProcessDataDisconnect((IMG_UINT32)pvr->kthread->pid);
        PVRSRVPerProcessDataDisconnect((IMG_UINT32)pvr->pid);
        pid = pvr->pid;
		kfree(pvr);
		platform->msvdx_pvr = NULL;
	}

}
Ejemplo n.º 2
0
IMG_EXPORT
IMG_VOID IMG_CALLCONV PVRSRVProcessDisconnect(IMG_UINT32	ui32PID)
{
	PVRSRVPerProcessDataDisconnect(ui32PID);
}
Ejemplo n.º 3
0
void PVRSRVProcessDisconnect(u32 ui32PID)
{
	PVRSRVPerProcessDataDisconnect(ui32PID);
}