3 years agospi: tegra: set INTR_MASK only once
Krishna Yarlagadda [Wed, 11 May 2016 04:54:16 +0000]
spi: tegra: set INTR_MASK only once

INTR_MASK does not change for each transfer and all interrupts
are enabled always. Write to register only during setup and resume

Bug 1731138

Change-Id: I53f600bd86cb7d605c3f26f6dbbf25ec28346f71
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1145628
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agospi: tegra: write to DMA_CTL only when needed
Krishna Yarlagadda [Wed, 11 May 2016 04:06:44 +0000]
spi: tegra: write to DMA_CTL only when needed

SPI_DMA_CTL register control interrupts for chips
before T210. Write to this register only for those
chips

Bug 1731138

Change-Id: Ie0979ea15e01faca9e4ee0643499ce7ee5bffb68
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1145627
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agomedia: mipi_cal: fix building errors for T124
Bryan Wu [Fri, 20 May 2016 00:55:21 +0000]
media: mipi_cal: fix building errors for T124

Bug 1686313

Change-Id: I92fe398998cbd877c7e39f81687bf24cacb90293
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1150781
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers:media:platform:tegra: Fix pll_d clk_get
Wenjia Zhou [Thu, 19 May 2016 01:01:46 +0000]
drivers:media:platform:tegra: Fix pll_d clk_get

NVHOST_VI_IOCTL_ENABLE_TPG need pll_d clk, however when dev_id is present, it
has higher priority than con_id, thus causing clk_get return unexpected result.
Remove dev_id to make sure "pll_d" is returned.

bug 1686313

Change-Id: Iceb12835ffeca3c3fd309fbd496a42974263fc61
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
Reviewed-on: http://git-master/r/1150109
Reviewed-by: Bryan Wu <pengw@nvidia.com>
Tested-by: Bryan Wu <pengw@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: media: camera: Ring buffer management
Bhanu Murthy V [Sat, 16 Apr 2016 02:54:08 +0000]
drivers: media: camera: Ring buffer management

Implement ring buffer which holds two buffers
before delivering frames from VI. This is to
ensure there is no performance impact using
single thread and memory write of the buffer
is complete.

Add logic to store buffers at the start,
release one buffer every frame once the queue
has only one free slot left.

Free all buffers once the stop streaming
is signalled.
Clean up for two thread implementation and
improve state mechanism in single thread

Bug 200092604
Bug 1736471

Change-Id: Ia9784ee0c7925b5ec4dd6ca5f0b3354af8323662
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit 39a3d10573140a98aea3b67044f056772fa2be9f)
Reviewed-on: http://git-master/r/1127760
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141924
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: media: camera: CSI closure for hotplug
Bhanu Murthy V [Sun, 17 Apr 2016 01:33:33 +0000]
drivers: media: camera: CSI closure for hotplug

Adds required routine for CSI HW to reach
idle state after hotplug. Resolves the mc-err
and zero writing issue in case of resolution
change.

Bug 200092604
Bug 1736471

Change-Id: I265736b185c3de206edcae017703840ae006e368
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit 96fa5e4ae547dbe7af15bbefd47d6118566da806)
Reviewed-on: http://git-master/r/1127813
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141922
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: media: camera: Hotplug fixes
Bhanu Murthy V [Wed, 13 Apr 2016 19:47:40 +0000]
drivers: media: camera: Hotplug fixes

Add check to block immediate hotplug event being
processed before start of streaming.
Do sync point re-init to a clean state before
starting streaming.

Bug 200092604

Change-Id: I4be38edff61eb06e1bd52a63ba288610ca7bb52d
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Signed-off-by: Jihoon Bang <jbang@nvidia.com>
(cherry picked from commit 1d76ef9f6822d88b2e486ecfb21429494e7abdff)
Reviewed-on: http://git-master/r/1126327
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141921
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

3 years agomedia:platform:tegra: Add mipical in VI
Wenjia Zhou [Thu, 7 Apr 2016 23:21:41 +0000]
media:platform:tegra: Add mipical in VI

Call mipi calibration in start_streaming call

bug 1686313

Change-Id: Ifbfc5f9125e5c5fec0ad959da0b54ad6a05379c0
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
(cherry picked from commit 0fecec602ec32b13ee1d6fdad72cf166cdbe166b)
Reviewed-on: http://git-master/r/1122127
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141916
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia:platform:tegra: Aggregate VI LA BW
Wenjia Zhou [Wed, 13 Apr 2016 22:35:20 +0000]
media:platform:tegra: Aggregate VI LA BW

Add an aggregation function in tegra_vi. It will combine camera userspace VI LA
bw request and V4L2 usecase.

Bug 1736471

Change-Id: Ic9255cb4fdfc5260f1478bda622d8b43d3b8f447
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
(cherry picked from commit 2deba04c9d680b17c31671548f792d0ae575f838)
Reviewed-on: http://git-master/r/1126384
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141907
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tegra: adding enumerations to csi driver
Bryan Wu [Wed, 30 Mar 2016 23:57:22 +0000]
media: tegra: adding enumerations to csi driver

Adding support for enum_framesize and enum_frameinterval to csi driver.
Now just support TPG and need to revisit support for real sensors

Bug 1736471

Change-Id: I73ad38a394b44661a01e672ff16ef4fdf98140f5
Signed-off-by: David Wang <davidw@nvidia.com>
Signed-off-by: Bryan Wu <pengw@nvidia.com>
(cherry picked from commit c0f605b124b7fd0ca4502fb74c8d8f47e96bc48b)
Reviewed-on: http://git-master/r/1118014
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141904
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tegra: return busy when tpg is opened
Bryan Wu [Mon, 4 Apr 2016 21:32:44 +0000]
media: tegra: return busy when tpg is opened

When TPG device channel is opened, openning a real sensor should get a
device busy failure and vice versa.

Bug 1736471

Change-Id: Idb2d68a96d1f5463f154e4604a310c133f127ac2
Signed-off-by: Bryan Wu <pengw@nvidia.com>
(cherry picked from commit 547df5f7ffbc0c420bd524cacfabbbc4355298de)
Reviewed-on: http://git-master/r/1119974
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141903
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tegra: move TPG setup before bypass check
Bryan Wu [Fri, 1 Apr 2016 01:13:34 +0000]
media: tegra: move TPG setup before bypass check

Bypass mode doesn't want to treat TPG as a sepecial subdevice but
handle it as a normal sensor. So move TPG programming before bypass
check will setup TPG register in kernel even for bypass mode.

Bug 1736471

Change-Id: Ifaf829e55bf207e30fb1671b2f492deba0343ea6
Signed-off-by: Bryan Wu <pengw@nvidia.com>
(cherry picked from commit cd56a2248f435e62e9aec3e7c81e6f3f5029736c)
Reviewed-on: http://git-master/r/1119252
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141902
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tegra: add completion sync
Bryan Wu [Fri, 8 Apr 2016 06:52:26 +0000]
media: tegra: add completion sync

When stop streaming, 2 kernel threads need synchronization. Using
completion framework in kernel to sync between kthreads.

Also remove lock and flags for HDMI unplug operation, which can be
achieved by completion sync.

Bug 1736471

Change-Id: I10df7499426a6d7b5489d836590f095f2d1baf12
Reviewed-on: http://git-master/r/1122379
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
(cherry picked from commit 2caab0bb07458efecd8934493677477a129d5d5e)
Reviewed-on: http://git-master/r/1124256
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141898
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tegra: revise tpg set/get_fmt ops
Ken Chang [Tue, 12 Apr 2016 08:00:48 +0000]
media: tegra: revise tpg set/get_fmt ops

