usb: gadget: Remove usb_diag_free_req() API

Freeing USB requests either as part of cable disconnect or in unbind
case, both doesn't depends on diag driver to initiate usb free request
using usb_diag_free_req(). Freeing of USB request as part of cable
disconnect is handled in the code by freeing the USB requests in next
cable connect. In unbind case, usb requests are freed in usb driver
before releasing reference to usb diag device context.

Although freeing of usb request is taken care in usb driver, but it
is seen in few regression testing that calling usb_diag_free_req()
from diag is leading to synchronization issues. As USB doesn't depend
on the diag driver to initiate usb free request using API
usb_diag_free_req(), hence remove API usb_diag_free_req() from code.

CRs-Fixed: 583730
Change-Id: I990f6c07ef28e767040cc959d0addf8ab413d1d1
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
gpu: ion: system_heap: add support for 2MB allocations

Enable 2MB (order 9) allocations from the system heap. This improves the
performance of some heavyweight use cases. The benefit is especially
large for use cases where the buffer is mapped into an IOMMU since we
can leverage the 2MB IOMMU page table mappings.

Change-Id: I869733089b9ccba8090bbca80aac7b5f248b335e
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: camera: Fix unterminated of_device_id table

Add a NULL table entry at end for msm, ispif and
msm_generic_buf_mgr device tree match tables.

Change-Id: I78ff0f63fdb49e8c62b1974c1ee786d48af5e067
CRs-Fixed: 582110
Signed-off-by: Hariram Purushothaman <hpurus@codeaurora.org>
msm: mhl: sii8334: proper gpio/regulator power on/off

Power off regulators and free gpios on cable disconnect/suspend
and power on when cable is connected or discovery is requested.
This makes sure that MHL remains on proper state during cable
connect disconnect and suspend resume.

Change-Id: I5c4122d18183fe6e24b2466029e31e917536e7a4
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: mdss: Decimation and BWC cannot be enabled together

Hardware cannot support decimation and bwc together.
The use case should be failed.

Change-Id: Ic7547340eb08d542a296aa9cfdd150e7eb0bea4b
Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@quicinc.com>
ARM: Allow panic on division by zero in the kernel

Division by zero errors in the kernel currently trigger warnings.
Allow panic on these errors so that we can catch the problem closer
to its source.

Change-Id: Id5fed71b74cd37874ae857a8105455d7561c782d
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
ARM: dts: msm: add interrupts to bypass list

some of the interrupts are enabled by default and causing
system not to enter into XO when the target is idle. Add
non wakeup capable interrupts to bypass list to allow
target to enter into XO shutdown.

Change-Id: I7237a69bd2b87ab5101ffa6ad95e86aef2a93ad5
CRs-fixed: 575437
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
Signed-off-by: Anil kumar mamidala <amami@codeaurora.org>
msm: pm: print active clocks before entering into pc

print out all active clocks during idle power collapse
and suspend power collapse using clock debug API

CRs-fixed: 596828
Change-Id: Ie653c02d490b80de001f61fe8320ee851bb139c7
Signed-off-by: Anil kumar mamidala <amami@codeaurora.org>
msm: camera: check buffer validity in isp buf mgr

When someone asks for buffer from isp_buf_mgr, check
if buffer is valid. This is done by verifying if it is
present in the list of buffers for this session.

This will potentially avoid few kinds of page faults.

Change-Id: I787a9503853706be65f1960779144d4b62925865
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
ion: system_heap: only use low gfp flags for order-0 pages

By trying a little harder to get high-order pages (by virtue of the
liberal gfp flags used for high-order allocations) we can actually
optimize performance since high-order pages seem to help a lot. Only use
the low-order flags as a last resort, when trying to allocate an order-0
page.

Change-Id: If8d8f4b1b4503b0c7546cf5a4bcdcaecd2bb5905
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: camera: Fix gc0339 sensor orientation

Fill mount angle valid flag and angle val in
CFG_GET_SENSOR_INFO call.

Change-Id: If6045e2f0beadd98e1bc8bfc6bec321500f953e3
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
msm: camera: Fix hi256 sensor orientation

Fill mount angle valid flag and angle val in
CFG_GET_SENSOR_INFO call.

Change-Id: I9315612b66846c4d025ca66de7b67b6879f62aa0
Signed-off-by: Evgeniy Borisov <eborisov@codeaurora.org>
msm: mdss: Fix for bus bandwidth issue

Fixing possible large values handling.

Change-Id: Id9e4aafa2a922c2c90def037b110826344487fcd
Signed-off-by: Radhika Ranjan Soni <rrsoni@codeaurora.org>
msm_serial_hs:Enable Error/Break Char off

Follow the hardware sequence of enabling
RX_ERROR_CHAR_OFF and RX_BREAK_ZERO_CHAR_OFF in
MR2 register, for not allowing the Break and
parity/frame Error characters into Rx FIFO.

CRs-Fixed: 538141
Change-Id: I24f73eea456c4cb2a68b1655bcd5426426ca7d97
Signed-off-by: Dilip Kota <c_dkota@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
msm: vidc: Increase maximum buffer count limit

Some clients want to allocate more buffers on decoder
input port than required (mainly for performance reasons).
Video decoder should honor the client request as long as
V4L2 framework permits.

Change-Id: Idd8101e84823b10736ab75ced2ea3235d944ef55
CRs-fixed: 509088
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
[media] media: Init the reserved fields of struct media_link_desc

struct media_link_desc is copy_to_user'ed as the return value of
MEDIA_IOC_ENUM_LINKS. When copying, the driver is omitting to initialise
the reserved fields.  This commit fixes that by initialising the
reserved fields to 0.

CRs-Fixed: 570757
Change-Id: I230e2666c0845cc36399518a0f2c94db664382d1
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: mdss: Do not program DSI PLL registers from DSI controller

MDSS DSI driver currently programs certain DSI PLL registers as
part of the DSI PHY off sequence. This is incorrect and could
lead to some unexpected errors such as DSI PLL getting turned off
while the branch clocks are still on. Fix this by removing all
such register programming.

Change-Id: Ie1e88cd18de6b8ef8804f7a2b34b8b8282166c96
CRs-Fixed: 509801
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: mdss: dsi-1 as master clock controller at split display case

During split display case, both dsi controllers share the same
dsi pll(dsi0) dsi-0 clock need to be enabled before dsi-1 and disabled
in the reverse order. This mechanism helps using a unified clock control
logic.

Change-Id: I9fe0095b0427c9c2b7fd84c3179bc8364049cce4
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm: mdss: parse dual DSI config from kernel cmd line

Update DSI panel configuration API to parse the
dual DSI configuration passed from kernel command
line.

Change-Id: I1a6f65a5ea385df46db2d81dcedc24c192ce1388
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
mdss: display: add JDI dual dsi pwm info to dtsi

Add JDI both video and command mode dual dsi panel pwm info
to dtsi.

Change-Id: If1162ede26c13141bc9f6ef2e6d20e6aa45e7824
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>