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

2015-10-05 Thread Jared McNeill

On Mon, 5 Oct 2015, Manuel Bouyer wrote:


On Mon, Oct 05, 2015 at 02:13:51PM -0300, Jared McNeill wrote:

Can you see what happens to audio output when the display is turend off in
this way? I have a vague memory of trying something like this before..


Not easily, my display doens't deal with HDMI audio.
It's also possible that the display side stop audio processing when going
to sleep ...


It has been a while, but ISTR the audio clock is derived from the video 
clock. So if you shut off video, you lose audio as well.


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

2015-10-05 Thread matthew green
FWIW, radeondrmkms has this audio depends on video problem.  i noticed
that hdmi audio works mostly fine in netbsd-7, so i tried to switch to
it.  unfortunately there are at least three problems i need to look at:

- the display must be unblanked (ie, the "xset dpms" standby
  time matters) -- ie, this problem

- after a little while, it starts dropping parts of the audio
  in a stuttery effect -- maybe on/off cycle every second or
  so.  pause and continue in audio apps seems to help that

- there is a 1-1.5s pause when (re)starting where there is no
  audio output

for now i'm back to the analog cable.


.mrg.


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

2015-10-05 Thread Manuel Bouyer
On Mon, Oct 05, 2015 at 02:13:51PM -0300, Jared McNeill wrote:
> Can you see what happens to audio output when the display is turend off in
> this way? I have a vague memory of trying something like this before..

Not easily, my display doens't deal with HDMI audio.
It's also possible that the display side stop audio processing when going
to sleep ...

-- 
Manuel Bouyer 
 NetBSD: 26 ans d'experience feront toujours la difference
--


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

2015-10-05 Thread Manuel Bouyer
On Mon, Oct 05, 2015 at 01:28:08PM -0300, Jared McNeill wrote:
> On Mon, 5 Oct 2015, Manuel Bouyer wrote:
> >BTW, I'm looking at this because I need to make the LVDS interface to work
> >(and turn the display on/off via GPIOs, to save power). Do you have ideas
> >on how this should work ?
> >We won't have EDID source in this case; for the omap controller I did
> >hardcode a video mode in sources, which is quite ugly.
> 
> If you pass a compiled version of the fex for your board
> (https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a20/a20-olinuxino_lime2.fex),

Yes, I've seen this fex stuff.
But are we sure it's the way to go ?
>From http://linux-sunxi.org/Fex_Guide the mainline linux kernel
uses device tree, and from https://linux-sunxi.org/Mainline_U-boot
I guess u-boot is going this way too.
So sunxi and board makers could well drop fex support in the near future ...

-- 
Manuel Bouyer 
 NetBSD: 26 ans d'experience feront toujours la difference
--


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

2015-10-05 Thread Jared McNeill
It's really a problem because of how the audio device behaves when you 
turn the clock off from under it. I don't think changing X server 
configuration is a good solution when we can clearly do better than that 
by adding a bit of logic in the display driver to handle it.



On Mon, 5 Oct 2015, Manuel Bouyer wrote:


On Mon, Oct 05, 2015 at 02:42:00PM -0300, Jared McNeill wrote:

On Mon, 5 Oct 2015, Manuel Bouyer wrote:


On Mon, Oct 05, 2015 at 02:13:51PM -0300, Jared McNeill wrote:

Can you see what happens to audio output when the display is turend off in
this way? I have a vague memory of trying something like this before..


Not easily, my display doens't deal with HDMI audio.
It's also possible that the display side stop audio processing when going
to sleep ...


It has been a while, but ISTR the audio clock is derived from the video
clock. So if you shut off video, you lose audio as well.


And is this really a problem ? turning off video is configurable in the
X server, so if you want audio without video you can turn off the
screensaver ...

--
Manuel Bouyer 
NetBSD: 26 ans d'experience feront toujours la difference
--



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

2015-10-05 Thread Jared McNeill
Device tree is definitely the way to go (IMHO) but we don't have that 
code today and that's not a small effort. I wrote the fex code at a time 
when there was no other option. So it's there if you want to use it.