Reuse the working *_mbus_fmt callbacks in set_fmt
and get_fmt pad ops.

This change also adds input_status callback, returns
the status based on the current tpg mode.

Bug 200184502

Change-Id: I9ad5f67465fa3d8a2d956d55e3c7cf5e08dd0cd7
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 3131eba1e9a94c8666bd7ad726750d5573dd7880)
Reviewed-on: http://git-master/r/1124154
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141897
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tegra: camera: revise try_fmt callback
Ken Chang [Thu, 7 Apr 2016 07:40:31 +0000]
media: tegra: camera: revise try_fmt callback

Return a supported format for invalid formats with return
code '0'. Return -EINVAL only for the mbus format code is
not supported.

Bug 200184502

Change-Id: Iaecb17162625fd70454143b436e841c36d8556d4
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 9265594cf94bf7dfadb3a939428732ed65035166)
Reviewed-on: http://git-master/r/1121723
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141896
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: media: camera: Dual capture fixes
Bhanu Murthy V [Fri, 8 Apr 2016 18:45:29 +0000]
drivers: media: camera: Dual capture fixes

Fix init routine for bypass mode not to reset
CSI block mode to 2x bricks by default
Fix unbalanced and duplicated dpd disable call
for sensor flow. VI driver enables the required
CSI lanes power.

Bug 1736471
Bug 1683411

Change-Id: I345ff6e081c558bd2f3a0216d6c8122491a28dbe
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit 62c47fb8d584f846b671506b642d0e67d2ea2831)
Reviewed-on: http://git-master/r/1122646
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141893
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers:media:camera: Add VI mode clk,bw control
Wenjia Zhou [Fri, 1 Apr 2016 23:12:29 +0000]
drivers:media:camera: Add VI mode clk,bw control

- Every time when a channel is open/close, it will update its requested vi bw
  and clock. And call API to update the final vi bw/clock.
- Use vi_v4l2.cbus to avoid conflict with userspace
- Add vi_v4l2_update_isobw API
  - When userspace call this API, it will take account into
    current VI mode request. Vice versa.

Bug 1736471

Change-Id: Ibf0926d20517a92c268f68008abfd7561bebe957
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
(cherry picked from commit 6de786b5427e3f91f6d31bb15dc1ab022907e3ac)
Reviewed-on: http://git-master/r/1118118
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141875
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers:video:tegra:host: Change vi clk name
Wenjia Zhou [Fri, 13 May 2016 23:57:04 +0000]
drivers:video:tegra:host: Change vi clk name

change to vi_bypass which is a client under vi bus

Bug 1683411

Change-Id: I4fea799b7b3eb2fd5825ec01a95f8dd477537666
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
Reviewed-on: http://git-master/r/1147819
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bryan Wu <pengw@nvidia.com>
Tested-by: Bryan Wu <pengw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agoplatform:tegra:tegra12_clock: Add clients under vi
Wenjia Zhou [Fri, 13 May 2016 23:54:11 +0000]
platform:tegra:tegra12_clock: Add clients under vi

vi.c4bus
--vi_v4l2.c4bus
--vi_bypass.c4bus

Bug 1683411

Change-Id: I9b54fcac441019966ddaba5280472d19b3685aac
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
Reviewed-on: http://git-master/r/1147818
Reviewed-by: Bryan Wu <pengw@nvidia.com>
Tested-by: Bryan Wu <pengw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agotegra-alt: adsp: add adsp recovery mechanism
Viraj Karandikar [Wed, 20 Apr 2016 11:37:30 +0000]
tegra-alt: adsp: add adsp recovery mechanism

ADSP recovery mechanism can get triggered by two ways.
First is by ADSP OS driver calling crash handler callback.
This can happen when watchdog timer expires and sends
interrupt to CPU. Second way is when any communication
with ADSP timesout.

In both cases crash handler is called which stops ADSP
and does cleanup work. It then kills parent process
(mediaserver) to trigger reload ADSP OS and apps.

Read only control "ADSP Recovery Count" indicates number
of times the ADSP was recovered.

Bug 200178310

Change-Id: I7db07d0716443aad972f946412bd75d31643e901
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1129606
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>

3 years agotegra-alt: adsp: fixes for adsp recovery
Viraj Karandikar [Fri, 20 May 2016 08:35:51 +0000]
tegra-alt: adsp: fixes for adsp recovery

Preparatory changes for enabling ADSP recovery.
Update tegra210_adsp_deinit function.
Request ACK for connect messages.
Add checks for successful ADSP resume.

Bug 200178310

Change-Id: I59a87dbc88adcbe4766a448d75565afbdd45f909
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1151021
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com>

3 years agoARM64: DT: Hawkeye: Use DTB for Wi-Fi card detect
Mohan Thadikamalla [Thu, 19 May 2016 05:40:23 +0000]
ARM64: DT: Hawkeye: Use DTB for Wi-Fi card detect

- Enable card detect from DT and set sdhci_host
as sdhci-tegra.1
- Use power retry country from DT and set
pwr_retry_cnt as 5

Bug 200166355

Change-Id: I0527161a46642fd55415be3bd499cb5e7d64047e
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
Reviewed-on: http://git-master/r/1132565
(cherry picked from commit a8428740a5083f5cb12b3c28da8f7b6232d94231)
Reviewed-on: http://git-master/r/1132556
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agonet: wireless: bcmdhd: Add card detect for DT
Mohan Thadikamalla [Thu, 19 May 2016 05:06:56 +0000]
net: wireless: bcmdhd: Add card detect for DT

- Implement set_carddetect platform call back for DT
- Remove TEGRA_PREPOWER_WIFI config check for adapter power up
and use pwr_retry_cnt DT parameter for no of retries
- Add sdhci_host and pwr_retry_cnt DT parameter support
- Request wifi power and reset gpio's

Bug 200166355

Change-Id: Ib3aced1d60f7e5242bfcff7b26cbf99610faca5a
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com>
(cherry picked from commit 81349e483d9526a9730ff56332c86fc9498f5baa)
Reviewed-on: http://git-master/r/1128873
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

3 years agodriver: media: add V4L2_MBUS_FMT_SRGGB12_1X12
esen chen [Fri, 6 May 2016 07:52:13 +0000]
driver: media: add V4L2_MBUS_FMT_SRGGB12_1X12

fix the 12 bit crash issue

Bug 200168141

Change-Id: I8a4321d7e8d4a5cb7db67036c247f8793c4b3441
Signed-off-by: esen chen <esenc@nvidia.com>
Reviewed-on: http://git-master/r/1142603
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agoarch: arm64: config: enable IMX185 sensor
esen chen [Thu, 28 Apr 2016 05:17:14 +0000]
arch: arm64: config: enable IMX185 sensor

for android

Bug 200168141

Signed-off-by: esen chen <esenc@nvidia.com>
Change-Id: I9ebfb6959b7210f6d6c625014c060d1a50105242
Reviewed-on: http://git-master/r/1134940
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agonet: wireless: bcmdhd: Add command to restrict p2p AGO bw
Srinivas Ramachandran [Tue, 3 May 2016 22:27:27 +0000]
net: wireless: bcmdhd: Add command to restrict p2p AGO bw

When device is operating with 50Hz HDMI refresh rate
1. If AP is not associated, restrict the bw of p2p AGO to 20Mhz
2. If AP is associated, follow the AP bw

This is a WAR to prevent controller connectivity issues
in 1080p50Hz mode due to Wi-Fi desense.

Bug 200176240
Bug 200193305

