Commit graph

3227 commits

Author SHA1 Message Date
Arun Menon
c9647fc5cf msm: vidc: Add Video driver for MSM targets
Add snapshot for Video driver source for MSM targets. The code is
migrated from msm-3.18 kernel at the below commit level -
d5809484bb1bf5864dad2f081b0145224762963a.

Signed-off-by: Arun Menon <avmenon@codeaurora.org>
2016-03-23 21:22:38 -07:00
Vidyakumar Athota
a15e630662 ASoC: msm: Add support to query speaker parameters
Add SET and GET parameter APIs to query speaker
parameters in feedback speaker protection FTM mode.

CRs-Fixed: 974621
Change-Id: I1a51e5033d7836c0c996621593cd2f4dd6982dcd
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-03-23 21:20:59 -07:00
Gopikrishnaiah Anandan
41a12ff0ed mdss: msm: Update dither driver interface
Post processing driver clients can program the dither table in mdp.
If length of the dither table is set to 0, driver will program the
default table. If driver client would like to program the table it needs
to update the length field as per mdp hardware version.

CRs-fixed: 983164
Change-Id: I5e6aaa3d9376884e5ea1fe153cdf2798e3a52d1e
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2016-03-23 21:20:58 -07:00
Jordan Crouse
5c39fe697f msm: kgsl: Set the DDR high bank bit if specified in the device tree
On 5XX targets we need to program the bit of the highest DDR bank
into a number of registers, one of which is protected which would
cause problems if the user mode driver tried to write to it.

Specify the high bank bit in the device tree files, set the
problematic register in the kernel and then pass the value up to
the user mode driver as a property and let them program the
other registers.  This makes the device tree the authoratative
source of the high bit value which is exactly how it should be.

If the value isn't specified by the device tree for whatever reason
return an error for the property request - that will give the UMD
a clue that the value wasn't specified and they should just set a
default.

CRs-Fixed: 970272
Change-Id: Ic0dedbad830321329b74da7fa3e172fdaf765c4d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2016-03-23 21:20:35 -07:00
Jonathan Wicks
e80d2278fb msm: kgsl: Add a cmdbatch profiling flag to get time since boot
Add a new cmdbatch profiling flag that populates the seconds
and nanosecond fields of the cmdbatch structure with the time
since boot instead of the wall time.

CRs-Fixed: 968114
Change-Id: I4e752d5237a74192b3ea9cc125c11bae574c1b36
Signed-off-by: Jonathan Wicks <jwicks@codeaurora.org>
2016-03-23 21:19:46 -07:00
Krishna Chaitanya Devarakonda
1f6940fa9c msm: mdss: Add mdss capabilities for msmgold
Add MDSS version info along with other capabilities
for msmgold.

Change-Id: Ia4602fdaf29bad28dffab4bb08a43a6eb6f32178
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2016-03-23 21:18:04 -07:00
Jayant Shekhar
24f4f57184 msm: mdss: Add mdss capabilities for msmtitanium
Add MDSS version info along with other capabilities
for msmtitanium.

Change-Id: If9544098e8bb7f4b0d8198a931e5a7ef8eb561d4
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2016-03-23 21:18:03 -07:00
Anirudh Ghayal
eeedd1c502 include: batterydata-interface: Add snapshot of the batterydata files
Add snapshot of the batterydata-interface files from msm-3.10, this
is required for qpnp-vmbms module.
(msm-3.10 commit - 7704c94d47f8ed7cc81e487ab9d576ef52e0f1e5)

Change-Id: I322774879dec5856443c90280f7eb8b1b7f07798
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-03-23 21:16:24 -07:00
Zhen Kong
deb62ed21a qseecom: make change to support sg list entry number larger than 512
qseecom_send_modfd_cmd_64 converts non-contiguous ION memory fd to
scatter-gather physical address list, and supports up to 512 SG list
entries. Now, 512 is not enough if client wants to send large data
in a fragmented system. In this change, if SG list entry number is
larger than 512, we will allocate a new contiguous kernel buffer,
then save all SG entries into this new buffer.

