msm: vidc: return alignment based on session type

Update alignment and buffer size when driver is queried for
buffer requirements.

Change-Id: Ie84e556e219ca02688ceff794e223dd56341dd93
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
USB: dwc3: msm: Implement new initialization sequence

Currently dwc3-msm driver is not following the initialization
sequence as per new hardware programming guide. Hence implement
new initialization sequence. The new sequence does PHY reset
under GCTL reset

This change solves the USB enumeration issue seen with HS/LS devices
connect/disconnect over TI USB3.0 HUB.

CRs-Fixed: 477323
CRs-Fixed: 515048
Change-Id: Ia0500517290c82f6ca6dc9dc32b4cee1e4f44aff
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
USB: bam: Enable RAM12, RAM13 only for QDSS data & descriptor fifo

Currently for QDSS<->USB usecase, DWC3 core internal memory
(RAM11, RAM12, RAM13) is used for data & descriptor fifos. A data
fifo of 8KB size is enough for achieving maximum QDSS performance
instead of 16KB size. Hence enable only RAM12, RAM13 for QDSS<->USB
usecase so that remaining RAM10, RAM11 can be used for TX endpoint's
fifo allocation. This enables more fifo allocation for TX endpoints,
which will allow double buffering and results in better throughput
improvement.

CRs-Fixed: 532070
Change-Id: I7637bda9520b92537b9297f30d6003d2b6ceccf7
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
USB: dwc3: Allocate 3KB FIFO for bulk and isochronous endpoints

Currently dwc3 driver will allocate fifo size of maximum endpoint
packet size for TX endpoints depending on operating speed. Due
to this, double buffering may not work for TX endpoints in both high
speed and superspeed. Hence implement policy that allocates 3KB of
fifo for all bulk and isochronous endpoints irrespective of speed.

Policy is to allocate 3KB for bulk and isochronous endpoints and
allocate maximum packet size for control and interrupt endpoints.
This policy will improve the TX throughput numbers for function
drivers like MTP, mass storage. But side effect is we can't accomodate
more than nine bulk + isochronous endpoints in non QDSS composition
and five bulk + isochronous endpoints in QDSS composition. Otherwise
last interfaces in the USB composition will not work.

CRs-Fixed: 532070
Change-Id: I5e947f21f25fada7829c84eba45980295497cfbc
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Revert "USB: dwc3: core: Add module parameter for TX fifo resize"

commit "dbe59bf157adf17a39c041ff9379bd5ec751da5c:USB: dwc3: core:
Add module parameter for TX fifo resize" disables dynamic fifo
allocation for TX endpoints by default and provides an option to
enable it for QDSS heavy composition.

Earlier tx fifo resize logic was causing throughput discrepancy
in high speed operation due to double buffering not happening.
With the new policy to allocate 3KB for all bulk and isochronous eps
implemented, this issue will be resolved. Hence revert the change to
always enable dynamic fifo allocation for TX endpoints which will
improve throughput in superspeed mode by having larger fifo to allow
double buffering.

CRs-Fixed: 532070
Change-Id: I9984637d9d3edf8067c4604ed661d3ef8ac426c4
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
USB: f_mtp: Set maximum burst value to two for superspeed mode

Currently burst value is set to zero for superspeed in mtp driver.
MTP throughput can be improved by setting max burst vlaue to non
zero value in superspeed mode. Hence set max burst vlaue to two
for both IN and OUT bulk endpoints in superspeed mode.

CRs-Fixed: 532070
Change-Id: Ib78b8fec5d1ab934f4d4ec80b7e008149707ce0f
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Merge "USB: dwc3: msm: Implement new initialization sequence"
Merge "USB: bam: Enable RAM12, RAM13 only for QDSS data & descriptor fifo"
Merge "msm: vidc: return alignment based on session type"
Merge "USB: dwc3: Allocate 3KB FIFO for bulk and isochronous endpoints"
Merge "Revert "USB: dwc3: core: Add module parameter for TX fifo resize""
Merge "USB: f_mtp: Set maximum burst value to two for superspeed mode"
USB: gadget: qdss: Fix strncmp length usage

Using a newer GCC we get the following warnings:

drivers/usb/gadget/f_qdss.c: In function 'qdss_bind_config':
drivers/usb/gadget/f_qdss.c:598: warning: argument to 'sizeof' in
'strncmp' call is the same expression as the second source; did you mean
to provide an explicit length? [-Wsizeof-pointer-memaccess]

drivers/usb/gadget/f_qdss.c: In function 'usb_qdss_open':
drivers/usb/gadget/f_qdss.c:760: warning: argument to 'sizeof' in
'strncmp' call is the same expression as the second source; did you mean
to provide an explicit length? [-Wsizeof-pointer-memaccess]

These look to be due to using sizeof(ch->name) which is a pointer, use
a simple strcmp instead.

Change-Id: I09e09a18ffb3361fc351b177ed3a35432d9ed933
Signed-off-by: Kumar Gala <galak@codeaurora.org>
kgsl/drm: fix ion resource leakage when there are some errors

There are some ion resource leakage cases when error is occurred.
This patch fixes them.

Change-Id: I354c3fe8d9894159c369b8d08cc954ecb6cbda78
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Mathew Karimpanal <kjmathew@codeaurora.org>
kgsl/drm: add all interrupt enable routine for vblank.

This patch adds all interrupt. e.g.) Primary,HDMI,Rotator,WB(WFD).
because kgsl drm supports all interrupt handling with mdss driver.
but previous patch only supports primary.

Change-Id: I3e6097eb42e72241d01445b4220c651bfd554195
Signed-off-by: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Mathew Karimpanal <kjmathew@codeaurora.org>
kgsl/drm: Fix WB2 irq bit set on vblank.

Change-Id: I3cf93bb4f6083b30740e7b01be2fc8f60b0b79c2
Signed-off-by: Jin-young Jeon <jy0.jeon@samsung.com>
Signed-off-by: Mathew Karimpanal <kjmathew@codeaurora.org>
kgsl/drm: Add WB1 interrupt bit set on vblank.

This patch adds WB1 INTR on drm vblank.
Rotator generated not only WB0 but also WB1 interrupt.

Change-Id: I6b030d890b374a0b7b72d6b29377d9c1d26cbb26
Signed-off-by: Jin-young Jeon <jy0.jeon@samsung.com>
Signed-off-by: Mathew Karimpanal <kjmathew@codeaurora.org>
msm: vidc: Fix proper port settings when calculating buffer size

Incorrect port settings was used for calculating buffer size.

Change-Id: I1ccf260649bd626b8983a48bd68475ef2e13381d
Signed-off-by: Ashray Kulkarni <ashrayk@codeaurora.org>
Merge "USB: gadget: qdss: Fix strncmp length usage"
Merge "msm: vidc: Fix proper port settings when calculating buffer size"