Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/sunxi Fix HDMI output; only install cursor_set/...



details:   https://anonhg.NetBSD.org/src/rev/2c52c6f97bf3
branches:  trunk
changeset: 996981:2c52c6f97bf3
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Feb 16 16:20:50 2019 +0000

description:
Fix HDMI output; only install cursor_set/cursor_move funcs if hardware cursor is available.

diffstat:

 sys/arch/arm/sunxi/sunxi_mixer.c |  17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diffs (52 lines):

diff -r 86ade6072ee5 -r 2c52c6f97bf3 sys/arch/arm/sunxi/sunxi_mixer.c
--- a/sys/arch/arm/sunxi/sunxi_mixer.c  Sat Feb 16 12:58:13 2019 +0000
+++ b/sys/arch/arm/sunxi/sunxi_mixer.c  Sat Feb 16 16:20:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_mixer.c,v 1.6 2019/02/06 03:07:08 jmcneill Exp $ */
+/* $NetBSD: sunxi_mixer.c,v 1.7 2019/02/16 16:20:50 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.6 2019/02/06 03:07:08 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_mixer.c,v 1.7 2019/02/16 16:20:50 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -420,7 +420,7 @@
        return 0;
 }
 
-static const struct drm_crtc_funcs sunxi_mixer_crtc_funcs = {
+static const struct drm_crtc_funcs sunxi_mixer0_crtc_funcs = {
        .set_config = drm_crtc_helper_set_config,
        .destroy = sunxi_mixer_destroy,
        .page_flip = sunxi_mixer_page_flip,
@@ -428,6 +428,12 @@
        .cursor_move = sunxi_mixer_cursor_move,
 };
 
+static const struct drm_crtc_funcs sunxi_mixer1_crtc_funcs = {
+       .set_config = drm_crtc_helper_set_config,
+       .destroy = sunxi_mixer_destroy,
+       .page_flip = sunxi_mixer_page_flip,
+};
+
 static void
 sunxi_mixer_dpms(struct drm_crtc *crtc, int mode)
 {
@@ -1184,7 +1190,10 @@
        BLD_WRITE(sc, BLD_CTL(2), 0x03010301);
        BLD_WRITE(sc, BLD_CTL(3), 0x03010301);
 
-       drm_crtc_init(ddev, &sc->sc_crtc.base, &sunxi_mixer_crtc_funcs);
+       if (sc->sc_ovl_ui_count > 1)
+               drm_crtc_init(ddev, &sc->sc_crtc.base, &sunxi_mixer0_crtc_funcs);
+       else
+               drm_crtc_init(ddev, &sc->sc_crtc.base, &sunxi_mixer1_crtc_funcs);
        drm_crtc_helper_add(&sc->sc_crtc.base, &sunxi_mixer_crtc_helper_funcs);
 
        drm_universal_plane_init(ddev, &sc->sc_overlay.base,



Home | Main Index | Thread Index | Old Index