Poor video quality is observed as VUI fps information is not present in
the encoded bit stream. Add support for VUI timing info in video driver
and an additional V4L2 control to set from user space.
CRs-Fixed: 399017
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Conflicts:
include/linux/videodev2.h
Change-Id: I970d4c479009da2d08531a9e9b8489a84cc5d44c
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Add new V4L2 control to set AU delimiter for AVC.
Change-Id: I8c72cb89f18c9b2b550b906d797eafb73ac4ebbe
CRs-Fixed: 389030
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
This patch ensures that camera is recovered by propogating the
error event when sensor is pulled off.
Change-Id: I4147e02342c2538db8337d3e04735cf97b2d7635
Signed-off-by: Azam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
Starting with B family chips, the IOMMU client is responsible
for registering a domain (page table) and attaching it with
the corresponding device context when required.
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Conflicts:
include/media/videobuf2-msm-mem.h
Change-Id: I2105f3cdd94a5e42c09a46e32ed615a35615485d
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Starting with B family chips, the IOMMU client is responsible
for registering a domain (page table) and attaching it with
the corresponding device context when required.
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Conflicts:
include/media/videobuf2-msm-mem.h
Change-Id: I98f97805a67d597da55780f8c6739c9734a19a14
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
- Pass number of ps string instead of ps length
- Use proper name for radio text length
CRs-Fixed: 388115
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
(cherry picked from commit 1c0db5273216ea80f3762dc5675daebac16e1e0b)
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
(cherry picked from commit d327e591c875450aa8ff157645974aa3fb7c0cc3)
Change-Id: I501af5c175c07f84dc117fc5e8ac410cecc8c35d
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
- Sometimes user data getting corrupted and it is not available
at the kernel level
- Use the kernel buffer instead of user space buffer to copy
the data from fifo.
- Increase the STD_BUF_SIZE buffer size from 64 to 128 bytes to compatible
with Frameworks buffer size
Change-Id: I1e0fd8e59b218e7bec7820b0c27e2405d472cd56
Signed-off-by: Venkateshwarlu Domakonda <Venkateshwarlu@codeaurora.org>
(cherry picked from commit 7f095c44d4f63b168820aeba9d72b2504a879ab9)
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Support is added for MPEG-2 extension and user data. With this
changes Core returns extension and user data as an extradata.
Change-Id: I66a230aa651dabafa883625ce9f687d5c35b8671
Signed-off-by: Shobhit Pandey <cshopan@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
All msm_ion clients need to use <linux/msm_ion.h> instead of
<linux/ion.h>
Change-Id: I521a079686780c117ccc9d91f27b9c59aaeafa04
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
When v4l2 streamon() is called the framework moves to streamon state,
after queueing the buffer. A state check is performed during dqbuf().
Sometimes when dqbuf() is called streamon() function has not completed
setting the state transisiton flag. This results in failure to dqbuf() as
the framework has not moved to streamon. This patch adds a mutex
around state transitions and dqbuf() calls.
Change-Id: I0eadc4aaffbed62facd7dd250893e50448d7e52b
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
- Adds supports to send DECODER command to
decoder which inturn used to CLOSE the instance.
- Adds supports to send ENCODER command to
encoder which inturn used to CLOSE the instance.
Change-Id: Ia6037fdf66824538124f775442150b7a4ed201b8
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>
Since VCAP is behind IOMMU, in order to get proper address for VCAP
hw to write to driver needs to alloc buffer from ION and not
kzalloc.
Change-Id: I1f4fcc6834d0ea09ba0fc812b301219d35f40721
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Extend the image mode defines to include the stats buffers.
Change-Id: I4c7a687cb08695d43befa15f6e18e7070d4e2976
Signed-off-by: Mingcheng Zhu <mingchen@codeaurora.org>
Core gives aspect ratio information for H264/Mpeg2 in a
shared memory register. This change will fetch the value
of the aspect ratio from the designated register and append
this information to the frame_info extradata which can be
used by the client.
Change-Id: Iacacaf1b1181546ba2d09362a51bbe5178a63999
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
Add Image Signal Processor support for 8974 chipset.
Change-Id: Id1f425e59d48e490d5e426f5d056bca7c54b54a2
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Move the ping pong buffer configuration and bus scaling
logic from vfe to axi as for concurrent camera case,
vfe component will be turned off
Change-Id: I39b465dcc121b83f960370b25349dc941ac8c34b
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Provide mechanism to decide whether the currently tuned station
is valid or not.
CRs-Fixed: 371689
Change-Id: I1a28537d242fbb636732b120c9259ad5e7fffcc0
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
RDI and PIX have different timing characteristics.
They should not share the same START_ACK notification.
Add rdi0, rdi1, rdi2 reg update ack notifications.
Change-Id: Id36b52ae5cf98f5f9f86e92028ec7ab0e7427a23
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
Refactor reset to axi_reset and vfe_reset. axi_reset
initializes stream off/on, irq related registers.
vfe_reset only handles stuff related to VFE components.
VFE_RESET_2 is removed. Both axi_reset and vfe_reset
are synchronous calls.
Change-Id: I274c17defbfbc56056b020c48239696b0f579b0e
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
Instead of counting the frame id inside VFE camif,
obtain the sof count in ispif and then pass the count into VFE
also add the capability to enable the sof count in VFE
Change-Id: I90c0178d933cb4c80627eb9a5f22b4bb13b10b27
Signed-off-by: Peter Liu <pingchie@codeaurora.org>
1. Move the logic to enable write masters from vfe
to axi as vfe component may not be enabled for concurrent camera
2. Pass the vfe operation mode and port info from user space
instead of storing in the global shared variable
Change-Id: Ibe01bbe6a449afc3e4116c0a1c5f0d68662c5ee6
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Logically from RESET to RESET_ACK, no interrupt should be
generated from hardware. Synchronous RESET call makes
code flow simpler.
Create a new ISP command VFE_CMD_RESET_2 which blocks
until RESET_ACK irq fires.
Change-Id: I1c1974c01d7037f457ab767a83f5cece3fe23705
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
Add Camera Control Interface (CCI) driver based on V4L2
architecture. Add probe sequence, subdevice creation,
hardware registers and configuration through V4L2
subdev call mechanism. This driver is responsible for
communicating with sensors, actuators and EEPROM
connected on I2C bus.
Change-Id: I2f135798e26348740f58da223caafdd8dfbbd098
Signed-off-by: Hody Hung <hhung@codeaurora.org>
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
ISPIF changes on 8974 to include VFE interface. Pass VFE interface
from user space ISPIF module and configure accordingly. Add support
to configure extra PIX and RDI interfaces.
Change-Id: Idb840fa3d1ef2d1a7242fc2175b8fa64f75aa14b
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
NR for VCAP is capable of receiving manual tuning parameters. In
order for the client to pass in these parameters a separate ioctl
was developed.
Change-Id: Ia8d7e8de80ee4fd7ccd2019d30b4457f1000e106
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Buffer unprepare is not done while releasing stats buffers,
hence add support for buf unprepare ioctl
Change-Id: If4fa95c270363d1948b5924c2365785d1427e2f4
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
The VBIF is capable of triggering a false bus error the first time
it performs a read. This fix creates a dummy read event that
happens every time that the VCAP is powered on that will ignore
the false positive VBIF interrupt error, so that during normal
operation the error can be properly identified.
Change-Id: Ie56e60faf2067fab7a05a0f16c2d840408c35035
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Currently when VFE requests for a free buffer, we search based
on the image mode sent from VFE. In some cases, there can be
multiple instances with the same image mode. This means the
buffer lookup logic has to take into consideration other
parameters like current usecase, vfe operation mode etc.
To ease this, add support for buffer lookup based on
the instance handle. The instance handle contains information
about where to get the buffer from. So the buffer lookup
logic does not have to know about other details. The instance
handle is decided when the user sets the format for a particular
instance. It is passed on to the VFE during AXI configuration.
VFE stores this and sends it whenever it requests for a free
buffer for a particular output.
Keep the current image_mode based buffer lookup logic for
legacy targets.
Change-Id: I78c3db77ac4014365c9866ff780ec71ac4c7ff87
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
Make changes to support dynamic selection
of subdevs through the resource manager. Instead of
choosing the subdevs to be used by the current mctl
session statically during open, the VFE, AXI and VPE
subdevs are now selected and initialized later as per
session requirements.
Change-Id: I8df951b81f0ccc77e5b4f64bf5cf620822cf0175
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Provide mechanism to decide whether the currently tuned station
is valid or not
CRs-Fixed: 371689
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
Change-Id: I1f058bdeec8ecebe85b950631118c1ac9604760f
Closing VCAP devices could be called without calling stream off:
This problem would make VCAP resources taken by devices no longer
running.
Using unsigned variable to store signed result: This problem would
allow stream on to continue even when function returned error.
Fix problem of reading VP irq status register too early: It was
possible for cadence detection bit to be propgated faster by only
a few clock cycles then the picture done bit. When the irq status
read was performed and by the time a write to the clear register
was performed the picture done bit would propgate. Since the irq
is rising edge triggered this would cause a problem and the irq
would not be triggered until VP was reset.
Remove unused code
Change-Id: Iba72354c06287efb27178edf64d8d3f459dbf954
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
This change fixes a crash when running VCAP in de-interlace mode.
The problem was noticed in the introduction of kernel 3.4. VCAP
was improperly using the videobuf2 framework APIs. Since VCAP is
already reliant on queue structure provided by videobuf2 framework,
we created our own basic version of the qbuf and dqbuf calls that
have some similarities to the videobuf2 framework. This addition
was necessary since we are calling qbuf from a kernel work thread.
Since moving to kernel 3.4 there has been a change in videobuf2
qbuf that dereferences the current process.s mm_struct, from a
kernel work thread this struct is NULL, which was causing a crash.
When we are de-interlacing a captured video we are cycling the
buffers internally in the driver, which is why we needed to create
our own q/dq buffer functionality.
Change-Id: Id51b775ae7f0a58bbac8a581e07fa02417802a30
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Add support for multiple ispif interfaces streaming concurrently.
PIX abd RDI interface can stream at same time or two RDI interfaces
may stream at one time depending on usecase
Change-Id: Ib3cef418cd2816bc19891c1855e1dcae5a2a55a1
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
Due to some reason, user can decide to abort a live
snapshot while it is in progress. Add support to stop
the VFE write masters right away so that the VFE
stops writing on the buffers allocated by the user.
Also send an ACK message to userspace once we get
confirmation from VFE that it has stopped using
the buffers.
CRs-Fixed: 373080
Change-Id: Ia4d9134298dd3a1a51f5829f9bcc2b80d6f21d0f
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
Initial commit for Camera Post Processor Driver.
The driver contains frame queuing and process logic
using v4l2 framework.
Change-Id: I283c11c3de3bd121b9c3ea5af1446c13e188d329
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Provide interfaces to allow host to update the spur table
with spur frequencies specific to platforms.
CRs-Fixed: 352591
Change-Id: I139ac84a4a45578ebab63c26d7176666d47d3e2a
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
Implement IOCTL to set the Internal FM TX Tone
generator values
Change-Id: I2a94d5559a90362b9439ea510e98489102ed0c04
CRs-Fixed: 356789
Signed-off-by: Ayaz Ahmad <aahmad@codeaurora.org>
Enable RDI registers and irq handler in VFE. RDI may
be used to dump sensor data directly to memory
without passing through VFE.
Change-Id: I1ca131c31913f62228364440bbe2cd98a6079003
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
Add initial driver code for IRQ Router hardware.
It shall be implemented as a v4l2 subdevice of the
msm cam server node.
Add logic in msm cam server to request for irqs configured
to the IRQ Router, which can be individual or composite.
When the individual camera hardware cores interrupt,
the cam server receives them through the common interrupt
handler and dispatches them to to the respective hardware
core's v4l2 subdevice.
If the usecase demands that the interrupts from two
different hw cores be composited into a single interrupt,
(for eg: VFE and ISPIF), then the cam server stores this
configuration in its interrupt lookup table. When the
interrupt is triggered on the composited interrupt,
it is dispatched to the individual hardware cores
which have been composited into that interrupt.
Change-Id: Iaadd60cc24de9b5ba8d09a151474658902244d7b
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
Use image mode instead of vfe operation mode to
get and free buffer
Change-Id: I33e912b0fa4e16d3a89161f98ab9a659b9c197f6
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
This change provides support to raise the clks to turbo mode for mpeg4
clips with high number of slices. The firmware performance degrades if
the number of slices is more than 10. Without this fix, we see lot of
frame drops happening, causing a freeze effect.
Change-Id: Ia897854ef6d30bb97cd37810b22eb1ab5ad818fb
CRs-Fixed: 358615
Signed-off-by: Arun Menon <menon@codeaurora.org>
Provide interfaces to allow host to update the SPUR Table
with newly found spur frequencies and their RMSSI values.
CRs-Fixed: 352591
Change-Id: I84f296ea313971cc1995c644d604f96581be5f7f
Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
Ispif is a separate hardware block. Decouple
it from sensors so that it can be controlled for various
camera usecases.
Change-Id: I539fcb4166edc7a14d15a94c2f7f56b2f196a971
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>