Commit Graph

8210 Commits

Author SHA1 Message Date
Raju P.L.S.S.S.N
3f4b302e99 msm: camera: Fix for camera crash
1. update get_sensor_info function to send sensor type
   to the upper layers
2. update table ack pending flag in case of table ack
   received
3. add ov5647 sensor power down function

Change-Id: I92c8e25d377d2fee09276b72119eb95adfcc79f8
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
2012-04-02 11:41:36 +05:30
Linux Build Service Account
c546b3178e Merge "msm: v4l2: use new IOMMU mapping API." into msm-3.0 2012-03-31 04:33:15 -07:00
Ankit Premrajka
459429648e msm: v4l2: use new IOMMU mapping API.
The ion_phys API is being deprecated. Instead there
is a new set of API that does the same thing as ion_phys
if the system has no IOMMU enabled. Otherwise, it
returns an IOMMU device virtual address.

Change-Id: I1f01d33cbc6d236d28c9193a90e48377b9fb35cc
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
2012-03-30 08:25:55 -07:00
Rohit Vaswani
a76e99abc5 Merge branch 'Linux 3.0.21' into msm-3.0
Merge Upstream's stable 3.0.21 branch into msm-3.0
This consists 814 commits and some merge conflicts.

The merge conflicts are because of some local changes to
msm-3.0 as well as some conflicts between google's tree and
the upstream tree.

Conflicts:
	arch/arm/kernel/head.S
	drivers/bluetooth/ath3k.c
	drivers/bluetooth/btusb.c
	drivers/mmc/core/core.c
	drivers/tty/serial/serial_core.c
	drivers/usb/host/ehci-hub.c
	drivers/usb/serial/qcserial.c
	fs/namespace.c
	fs/proc/base.c

Change-Id: I62e2edbe213f84915e27f8cd6e4f6ce23db22a21
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2012-03-30 00:09:34 -07:00
Deva Ramasubramanian
21e602b293 video: msm: wfd: Switch to high-res timers
Using the typical timer_list to keep track of frame queue timeout was
not accurate enough.  In 60 FPS case, 16.6 ms translated into 1
jiffy causing inaccurate FPS and performance problems. Hence switching
to hrtimer for more accurate timeouts.

Change-Id: I49facc6846d6795bcb61674a23b113d6b7f04f1d
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-03-26 16:03:31 -07:00
Raju P.L.S.S.S.N
249e675d83 msm: camera: Fix for csi and vfe driver issues
1.enable csi lanes based on lane count and Update
  csi irq to IRQF_TRIGGER_HIGH
2.update vfe driver not to send any command when
  the table command is in progress

Change-Id: If35c673e432ff54ce9ac5a20350fc0e7068d18e4
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
2012-03-26 12:33:10 +05:30
Deva Ramasubramanian
2e99bff826 video: msm: wfd: IOMMU migration
Migrate WFD to IOMMU APIs.  Commit contains following changes:
- Switch from allocate buffer model to use buffer model in order
  to have the flexibility to map buffers into seperate domains.
- Use the ION caching APIs to flush buffers in case they are cached.
  Earlier on, we used uncached buffers, hence we didn't have a need
  to flush.

Change-Id: I959027ee94a5d6074005f1de420c66cbe55db776
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-03-23 11:46:50 -07:00
Linux Build Service Account
cbc4e12cee Merge "msm: camera: IMX091 sensor kernel driver" into msm-3.0 2012-03-23 10:51:04 -07:00
Linux Build Service Account
74b91a3f6a Merge "msm: camera: Fix the stretch issue in Camera Preview" into msm-3.0 2012-03-23 10:51:04 -07:00
Sreesudhan Ramakrish Ramkumar
3381da7e64 msm: camera: IMX091 sensor kernel driver
This driver includes voltage regulator configuration,
clock configuration, sensor gpio settings and sensor
register settings to enable preview and snapshot for
Sony IMX091 sensor.

Change-Id: Ib974e78bdb4310350c27eda20e0cc49e4c34916e
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
2012-03-22 23:50:44 -07:00
Linux Build Service Account
4948d2f31c Merge "video: msm: wfd: Set SPS/PPS per IDR frame as default" into msm-3.0 2012-03-22 22:20:23 -07:00
Linux Build Service Account
c3dddea389 Merge "msm_camera: Skip the frame when ping-pong register status is not proper." into msm-3.0 2012-03-22 15:52:14 -07:00
Linux Build Service Account
17f5150328 Merge changes I16c7c3b8,I3553fcf6 into msm-3.0
* changes:
  msm: camera: handle mediaserver crash elegantly.
  msm: camera: add fields to msm_stats_buf for cache operations.
