Skip to content

Commit

Permalink
drm/exynos/mixer: replace direct cross-driver call with drm mode vali…
Browse files Browse the repository at this point in the history
…dation

HDMI driver called directly function from MIXER driver to invalidate modes
not supported by MIXER. The patch replaces the hack with proper .atomic_check
callback.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
  • Loading branch information
Andrzej Hajda authored and Inki Dae committed Nov 3, 2015
1 parent 5625b34 commit 3ae2436
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
5 changes: 0 additions & 5 deletions drivers/gpu/drm/exynos/exynos_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

#include "exynos_drm_drv.h"
#include "exynos_drm_crtc.h"
#include "exynos_mixer.h"

#define HOTPLUG_DEBOUNCE_MS 1100

Expand Down Expand Up @@ -1017,10 +1016,6 @@ static int hdmi_mode_valid(struct drm_connector *connector,
(mode->flags & DRM_MODE_FLAG_INTERLACE) ? true :
false, mode->clock * 1000);

ret = mixer_check_mode(mode);
if (ret)
return MODE_BAD;

ret = hdmi_find_phy_conf(hdata, mode->clock * 1000);
if (ret < 0)
return MODE_BAD;
Expand Down
6 changes: 4 additions & 2 deletions drivers/gpu/drm/exynos/exynos_mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "exynos_drm_crtc.h"
#include "exynos_drm_plane.h"
#include "exynos_drm_iommu.h"
#include "exynos_mixer.h"

#define MIXER_WIN_NR 3
#define VP_DEFAULT_WIN 2
Expand Down Expand Up @@ -1096,8 +1095,10 @@ static void mixer_disable(struct exynos_drm_crtc *crtc)
}

/* Only valid for Mixer version 16.0.33.0 */
int mixer_check_mode(struct drm_display_mode *mode)
static int mixer_atomic_check(struct exynos_drm_crtc *crtc,
struct drm_crtc_state *state)
{
struct drm_display_mode *mode = &state->adjusted_mode;
u32 w, h;

w = mode->hdisplay;
Expand All @@ -1123,6 +1124,7 @@ static const struct exynos_drm_crtc_ops mixer_crtc_ops = {
.wait_for_vblank = mixer_wait_for_vblank,
.update_plane = mixer_update_plane,
.disable_plane = mixer_disable_plane,
.atomic_check = mixer_atomic_check,
};

static struct mixer_drv_data exynos5420_mxr_drv_data = {
Expand Down
20 changes: 0 additions & 20 deletions drivers/gpu/drm/exynos/exynos_mixer.h

This file was deleted.

0 comments on commit 3ae2436

Please sign in to comment.