Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331762
b: refs/heads/master
c: 3d05859
h: refs/heads/master
v: v3
  • Loading branch information
Inki Dae committed Oct 4, 2012
1 parent 61c69db commit 674604f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 479cbc3eeed060879dc89652e497d7719f7ee1dc
refs/heads/master: 3d05859fd78bbc0b04cca929aea494f5e6b8235b
11 changes: 11 additions & 0 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,21 @@ static void drm_mixer_disable(struct device *subdrv_dev, int zpos)
ctx->enabled[win] = false;
}

static void drm_mixer_wait_for_vblank(struct device *subdrv_dev)
{
struct drm_hdmi_context *ctx = to_context(subdrv_dev);

DRM_DEBUG_KMS("%s\n", __FILE__);

if (mixer_ops && mixer_ops->wait_for_vblank)
mixer_ops->wait_for_vblank(ctx->mixer_ctx->ctx);
}

static struct exynos_drm_overlay_ops drm_hdmi_overlay_ops = {
.mode_set = drm_mixer_mode_set,
.commit = drm_mixer_commit,
.disable = drm_mixer_disable,
.wait_for_vblank = drm_mixer_wait_for_vblank,
};

static struct exynos_drm_manager hdmi_manager = {
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ struct exynos_mixer_ops {
void (*dpms)(void *ctx, int mode);

/* overlay */
void (*wait_for_vblank)(void *ctx);
void (*win_mode_set)(void *ctx, struct exynos_drm_overlay *overlay);
void (*win_commit)(void *ctx, int zpos);
void (*win_disable)(void *ctx, int zpos);
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/gpu/drm/exynos/exynos_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,18 @@ static void mixer_dpms(void *ctx, int mode)
}
}

static void mixer_wait_for_vblank(void *ctx)
{
struct mixer_context *mixer_ctx = ctx;
struct mixer_resources *res = &mixer_ctx->mixer_res;
int ret;

ret = wait_for((mixer_reg_read(res, MXR_INT_STATUS) &
MXR_INT_STATUS_VSYNC), 50);
if (ret < 0)
DRM_DEBUG_KMS("vblank wait timed out.\n");
}

static void mixer_win_mode_set(void *ctx,
struct exynos_drm_overlay *overlay)
{
Expand Down Expand Up @@ -818,6 +830,7 @@ static struct exynos_mixer_ops mixer_ops = {
.dpms = mixer_dpms,

/* overlay */
.wait_for_vblank = mixer_wait_for_vblank,
.win_mode_set = mixer_win_mode_set,
.win_commit = mixer_win_commit,
.win_disable = mixer_win_disable,
Expand Down

0 comments on commit 674604f

Please sign in to comment.