Re: CVS commit: src/sys/arch/arm/allwinner

2015-10-08 Thread Jared McNeill
Unless you plan on implementing a better fix, I'm going to commit 
something like this (not compile tested) to restore HDMI audio 
functionality for A20 and A31.



Index: awin_debe.c
===
RCS file: /cvsroot/src/sys/arch/arm/allwinner/awin_debe.c,v
retrieving revision 1.15
diff -u -p -r1.15 awin_debe.c
--- awin_debe.c 5 Oct 2015 14:42:19 -   1.15
+++ awin_debe.c 8 Oct 2015 22:16:59 -
@@ -75,6 +75,8 @@ struct awin_debe_softc {
int sc_hot_x, sc_hot_y;
uint8_t sc_cursor_bitmap[8 * AWIN_DEBE_CURMAX];
uint8_t sc_cursor_mask[8 * AWIN_DEBE_CURMAX];
+
+   bool sc_audio_supp;
 };

 #define DEBE_READ(sc, reg) \
@@ -249,7 +251,7 @@ awin_debe_attach(device_t parent, device
 #endif

 #ifdef AWIN_DEBE_FWINIT
-   awin_debe_set_videomode();
+   awin_debe_set_videomode(, false);
awin_debe_enable(true);
 #endif
 }
@@ -472,7 +474,7 @@ awin_debe_enable(bool enable)
 }

 void
-awin_debe_set_videomode(const struct videomode *mode)
+awin_debe_set_videomode(const struct videomode *mode, bool audio_supp)
 {
struct awin_debe_softc *sc;
device_t dev;
@@ -485,6 +487,8 @@ awin_debe_set_videomode(const struct vid
}
sc = device_private(dev);

+   sc->sc_audio_supp = audio_supp;
+
if (mode) {
const u_int interlace_p = !!(mode->flags & VID_INTERLACE);
const u_int width = mode->hdisplay;
@@ -582,7 +586,9 @@ awin_debe_ioctl(device_t self, u_long cm
val &= ~AWIN_DEBE_MODCTL_HWC_EN;
}
DEBE_WRITE(sc, AWIN_DEBE_MODCTL_REG, val);
-   awin_tcon_enable(enable);
+   if (sc->sc_audio_supp == false) {
+   awin_tcon_enable(enable);
+   }
return 0;
case WSDISPLAYIO_GVIDEO:
val = DEBE_READ(sc, AWIN_DEBE_MODCTL_REG);
Index: awin_hdmi.c
===
RCS file: /cvsroot/src/sys/arch/arm/allwinner/awin_hdmi.c,v
retrieving revision 1.16
diff -u -p -r1.16 awin_hdmi.c
--- awin_hdmi.c 25 Jul 2015 15:19:54 -  1.16
+++ awin_hdmi.c 8 Oct 2015 22:16:59 -
@@ -565,7 +565,8 @@ awin_hdmi_read_edid(struct awin_hdmi_sof
awin_tcon_enable(false);
delay(2);

-   awin_debe_set_videomode(mode);
+   awin_debe_set_videomode(mode,
+   display_mode == DISPLAY_MODE_HDMI);
awin_tcon_set_videomode(mode);
awin_hdmi_set_videomode(sc, mode, display_mode);
awin_hdmi_set_audiomode(sc, mode, display_mode);
Index: awin_var.h
===
RCS file: /cvsroot/src/sys/arch/arm/allwinner/awin_var.h,v
retrieving revision 1.35
diff -u -p -r1.35 awin_var.h
--- awin_var.h  20 Apr 2015 01:33:22 -  1.35
+++ awin_var.h  8 Oct 2015 22:16:59 -
@@ -140,7 +140,7 @@ unsigned int awin_tcon_get_clk_div(void)
 bool   awin_tcon_get_clk_dbl(void);
 void   awin_tcon_set_videomode(const struct videomode *);
 void   awin_tcon_enable(bool);
-void   awin_debe_set_videomode(const struct videomode *);
+void   awin_debe_set_videomode(const struct videomode *, bool);
 void   awin_debe_enable(bool);
 intawin_debe_ioctl(device_t, u_long, void *);
 intawin_mp_ioctl(device_t, u_long, void *);


Re: CVS commit: src/sys/arch/x86/x86

2015-10-08 Thread Masanobu SAITOH

On 2015/10/06 6:10, Jean-Yves Migeon wrote:

Le 04/10/2015 19:52, matthew green a écrit :

Module Name:src
Committed By:   mrg
Date:   Sun Oct  4 17:52:50 UTC 2015

Modified Files:
src/sys/arch/x86/x86: cpu_ucode_intel.c

Log Message:
kmem_free() the address returned by kmem_alloc().  found by Brainy.
use the newly aligned location if we needed it.  found by kre.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/x86/cpu_ucode_intel.c


IMHO this should be pulled-up to -6 and -7.

Any argument against? If the old code worked, it's pure luck.


 netbsd-6 doesn't support the microcode update function for Intel
CPU. That bug should be pulled up to netbsd-7 (and netbsd-7-1) branch.


--
---
SAITOH Masanobu (msai...@execsw.org
 msai...@netbsd.org)