Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] cm7 nightly camera preview freeze

OP slugthru

7th March 2012, 09:20 AM   |  #11  
thuanngotau's Avatar
Senior Member
Flag Hải Pḥng
Thanks Meter: 87
 
624 posts
Join Date:Joined: Feb 2009
More
Quote:
Originally Posted by slugthru

Yes, I saw on the cm7 nightly thread people reporting the latest KANGs from kaijura working with no camera problems.
Tried that but doesn't work for me

Sent from my Incredible S using XDA

I've tried all possible CM7 builds including CM7 nightlies & official 7.1 release -> All same -> Camera freeze!
8th March 2012, 11:44 AM   |  #12  
Junior Member
Flag Tehran
Thanks Meter: 3
 
12 posts
Join Date:Joined: Jul 2010
More
try nightly kang version + tiamat kernel

http://forum.xda-developers.com/show...&postcount=530
The Following User Says Thank You to aliireza For This Useful Post: [ View ]
8th March 2012, 11:54 AM   |  #13  
Psyloid's Avatar
Senior Member
Thanks Meter: 236
 
967 posts
Join Date:Joined: May 2011
just my two cents : stop messing with CM7 and go for CM9 Ice cold sandwich ...
camera works 95% flawless with Angel camera Dx on it
13th March 2012, 01:03 AM   |  #14  
OP Member
Thanks Meter: 31
 
45 posts
Join Date:Joined: Feb 2012
Possible fix
I might have found the source of the problem in the kernel's msm framebuffer driver.

I didn't have time to look into more detail but I noticed that in drivers/video/msm/msm_fb.c you have a check for the overlay_play result and force update and sleeping state (don't know what this is for).
If I remove this check and just go everytime with msmfb_pan_update than I no longer see the freeze.

This is the whole diff for my test, if anybody know how to code this the proper way please go ahead:

--- a/drivers/video/msm/msm_fb.c
+++ b/drivers/video/msm/msm_fb.c
@@ -805,7 +805,7 @@ static int msmfb_overlay_play(struct fb_info *info, unsigned long *argp)
int ret;
struct msmfb_overlay_data req;
struct file *p_src_file = 0;
- struct msmfb_info *msmfb = info->par;
+// struct msmfb_info *msmfb = info->par;

ret = copy_from_user(&req, argp, sizeof(req));
if (ret) {
@@ -816,12 +816,11 @@ static int msmfb_overlay_play(struct fb_info *info, unsigned long *argp)

ret = mdp->overlay_play(mdp, info, &req, &p_src_file);

- if (ret == 0 && (mdp->overrides & MSM_MDP_FORCE_UPDATE)
- && msmfb->sleeping == AWAKE) {
+// if (ret == 0) {
msmfb_pan_update(info,
0, 0, info->var.xres, info->var.yres,
info->var.yoffset, 1);
- }
+// }

if (p_src_file)
put_pmem_file(p_src_file);

Unfortunately I won't be able to go ahead with it this week so be my guest
13th March 2012, 09:53 PM   |  #15  
OP Member
Thanks Meter: 31
 
45 posts
Join Date:Joined: Feb 2012
Fixed CM7 nightly camera freeze
Ok, I've had some time today and finally settled on a fix - don't know if it's the "right one" but it solves my problem.

That means that camera works ok, camcorder works ok with the CM7 nightly.

The fix: for vivo it will no longer reset the force update override in the panel setup (for everyone interested see below the file changed with diffs).

For who wants to test this I've attached a kernel update (based on the vanilla cm7 gingerbread): cm7_kernel_cam_fix.zip. (PS: no support for this).

Have fun!

diff --git a/arch/arm/mach-msm/board-vivow-panel.c b/arch/arm/mach-msm/board-vivow-panel.c
index 94ebc62..b91d3c3 100644
--- a/arch/arm/mach-msm/board-vivow-panel.c
+++ b/arch/arm/mach-msm/board-vivow-panel.c
@@ -1106,13 +1106,15 @@ int __init vivow_init_panel(unsigned int sys_rev)

B(KERN_INFO "%s(%d): enter. panel_type 0x%08x\n", __func__, __LINE__, panel_type);

+#ifndef CONFIG_MACH_VIVO
//use dmap for hitachi panel
if(panel_type == PANEL_VIVOW_HITACHI)
{
mdp_pdata.overrides = 0;
pr_err("%s: mdp_pdata.overrides = 0\n", __func__);
}
-
+#endif
+
msm_device_mdp.dev.platform_data = &mdp_pdata;
rc = platform_device_register(&msm_device_mdp);
if (rc)
The Following 9 Users Say Thank You to slugthru For This Useful Post: [ View ]
13th March 2012, 09:57 PM   |  #16  
OP Member
Thanks Meter: 31
 
45 posts
Join Date:Joined: Feb 2012
Quote:
Originally Posted by Psyloid

just my two cents : stop messing with CM7 and go for CM9 Ice cold sandwich ...
camera works 95% flawless with Angel camera Dx on it

You might be right but for the moment CM9/AOKP are not stable enough for me to use daily (eg camera - with Angel cam - stopped working after 5-10 pictures).

Besides, it's been fun
13th March 2012, 11:20 PM   |  #17  
OP Member
Thanks Meter: 31
 
45 posts
Join Date:Joined: Feb 2012
Btw, can anybody post a link to this fix in the cm7 nightly thread ?
Looks like I dont have enough "thank you's" to post in the development forums

Sent from my Incredible S using XDA
14th March 2012, 05:11 AM   |  #18  
Senior Member
Flag Adelaide
Thanks Meter: 995
 
1,627 posts
Join Date:Joined: Sep 2011
More
Exclamation
Quote:
Originally Posted by slugthru

Btw, can anybody post a link to this fix in the cm7 nightly thread
Looks like I dont have enough "thank you's" to post in the development forums

Sent from my Incredible S using XDA

I think its a 10 post minimum to post in the dev forum, you should be OK now.

Edit: thanks for posting this, I have recently gone back to cm7 from which the reason I left it for sense is because of the camera issue. Having had no satisfaction it any of the sense customs (every kernel available to this device has Bluetooth dropout issues) I installed a cm7 'nightly' with tiamat kernel and used a third party camera app to get around the camera freeze issues I was experiencing. This seems like a much better fix.
Last edited by Nonverbose; 14th March 2012 at 05:19 AM.
14th March 2012, 08:06 AM   |  #19  
kaijura's Avatar
Recognized Contributor
Thanks Meter: 1,817
 
1,305 posts
Join Date:Joined: Jan 2011
@slugthru
nice work, you should submit this on the cm gerrit review. None of their devs who manage the vivo read this section anymore and I don't see anyone ever dev'ing for the vivo except kali- / Guilio.

You should do it so that they are aware of it and can implement a patch.
14th March 2012, 09:03 AM   |  #20  
Senior Member
Flag Chennai, India
Thanks Meter: 74
 
395 posts
Join Date:Joined: May 2011
More
Can I flash this kernel fix to MIUI.?

Sent from my Incredible S

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes