From 99ca4559815cfedc156d2fe381a86ef3ec187485 Mon Sep 17 00:00:00 2001 From: jmcneill Date: Mon, 16 Nov 2015 21:14:51 +0000 Subject: [PATCH] commit window changes when updating base --- sys/arch/arm/nvidia/tegra_drm_mode.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/sys/arch/arm/nvidia/tegra_drm_mode.c b/sys/arch/arm/nvidia/tegra_drm_mode.c index 367c238e67ed..470a1f8f3c6b 100644 --- a/sys/arch/arm/nvidia/tegra_drm_mode.c +++ b/sys/arch/arm/nvidia/tegra_drm_mode.c @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_drm_mode.c,v 1.8 2015/11/15 14:39:12 jmcneill Exp $ */ +/* $NetBSD: tegra_drm_mode.c,v 1.9 2015/11/16 21:14:51 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.8 2015/11/15 14:39:12 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_drm_mode.c,v 1.9 2015/11/16 21:14:51 jmcneill Exp $"); #include #include @@ -659,14 +659,34 @@ static int tegra_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, struct drm_framebuffer *old_fb) { - return tegra_crtc_do_set_base(crtc, old_fb, x, y, 0); + struct tegra_crtc *tegra_crtc = to_tegra_crtc(crtc); + + tegra_crtc_do_set_base(crtc, old_fb, x, y, 0); + + /* Commit settings */ + DC_WRITE(tegra_crtc, DC_CMD_STATE_CONTROL_REG, + DC_CMD_STATE_CONTROL_WIN_A_UPDATE); + DC_WRITE(tegra_crtc, DC_CMD_STATE_CONTROL_REG, + DC_CMD_STATE_CONTROL_WIN_A_ACT_REQ); + + return 0; } static int tegra_crtc_mode_set_base_atomic(struct drm_crtc *crtc, struct drm_framebuffer *fb, int x, int y, enum mode_set_atomic state) { - return tegra_crtc_do_set_base(crtc, fb, x, y, 1); + struct tegra_crtc *tegra_crtc = to_tegra_crtc(crtc); + + tegra_crtc_do_set_base(crtc, fb, x, y, 1); + + /* Commit settings */ + DC_WRITE(tegra_crtc, DC_CMD_STATE_CONTROL_REG, + DC_CMD_STATE_CONTROL_WIN_A_UPDATE); + DC_WRITE(tegra_crtc, DC_CMD_STATE_CONTROL_REG, + DC_CMD_STATE_CONTROL_WIN_A_ACT_REQ); + + return 0; } static void