Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319407
b: refs/heads/master
c: d249ce0
h: refs/heads/master
i:
  319405: 23fece0
  319403: 5392a45
  319399: b17546d
  319391: 76fbc8a
v: v3
  • Loading branch information
Joonyoung Shim authored and Inki Dae committed Jul 27, 2012
1 parent d16739a commit 0b5dd42
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 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: aeb292245af4bdfda00c0e46647d9e140e3f5cd0
refs/heads/master: d249ce024bf6da9cc26cbd236aca25a22cbbe36e
8 changes: 4 additions & 4 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ static void exynos_drm_crtc_apply(struct drm_crtc *crtc)

exynos_drm_fn_encoder(crtc, overlay,
exynos_drm_encoder_crtc_mode_set);
exynos_drm_fn_encoder(crtc, &exynos_crtc->pipe,
exynos_drm_encoder_crtc_commit);
exynos_drm_fn_encoder(crtc, NULL, exynos_drm_encoder_crtc_commit);
}

int exynos_drm_overlay_update(struct exynos_drm_overlay *overlay,
Expand Down Expand Up @@ -231,8 +230,7 @@ static void exynos_drm_crtc_commit(struct drm_crtc *crtc)
exynos_drm_encoder_dpms_from_crtc);
}

exynos_drm_fn_encoder(crtc, &exynos_crtc->pipe,
exynos_drm_encoder_crtc_commit);
exynos_drm_fn_encoder(crtc, NULL, exynos_drm_encoder_crtc_commit);
}

static bool
Expand All @@ -253,6 +251,7 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
{
struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
struct exynos_drm_overlay *overlay = &exynos_crtc->overlay;
int pipe = exynos_crtc->pipe;
int ret;

DRM_DEBUG_KMS("%s\n", __FILE__);
Expand All @@ -268,6 +267,7 @@ exynos_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
return ret;

exynos_drm_fn_encoder(crtc, overlay, exynos_drm_encoder_crtc_mode_set);
exynos_drm_fn_encoder(crtc, &pipe, exynos_drm_encoder_crtc_pipe);

return 0;
}
Expand Down
33 changes: 19 additions & 14 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "drm_crtc_helper.h"

#include "exynos_drm_drv.h"
#include "exynos_drm_crtc.h"
#include "exynos_drm_encoder.h"

#define to_exynos_encoder(x) container_of(x, struct exynos_drm_encoder,\
Expand Down Expand Up @@ -303,8 +302,8 @@ void exynos_drm_enable_vblank(struct drm_encoder *encoder, void *data)
struct exynos_drm_manager_ops *manager_ops = manager->ops;
int crtc = *(int *)data;

if (manager->pipe == -1)
manager->pipe = crtc;
if (manager->pipe != crtc)
return;

if (manager_ops->enable_vblank)
manager_ops->enable_vblank(manager->dev);
Expand All @@ -317,8 +316,8 @@ void exynos_drm_disable_vblank(struct drm_encoder *encoder, void *data)
struct exynos_drm_manager_ops *manager_ops = manager->ops;
int crtc = *(int *)data;

if (manager->pipe == -1)
manager->pipe = crtc;
if (manager->pipe != crtc)
return;

if (manager_ops->disable_vblank)
manager_ops->disable_vblank(manager->dev);
Expand All @@ -341,19 +340,10 @@ void exynos_drm_encoder_crtc_plane_commit(struct drm_encoder *encoder,

void exynos_drm_encoder_crtc_commit(struct drm_encoder *encoder, void *data)
{
struct exynos_drm_manager *manager =
to_exynos_encoder(encoder)->manager;
int crtc = *(int *)data;
int zpos = DEFAULT_ZPOS;

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

/*
* when crtc is detached from encoder, this pipe is used
* to select manager operation
*/
manager->pipe = crtc;

exynos_drm_encoder_crtc_plane_commit(encoder, &zpos);
}

Expand Down Expand Up @@ -429,3 +419,18 @@ void exynos_drm_encoder_crtc_disable(struct drm_encoder *encoder, void *data)
if (overlay_ops && overlay_ops->disable)
overlay_ops->disable(manager->dev, zpos);
}

void exynos_drm_encoder_crtc_pipe(struct drm_encoder *encoder, void *data)
{
struct exynos_drm_manager *manager =
to_exynos_encoder(encoder)->manager;
int pipe = *(int *)data;

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

/*
* when crtc is detached from encoder, this pipe is used
* to select manager operation
*/
manager->pipe = pipe;
}
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ void exynos_drm_encoder_dpms_from_crtc(struct drm_encoder *encoder,
void exynos_drm_encoder_crtc_dpms(struct drm_encoder *encoder, void *data);
void exynos_drm_encoder_crtc_mode_set(struct drm_encoder *encoder, void *data);
void exynos_drm_encoder_crtc_disable(struct drm_encoder *encoder, void *data);
void exynos_drm_encoder_crtc_pipe(struct drm_encoder *encoder, void *data);

#endif

0 comments on commit 0b5dd42

Please sign in to comment.