Change-Id: I759aefe2ad175f195dc26239e77839bf0abb12f5
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: http://git-master/r/1146622
(cherry picked from commit 1aff341bd28a5824e16dea4b1c7b63262b0589e6)
Reviewed-on: http://git-master/r/1148786
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agobcmdhd: added set and get btcparams functions
Mahesh Patil [Mon, 18 Jan 2016 20:32:43 +0000]
bcmdhd: added set and get btcparams functions
support to driver

Bug 1719066

Change-Id: I9f75026c841195dad6725dac2399a5d35edbb410
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: http://git-master/r/933954
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoASoC: Codec: fix jack detection in suspend state
Sameer Pujar [Mon, 16 May 2016 15:23:21 +0000]
ASoC: Codec: fix jack detection in suspend state

Jack interrupt is disabled when system is supspended and any jack event
happens during suspend is not acknowledged by cpu and results in wrong
h2w state value, causing audio routing issue. This fix allows re-check
of jack status when the device resumes and updates h2w state properly.

Bug 200199970

Reviewed-on: http://git-master/r/1148349
(manual cherry pick from commit 130cb108a2d71302916f7c96db9d99762b9f3161)

Change-Id: I5e32aa0fdf107e34f0d5a237910efd9970655da5
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: http://git-master/r/1149862
GVS: Gerrit_Virtual_Submit
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>

3 years agoRevert "iio: imu: NVI v.323 Fix ICM significant motion"
Kerwin Wan [Tue, 17 May 2016 06:46:27 +0000]
Revert "iio: imu: NVI v.323 Fix ICM significant motion"

This reverts commit 0f67637c74e564c814380f24be1d1730dcec67ce.

Bug 200199736

Change-Id: I444f1899fb41b11794f1451a0022b3083179323a
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-on: http://git-master/r/1148789
GVS: Gerrit_Virtual_Submit

3 years agomedia: tc358840: fix code for format update
Ken Chang [Thu, 31 Mar 2016 11:37:04 +0000]
media: tc358840: fix code for format update

mbus_fmt_code shall be update only for
V4L2_SUBDEV_FORMAT_ACTIVE.

Bug 200184254

Change-Id: I8ed3e81ff50fe663fc33ea2b6380ef6ce4c33e10
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 53f3463519b9ea393fc6b482603926b5cd383117)
Reviewed-on: http://git-master/r/1118318
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141888
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: platform: tegra: update channel format correctly
Ken Chang [Thu, 31 Mar 2016 11:35:50 +0000]
media: platform: tegra: update channel format correctly

The channel format shall be set based on the current used
format from the subdev not the capabilities.
And shall be updated only when s_dv_timings is successful.

Bug 200184254

Change-Id: I76ffc239f65371f3b01eaf62144677d77e447bdb
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit b17eeac5e29bb595f3fb21f280cb6fc42d7e11cf)
Reviewed-on: http://git-master/r/1118317
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141887
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: platform: tegra: revise try/set_fmt
Ken Chang [Thu, 31 Mar 2016 07:20:53 +0000]
media: platform: tegra: revise try/set_fmt

video *_mbus_fmt ops are removded from upstream kernel thus
use pad set/get/try_fmt ops instead.

set_fmt shall first check if the pixelformat is supported,
if not, pick up the default then call try_fmt, which with
which set to V4L2_SUBDEV_FORMAT_TRY to query the device
capaibility.
Then set the format with which set to V4L2_SUBDEV_FORMAT_ACTIVE
to make the subdev use this format.

Bug 200184254

Change-Id: I523b6548ba24dda7360b7f3be2ccd76e840094f3
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 735b6a9464daa7634f2cc4576fd8ff376dd0079f)
Reviewed-on: http://git-master/r/1118316
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141883
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tegra: camera: add missing image format info
Ken Chang [Thu, 24 Mar 2016 05:46:19 +0000]
media: tegra: camera: add missing image format info

Add below missing info for v4l2_pix_format in the v4l2
ioctl .vidioc_g_fmt_vid_cap callback:
- pixelformat
- bytesperline
- sizeimage

Bug 200184254

Change-Id: I0ce64689649aa4314f7f87ae6af18d8a6644c941
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 7ff3e648aafba9b21500781f78016e5101d25112)
Reviewed-on: http://git-master/r/1117405
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141882
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tc358840: move callbacks to pad ops
Ken Chang [Wed, 30 Mar 2016 05:00:43 +0000]
media: tc358840: move callbacks to pad ops

Move enum_dv_timings and dv_timings_cap callbacks
from video ops to pad ops because video ops are
removed from upstream kernel.

Bug 200184254

Change-Id: I7d18d4bd176ef51e0cfde2da6d43c2bf9ff6ea65
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit c53733af6527d09c37380aed9e3f8ef384a0fd6b)
Reviewed-on: http://git-master/r/1117404
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141881
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: media: camera: avoid unnecessary power on/off calls
Ken Chang [Fri, 25 Mar 2016 06:21:02 +0000]
drivers: media: camera: avoid unnecessary power on/off calls

The CSI/sensor power related calls should be done only
when the open filehandle number is 1, i.e., the first
to open; and the last to close.
Thus protect the power related callbacks by calling
v4l2_fh_is_singular_file().

Bug 1736471

Change-Id: Ia5e095daa7a6acde2eaece654d8f6bf27ec6ebc3
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 1bd6e1d2407fbd86dc3407350ffad6f02db10c7c)
Reviewed-on: http://git-master/r/1115315
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141879
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: media: camera: fix v4l2-compliance VIDIOC_ENUM_FMT test
Ken Chang [Wed, 23 Mar 2016 09:32:07 +0000]
drivers: media: camera: fix v4l2-compliance VIDIOC_ENUM_FMT test

This change fix the failure of VIDIOC_ENUM_FMT test by:
1) Extend the supported video formats
2) Add format description
3) move tegra_channel_fmts_bitmap_init() to
tegra_channel_open() thus pad enum_mbus_code can go to
the real subdevs.

Bug 200184254

Change-Id: Ib4d02c0b3ceca95ce512c6783cc824a28e1bb855
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Ken Chang <kenc@nvidia.com>
Reviewed-on: http://git-master/r/1114503
(cherry picked from commit 8bc9b656cca1a567b8838196fc6eac3236772663)
Reviewed-on: http://git-master/r/1115296
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141878
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: media: camera: enable use_fh_prio
Ken Chang [Thu, 24 Mar 2016 04:56:16 +0000]
drivers: media: camera: enable use_fh_prio

Set V4L2_FL_USE_FH_PRIO to enable v4l2 framework to handle
VIDIOC_G/S_PRIORITY ioctls.

Bug 200184254

Change-Id: Icedae53962bcf942d4a58efc8e2c85825397aaee
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 2de13a41fa1e1f253db78477133f310b236cc9d2)
Reviewed-on: http://git-master/r/1115295
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141877
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: media: camera: extended pixel format
Bhanu Murthy V [Fri, 25 Mar 2016 01:43:17 +0000]
drivers: media: camera: extended pixel format

Add extended pixel format to the capabilities.

Bug 200184254

Change-Id: Ic197e0da95823c98b8ec8f1883e2efde6f198923
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit e40ddf883213d3d17d9a01c0e5a400ad2840cb8f)
Reviewed-on: http://git-master/r/1115245
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141876
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers:video: Add 3 API in tegra_camera_platform
Wenjia Zhou [Fri, 1 Apr 2016 22:58:53 +0000]
drivers:video: Add 3 API in tegra_camera_platform

- Reorganize the tegra_camera_platform driver
  - Move clk_get to probe
  - Move driver private struct from header to c file
  - Move header file to include/media/
  - Export function to update isobw
  - Export function to enable/disable emc clk
  - Add debugfs to help show isobw request breakdown

Bug 1736471

