msm: mdss: Add support to get/set secure flag via an ioctl

Add support to get/set secure flag for WB session through an ioctl.
This is required for WB clients such as AD/WFD, enabling them to modify
or query the secure flag depending on requirements e.g. secure video
playback when using AD.

Change-Id: I852b6f79b31b5ba027d9a5c11561c562023cb99f
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
msm: mdss: MISR based CRC validation

MISR allows a CRC to be generated from contents of a
particular hw block which can be used for validation.
Enable setup of misr and APIs to obtain CRC from hw blocks.

Change-Id: Ib07e31cba45d242922bd28b6b306220efece7b8d
Acked-by: Sachin Bhayare <sbhayare@qti.qualcomm.com>
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: mdss: Add six zone LUT size as PAv2 parameter

Added six zone LUT size as a parameter to PAv2 in order for the size to be
specified by the user. This size is sanitized based on the required LUT
size.

Change-Id: Iaf1b418ce1a3ec4b5013b1192c7f3b7de5827e3d
Signed-off-by: Benet Clark <benetc@codeaurora.org>
msm: mdss: Realign PAv2 structure

Changed fields in the PAv2 struct in order to pack it more efficiently

Change-Id: I81fbebd4e2df87d922cc318675c5c4ae7e6e00c0
Signed-off-by: Benet Clark <benetc@codeaurora.org>
msm: mdss: Block postprocessing updates during DTM

When calibration tool requests the fb driver to enter in
Display Tuning Mode (DTM), PostProcessing blocks should
not update the HSIC, Memory color, Six Zone colors, etc.
Updating them during DTM conflicts the update from
calibration tool.

Change-Id: I11fcac57a651581d85e771911f83b2fdd9c3c681
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
msm: mdss: add retire fence support

Retire fence timeline should follow the actual panel vsync more closely.
For video mode the retire fence can be signaled along with the release
timeline with +1 offset, since this is signaled at vsync.
In case of command mode the panel vsync can be different from buffer
release timeline. To handle the command mode panel vsyncs better, create
a new timeline for the retire fence signaling.

Change-Id: If8a1eb717d733ca215275a8be4f0054091dbc147
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: mdss: synchronize wfd driver iommu mmap/munmap with mdss

Add clocks reference during wfd driver iommu mdp_mmap/mdp_munmap
to ensure iommu is in proper state while wfd driver map/un-map
any buffers.

Change-Id: Id1a24285b81d5047e5e9f002ade9694ea49be59d
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>
msm: mdss: implement overlay prepare ioctl

Overlay prepare will allow a full frame with multiple overlays to be
configured at once and perform frame level checks before being pushed to
display. This function guarantees that if the call is successful, the
frame can be displayed successfully on the screen when display commit is
called.

Change-Id: I276b6fe3e0a872a2e93170f3cea1002d3ce0dac9
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
msm: mdss: Add backlight attenuation mechanism in AD auto strength mode

AD backlight attenuation provides the ability to modulate backlight based
on calibration before feeding it to AD core for strength computation.

Change-Id: Iea011807b25882463b1142e17324fa0509007aa4
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
msm: mdss: move MDSS revision macros to /linux/msm_mdp.h

Currently kernel driver and user mode libraries keep their own
copies of HW revision numbers. This strategy is prone to errors
and usually frowned upon. Fix this by moving revision information
to sanitized header which is shared by kernel drivers and user mode
libraries.

Change-Id: I59d1256ffd98e07f4ef9ae2b534f04b67abd2119
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Revert "msm: mdss: Add backlight attenuation mechanism in AD auto strength mode"

This reverts commit d69888a7cf6f7bcb9ad1443ec346d80b36fbde8f.
Find7: remove unused camera sensors
Find7: disable V4L USB support
find7: switch to XZ compression

Change-Id: I5beba53cc139d1707e8ee50b32ca0ade6123ce72
Find7: enable pronto wlan driver
Revert "msm: mdss: move MDSS revision macros to /linux/msm_mdp.h"

This reverts commit 5821063dd2c7358740cc461c02f31cda5c6dc031.
msm: vidc: Add a control to disable the bit stream restrict flag

HFI_PROPERTY_PARAM_VENC_H264_VUI_BITSTREAM_RESTRC is set to true by
default in firmware, generating VUI which some decoders don't support.
This change provides an option to turn off the bitstream restrict
flag which, when used in conjunction with other VUI-related controls
being disabled, will prevent the encoder from generating VUI entirely.

Change-Id: Idb00d942bdd82b80001f9fda47a84aee231e4bdd
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>

Conflicts:
	drivers/media/platform/msm/vidc/msm_venc.c
	drivers/media/platform/msm/vidc/vidc_hfi_api.h
	include/linux/videodev2.h
msm: vidc: Add control to preserve text quality

V4L2_CID_MPEG_VIDC_VIDEO_PRESERVE_TEXT_QUALITY allows the client to
tell the encoder to preserve the text quality whenever a given frame
contains text elements.  This reduces the amount of artifacts around the
text in the encoded frame.

Change-Id: If75ea580adaedc896d8a31410a194076f38b5179
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: vidc: set ctrl to request sequence header for encoder

The encoder depended on a debug variable i.e. ftb_count, to
request firmware to send sequence header. Remove this
dependency and make the request only when the encoder
client requests using the provided set ctrl.

b/11051201

Change-Id: Iac4104c33eef62da553066c736b7adc87834d2ac
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
videodev2: fixup control sequence order