2012-03-22 10:55:12 -07:00
Monika Alekhya
fa6318641e msm_camera: Skip the frame when ping-pong register status is not proper.
When YV12 preview format is set,due to timing reasons the viewfinder frame
status is inconsistent.so skip such frames to avoid preview freeze.

Change-Id: Iac65277b76b1c32eefe95b0932149b7152e4b2e7
Signed-off-by: Monika Alekhya <malekh@codeaurora.org>
2012-03-21 11:08:34 +05:30
Linux Build Service Account
7c3972cd66 Merge "msm: camera: Fix for lcd power on issue" into msm-3.0 2012-03-20 18:50:27 -07:00
Deva Ramasubramanian
980636f0a9 video: msm: wfd: Set SPS/PPS per IDR frame as default
Instead of relying on the client to enable this option, enable it by
default internally.

Change-Id: I4d2c7e241a7e5b87ccdea25f876f0eb5732aff74
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-03-20 14:18:04 -07:00
Linux Build Service Account
c768ec881d Merge "video: msm: wfd: Enable logs useful for debugging" into msm-3.0 2012-03-20 13:13:49 -07:00
Raju P.L.S.S.S.N
cea3151b9f msm: camera: Fix for lcd power on issue
After camera probe, releasing LCD_CAMERA_LDO_2V8 &
SKU3_LCD_CAMERA_LDO_1V8 gpios for power on lcd

Change-Id: I2c03f045b0eb5302962145d7466ac2231eea0c83
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
2012-03-20 12:17:31 +05:30
Ankit Premrajka
f3ae3699dd msm: camera: handle mediaserver crash elegantly.
This change stops the VFE first, before unmapping the buffers
registered in the kernel in the scenario of a mediaserver
crash.

Change-Id: I16c7c3b8dcd7a2f9c0ad98cf93cb1980c3a675fa
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
2012-03-19 14:36:26 -07:00
Deva Ramasubramanian
8c5f7b7fd6 video: msm: wfd: Enable logs useful for debugging
Add a few logs that are useful for debugging.  In addition, enabling
WFD_MSG_DBG unconditionally so that we can  take advantage of dynamic
debug.

Change-Id: Id1b616aef1554f04b750207ee14b818e19319b6e
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-03-19 14:30:57 -07:00
Hody Hung
bf410a3f51 msm: camera: add reset csid and csiphy
1) reset csiphy during init to make sure it is in known state
2) reset csid during init to make sure it is in known state
3) remove DBG_CSID flag to get the reset irq after csid_reset

Change-Id: I66b4da08b300a2e43655544cff4db64d9fbe5b19
Signed-off-by: Hody Hung <hhung@codeaurora.org>
2012-03-18 19:13:10 -07:00
Hody Hung
9ba65cfcc3 msm: camera: Add csi_lane_mask and csi_lane_assign
1) Move csi lane params from kernel driver to board
file to support same kernel drivers for different
sensors with different csi parameters (in case of
3D, same kernel driver can support both sensors
with different csi configuration)
2) In msm sensor driver, extract lane assign and
lane mask from plaform info and store in sensor
control structure before passing to csi phy
3) Change csi phy config logic to configure mipi
lanes in any order using lane mask

Change-Id: Iba26640f28d957b17631c98286dba37b7774b42b
Signed-off-by: Hody Hung <hhung@codeaurora.org>
2012-03-18 19:05:50 -07:00
Nishant Pandit
ad5584d31b msm: camera: Fix the stretch issue in Camera Preview
In non zsl camera preview mode, two vfe outputs are configured as
preview and video outputs. Greater of the two is output from main
scaler and the lower one from the secondary scaler. In Camera preview mode,
application matches preview dimensions aspect ratio to snapshot
dimensions and in camcordermode it is matched to video.

In Current design, We have below scenarios for Non ZSL Camera Preview

Case1: Main Scaler is preview and secondary scalar is video
  In this scenario no error is observed
Case2: Main scalar is video and secondary scalar is preview
  In this scenario since preview output in derived from video but the
aspect ratio may not match in camera mode, so we see stretch in camera
preview.

  This issue is fixed by configuring only single VFE output as per
display dimensions in Camera Preview  since the second video output
is never used

CRs-Fixed: 343884
Change-Id: I25a82b417a3ed1b28ea243c6ce988c23d5fed4a7
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
2012-03-17 08:58:42 +05:30
Deva Ramasubramanian
c84975cbfb video: msm: wfd: Add support for in-band sps/pps
This adds support for sps/pps to be prepended to all I-frames provided
by the core. This support needs to be provided by the core as in HDCP
use case, userspace can no longer prepend the sps/pps to I-frames, as
required by WFD spec.