Change-Id: Ie62570f7ad881c7b264cced445f30b97b412a3ee
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
(cherry picked from commit fffdce33aa5bab686e9693bb499b793b2501924b)
Reviewed-on: http://git-master/r/1119249
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141874
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agonet: ethernet: realtek: fix pgdrv remove for r8168 driver
Martin Gao [Tue, 3 May 2016 01:03:12 +0000]
net: ethernet: realtek: fix pgdrv remove for r8168 driver

- in r8168 realtek ethernet driver, we added pgtool functionality, and
pgdrv_remove wasn't checking for null pointer, and thus caused null pointer
exception.

Bug 200196087

Change-Id: Ib170fc4b1d3ef496d75def62924adf119f068324
Signed-off-by: Martin Gao <marting@nvidia.com>
(cherry picked from commit fa3352ceffe25cc86cf25ebc86e6d519bb7b6316)
Reviewed-on: http://git-master/r/1146186
GVS: Gerrit_Virtual_Submit
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>

3 years agodrivers: thermal: cancel delayed work
Martin Gao [Mon, 18 Apr 2016 20:11:40 +0000]
drivers: thermal: cancel delayed work

This change fixes cancel delayed work before scheduling another one,
which was a race condition.

Bug 1751479

Change-Id: Idd0bab7e6ec1fd9022ef24fb73d8ef2fa1e84909
Signed-off-by: Martin Gao <marting@nvidia.com>
(cherry picked from commit 7a770ad9041c731de45b56a2f8dc134ac0a87656)
Reviewed-on: http://git-master/r/1128368
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Raymond Poudrier <rapoudrier@nvidia.com>

3 years agoRevert "gpu: nvgpu: recycle the cmdbuf instead of freeing after job done"
Deepak Nibade [Wed, 11 May 2016 14:22:21 +0000]
Revert "gpu: nvgpu: recycle the cmdbuf instead of freeing after job done"

This reverts commit da7e702365007ab23dfb00c75e8babf749b21f9a.

Commit 21b759 (gpu: nvgpu: add lock for priv_cmd_queue list accesses)
was needed to protect a crash introduced with this patch,
but above patch is getting reverted with http://git-master/r/#/c/1145913/

Hence revert this patch as well

Bug 1755244

Change-Id: I29289ec32588492c5054c3b7183e9e3d7e49c897
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1145914
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

3 years agoRevert "gpu: nvgpu: add lock for priv_cmd_queue list accesses"
Deepak Nibade [Wed, 11 May 2016 14:21:35 +0000]
Revert "gpu: nvgpu: add lock for priv_cmd_queue list accesses"

This reverts commit 21b7595b0ca4d3931b73246eb0f4fd3665379a2b.

Original patch introduces variance in nvgpu submit times

Also, it should be fine to remove the lock since the races
it protects will also be removed with revert patch
http://git-master/r/#/c/1145914/

Hence revert this patch

Bug 1755244

Change-Id: I588e2217477e5e6daea11a28021b419acdddb143
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1145913
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>

3 years agoarm64: tegra: jetson_tx1: disable dsi by default
Kerwin Wan [Tue, 8 Mar 2016 06:46:29 +0000]
arm64: tegra: jetson_tx1: disable dsi by default

jetson tx1 devkit does not use dsi so disable it.

Bug 200161650

Change-Id: I074f5230810cd9ecc48256fe69a1aec9361d3606
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-on: http://git-master/r/1026249
(cherry picked from commit 85f233aa3207e5a300a8903504774e523784699f)
Reviewed-on: http://git-master/r/1149421
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

3 years agopower: extcon: Avoid race condition
Laxman Dewangan [Fri, 6 May 2016 11:50:19 +0000]
power: extcon: Avoid race condition

When power supply get registers, it schedule the work queue
for getting property and then return back to caller.

If caller has not initialised all the parameters for reading
property and if initialise after power supply registration
then there is race for work queue get scheduled and use the
parameters which are not initialised and it can cause the
system hang.

Fixing this to initialise parameters for get properties property.

bug 200196661

Change-Id: I8206a61bd3ced9d60135855aa790b10beaa480d3
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1142758
Reviewed-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Tested-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
GVS: Gerrit_Virtual_Submit

3 years agowatchdog: tegra: support nowayout config
Krishna Yarlagadda [Mon, 9 May 2016 14:33:11 +0000]
watchdog: tegra: support nowayout config

Disabling of watchdog is not allowed when
nowayout config is enabled and will restart device
if watchdog deamon is disabled or crashed

Bug 200160105

Change-Id: I496d8b3f7dae4ce8ee26198ee4930c5962eeb255
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1143663
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agodrivers: media: camera: Ignore unbound entities
Kai Lee [Thu, 5 May 2016 20:25:39 +0000]
drivers: media: camera: Ignore unbound entities

Do not build graph for unbound entities.

Bug 200194286

Change-Id: I5f8efe7a9f76048cef60372042c36bd736b66fad
Signed-off-by: Kai Lee <kailee@nvidia.com>
Reviewed-on: http://git-master/r/1142287
Reviewed-by: Bhanu Murthy V <bmurthyv@nvidia.com>
Reviewed-by: Frank Chen <frankc@nvidia.com>
Reviewed-by: David Wang (SW-TEGRA) <davidw@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-on: http://git-master/r/1143756
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoARM: kernel: remove the __init from register_persistent_clock
Laxman Dewangan [Thu, 17 Mar 2016 10:57:40 +0000]
ARM: kernel: remove the __init from register_persistent_clock

To avoid the section mismatch error:
WARNING: vmlinux.o(.text+0x6cc3f4): Section mismatch in reference from
the function tegra_rtc_probe() to the function .init.text:register_persistent_clock()
The function tegra_rtc_probe() references
the function __init register_persistent_clock().
This is often because tegra_rtc_probe lacks a __init
annotation or the annotation of register_persistent_clock is wrong.

Bug 200170914

Change-Id: If677c41f46bb4e3adb354a16e44c1c59c78df356
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1112203
(cherry picked from commit 6348c498d00bf13cda7b4c6324104942e7792574)
Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-on: http://git-master/r/1131704
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Tested-by: Shridhar Rasal <srasal@nvidia.com>
GVS: Gerrit_Virtual_Submit
(cherry picked from commit d7bf977ad074482e5613204c9fc52291a68d6a46)
Reviewed-on: http://git-master/r/1145614
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>

3 years agopower: reset: max77620: ignore GPIO configuration if not supported
Venkat Reddy Talla [Fri, 13 May 2016 11:01:59 +0000]
power: reset: max77620: ignore GPIO configuration if not supported

ignore MAX77620 PMIC GPIO configuration, if GPIO status information
not provided through DTS, ignore GPIO config from restart notifier
call instead of prepare_system_power_off.

Bug 200200532

Change-Id: I78f5266ae67ac1f7f8ccaf114b9265eda6adac2d
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/1147531
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>

3 years agoplatform: nvadsp: Reset ADSP driver on crash
Viraj Karandikar [Wed, 20 Apr 2016 11:36:59 +0000]
platform: nvadsp: Reset ADSP driver on crash

When ADSP crashes, the audio server is restarted so that it can
resume its operations. Hence, on crash ADSP driver recovers itself
by doing the following :

 1) resetting queues of software mailboxes
 2) resetting global send hw mailbox queue
 3) Unloading all apps
 4) making a callback to the registered client when ADSP WDT
    is triggered.

 Also, nvadsp_os_stop is removed from restart work thread.

Bug 200178310

Change-Id: Iffa033ec60165c9a7322e9224e45637b212bff65
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Signed-off-by: Viraj Karandikar <vkarandikar@nvidia.com>
Reviewed-on: http://git-master/r/1024573
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>

