msm_fb: display: perform backlight updates on overlay play

Perform pending backlight requests on overlay play to handle cases in
which framebuffer updates are not happening to update backlight.

CRs-fixed: 334643
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
(cherry picked from commit da2f3cc0003c55cd18d6f052ecb9530fe2acea9a)

Change-Id: I448241fa76d96c0511f92f22aab5c57e4d29546f
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: display: Fix color swap issues in MDP4 and Rotator drivers

Many of MDP input formats don't have correct unpack pattern, so image
displayed on screen is not in the actual format set. Also,Some rotator
output formats differ from input, these mappings used to be handled in
userspace, but to avoid issues this is now done in driver. For YCrCb planar
inputs chrominance order is dependent on rotator hardware version. Add
hardware check to swap Cb and Cr for 7x30 and 8x60 rotators.

CRs-fixed: 339114
CRs-fixed: 337040
Change-Id: I55691aa7c9d38e83e4fc63a162ffb23959ba30c1
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm: vidc: Extract PAR info for MPEG4/DIVX.

Display needs the pixel aspect ratio information
from the video decoder to display the picture
with the right aspect ratio. Video decoder extracts
the pixel aspect ratio information from the
video core and passes it to the client/display
as extradata.

Change-Id: I4db2b8ba827af67bc01888d13c36c1b501934ccd
Signed-off-by: Arun Menon <menon@codeaurora.org>
vidc: Modify shift value for extended PAR width.

Currently extended pixel aspect ratio register shift
value for width is 15. Due to this the actual width
value returned by core is getting doubled while
sending to user space. Now correct values are returned
by modifying the shift value to 16.

CRs-fixed: 362985
Change-Id: I996bfc79b327492a791017fd5b33638f82240d76
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
msm: vidc: Add PAR value extradata support for H264 and Mpeg2

Core gives aspect ratio information for H264/Mpeg2 in a
shared memory register. This change will fetch the value
of the aspect ratio from the designated register and append
this information to the frame_info extradata which can be
used by the client.

Change-Id: Iacacaf1b1181546ba2d09362a51bbe5178a63999
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: Reduce the priority of incorrect PAR value message

We get the error message for the incorrect aspect ratio
with each frame of the video. By reducing the priority,
error message will appear only when we enable it.

Change-Id: Iacb8002383ea6c0b7ee86e9cfe14478c0e5ca5c3
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
vidc: Migrate to ion_map_iommu() API.

Migrate video driver to use the ion_map_iommu() api,
this api provides the physical address if IOMMU is
not enabled.
If IOMMU is enabled in the system it provides the
virtual contigious address.

Change-Id: I0f6f7c50865cb3da88a0ee13425e3973037c846a
Signed-off-by: Arun Menon <menon@codeaurora.org>
vidc: Move shared memory to firmware heap

if smmu is enabled then the memory needs to be
mapped as cached for IOMMU heap, moving the
shared mmeory to firmware heap which does not
require cached mapping

Change-Id: Iac14169b1063bd2784ebf7df433614d68830e84a
Signed-off-by: Arun Menon <menon@codeaurora.org>
vidc: Memset only for non secure session.

The buffers are memset only if its a non secure
session.

Change-Id: I9b374d4a46ffdd37147e4888fe81c9a7ff7c59aa
Signed-off-by: Deepak Kotur <dkotur@codeaurora.org>
msm: vidc: Perform cache flush only for non-secured mode.

The cache flush for secure mode is not needed as
no memset is performed. Pass the correct parameter to
cache flush to avoid kernel panic.

CRs-Fixed: 374719
Change-Id: If9bfe1025b15b24e17ec49590c21a59d77f9414c
Signed-off-by: Arun Menon <menon@codeaurora.org>
vidc: 1080p : Add support for slice delivery mode to encoder

Slice delivery mode enables confguring the encoder to deliver
one slice per output buffer. This mode is valid only for h264
codec when multi slice config is set to slice by mb.

Change-Id: Ibc9f3193faa3e1bc6009a6521475ef15966fc7c1
Signed-off-by: Pradnya Chaphekar <pradnyac@codeaurora.org>
vidc: 1080p : Add support for skip frame in slice delivery mode

Slice delivery mode for H264 encoder will deliver constant number of
output slice buffers for each frame. In case of CBR rate control method,
core will skip frames to maintain the output quality, in which case
driver need to send out the output buffers with data length as zero
for skipped frame output type from the core.

Change-Id: Id81330b28f1f17b97eb2c79c86558bd072b62c4e
CRs-fixed: 362356
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
gpu: fix Kconfig path
rotator: use dev_err instead of pr_err
gpu: kgsl: fix function prototype
gpu: adreno: add missing hunk
vidc: Fix up bad merge
cfg80211/nl80211: Send AssocReq IEs to user space in AP mode

When user space SME/MLME (e.g., hostapd) is not used in AP mode, the
IEs from the (Re)Association Request frame that was processed in
firmware need to be made available for user space (e.g., RSN IE for
hostapd). Allow this to be done with cfg80211_new_sta().

Add a comment pointing out the use of enum station_info_flags for
all new struct station_info fields. In addition, memset the sinfo
buffer to zero before use on all paths in the current tree to avoid
leaving uninitialized pointers in the data.

Change-Id: Ia2220d58ee81c1b7ca905cfc8eb55b6a84779d38
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
cfg80211: fix a crash in nl80211_send_station

mac80211 leaves sinfo->assoc_req_ies uninitialized, causing a random
pointer memory access in nl80211_send_station.
Instead of checking if the pointer is null, use sinfo->filled, like
the rest of the fields.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
msm_fb: display: Add backlight with first pan display after resume

Add backlight call with first pan display after resume operation
of framebuffer driver

CRs-Fixed: 323682
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ic27c2c9fe37b622bbd9ab5933ca45626decd53ae