Message ID | 4E2C16B5.5010703@redhat.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On Sun, Jul 24, 2011 at 8:57 AM, Mauro Carvalho Chehab <mchehab@redhat.com> wrote: > I proposed the same fix sometime ago, when Gerd reported this issue > for me. His feedback was that this partially fixed the issue, but > he reported that he also needed to increase the set_power_mode delay > from 5 to 50 ms in order to fully initialize the cx231xx hardware, > as on the enclosed patch. It seems he tested with vanilla Fedora kernel. > > So, I suspect that HZ may be affecting this driver as well. As you know, > if HZ is configured with 100, the minimum msleep() delay will be 10. > so, instead of waiting for 5ms, it will wait for 10ms for the device > to powerup. > > It would be great to configure HZ with 1000 and see the differences with > and without Gerd's patch. > > Cheers, > Mauro. I don't dispute the possibility that there is some *other* bug that effects users who have some other value for HZ, but neither I nor the other use saw it. Without this patch though, the device is broken for *everybody*. I would suggest checking in this patch, and separately the HZ issue can be investigated. I'll see if I can find some cycles today to reconfigure my kernel with a different HZ. Will also check the datasheets and see if Conexant documented any sort of time for power ramping. It's not uncommon for such documentation to include a diagram showing timing for power up. Devin
On Sun, Jul 24, 2011 at 9:02 AM, Devin Heitmueller <dheitmueller@kernellabs.com> wrote: > I don't dispute the possibility that there is some *other* bug that > effects users who have some other value for HZ, but neither I nor the > other use saw it. Without this patch though, the device is broken for > *everybody*. > > I would suggest checking in this patch, and separately the HZ issue > can be investigated. > > I'll see if I can find some cycles today to reconfigure my kernel with > a different HZ. Will also check the datasheets and see if Conexant > documented any sort of time for power ramping. It's not uncommon for > such documentation to include a diagram showing timing for power up. Reconfigured CONFIG_HZ to 1000 and indeed I am seeing the problem. Will try to track down the correct fix this afternoon.
diff --git a/drivers/media/video/cx231xx/cx231xx-avcore.c b/drivers/media/video/cx231xx/cx231xx-avcore.c index cf50faf..cf412cd 100644 --- a/drivers/media/video/cx231xx/cx231xx-avcore.c +++ b/drivers/media/video/cx231xx/cx231xx-avcore.c @@ -2412,7 +2412,7 @@ int cx231xx_set_power_mode(struct cx231xx *dev, enum AV_MODE mode) break; } - msleep(PWR_SLEEP_INTERVAL); + msleep(PWR_SLEEP_INTERVAL * 10); /* For power saving, only enable Pwr_resetout_n when digital TV is selected. */