3 years agovideo: tegra: refresh VTs upon hotplug
Naveen Kumar S [Tue, 10 May 2016 06:19:08 +0000]
video: tegra: refresh VTs upon hotplug

Virtual terminals need to be refreshed through a
blank/unblank call when a hotplug event occurs.
Without this ttys remain blank as there is no
framework in VT driver to ublank itself upon hotplug.

bug 200164516

Change-Id: I6a46f21cd1c9d8986a152faabb9a34bbaffdd441
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/1144386
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

3 years agovideo: tegra: dc: update default_limited_cmu lut2
Ivan Raul Guadarrama [Fri, 6 May 2016 21:19:47 +0000]
video: tegra: dc: update default_limited_cmu lut2

Update the lut2 of the default limited sRGB case so the input to output
operation matches the formula "round( input * 219.0 / 255.0 + 16.0)"
Some of the original values deviated from this formula.

Bug 1750555

Change-Id: I3200da429564a3c6ae2396a2cb5ec7ea95d98028
Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-on: http://git-master/r/1143050
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Mitch Luban <mluban@nvidia.com>

3 years agoinput: touchscreen: raydium: Keep report mode across suspend/resume.
Jordan Nien [Tue, 26 Apr 2016 02:37:41 +0000]
input: touchscreen: raydium: Keep report mode across suspend/resume.

- Don't set default report mode in init stage
  and let touch daemon to handle it. This is
  to fix the report mode is changed to default
  after suspend/resume.

Bug 1757082

Change-Id: I05685b9420946c0eff6980d58658f5202640fc65
Signed-off-by: Jordan Nien <jnien@nvidia.com>
Reviewed-on: http://git-master/r/1132263
(cherry picked from commit c68d975b7b5d9628ea0bdcfbce091836938bda8e)
Reviewed-on: http://git-master/r/1143434
(cherry picked from commit 7b2a9069d39f7ba46830a88e88e242c5ad308510)
Reviewed-on: http://git-master/r/1145717
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Pu <dpu@nvidia.com>
Reviewed-by: Eric Chuang <echuang@nvidia.com>

3 years agomisc: bluedroid_pm: fix memory corruption
Manikanta [Wed, 11 May 2016 06:56:18 +0000]
misc: bluedroid_pm: fix memory corruption

- rfkill is freed in rfkill_destroy, no need to
free rfkill again in bluedroid_pm driver
- correct the cleanup sequence in probe and
create_bt_proc_interface functions

bug 200195922
bug 200191319

Change-Id: I12709810f250930f220c4975a0e046180dadd296
Signed-off-by: Manikanta <mmaddireddy@nvidia.com>
Reviewed-on: http://git-master/r/1145305
(cherry picked from commit 0e14200b18204c3606f1d7a203369bad25d6c410)
Reviewed-on: http://git-master/r/1147285
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

3 years agoarch: arm64: dts: add new entry for sensor crop.
Ajith Kumar [Thu, 21 Apr 2016 07:54:18 +0000]
arch: arm64: dts: add new entry for sensor crop.

* New property post_crop_frame_drop added.
  This property holds number of frames to be skipped
  in camera driver internally to abandon the corrupt
  frames sent by camera sensor upon applying sensor
  crop setting.

* Fix missing entry of embedded metadata support.

Bug 1687120

Change-Id: Ie0f94c03e00770c045ef17ca44165ebc6eccb6a2
Signed-off-by: Ajith Kumar <ajithk@nvidia.com>
Reviewed-on: http://git-master/r/1130199
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ankit Gupta (SW-TEGRA) <ankitgu@nvidia.com>
Reviewed-by: Shantanu Nath <snath@nvidia.com>

3 years agodrivers: media: camera: Dual capture
Bhanu Murthy V [Wed, 6 Apr 2016 02:14:35 +0000]
drivers: media: camera: Dual capture

WAR: Match the register programming with
the userspace to avoid overwriting them.

Bug 1736471

Change-Id: Icfdb1177e7e17b61bcd5af843eb6af25b0533dfe
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit 2d8db0b157331063fca47453b6bb290f492cf00a)
Reviewed-on: http://git-master/r/1120799
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141872
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agodrivers: media: camera: Refcount for channel
Bhanu Murthy V [Wed, 6 Apr 2016 02:05:26 +0000]
drivers: media: camera: Refcount for channel

Add refcount for channel power so that CSI lanes
and sensor power are guarded well.

Bug 1736471

Change-Id: I3513db1866540e395833392aa23f92fe10bdea9b
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit 8e223a8b9719a75ae0bf7b203352a1fbee8bceed)
Reviewed-on: http://git-master/r/1120798
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141871
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agodrivers: media: camera: GangMode update
Bhanu Murthy V [Mon, 4 Apr 2016 19:44:22 +0000]
drivers: media: camera: GangMode update

Fix recursion in gang mode and clean up
to have good flow for managing multiple
ports.
Add alignment for surface strides being
programmed to VI. There are enhancements
needed to manage non-aligned sizes based
on gang mode which is left as to-do now.

Bug 1736471
Bug 200169351

Change-Id: Ibb7566f8cb77daa6a5456c2fed9bcbbab2a773c8
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit 6e699ad7f5ef8527742fae9e8f15c8244f7745bc)
Reviewed-on: http://git-master/r/1119996
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141870
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agodrivers: media: hdmi-in: correct pixel format report
Roger Hsieh [Thu, 31 Mar 2016 07:34:44 +0000]
drivers: media: hdmi-in: correct pixel format report

V4L2_PIX_FMT_RGB32 is deprecated. Replace to V4L2_PIX_FMT_ABGR32
and update related config.

Bug 200169351

Change-Id: Id41a24dac6e36fb6e252650b1b30da26d40d8224
Signed-off-by: Roger Hsieh <rhsieh@nvidia.com>
(cherry picked from commit 2b20a3506862ef26e82a9ef246377ab1062f45f3)
Reviewed-on: http://git-master/r/1118181
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141869
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agodriver: media: tc358840: set UYVY as default fmt
Ahung Cheng [Wed, 6 Apr 2016 08:22:46 +0000]
driver: media: tc358840: set UYVY as default fmt

Tegra VI driver picks the first pixel format
as default in enum_mbus_code. Move UYVY as the
first one instead RGB888

bug 200169351

Change-Id: Ia8e14f234b4763f0b2400c0de74545d4c0a5c704
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
(cherry picked from commit 5b46e9584940617eadc807ac0e873935b3cf4061)
Reviewed-on: http://git-master/r/1120965
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141868
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agodriver: media: camera: hdmi-in unplug handling
Ahung Cheng [Wed, 30 Mar 2016 18:26:59 +0000]
driver: media: camera: hdmi-in unplug handling

This is to prevent the syncpt timeout case if
unplug when VI driver is doing capture.

The concept is to stop capture threads once
the hdmiin is unplug. And ensure increment
syncpt for two threads.

bug 200169351

Change-Id: I067de1e80c968c4ac2ee71eee6ce6071f3d71d94
Signed-off-by: Ahung Cheng <ahcheng@nvidia.com>
(cherry picked from commit b35b75bb8587e1fcd96c5c2cf96e125c789c228c)
Reviewed-on: http://git-master/r/1118051
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141867
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>

3 years agomedia: mipi_cal: remove static to fix build fails
Bryan Wu [Wed, 11 May 2016 18:46:06 +0000]
media: mipi_cal: remove static to fix build fails

Bug 1686313

Change-Id: I8043f5aea21a00504e18b0a571c6cdc3a7b25805
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1146110
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agovideo: tegra: host: isp: fix bw number
Bhushan Rayrikar [Mon, 18 Apr 2016 22:26:45 +0000]
video: tegra: host: isp: fix bw number