Change-Id: Id90eefb98b63bf16db755dae8e1482e448090f47
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-23 21:13:51 -07:00
Skylar Chang
894269ca16 msm: ipa3: make ipa3 compile for corbalt rumi
Configure the new IPA-interrupt register to get
the IPA-HW irq, also change the tag process to
be compatible to 64 bits platform.

Change-Id: I29a8805cacc8d8df2f0e60ee8e1d2243c718d248
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2016-03-23 21:13:50 -07:00
Jeremy Gebben
18015f6f2a msm: crypto: move compat_qcedev.h
The uapi directory shouldn't contain compat definitions,
so move this file out of there.

Change-Id: I1ee862e522d0b7f9bc4e22fb0e375b4cc1a53504
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2016-03-23 21:13:37 -07:00
Amir Samuelov
cd1949d4e2 include: uapi: fix spcom.h using bitops
The include file <linux/bitops.h> is not available on user space.
remove it from the spcom.h uapi file.

Change-Id: I1a2ea14a4fc1154b63776e83909389cc73398f7d
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2016-03-23 21:13:31 -07:00
Amir Samuelov
95039b1403 include: uapi: add spcom.h to Kbuild
Add spcom.h header file to the copy list, to be available for user space.

Change-Id: Icafff242dd7b14094cb4ec846c20c8206a6bf9ce
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2016-03-23 21:13:06 -07:00
Jeremy Gebben
ea4e77c42f msm: kgsl: include header dependencies
Include the dependencies rather than relying on 'something else'
to include them.

Change-Id: I472e8f4abbc3d54904f441d42f2e7cb38bc413d0
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2016-03-23 21:12:47 -07:00
Amir Samuelov
09e5b18869 soc: qcom: add secure processor communication (spcom) driver
This driver supports communication with secure processor subsystem
over glink transport layer.
The communication is based on using shared memory and interrupts.
This driver exposes interface to both kernel and user space.

Change-Id: Iec5fc78c8370002643b549e43015c06b09d8ab8b
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2016-03-23 21:12:11 -07:00
Satya Durga Srinivasu Prabhala
3165bb66bf uapi: export IPA & Media headers
IPA & Media headers need to go to userspace.

Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-23 21:10:42 -07:00
Stephen Boyd
8570db60c0 Export android_pmem.h to keep userspace compiling
Some applications still include android_pmem.h although all the
functionality for it is gone from the kernel. Keep this header
file around until all such users have removed the include.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-23 21:10:42 -07:00
Zhen Kong
df53b6783a hw_random: add snapshot of msm_rng driver
This snapshot is taken as of msm-3.18 commit e70ad0cd
(Promotion of kernel.lnx.3.18-151201.)

Acked-by: Shabnam Aboughadareh <shabnama@qti.qualcomm.com>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-23 20:58:34 -07:00
Neil Leeder
86cd54bb19 perf: support hotplug
Add support for hotplugged cpu cores.

Change-Id: I0538ed67f1ad90bbd0510a7ba137cb6d1ad42172
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-23 20:58:09 -07:00
Mohan Pallaka
d42befffb2 input: misc: add support for virtual mouse
Add input driver for virtual mouse feature. The events
are received through ioctls and transfer them through
input framework.

Change-Id: I0842b49ec1c8c6bef3005d9f4419ab15e3abe024
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2016-03-23 20:58:02 -07:00
Himanshu Aggarwal
8366ca7181 input: hbtp_input: Port and add snapshot of changes from msm-3.10
Port the HBTP Input driver and apply the following driver
changes taken from msm-3.10 kernel branch as of msm-3.10 commit.

31773451	input: misc: add input driver for HBTP

20bf9c5f	input: hbtp_input: bypass alphabetical and numeric
		key config

e424ee72	input: misc: hbtp-input: add event type in uevents

Change-Id: I122d22cf738c747bcd43ec7f90c33a239288fd9d
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
2016-03-23 20:58:01 -07:00
Jing Lin
e897567177 input: maxim_sti: move header to uapi
Move kernel data structures to driver and keep the
data structures shared between kernel and user space
in the header file. Move the header to uapi to make
it accesible to user space.