Change-Id: If13437c6eae4088f913a9a7016a477a4342e8c35
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-03-16 14:44:07 -07:00
Kevin Chan
210061ffd9 msm: camera: Add media device node
Add media device node for each camera sensor
Sensor and video node info will be used
for device discovery from userspace

Change-Id: Id8c2f3e952c83259bb6b273cb6b3f04ed93d0ef3
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
2012-03-16 10:34:41 -06:00
Raju P.L.S.S.S.N
2b34501b3b msm: camera: Fix to choose proper CSI device for 8625 target
Update board file to choose proper CSI (Camera Serial Interface)
device for 8625 target to fix CSI IRQ failure

Change-Id: I6c273739ad3114b69cf48ee32fa41cefcc408e2c
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
2012-03-15 16:17:02 +05:30
Raju P.L.S.S.S.N
cc40097e04 msm: camera: Add support to OV5645,OV7692 sensors,AD5046 actuator
Ported OV5647, OV7692 sensors and AD5046 actuator to
V4L2 camera architecture

Change-Id: I70813f236e7cbc9c8c566dd2ee42ad181cb9eccc
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
2012-03-15 16:13:34 +05:30
Linux Build Service Account
f2b497fec2 Merge "msm-camera: enhance the camsenser query structure" into msm-3.0 2012-03-14 00:34:42 -07:00
Linux Build Service Account
4af3fd587e Merge "msm-camera: Add 8MP and 1MP sensor support" into msm-3.0 2012-03-13 19:53:45 -07:00
Linux Build Service Account
7c71edf262 Merge "msm: camera: Fix camera devices disable sequence" into msm-3.0 2012-03-13 17:34:54 -07:00
Mingcheng Zhu
c85b8ade5c msm-camera: enhance the camsenser query structure
More information needs to pass to userspace.

Change-Id: Ia7c5a5cf9a7f48e1c6167fd3ca2ddd56fbdbf8c9
Signed-off-by: Mingcheng Zhu <mingchen@codeaurora.org>
2012-03-13 01:43:53 -07:00
Sandeep Kodimela
c6f7867e7f msm-camera: Add 8MP and 1MP sensor support
Add support to mt9e013 and ov9726 sensors for v4l2 camera
architecture

Change-Id: Ie0e12bb0b8f1d80c0aa40800f5578208ca86efcb
Signed-off-by: Sandeep Kodimela <skodimela@codeaurora.org>
2012-03-12 11:41:07 +05:30
Linux Build Service Account
2d1a595f2d Merge "video: msm: wfd: Allocate bigger buffers for non-16 byte aligned heights" into msm-3.0 2012-03-08 06:20:55 -08:00
Deva Ramasubramanian
a6e4923eda video: msm: wfd: Allocate bigger buffers for non-16 byte aligned heights
WFD driver now rejects non-16 byte aligned widths as MDP cannot add the
necessary padding.  For height, as the hardware will access up to the
next 16 aligned address, we need to allocate a bigger buffer to prevent
page faults.

Change-Id: Ib8aa6ecc827c31eb20c9cd3428d82a62f3668e5b
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-03-05 12:17:13 -08:00
Mingcheng Zhu
e127bd40c4 msm-camera: pass video driver id to daemon.
The video driver index is not passed to daemon in some code

Change-Id: Ie3074fe3590228d8fdd7bd8b7de608820a36627a
Signed-off-by: Mingcheng Zhu <mingchen@codeaurora.org>
2012-03-05 10:54:58 -08:00
Linux Build Service Account
6d4037b278 Merge changes I29731cfb,I0b2d31c8 into msm-3.0
* changes:
  video: msm: wfd: Encode frames asynchronously
  video: msm: wfd: Reset "stopped" state on vsg_start
2012-03-05 04:43:58 -08:00
Kevin Chan
57701f7109 msm: camera: Fix camera devices disable sequence
Ensure clocks are turned off after tasklet is kill
and device is not in active state. This is to
prevent bus lockdown if the device is accessing
the bus and clock is turn off
Also ensure clocks are on, when accessing hardware
registers.

Change-Id: I4010b96709f48b8cf2bf532e57442152f2e30de9
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
2012-03-04 04:07:05 -08:00
Kevin Chan
4bb6ead226 msm: camera: send error to HAL if daemon crashed
When camera userspace daemon crashes, the server fd
will be close, which trigger the msm_server_close
function, we will check if there is an active camera
session. If camera is active, we will send a v4l2
event to HAL layer to signal an error. Application
will exit gracefully and close other open fds and
exit camera session.