ISO manager BW needs to be in MBps.

Bug 200189885

Change-Id: I67c820c2e4355e5a368bb4195c5bb6d9b9c21fc8
Signed-off-by: Bhushan Rayrikar <brayrikar@nvidia.com>
(cherry picked from commit 6e696fcd755a4cbabdc1e87d3d3ef92b61468d05)
Reviewed-on: http://git-master/r/1128418
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141918
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agovideo:tegra:dsi: Use new mipical API on t21
Wenjia Zhou [Sat, 27 Feb 2016 03:44:56 +0000]
video:tegra:dsi: Use new mipical API on t21

For T210, remove DC's mipical and use new API from common MIPICAL driver.

Change-Id: I248164388932ee8be9034845c6e8f608169ad011
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
Reviewed-on: http://git-master/r/1122126
(cherry picked from commit 1a834b5d6d5ce06f7eab836553adce96a2dc8084)
Reviewed-on: http://git-master/r/1126931
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141917
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers:media:platform: Add common mipical
Wenjia Zhou [Sat, 27 Feb 2016 02:43:02 +0000]
drivers:media:platform: Add common mipical

Add common mipical driver for CSI and DSI

bug 1686313

Change-Id: I4bac768c17805c8d71d7071ceac29d17d83416db
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
(cherry picked from commit c2c51629c2d1dab55c8d0be8496cf01373ce19cc)
Reviewed-on: http://git-master/r/1122125
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141915
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoarch:arm64:boot:dts: Add clk,config to mipical
Wenjia Zhou [Tue, 1 Mar 2016 22:54:52 +0000]
arch:arm64:boot:dts: Add clk,config to mipical

Bug 1686313

Change-Id: Id6660fb07f8a71be518b3fdbe070bd2b57280c7c
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
(cherry picked from commit 26427fda4f1e67bcafd3bdf379c1120837d1433b)
Reviewed-on: http://git-master/r/1122124
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141914
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agoplatform:tegra: Add separate cbus for vi_bypass
Wenjia Zhou [Tue, 12 Apr 2016 22:56:02 +0000]
platform:tegra: Add separate cbus for vi_bypass

vi.cbus
--vi_v4l2.cbus
--vi_bypass.cbus (Added)

Since we have to support Vi mode and SCF mode simultaneously, Nvhost should
use vi_bypass.cbus not vi.cbus.

Bug 1683411

Change-Id: I3855b63c3c648570a5a9204705a25e06f0c6f3c5
Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
(cherry picked from commit e6919b95f042b0187b677507b12e47de900263ca)
Reviewed-on: http://git-master/r/1125779
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141901
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agodrivers:tegra:tegra21_clocks: Add vi_v4l2.cbus
Wenjia Zhou [Fri, 1 Apr 2016 23:10:10 +0000]
drivers:tegra:tegra21_clocks: Add vi_v4l2.cbus

Add vi_v4l2.cbus under vi.cbus for VI mode.
When both scf and vi mode are running, vi mode should have its own clock to
prevent scf overwriting its vi clock request.

Bug 1736471

Signed-off-by: Wenjia Zhou <wenjiaz@nvidia.com>
Change-Id: I42c0bcb0f1bd4869467f4bb7165f9c4ff65ec752
(cherry picked from commit cca841662e7f3f1b994463670a6951d02e5d704b)
Reviewed-on: http://git-master/r/1116498
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141873
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agoARM: tegra: increase GND voltage range for ADC for Hawkeye
Laxman Dewangan [Fri, 6 May 2016 10:33:35 +0000]
ARM: tegra: increase GND voltage range for ADC for Hawkeye

Increase the GND voltage range when connected to ID pin for ADC
conversion to handle tolerances on boards and cables.

bug 200179332

Change-Id: I30ec70b368009993dd83052ff6a8e8404c40ac33
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/1142711
GVS: Gerrit_Virtual_Submit
Tested-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-by: Steve Rogers <srogers@nvidia.com>

3 years agoarm: dts: change current to micro ampere
Rakesh Babu Bodla [Fri, 6 May 2016 10:44:14 +0000]
arm: dts: change current to micro ampere

Update the dt the nodes to micro ampere and
QC2.0 charger input voltage in readable format.

Bug 200194931

Change-Id: Id53c1c93bd7d2e15ba818e28857a021ea21d1813
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/1142709
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agousb: tegra: configure current in ua
Rakesh Babu Bodla [Fri, 6 May 2016 10:43:25 +0000]
usb: tegra: configure current in ua

Allow the system to configure current in ua for
uniformity. Also modify the input to QC2.0 charger
through dt node in readable format.

Bug 200194931

Change-Id: Ic18e873f08ee50282e34f76e9536a0f46e2ae8e2
Signed-off-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/1142708
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agogpu:nvgpu:gm20b: update elpg prod settings
Vijayakumar [Wed, 11 May 2016 09:24:21 +0000]
gpu:nvgpu:gm20b: update elpg prod settings

bug 1764398

PGSequencer settings use index to writ to
PSORDER register setting. HW has implementation
for 28 PSORDER (PSORDER0 - 27). Every write will
auto increment index and index will wrap around
after it reaches 27. In PROD settings we are
writing enable from 0 to 27 and zero from 28
to 65. This overwrites enables written to 0 to 27.
Effectively those partitions are never power gated.
P4 SWCL# 20744424

Change-Id: Ib6ce5ec1397b475f5477fc09057d36648d0626e3
Signed-off-by: Vijayakumar <vsubbu@nvidia.com>
Reviewed-on: http://git-master/r/1145424
Reviewed-by: Supriya Sharatkumar <ssharatkumar@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

3 years agovideobuf2: Add support for file access mode flags for DMABUF exporting
Philipp Zabel [Tue, 21 May 2013 08:11:35 +0000]
videobuf2: Add support for file access mode flags for DMABUF exporting

Currently it is not possible for userspace to map a DMABUF exported buffer
with write permissions. This patch allows to also pass O_RDONLY/O_RDWR when
exporting the buffer, so that userspace may map it with write permissions.

Bug 200184254

Change-Id: I7009f7d9e0988eb1db9da045489036b225ab5930
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
(cherry picked from commit 2fe02e73c04685d8f415ad051b606ba0e25a7e85)
Reviewed-on: http://git-master/r/1118827
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141889
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: v4l2-compat-ioctl32: fix missing reserved field copy in put_v4l2_create32
Tiffany Lin [Mon, 14 Mar 2016 11:16:14 +0000]
media: v4l2-compat-ioctl32: fix missing reserved field copy in put_v4l2_create32

In v4l2-compliance utility, test VIDIOC_CREATE_BUFS will check whether reserved
filed of v4l2_create_buffers filled with zero
Reserved field is filled with zero in v4l_create_bufs.
This patch copy reserved field of v4l2_create_buffer from kernel space to user
space

Bug 200184254

Change-Id: I5b32a9ea6b12c341145e6e952c6163c8c2365593
Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com>
(cherry picked from commit 03f90016bc43fd1b064bb3cab21802fa10a0ae18)
Reviewed-on: http://git-master/r/1118315
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141886
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agoV4L2: fix VIDIOC_CREATE_BUFS 32-bit compatibility mode data copy-back
Guennadi Liakhovetski [Fri, 30 May 2014 23:26:38 +0000]
V4L2: fix VIDIOC_CREATE_BUFS 32-bit compatibility mode data copy-back

Similar to an earlier patch, fixing reading user-space data for the
VIDIOC_CREATE_BUFS ioctl() in 32-bit compatibility mode, this patch fixes
writing back of the possibly modified struct to the user. However, unlike
the former bug, this one is much less harmful, because it only results in
the kernel failing to write the .type field back to the user, but in fact
this is likely unneeded, because the kernel will hardly want to change
that field. Therefore this bug is more of a theoretical nature.

