fat: limit the number of error prints

Use fat_fs_error_ratelimit instead of fat_fs_error so as to
avoid large number of prints.

CRs-Fixed: 619824
Change-Id: I458df6c2c7a53c0902f2b388b5992007b719cb86
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
mdss: dsi: Handle gpio configuration properly

Dsi related GPIOs are freed even when gpio request fails.
Fix this by removing the gpio_free() calls when the gpio request
fails. Add the gpio_request() and gpio_free()
calls to panel reset sequence so that gpio pins would
go to suspend state when not in use.

Change-Id: Id5ef45c5cc106d2a3ced3359739037f488e1919f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: mdss: Avoid GPIO warnings during boot up

During continuous splash screen handoff, we see GPIO
warnings since we try to free the GPIOs without
requesting them before. This change takes care of avoiding
these warnings.

Change-Id: I574bcf0bd28e3c33dca618103cf0285675917189
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: mdss: fix clearing interrupts of DSI0 during isr for DSI1

Currently we need to handle DSI-1 interrupts only for panel/DCS
commands in the software during broadcast mode. When we handle
isr for DSI-1 interrupt, we clear all the interrupts for DSI-0
also. This might cause timeout issues for waits on DSI-0
interrupts like CMD_MDP_DONE since the interrupt is cleared
and we do not handle the interrupt for DSI-0. Fix this issue
by clearing only the DMA_DONE interrupt for DSI-0 during the
isr handling for DSI-1.

Change-Id: Id1735673f94066ff6c7250eaef7d9394b0525c2f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Revert "msm: mdss: Fix mdss iommu detach-attach issue"

This reverts commit 82a181a8c819c0b0b2cdf1adfe5fadcd0fdb5151.

Change-Id: Id2ff6f02945e763835ce1783461325df13b32daa
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
msm: vidc: Amend calculation of buffer sizes in VENUS_BUFFER_SIZE

Add 8KB worth of padding for extradata. This is required to accommodate
some of the larger extradata types that didn't fit into the residual
space between the actual buffer size and its aligned size.

CRs-Fixed: 647378
Change-Id: I550f806079dfbdece229f68ffdfc5c0e20b3c9e1
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: camera: Fix improper memory free in failure case

Remove improper drv_priv free in failure case and
add NULL pointer check to avoid kernel panic

Change-Id: If074eba245e93bf8fead505993a2611582e4398d
Signed-off-by: Yiduo Wang <yiduow@codeaurora.org>
msm: camera: Fix race condition between camera driver and camera daemon

Delete checking command list before calling
wait_for_competion_timeout which could cause race condtion
if camera daemon may respond fast and there is one context swtich
between msm_enqueue and completion.

Change-Id: I28bdc4e344d2365acf49d422ba75dc64308a96aa
Signed-off-by: Yiduo Wang <yiduow@codeaurora.org>
msm: mdss: Cancel ESD workqueue whenever display off happens

Display can be turned off by using different ioctls. Make sure that
in all the cases ESD workqueue is cancelled.

CRs-Fixed: 626835
Change-Id: Id14992665e4a86941386a8269600d322c3500a70
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
msm: vidc: Add AFD and CC metadata support to extradata

Add support and control for setting Active format
description and closed caption meta data in the
extradata. FW parses metadata and adds it to the
extradata. Client can use control to parse extradata
for the metadata information.

Change-Id: I79fb71e635927c95e0792862c9dea7d96f58e895
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
mmc: sdhci-msm: fix issue with tuning command

As of now we ignore CRC/INDEX command failures to tuning command
and still wait for data from card but in case the card did not
receive the command, it won't send the data. This is causing
software request timeout for tuning commands. Hence, software
must not ignore such cmd errors for tuning commands but end the
request immediately after resetting the controller for both CMD
and DATA. Also, wait for 146 MCLK cycles for card to send out the
data and thus to move to transfer state. Its corresponding phase must
also be considered as bad phase.

CRs-fixed: 625855
Change-Id: Ic8462dd9c67e4f18a3ce73d972591772be8c6d10
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
msm: vidc: update format during downscaling

When downscaling is enabled, update the port format
parameters based on port type.
Avoid updating the instance property during reconfig event
with sufficient resource. IL Client expects downscaled
parameters rather than reconfig parameters.

CRs-Fixed: 629474
Change-Id: I629a0b78a56806018976f7f82e8c526fef456ec9
Signed-off-by: Pushkaraj Patil <ppatil@codeaurora.org>
mdss: mdp: Fix check to identify if dsi short read

The short response can be <=2 bytes.

Change-Id: Iad322bc892ea29b2acf220ef579d18dea1a91c32
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
msm: vidc: Add NULL pointer check before deiniting controls

Add NULL pointer check in deinit function, and return -EINVAL
when NULL pointer is found.
Without this change, accidentally, msm_venc_ctrl_deinit() will be called
with a null pointer parameter, which will cause kernel panic.

Change-Id: I80bb6c271dcd3277ddce5332c5f42328ca376128
CRs-Fixed: 652365
Signed-off-by: huiy <huiyQuic@codeaurora.org>
msm: vidc: do not check for session supported in executing state

The v4l2 video driver should check if the video session is supported
only prior to entering the executing state. Once video session is
in executing state, the session should be always honored.

Change-Id: Iaa59089ef05f03bbc821af8c7fd4fbc342067b3a
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Merge "mdss: mdp: Fix check to identify if dsi short read"
Merge "Revert "msm: mdss: Fix mdss iommu detach-attach issue""
msm: kgsl: Update calculation for graphics IOMMU context IDs

Calculate graphics IOMMU context IDs using the 'label' property of
the device tree node of that context. Context IDs are independent
of the register addresses of the SMMU device and its contexts, which
change for every target.

Change-Id: I16825d7248081997a442d4fb59ca5b04b88e33fd
Signed-off-by: Lokesh Batra <lbatra@codeaurora.org>
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Signed-off-by: Prabhat Awasthi <pawasthi@codeaurora.org>
Merge "msm: kgsl: Update calculation for graphics IOMMU context IDs"
hwmon: qpnp-adc-voltage: Update default scaling API

Update default scaling API to support absolute and
ratiometric calibration both to convert raw adc data
to voltages.

Change-Id: I45a109d77c388564c0063d1de926813a4a929c48
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>