Fix checkpatch errors to replace deprecated functions
and hardcoded error return values.

Change-Id: Ic3312c11ddda9f02da9807a6243206d582281995
Signed-off-by: Jing Lin <jinglin@codeaurora.org>
2016-03-23 20:51:34 -07:00
Archana Sathyakumar
fa6246b1f4 uapi: Kbuild: Expose thermal kernel header
Expose thermal uapi kernel header file to the userspace

Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2016-03-23 20:51:30 -07:00
Archana Sathyakumar
24536b1559 uapi: Kbuild: Expose energy-aware kernel header
Expose energy-aware uapi kernel header file to the userspace

Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2016-03-23 20:51:29 -07:00
Venkat Gopalakrishnan
b9fcf56406 include: mmc: Export sanitized mmc headers
Export sanitized mmc.h and core.h for userspace.

Change-Id: I3a6eadde2023d974b0ce260a77082b01d8ba0b5d
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-23 20:51:28 -07:00
Krishna Konda
8a3d5e6ab0 mmc: card: Fix RPMB IOCTL to handle all cards
The eMMC 4.5 spec for RPMB accesses is not very clear on whether
user parition accesses can be allowed in the middle of RPMB accesses.
Due to this ambiguity, it turns out this is implementation defined
and certain cards support it while others do not.

In order to allow this feature to function across a wide variety of
cards, this patch takes the pessimistic approach and ensures that any
RPMB access is completed before user partition can be accessed.

Change-Id: I77959f462c874771a0a854d9a2bc48df446eff56
Signed-off-by: Krishna Konda <kkonda@codeaurora.org>
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[merez@codeaurora: fix conflicts due to changes in 3.14]
Signed-off-by: Maya Erez <merez@codeaurora.org>
[venkatg@codeaurora: pick only ioctl header changes and drop rest]
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-23 20:51:27 -07:00
Lakshmi Narayana Kalavala
a47c5d5076 msm: camera: Update camera drivers
Add changes to update camera drivers to:

1. Update necessary Kconfig files to support camera driver
compilation.
2. Support minor changes to V4L framework.
3. Export uapi headers to header_install export location.

Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 20:48:08 -07:00
Lakshmi Narayana Kalavala
12d7df3314 msm: camera: Add all camera drivers
Add all camera drivers by picking them up from
AU_LINUX_ANDROID_LA.HB.1.3.1.06.00.00.187.056 (e70ad0cd)

Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2016-03-23 20:48:07 -07:00
Ping Li
92409ccc31 msm: mdss: Add backlight threshold for AD
Notify user space with only backlight changes that pass the backlight
threshold check.

Change-Id: Id2fef0a2d9c883d0e68a5ad6be699858be6898ae
Signed-off-by: Ping Li <pingli@codeaurora.org>
2016-03-23 20:47:52 -07:00
Clarence Ip
ee35c22ddf msm: mdss: add mdss support for msm8937
Initial set of changes to support msm8937. This includes
adding MDP HW version for msm8937, and some makefile
changes.

Change-Id: I0646ea76060696d4fe35e3f6f5f2a949474c0b8b
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict.
Remove makefile changes, always build mdss_mdp_pp_v1_7.c]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:47:43 -07:00
Gopikrishnaiah Anandan
a6d4908341 msm: mdss: Add support for SRGB IGC
Inverse gamma correction(IGC) linearizes the incoming pixels of a layer
before blending it with other layers. Change adds support for sRGB
format.

Change-Id: I2b30adeae5a10354f485c8e78c9d8c938e1ccf1f
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2016-03-23 20:46:34 -07:00
Terence Hampson
cc7c1fe8ec uapi: msm: mdss: add flag to indicate if content is interlaced
When rotation session involves an interlaced layer that is intended to be
deinterlaced by MDP, client is expected to pass in flag indicating rotator
needs to deinterlace content.