Bug 200184254

Change-Id: I34babf62d9233cbda268053ed0bcddc32644206c
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
(cherry picked from commit 81ebade4a843b475d0a214a2a42275e7e1453579)
Reviewed-on: http://git-master/r/1118314
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141885
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agov4l2-ioctl: clear the reserved field of v4l2_create_buffers
Hans Verkuil [Fri, 5 Jun 2015 08:11:14 +0000]
v4l2-ioctl: clear the reserved field of v4l2_create_buffers

This field was never cleared by the kernel making future extensions
hard to implement. Clear it now.

Bug 200184254

Change-Id: Ie549f6418be24b452e2d0d1d423287279529054d
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
(cherry picked from commit f9c4310c11f57252cf50d8b7ab85e0609762562c)
Reviewed-on: http://git-master/r/1118313
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141884
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agov4l2: add dummy VIDIOC_QUERY_EXT_CTRL ioctl
Hans Verkuil [Fri, 25 Mar 2016 08:31:25 +0000]
v4l2: add dummy VIDIOC_QUERY_EXT_CTRL ioctl

This is just a pass through to VIDIOC_QUERYCTRL, but it allows applications
such as v4l2-compliance to use the new ioctl.

Change-Id: Iaa82fd7579bdc1165ab7cdef829ea915dad5a86f
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 5c9ebb4ac289c14162c05baa9f95bdf0d0ca3552)
Reviewed-on: http://git-master/r/1116824
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141880
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: media: i2c: IMX274 input status
Bhanu Murthy V [Mon, 25 Apr 2016 19:56:38 +0000]
drivers: media: i2c: IMX274 input status

Add g_input_status video op and return the status
based on the pw->state value.

Bug 200184502

Change-Id: Id8ac224d1dad679c2fb7280758b2a5df0c6f3877
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit ef3f07d48d2b863bccdd82113064c35ca11233f0)
Reviewed-on: http://git-master/r/1132077
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141920
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: media: i2c: IMX274 existence check
Bhanu Murthy V [Wed, 20 Apr 2016 21:09:22 +0000]
drivers: media: i2c: IMX274 existence check

Verify IMX274 is connected during probe

Bug 200191959

Change-Id: I905d2ba161e65d3420d0437089f8ff4fa2dd1a58
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit a8e44ad73fcec2080d6a6a946515131d3b428a90)
Reviewed-on: http://git-master/r/1129869
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141919
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: imx274: add resolution, frame rate, code
Bryan Wu [Thu, 14 Apr 2016 22:54:27 +0000]
media: imx274: add resolution, frame rate, code

Bug 1736471

Change-Id: Ieb8522b195fb0d34de52ecae489b4bf3c7f2fbcc
Signed-off-by: Bryan Wu <pengw@nvidia.com>
(cherry picked from commit fcc57a0ab973a56408c8e045395bf18e4b87488b)
Reviewed-on: http://git-master/r/1127009
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141913
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: ov5693: add resolution, frame rate, code
Bryan Wu [Fri, 15 Apr 2016 04:47:52 +0000]
media: ov5693: add resolution, frame rate, code

Use camera_common APIs

Bug 1736471

Change-Id: I974ca7b9d898c7a76d2dd8443bc501dc39f989be
Signed-off-by: Bryan Wu <pengw@nvidia.com>
(cherry picked from commit 875a2b183aee4b49ce9d908cbe467710cf323fcf)
Reviewed-on: http://git-master/r/1127167
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141912
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: imx214: update camera_common_frmfmt
Bryan Wu [Fri, 15 Apr 2016 04:51:33 +0000]
media: imx214: update camera_common_frmfmt

Bug 1736471

Change-Id: Ic6ff599caa526f6755a6cbdf9a6351e550365ba2
Signed-off-by: Bryan Wu <pengw@nvidia.com>
(cherry picked from commit 3057a83b0ce8aec88d51d5d68c081784de940a27)
Reviewed-on: http://git-master/r/1127169
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141911
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: ov23850: update camera_common_frmfmt
Bryan Wu [Fri, 15 Apr 2016 04:49:13 +0000]
media: ov23850: update camera_common_frmfmt

Also clean up some building warings.

Bug 1736471

Change-Id: I99a2cad9dd562ecd2677edd6500158392c6e334c
Signed-off-by: Bryan Wu <pengw@nvidia.com>
(cherry picked from commit d9a942c77213e7a4ddf9d654ebb69d0f10d04a38)
Reviewed-on: http://git-master/r/1127168
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141910
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tc358840: add resolution, frame rate, code
Bryan Wu [Thu, 14 Apr 2016 23:24:21 +0000]
media: tc358840: add resolution, frame rate, code

Bug 1736471

Change-Id: I98587d4579e4e92b7021e06ddc867b0e95a71901
Signed-off-by: Bryan Wu <pengw@nvidia.com>
(cherry picked from commit db8d6dc3096adda37ef39c9a24b8eadfc62e2b5e)
Reviewed-on: http://git-master/r/1127010
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141909
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: camera_common: add enum sizes and intervals
Bryan Wu [Fri, 15 Apr 2016 04:45:04 +0000]
media: camera_common: add enum sizes and intervals

Add enum_framesizes and enum_frameintervals API in camera common
framework which can be used in any sensor drivers.

One resolution might support multiple framerate instead one. This
patch modify the camera_common driver to support multiple framerates
for one resolution.

Bug 1736471

Change-Id: Id9e38490784136b29161f484ed0b5443c4a4fa89
Signed-off-by: Bryan Wu <pengw@nvidia.com>
(cherry picked from commit 73c4011724f5e20253f872d3956a9ef93190d236)
Reviewed-on: http://git-master/r/1127166
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141908
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>

3 years agodriver: media: i2c: ov5693: reset ctrl range
David Wang [Thu, 14 Apr 2016 22:27:49 +0000]
driver: media: i2c: ov5693: reset ctrl range

Adding logic to reset ctrl range on stream disable.
This helps keep max coarse time diff the same on new
range queries.

Bug 1753352

Change-Id: Idf7eb944c284e4b52d8d13156fd19c85d8841564
Signed-off-by: David Wang <davidw@nvidia.com>
(cherry picked from commit da13b238d1446e322f3a6de8fbb193203c584c97)
Reviewed-on: http://git-master/r/1126986
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141906
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomeida: i2c: Fix gain function for IMX274
Frank Chen [Thu, 14 Apr 2016 20:45:54 +0000]
meida: i2c: Fix gain function for IMX274

Added proper equation to convert analog gain
to IMX274 gain register values.

Bug 1742136

Change-Id: I35f6dee7e59db9a98f6bfeaf89699fcacb5f2c84
Signed-off-by: Frank Chen <frankc@nvidia.com>
(cherry picked from commit 92431495029ba786a63a66c0e1c897a23fcae889)
Reviewed-on: http://git-master/r/1126939
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141905
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agov4l: ctrls: Provide an unlocked variant of v4l2_ctrl_modify_range()
Sakari Ailus [Tue, 12 Apr 2016 03:24:34 +0000]
v4l: ctrls: Provide an unlocked variant of v4l2_ctrl_modify_range()

Drivers may use the v4l2_ctrl_modify_range() internally as part of other
operations that need to be both serialised using a driver's lock which can
also be used to serialise access to the control handler. Provide an unlocked
version of the function, __v4l2_ctrl_modify_range() which then may be used
by drivers for the purpose.

Bug 200184502

