aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r--drivers/gpu/drm/exynos/exynos_mixer.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index c414584bfbae..cc809ca6b8ec 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -818,6 +818,29 @@ static void mixer_win_disable(void *ctx, int win)
818 mixer_ctx->win_data[win].enabled = false; 818 mixer_ctx->win_data[win].enabled = false;
819} 819}
820 820
821int mixer_check_timing(void *ctx, struct fb_videomode *timing)
822{
823 struct mixer_context *mixer_ctx = ctx;
824 u32 w, h;
825
826 w = timing->xres;
827 h = timing->yres;
828
829 DRM_DEBUG_KMS("%s : xres=%d, yres=%d, refresh=%d, intl=%d\n",
830 __func__, timing->xres, timing->yres,
831 timing->refresh, (timing->vmode &
832 FB_VMODE_INTERLACED) ? true : false);
833
834 if (mixer_ctx->mxr_ver == MXR_VER_0_0_0_16)
835 return 0;
836
837 if ((w >= 464 && w <= 720 && h >= 261 && h <= 576) ||
838 (w >= 1024 && w <= 1280 && h >= 576 && h <= 720) ||
839 (w >= 1664 && w <= 1920 && h >= 936 && h <= 1080))
840 return 0;
841
842 return -EINVAL;
843}
821static void mixer_wait_for_vblank(void *ctx) 844static void mixer_wait_for_vblank(void *ctx)
822{ 845{
823 struct mixer_context *mixer_ctx = ctx; 846 struct mixer_context *mixer_ctx = ctx;
@@ -955,6 +978,9 @@ static struct exynos_mixer_ops mixer_ops = {
955 .win_mode_set = mixer_win_mode_set, 978 .win_mode_set = mixer_win_mode_set,
956 .win_commit = mixer_win_commit, 979 .win_commit = mixer_win_commit,
957 .win_disable = mixer_win_disable, 980 .win_disable = mixer_win_disable,
981
982 /* display */
983 .check_timing = mixer_check_timing,
958}; 984};
959 985
960static irqreturn_t mixer_irq_handler(int irq, void *arg) 986static irqreturn_t mixer_irq_handler(int irq, void *arg)