wcnss: Download NV during SSR

If CAL data is already available, then based on the intial design it is
belived that only CAL needs to be downloaded to WCNSS during SSR.
However that design was incorrect, FW always needs the NV after a
reset. So download NV (and CAL if available) during SSR.

Change-Id: I624d40ac3e195997c9638f62fcdb0e88f0cc749e
CRs-Fixed: 557561
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
ASoC: msm: Add support for external EC reference point

Add mux to sound card topology with output of mux routed
to CS voice uplink front-end as way to indicate external
EC reference point. Currently, MI2S_TX is the only
AFE input port defined for this MUX. This change is required
if external EC is to be used with external speaker.
CRs-Fixed:575788

Change-Id: Ic6f190414f060fbe0844a1b7038a787a07b5a820
Signed-off-by: Venkat Sudhir <vsudhir@codeaurora.org>
msm: mdss: Fix MDP hang issue for H2V1 interleaved formats

MDSS HW with decimation block present, uses two SMP clients, Y and UV,
regardless of YUV surface is interleaved or planar. Current code takes
care of planar format but not interleave YUV. Fix this by temporarily
converting those formats to pseudo-planar while calculating SMP
requirements.

CRs-Fixed: 568011
Change-Id: I917f7dfd848144bcc4a6c463cd20fb302c432cc5
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
clock-mdss-8974: Switch HDMI clocks to use the new PLL implementation

This change cleans up the HDMI VCO/PLL implementation. It implements
the HDMI VCO clock and uses generic div and mux clocks to align to
the HDMI PLL architecture.

CRs-Fixed: 456315
Change-Id: I19ef344aafc954935cd6d236f3725bf168658ec9
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: clock-mdss-8974: Enable AHB clock before register access

Enable the MDSS AHB clock for proper HDMI PHY PLL register
access. Disable the MDSS AHB clock after register access.

Change-Id: Ice8e723333f3c041bc1cffa2ebc8d7d40a8817d2
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: clock-mdss-8974: Proper hdmi set rate

Do not call set rate if the rate is zero. Reset the flag which sets
the rate on cable disconnect so that next cable connect can set the
rate again.

Change-Id: Ieb8eed3760c4b285182ae47d732352771d13b020
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: clock-mdss-8974: Dynamic HDMI PHY-PLL configuration

Implement the  HDMI PHY PLL calculator to dynamically configure the
HDMI PLL VCO to any supported pixel rate within the supported range.

Change-Id: I5665509aeaf54132ae711e3c4c9be542b25b8241
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
of: batterydata: fix a typo on flat-ocv-threshold-uv property reading

This typo cause flat_ocv_threshold_uv value can't be read correctly,
and make adjust_soc() assign a wrong value to correction_limit_uv in
bms driver.

CRs-fixed: 572797
Change-Id: Ifc00c63070281e3adfafd3f10559f2660644af90
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
msm: vidc: Return failure for unsupported codecs

This change will check the codec type with supported codecs
(obtained from SYS_INIT_DONE response) and return failure
if unsupported codec is being set.

Change-Id: I113b4600b8c0152227cff50d5dff8c2da6f74c86
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: audio: initialize the structure before sending to user space

If uninitialzied structure is passed from kernel to user space, it
may contain contain sensitive information that will be leaked.

Change-Id: I4926185703b84c38710dd7d1271d3684aab5361e
Signed-off-by: Fred Oh <fred@codeaurora.org>
msm: vidc: Halt axi bus before clock disable

Before turning off venus clock, host should make sure
that there are no pending AXI transactions. This is achieved
by halting AXI.

CRs-Fixed: 578007

Change-Id: Ib4a71d1097f2f62e910e00c7be5d32e006d4c62b
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
msm: mdss: release all overlay resources on last fb release

There are cases where the last frame buffer reference is released from a
different pid than the one who originally allocated the resource.
In these cases we can still deallocate all resources currently allocated
as we know that all references on fb dev have been released.

This issue was previously fixed by a42150bd. But later it again resurfaced
with 831a828.

Change-Id: Ie35194b1e11ae90ff886b1be22cf02c842a76d1a
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
msm: mdss: release all overlay resources if calling process is unknown

There are cases where fb release is called from a process which is
unknown to internal process tracking list. This usually happens when
a crash handlers closes open fds in a kernel worker thread rather than
in process context. In such cases if fb open happens from a completely
new process then it may lead to pipe leakage due to race condition
between unknown process and this new, fb open, process. Prevent this by
releasing all overlay resources when fb release is called from an
unknown process context.

Change-Id: I07157116413dfb26e0b87c61f9def916a653340a
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
msm: mdss: error handling in the dsi driver on 8x10

This adds the error handling in the dsi command send and receive
functions.

Change-Id: I69d77a6f1981a286864e7076aee079776ed53a85
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
usb: misc: diag_bridge: use platform_device_register_simple

Simplify platform_device allocation in probe() function by
calling platform_device_register_simple(). This does the job
of both allocation as well as calling platform_device_add(),
which will reduce the number of error checks needed by one.

CRs-fixed: 534397
Change-Id: I02815b67a36dd7da0bf872ca5bd7464e290267c8
Signed-off-by: Jack Pham <jackp@codeaurora.org>
msm: mdss: Fix NULL pointer dereference in mdss_mdp_display_wait4comp

Add sanity check for ctl to prevent NULL pointer dereference
leading to kernel panic.

CRs-Fixed: 578595
Change-Id: Iace727501856d9f93ba87eca92f9f000c32d2c8f
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Merge "msm: mdss: error handling in the dsi driver on 8x10"
Merge "usb: misc: diag_bridge: use platform_device_register_simple"
Merge 3b6a76c7fdd1cd56e932693fc492877ef175f960 on remote branch

Change-Id: Ib830cea43768050b4fdf277fe8ced484d2ce3e72
Merge "Merge 3b6a76c7fdd1cd56e932693fc492877ef175f960 on remote branch"