Change-Id: I27c009e32cd82e00713c20b3accb2efbe5587344
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:45:57 -07:00
Dhaval Patel
7fdfe0ad67 msm: mdss: add secure display support
Secure display architecture requires null commit
before and after secure display session. It
also adds requirement to make the SCM call before
and after secure display session. It supports secure
display with single-stage SMMU hypervisor controlled.

Change-Id: I3f41ed318c80d6e76328de114f7dee0c9891c2f0
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:43:48 -07:00
Krishna Chaitanya Devarakonda
39b46f5d78 msm: mdss: calculate rotator bw based on source fps
If the source FPS for the rotator is set, store it and
use it for calculating BW required by rotator.

Change-Id: I35801528930897447a039c4a4c950048e99d16d9
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
2016-03-23 20:43:36 -07:00
Ingrid Gallardo
f6a76559a2 uapi: msm: mdss: expose compression ratio for rotator
For bandwidth calculations, rotator driver needs
to know the compression ratio factors which
depends on the pixel format. This change adds
support to share this information between
user-space and rotator driver.

Change-Id: I6163317514328610a836c34fd9ca75c3e753b50f
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:43:30 -07:00
Benet Clark
f423ac1538 msm: mdss: Add atomic commit PP support
This change adds support for SSPP postprocessing using the
atomic commit ioctl. The configuration given as part of the
ioctl will be cached in the same pipe res as before, and the
register programming sequence will be called from the pipe
setup as before.

Change-Id: Ida8209f80e55e9d5009b5df4e55f787b4a85ddc0
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-03-23 20:42:54 -07:00
Benet Clark
8f2a3654ec msm: mdss: Clean up PP framework for unchanged PP features
When creating the framework for handling PP versioning, all PP features
were given interface update and space in the framework for handling
versioning. However, the CSC hardware will not change, and
therefore will not need any updates. This change removes the framework
update done for CSC.

Change-Id: Idc6c0b7ea62717ff1d1f2e4c827481e5db1976a8
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-03-23 20:42:40 -07:00
Sushil Chauhan
92049f8139 uapi: msm: mdp: Add color space in mdp_input_layer
MDP needs color space value to configure CSC matrix correctly. So
add color_space member in the mdp_input_layer structure.

Change-Id: I47ca556f8cfa8ef6c95fb0d77ef1510e3830a286
Signed-off-by: Sushil Chauhan <sushilchauhan@codeaurora.org>
2016-03-23 20:42:39 -07:00
Veera Sundaram Sankaran
c040ba96c0 msm: mdss: add support for async position updates
Expose new ioctl for updating the layer position asynchronously.
Initially, pipes should be configured with async_update flag set
during the atomic commit, after which any number of position update
calls can be made. This would enable multiple position updates
within a single vsync. However, the screen update would happen
only after vsync, which would pick the latest update. Currently,
supported for video mode panels with single LM or dual LM with
src_split enabled. Only position updates are possible with no
scaling/cropping and each async layer should have unique z_order.

