コード例 #1
0
ファイル: nouveau_drm.c プロジェクト: AiWinters/linux
static int
nouveau_drm_vblank_enable(struct drm_device *dev, int head)
{
	struct nouveau_drm *drm = nouveau_drm(dev);
	struct nouveau_disp *pdisp = nouveau_disp(drm->device);
	nouveau_event_get(pdisp->vblank, head, &drm->vblank);
	return 0;
}
コード例 #2
0
int
nv50_software_mthd_vblsem_release(struct nouveau_object *object, u32 mthd,
				  void *args, u32 size)
{
	struct nv50_software_chan *chan = (void *)nv_engctx(object->parent);
	u32 head = *(u32 *)args;
	if (head >= chan->vblank.nr_event)
		return -EINVAL;

	nouveau_event_get(chan->vblank.event[head]);
	return 0;
}
コード例 #3
0
static int
nouveau_drm_vblank_enable(struct drm_device *dev, int head)
{
	struct nouveau_drm *drm = nouveau_drm(dev);
	struct nouveau_disp *pdisp = nouveau_disp(drm->device);

	if (WARN_ON_ONCE(head > ARRAY_SIZE(drm->vblank)))
		return -EIO;
	WARN_ON_ONCE(drm->vblank[head].func);
	drm->vblank[head].func = nouveau_drm_vblank_handler;
	nouveau_event_get(pdisp->vblank, head, &drm->vblank[head]);
	return 0;
}
コード例 #4
0
static int
nvc0_software_mthd_vblsem_release(struct nouveau_object *object, u32 mthd,
				  void *args, u32 size)
{
	struct nvc0_software_chan *chan = (void *)nv_engctx(object->parent);
	struct nouveau_disp *disp = nouveau_disp(object);
	u32 crtc = *(u32 *)args;

	if ((nv_device(object)->card_type < NV_E0 && crtc > 1) || crtc > 3)
		return -EINVAL;

	nouveau_event_get(disp->vblank, crtc, &chan->base.vblank.event);
	return 0;
}