Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/nvidia commit window changes when updating base



details:   https://anonhg.NetBSD.org/src/rev/5f75e2bcb530
branches:  trunk
changeset: 341672:5f75e2bcb530
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Mon Nov 16 21:14:51 2015 +0000

description:
commit window changes when updating base

diffstat:

 sys/arch/arm/nvidia/tegra_drm_mode.c |  28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diffs (55 lines):

diff -r daf245d5ec27 -r 5f75e2bcb530 sys/arch/arm/nvidia/tegra_drm_mode.c
--- a/sys/arch/arm/nvidia/tegra_drm_mode.c      Mon Nov 16 21:14:33 2015 +0000
+++ b/sys/arch/arm/nvidia/tegra_drm_mode.c      Mon Nov 16 21:14:51 2015 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__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 <drm/drmP.h>
 #include <drm/drm_crtc.h>
@@ -659,14 +659,34 @@
 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



Home | Main Index | Thread Index | Old Index