Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331770
b: refs/heads/master
c: 291257c
h: refs/heads/master
v: v3
  • Loading branch information
Inki Dae committed Oct 4, 2012
1 parent d85ccd5 commit bd0eb17
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32aeab17457c13e6a448ba0f6f3c03d6705e5592
refs/heads/master: 291257cf4cb0da1e32b672b88e73d22d845c8f93
22 changes: 21 additions & 1 deletion trunk/drivers/gpu/drm/exynos/exynos_drm_vidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ struct vidi_context {
unsigned int connected;
bool vblank_on;
bool suspended;
bool direct_vblank;
struct work_struct work;
struct mutex lock;
};
Expand Down Expand Up @@ -224,6 +225,15 @@ static int vidi_enable_vblank(struct device *dev)
if (!test_and_set_bit(0, &ctx->irq_flags))
ctx->vblank_on = true;

ctx->direct_vblank = true;

/*
* in case of page flip request, vidi_finish_pageflip function
* will not be called because direct_vblank is true and then
* that function will be called by overlay_ops->commit callback
*/
schedule_work(&ctx->work);

return 0;
}

Expand Down Expand Up @@ -425,7 +435,17 @@ static void vidi_fake_vblank_handler(struct work_struct *work)
/* refresh rate is about 50Hz. */
usleep_range(16000, 20000);

drm_handle_vblank(subdrv->drm_dev, manager->pipe);
mutex_lock(&ctx->lock);

if (ctx->direct_vblank) {
drm_handle_vblank(subdrv->drm_dev, manager->pipe);
ctx->direct_vblank = false;
mutex_unlock(&ctx->lock);
return;
}

mutex_unlock(&ctx->lock);

vidi_finish_pageflip(subdrv->drm_dev, manager->pipe);
}

Expand Down
10 changes: 10 additions & 0 deletions trunk/include/drm/exynos_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,16 @@ struct drm_exynos_vidi_connection {
uint64_t edid;
};

/* Indicate Exynos specific vblank flags */
enum e_drm_exynos_vblank {
/*
* this flags is used for Virtual Display module
* to use DRM_IOCTL_WAIT_VBLANK feature. for this,
* user should set this flag to vblwait->request.type
*/
_DRM_VBLANK_EXYNOS_VIDI = 2,
};

/* memory type definitions. */
enum e_drm_exynos_gem_mem_type {
/* Physically Continuous memory and used as default. */
Expand Down

0 comments on commit bd0eb17

Please sign in to comment.