Opened 8 years ago

Closed 7 years ago

#1733 closed defect (fixed)

After suspend/resume, camera light comes on.

Reported by: cjb Owned by: corbet
Priority: high Milestone: Trial-3
Component: distro Version:
Keywords: power Cc: corbet
Blocked By: Blocking:
Deployments affected: Action Needed:
Verified: no

Description

In a normal boot, the camera light is off except for when the device has been opened by the camera activity. When we suspend and resume, the light comes on even though the device isn't open.

Attachments (1)

camera-resume.patch (743 bytes) - added by cjb 8 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 8 years ago by cjb

cafe_pci_resume() does a "cafe_ctlr_power_up(cam);" regardless of whether cam->users == 0, and the open path doesn't.

Here's a first shot at a patch that checks "users" before powering the camera back up, attached. Jon, could you take a look?

Changed 8 years ago by cjb

comment:2 Changed 8 years ago by kimquirk

  • Milestone changed from Trial-2 to BTest-4

Would like to fix this on the B4 boards.

comment:3 Changed 8 years ago by jg

  • Milestone changed from BTest-4 to Trial-2

comment:4 follow-ups: Changed 7 years ago by cjb

  • Resolution set to fixed
  • Status changed from new to closed

Closing this out, since the fix is working fine for us. It would be great to have the patch reviewed and sent upstream, though. Jon, could you take a look?

Some thoughts:

  • the "if users > 0" logic could be moved into the powerup function itself, since the same test is done in both places the function's called from now.
  • the mutex is probably unnecessary?

comment:5 in reply to: ↑ 4 ; follow-up: Changed 7 years ago by corbet

Replying to cjb:

Closing this out, since the fix is working fine for us. It would be great to have the patch reviewed and sent upstream, though. Jon, could you take a look?

Yes, I'll take a look and try it out. I have one more trip in my Period Of Insane Travel (a short hop to Tokyo) then I'll have more time for such things. That should still make it easily possible to get the patch into 2.6.23. When you have a moment, can you mail me a version with a signed-off-by on it?

comment:6 in reply to: ↑ 5 Changed 7 years ago by cjb

Replying to corbet:

When you have a moment, can you mail me a version with a signed-off-by on it?

Done. Thanks!

comment:7 Changed 7 years ago by dilinger

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:8 in reply to: ↑ 4 Changed 7 years ago by dilinger

Replying to cjb:

Closing this out, since the fix is working fine for us. It would be great to have the patch reviewed and sent upstream, though. Jon, could you take a look?

Some thoughts:

  • the "if users > 0" logic could be moved into the powerup function itself, since the same test is done in both places the function's called from now.
  • the mutex is probably unnecessary?

The power_down should really not be necessary; we should probably figure out why ctrl_init is turning the light on/enabling the camera. However, cjb's patch has been committed to olpc-2.6.

comment:9 Changed 7 years ago by jg

  • Cc corbet added
  • Priority changed from blocker to high

Needs to to be reviewed and go upstream via John Corbet, but working in our builds.

comment:10 Changed 7 years ago by jg

  • Milestone changed from Trial-2 to Trial-3

comment:11 Changed 7 years ago by corbet

  • Resolution set to fixed
  • Status changed from reopened to closed

[Better late than never...] Patch looks good to me; I'll be forwarding it upstream. Sorry for taking so long.

Note: See TracTickets for help on using tickets.