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>

Conflicts:
	include/linux/msm_mdp.h
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>

Conflicts:
	drivers/video/msm/mdss/mdss_fb.c
	drivers/video/msm/mdss/mdss_mdp_overlay.c
msm: mdss: Enable solid fill on pipe

Add support to enable solid fill on pipe with an option to
configure fill-color by userspace. This support does not confine
to background pipe and can be used to enable solid fill on any source
surface processing pipes irrespective of the z-order.
This support can be used in requirements involving constant
color layers.

Change-Id: Iae3c2968ca2f2f1be161e9c2f857641ffbb859e5
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

Conflicts:
	include/linux/msm_mdp.h
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: vidc: add LTR support for video encoder

Enable LTR support for VP8 codec to add robust error resilience.

Change-Id: I3b87c5cdaef836a6d02d5b9fe71b7165b7f13581
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>

Conflicts:
	drivers/media/platform/msm/vidc/hfi_packetization.c
	drivers/media/platform/msm/vidc/vidc_hfi_api.h
	include/linux/videodev2.h

Conflicts:
	drivers/media/platform/msm/vidc/hfi_packetization.c
	drivers/media/platform/msm/vidc/vidc_hfi_api.h
[media] v4l2: Add enum for frame level QP extra-data

This option is intended to be used to request as extra-data
the frame level QP.

Change-Id: Icaf88bd5a48ac394d1ed7ded8dc320cfeebc2765
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
[media] v4l2: Add enums to request frame bits info as extra-data

This option is intended to be used to request as extra-data
the size in bits from frame header and frame itself.

Change-Id: I207045cda8c8038981bcf4548eb3d221502a67e1
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
msm: vidc: Add support to request frame level QP information

The resulting QP information for H264 is the slice level
QP averaged over whole frame; for all other codecs its
frame level QP.

Change-Id: I288904b05d886c1e94fc113b8bd3fba5b13b48f3
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
msm: vidc: Add support to request frame bits info as extra-data

Provides information regarding number of bits in the frame (i.e frame
size expressed in bits) & also the number of bits in frame header (i.e
frame header size expressed in bits).
Number of bits in header is reported as:
For H264, sum of all slice headers bits for all the slices in the frame.
For all other codecs, number of bits in the frame header.

Change-Id: I6caeca025ff0ce059a20891a6d657b47c4b452b3
Signed-off-by: Jorge Solano Altamirano <jsolano@codeaurora.org>
msm: vidc: Add generic LTR mode support

Use generic LTR HFI APIs for h264 and vp8 formats.

Change-Id: I9f307046d7ec6de4eb6d43704686be902356882a
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>