On Mon, 5 Oct 2015, Manuel Bouyer wrote:


On Mon, Oct 05, 2015 at 01:28:08PM -0300, Jared McNeill wrote:

On Mon, 5 Oct 2015, Manuel Bouyer wrote:

BTW, I'm looking at this because I need to make the LVDS interface to work
(and turn the display on/off via GPIOs, to save power). Do you have ideas
on how this should work ?
We won't have EDID source in this case; for the omap controller I did
hardcode a video mode in sources, which is quite ugly.


If you pass a compiled version of the fex for your board
(https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a20/a20-olinuxino_lime2.fex),


Yes, I've seen this fex stuff.
But are we sure it's the way to go ?
From http://linux-sunxi.org/Fex_Guide the mainline linux kernel
uses device tree, and from https://linux-sunxi.org/Mainline_U-boot
I guess u-boot is going this way too.
So sunxi and board makers could well drop fex support in the near future ...

--
Manuel Bouyer 
NetBSD: 26 ans d'experience feront toujours la difference
--



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

2015-10-05 Thread Manuel Bouyer
On Mon, Oct 05, 2015 at 02:42:00PM -0300, Jared McNeill wrote:
> On Mon, 5 Oct 2015, Manuel Bouyer wrote:
> 
> >On Mon, Oct 05, 2015 at 02:13:51PM -0300, Jared McNeill wrote:
> >>Can you see what happens to audio output when the display is turend off in
> >>this way? I have a vague memory of trying something like this before..
> >
> >Not easily, my display doens't deal with HDMI audio.
> >It's also possible that the display side stop audio processing when going
> >to sleep ...
> 
> It has been a while, but ISTR the audio clock is derived from the video
> clock. So if you shut off video, you lose audio as well.

And is this really a problem ? turning off video is configurable in the
X server, so if you want audio without video you can turn off the
screensaver ...

-- 
Manuel Bouyer 
 NetBSD: 26 ans d'experience feront toujours la difference
--


Re: CVS commit: src/sys/net

2015-10-05 Thread Ryota Ozaki
On Wed, Sep 30, 2015 at 11:15 PM, Christoph Badura  wrote:
> On Wed, Sep 30, 2015 at 07:12:32AM +, Ryota Ozaki wrote:
>> Modified Files:
>>   src/sys/net: if.h if_llatbl.c if_llatbl.h
>>
>> Log Message:
>> Make GATEWAY (fastforward) work again
>>
>> With GATEWAY (fastforward), the whole forwarding processing runs in
>> hardware interrupt context. So we cannot use rwlock for lltable and
>> llentry in that case.
>>
>> This change replaces rwlock with mutex(IPL_NET) for lltable and llentry
>> when GATEWAY is enabled. We need to tweak locking only around rtree
>> in lltable_free. Other than that, what we need to do is to change macros
>> for locks.
>>
>> I hope fastforward runs in softint some day in the future...
>
> Well, the point of the fast forwarding code was that the fast forwarding
> is done in interrupt context.  If no flow exists the normal (slow)
> forwarding path running in softint is used.

(Hardware) interrupt context isn't must for the fast forwarding,
IIUC. FreeBSD doesn't run it in the interrupt context nowadays and we
already have some network drivers run if_input (ether_input normally)
in softint context, e.g., pq3etsec [*].

My hope is that all network device drivers implement softint-based RX and
run if_input (i.e., Layer 2) in softint context. Then we can make
Layer 2 components (bridge, vlan, bpf, etc.) MP-safe easier than now.

[*] 
https://wiki.netbsd.org/users/msaitoh/Comparison_of_implementations_of_Ethernet_drivers/

  ozaki-r


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

2015-10-05 Thread Jean-Yves Migeon
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.

-- 
Jean-Yves Migeon


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

2015-10-05 Thread matthew green
> And is this really a problem ? turning off video is configurable in the
> X server, so if you want audio without video you can turn off the
> screensaver ...

it's a problem if you want the screensaver to work when you're not
using the video or audio.  your idea means it is *always* on.


.mrg.