Change-Id: I2d10f917fd4072882971a7f8d5b46a5829dde64b
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 24879d4ae4d6fe76dc63395a0ea3e2caaafc036b)
Reviewed-on: http://git-master/r/1123990
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141900
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: i2c: ov5693: update ctrl range
Ken Chang [Tue, 12 Apr 2016 04:48:32 +0000]
media: i2c: ov5693: update ctrl range

The maximum value of control V4L2_CID_COARSE_TIME_* depends
on the current value of V4L2_CID_FRAME_LENGTH, thus the
control range needs to be updated when V4L2_CID_FRAME_LENGTH
is changing.

Bug 200184502

Change-Id: I861655199ceb014d58cd850826dbbf457af9e4df
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 7d95544557d2e038a65731878967cd4b030c4651)
Reviewed-on: http://git-master/r/1123991
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141899
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: i2c: ov23850: add set/get fmt pad ops
Ken Chang [Tue, 12 Apr 2016 03:10:24 +0000]
media: i2c: ov23850: add set/get fmt pad ops

Add subdev set_fmt and get_fmt pad ops:
- set_fmt calls the existing camera_common_try_fmt
for V4L2_SUBDEV_FORMAT_TRY, and camera_common_s_fmt
for V4L2_SUBDEV_FORMAT_ACTIVE
- get_fmt calls the existing camera_common_g_fmt call

Bug 200184502

Change-Id: I0f83444c3a48f2f43e2f22731ac5a4f610ee92a9
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit fbb36cd1b51d5bdd951080d9bf1aefafb98705fa)
Reviewed-on: http://git-master/r/1123960
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141895
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodriver: media: i2c: IMX274 set/get fmt pad ops
Bhanu Murthy V [Tue, 12 Apr 2016 00:16:03 +0000]
driver: media: i2c: IMX274 set/get fmt pad ops

Add subdev set_fmt and get_fmt pad ops:
- set_fmt calls the existing camera_common_try_fmt
for V4L2_SUBDEV_FORMAT_TRY, and camera_common_s_fmt
for V4L2_SUBDEV_FORMAT_ACTIVE
- get_fmt calls the existing camera_common_g_fmt call

Bug 1753352

Change-Id: Ie14923addc7883e0be53806e649e220a1b7faa7a
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit 66847bf0324d97f00fbb3584298e686ee23d2852)
Reviewed-on: http://git-master/r/1123917
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141894
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: i2c: ov5693: add set/get_fmt ops
Ken Chang [Wed, 6 Apr 2016 08:45:14 +0000]
media: i2c: ov5693: add set/get_fmt ops

Add subdev set_fmt and get_fmt pad ops:
- set_fmt calls the existing camera_common_try_fmt
for V4L2_SUBDEV_FORMAT_TRY, and camera_common_s_fmt
for V4L2_SUBDEV_FORMAT_ACTIVE
- get_fmt calls the existing camera_common_g_fmt call

Bug 200184502

Change-Id: I04c94e308df1c5dec4226c1aafdbcdab7a8e8bc7
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 9ef1c1c89756d4a37466ce1737a657ce2a3b19ef)
Reviewed-on: http://git-master/r/1120975
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141892
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: i2c: ov5693: add g_input_status
Ken Chang [Wed, 6 Apr 2016 08:40:28 +0000]
media: i2c: ov5693: add g_input_status

Add g_input_status video op and return the status
based on the pw->state value.

Bug 200184502

Change-Id: I89f7e07fb193ec62ecb0851a364dadb1ce6bf35c
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 66525a54bab974421fcd17aef2f96a9fe98e2187)
Reviewed-on: http://git-master/r/1120974
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141891
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: i2c: ov5693: don't use V4L2_CTRL_FLAG_DISABLED
Ken Chang [Wed, 6 Apr 2016 06:36:52 +0000]
media: i2c: ov5693: don't use V4L2_CTRL_FLAG_DISABLED

V4L2_CTRL_FLAG_DISABLED is deprecated. Just not to add
the specificed control if it's shall be disabled.

Bug 200184502

Change-Id: Iedfd463718bacd04729d32ef662c8763a0b991ef
Signed-off-by: Ken Chang <kenc@nvidia.com>
(cherry picked from commit 8044fec7ccfd72f067e55c3fc8e1f5b10066f11f)
Reviewed-on: http://git-master/r/1120906
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141890
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tegra: bypass TEST_PATTERN ctrl for non-TPG
Bryan Wu [Mon, 9 May 2016 18:29:42 +0000]
media: tegra: bypass TEST_PATTERN ctrl for non-TPG

TPG mode now is enabled by install TPG driver module, so the pg_mode
can't be changed when TPG driver is not installed. Bypass the
TEST_PATTERN V4L2 control for non TPG mode.

Bug 1758954

Change-Id: Ib0acbbfb75ddcc1e867ca0ff1b94379fa25e3529
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1143886
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agoARM: L4T: disable soc_camera for T124
Bryan Wu [Sun, 8 May 2016 08:51:52 +0000]
ARM: L4T: disable soc_camera for T124

Media controller based VI/CSI driver gives us more functionality and
it's default build-in driver for T210.

T124 defconfig still builds media controller driver and soc_camera as
modules. Modules of the latest media controller driver code will cause
the build linking fail. Since media controller eventually will replace
soc_camera and T124 might not be supported in rel-24. So disable
soc_camera and build in media controller driver by default as T210.

Bug 1758954

Change-Id: Ifa9422d9b7ef848f188e6b9f72a8d029e182e8d5
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1143247
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tegra: remove the useless header includes
Bryan Wu [Thu, 5 May 2016 22:07:11 +0000]
media: tegra: remove the useless header includes

This includes will cause build failure after merging TPG driver.

Eventually this camera.c driver should be removed from V4L2 drivers.

Bug 1758954

Change-Id: Ia267c2f2b930950d95c1f472736a0d288879c7e6
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1142368
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agodrivers: video: camera: Fix build issue
Bhanu Murthy V [Tue, 5 Apr 2016 18:31:28 +0000]
drivers: video: camera: Fix build issue

Bug 1736471

Change-Id: Icd3f1934d535b14052ad40eda76d2675cdad4b8d
Signed-off-by: Bhanu Murthy V <bmurthyv@nvidia.com>
(cherry picked from commit a0cc4a775b29c8b0c94c2e4ad69cf69bfaefd372)
Reviewed-on: http://git-master/r/1120539
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141866
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agomedia: tegra: camera: Re-arch MFI (2/2)
Sudhir Vyas [Fri, 16 Oct 2015 12:58:18 +0000]
media: tegra: camera: Re-arch MFI (2/2)

* Disable MFI callback registration from camera PCL.
* Enable focuser drivers to use MFI APIs exposed by
  tegra_camera_platform driver.

Bug 1683491

Change-Id: I1b500b3d56615555b4475eb83e9059e55ae51d5e
Signed-off-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-on: http://git-master/r/818881
(cherry picked from commit d920978e696a279e4fb8443bde6f12e279b46def)
Reviewed-on: http://git-master/r/1118351
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141865
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>

3 years agovideo: tegra: camera: Re-arch MFI (1/2)
Sudhir Vyas [Fri, 16 Oct 2015 12:48:35 +0000]
video: tegra: camera: Re-arch MFI (1/2)

Add MFI support in tegra_camera_platform driver,
as part of MFI re-arch.

Bug 1683491

Change-Id: Ic40498ca400c26b117d21de30ffa6e7f2ede9523
Signed-off-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-on: http://git-master/r/818880
(cherry picked from commit cf4276904e81892666fae9847734d43e248122b5)
Reviewed-on: http://git-master/r/1118350
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/1141864
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jihoon Bang <jbang@nvidia.com>