Change-Id: Ibb2804b59c6c980411396120e63167f18df5bc5b
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
[cip@codeaurora.org: Resolved out-of-order merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:42:27 -07:00
Gopikrishnaiah Anandan
4d9b8c2d45 mdss: msm: Add support for gamut map enable
Non-uniform mapping mode is configurable parameter exposed by MDP.
Driver should provide the option to gamut clients to configure the
mapping. Change updates the interface to expose the parameter and
programs the gamut registers based on user setting.

Change-Id: I71e7e0f7443da7856b0d03e6b2799f9380274893
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2016-03-23 20:42:25 -07:00
Ujwal Patel
759e9a0fd6 uapi: msm: mdp: add comment on how to fill roi
Add a comment specifying guidelines for user on how to fill roi
information when calling commit IOCTL.

Change-Id: Iaab026131baccace1d4236777ff68d5953b5342b
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:42:16 -07:00
Ping Li
25ee56238a msm: mdss: add sysfs node for AD backlight notification
This change adds a sysfs node for assertive display attenuation
backlight change notification. Any AD related backlight notification
will be posted to the ad_bl_event sysfs node, so userspace clients
can be notified if they poll on the same sysfs node.
It will simplify and optimize the previous notification ioctl
implementation.

Change-Id: I7a8f86563d5802a41dc200f5901a8d0bed1cf765
Signed-off-by: Ping Li <pingli@codeaurora.org>
2016-03-23 20:42:07 -07:00
Jayant Shekhar
1715b84a52 msm: mdss: Add support to select max MDP bandwidth
MDSS currently has fixed maximum bandwidth enabled in DT file.
But there are scenarios where this maximum bandwidth support
can change to enhance performance. Based on scenarios such as
camera use, or flip involved declare the max bandwidth for
usecase in DT and change accordingly based on usecase.

Change-Id: Icc85d75d7a60fe6f934a1fbd9d5077b620b2993d
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2016-03-23 20:42:00 -07:00
Ingrid Gallardo
8837f78417 msm: mdss: add support to expose compression ratio factor
For bandwidth calculations, driver needs to know
compression ratio factors which depends on the pixel
format. This change adds support to share this
information with user-space.

Change-Id: I08aa8792c38bb85a8114a21cbaabe905bbfee289
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:41:54 -07:00
Naseer Ahmed
62a6355138 msm: mdss: hdmi: Add S3D modes
Export stereoscopic 3D modes supported by the driver to the
userspace.

Change-Id: I9992fc10abeca9cf48a9cca5efd404ec0693bb72
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2016-03-23 20:41:44 -07:00
Ken Zhang
699a73beab Revert "msm: mdss: Override partial update PP block using ioctl"
This reverts commit 679dc362a9effee922ef2ce1447424b318f667bc.
The way overriding partial update via PP ioctl is obsolete,
partial update control is going through sysfs. The left code
is blocking pp ioctl even partial update is disabled dynamically.

Change-Id: Icb455a0101b53c58ae6c1b2686bd2297b4832396
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Ping Li <pingli@codeaurora.org>
2016-03-23 20:41:00 -07:00
Nitesh Gupta
3425b351bd msm: mdss: Add MDSS version macro for msm8952
This change adds MDSS version macro for msm8952

Change-Id: I096833c36229f2d623ab7efdeaf43035e5254973
Signed-off-by: Nitesh Gupta <niteshg@codeaurora.org>
2016-03-23 20:40:47 -07:00
Jayant Shekhar
a8e138b0aa msm: mdss: add support for NV21_VENUS in MDP
Earlier, camera preview buffers were of NV21(YCrCb_420_SP)
and the video buffers were of NV12_VENUS(YCbCr_420_SP_VENUS)
format. Now that the video encoder has support for NV21,
both the camera and video buffers can be of NV21_VENUS
(YCrCb_420_SP_VENUS) format.

If the preview and video buffer sizes are the same, CPP
double pass to generate video and preview buffers can be
avoided and the buffers can now be generated within a
single pass with CPP duplication thereby saving power.

Add support in kernel for NV12_VENUS format to achieve
the same.

Change-Id: Ia0ee0155faaa5ba6d5cafbc0529428734eaf37e5
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
2016-03-23 20:40:41 -07:00
Dhaval Patel
3e28d13595 msm: mdss: add RGBX UBWC format support in mdss for msm8996
MDSS hardware on msm8996 target supports RGBX UBWC format
because it handles the RGBA and RGBX formats in same manner.
This change adds the RGBX UBWC format support with
compression ratio information.

Change-Id: I674d136496910e017d4c21d56b62def7eff0562e
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:40:25 -07:00
Krishna Chaitanya Parimi
23a7f64be1 msm: mdss: Add gamma correction support in mdp3
Add gamma correction support in mdp3 driver via
MSMFB_MDP_PP ioctl. The ioctl has been extended to
program luts corresponding to histogram based
outputs and gamma correction based on flag.

The gain corresponding to gamma correction and
the histogram based output are combined in driver
and applied to hardware.

Change-Id: Ie875b4a9f4f4c752ad9a811ad68aff1c5110d57b
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
2016-03-23 20:39:04 -07:00