Change-Id: I14ebc864d6cace7ca6f4dbfb935623a76eeccaa8
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
2012-03-02 18:44:28 -08:00
Linux Build Service Account
4d3c7ef35e Merge "video: msm: wfd: Set last encoded buffer in input thread" into msm-3.0 2012-03-02 12:21:32 -08:00
Linux Build Service Account
77459a7ea6 Merge "video: msm: wfd: Add controls for setting frame QP and I-Frame period" into msm-3.0 2012-03-02 09:22:41 -08:00
Deva Ramasubramanian
fa78ea2f46 video: msm: wfd: Encode frames asynchronously
The sequence of unlocking, encoding, and locking again was dangerous
since it is unpredictable when the lock can be reacquired in the input
thread. In most cases, this was fine as the encoder took long enough to
return buffers back to VSG that we were able to re-acquire the lock.
However, in cases that encoder is faster than expected, VSG receives an
EBD call back before the input thread can reacquire the lock and put the
encoded buffer into the busy queue. This causes the output thread to
complain about unexpected buffers and drop the frame, which eventually
causes 100% frame drop.

CRs-Fixed: 339432
Change-Id: I29731cfb4a51ffc8f362426d570482ad7f6394b6
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-02-29 12:31:24 -08:00
Deva Ramasubramanian
e9153ee743 video: msm: wfd: Reset "stopped" state on vsg_start
In the sequence of vsg_start(), vsg_stop() and vsg_start(), the second
vsg_start() wouldn't generate buffers as the timer thread would
immediately stop due to to VSG still being in a stopped state.

Change-Id: I0b2d31c81d46e91b898a6210ad2c50d5c9200f1c
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-02-29 12:30:28 -08:00
Linux Build Service Account
3d491ff5bf Merge "msm: camera: Remove total steps restriction for continuous auto focus" into msm-3.0 2012-02-28 18:14:19 -08:00
Linux Build Service Account
cb952149d0 Merge "msm: camera: Support MT9M114 as front sensor" into msm-3.0 2012-02-28 18:14:19 -08:00
Linux Build Service Account
8b74dfe3b8 Merge "msm: camera: Change S5K3L1YX register settings" into msm-3.0 2012-02-28 18:14:19 -08:00
Sreesudhan Ramakrish Ramkumar
96db9983d1 msm: camera: Remove total steps restriction for continuous auto focus
The autofocus function fails under certain test condition
due to restriction on the total number of steps available
for moving the lens. The issue is seen only with piezo
type of actuators. This fix ensures the piezo actuator can
move upto its mechanical limits.

Change-Id: Ic718b4a55016a1cc4a3aecea332e98ba326226c5
Signed-off-by: Rajakumar Govindaram <rajakuma@codeaurora.org>
CRs-Fixed: 332887
2012-02-28 09:45:33 -08:00
Deva Ramasubramanian
df0a0540f6 video: msm: wfd: Set last encoded buffer in input thread
Setting last_buffer to the last encoded buffer in the output callback was
causing problems in concurrent encode/decode scenarios where the core would
take extra time in returning buffers. As a result, the timer would fire
and queue a stale frame to the encoder. This would result in the encoder
eventually returning a stale frame and video stream generator choosing
the stale frame as the last buffer.

CRs-Fixed: 330432
Change-Id: I50da57b1376c7811ec7255b501c4cc918133580b
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-02-27 23:11:57 -08:00
Sreesudhan Ramakrish Ramkumar
61c877d435 msm: camera: Support MT9M114 as front sensor
Change board settings and compile order to change
MT9M114 from back to front sensor

Change-Id: Ib992684baf28472ca3d391b680e92e26b89d273c
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
2012-02-27 23:04:29 -08:00
Sreesudhan Ramakrish Ramkumar
6c368df50d msm: camera: Change S5K3L1YX register settings
Change x-addr start values in S5K3L1YX register settings
for HFR as per read-out pattern.

CRs-fixed: 337269
Change-Id: If15e0e9daf68288d055aa57ed43946ac7b9e2aa5
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
2012-02-27 23:02:37 -08:00
Deva Ramasubramanian
3f2e6028e3 video: msm: wfd: Add controls for setting frame QP and I-Frame period
Add support for controls that allow for userspace to set and get
the I-frame period and QP values for I, P, and B frames.

Change-Id: Ia535291872b671f001fec6bf23601022f7712af0
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2012-02-27 21:21:41 -08:00