Commit graph

577664 commits

Author SHA1 Message Date
Patrick Auchter
66221ce8c2 msm: mdss: fix possible overflow errors in panel_debug_base_reg_read
The panel_reg_buf is a dynamically allocated buffer of size reg_buf_len
so checking sizeof(panel_reg_buf) is incorrect.  Using scnprintf will
ensure that len is at most reg_buf_len - 1 after all the prints.  This
allows sanity checks to be removed which were incorrectly skipping
clock disable, resulting in an extra clock reference count.

Change-Id: Ic3bb685c7b83eefef7bc207ad93d6a2a9e36fd33
Signed-off-by: Patrick Auchter <auchter@motorola.com>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
(cherry picked from commit 89bede0751357bc24701b8ebfe326d3e6bb46683)
2016-11-11 12:18:37 -08:00
Sravan Kumar D.V.N
0e5b65737d msm: mdss: Fix pp resume failure
Ensure that mixer object is present before calling
pp resume.

Change-Id: I18145fb89d33334dc9427ff1c2c4d85a957d6914
Signed-off-by: Sravan Kumar D.V.N <sravank1@codeaurora.org>
2016-11-11 12:13:05 -08:00
Tatenda Chipeperekwa
c0c3313cac msm: mdss: hdmi: set the output format to RGB888
Set the HDMI panel's output format to RGB888 when the panel is
registered during probe time. This is the default configuration
for HDMI panels until there is a request from the framework to
change the output after connecting to a sink that supports an
alternative format e.g. YUV420.

CRs-Fixed: 1008555
Change-Id: Ic7c68c0025231208215c02e406044857eb2ebe04
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2016-11-11 12:12:44 -08:00
Sandeep Panda
d0a0f24144 msm: mdss: fix NULL pointer dereferencing in DBA driver
In DBA driver, after complete raw EDID data is parsed,
the start address to audio block in EDID and its size is
stored in corresponding bridge chip local variable, using
a API implemented by the bridge chip driver. If the
bridge chip driver does not implement the API to set audio
block, then it will lead to crash if DBA driver tries to
use the API. So fix the issue by checking for NULL pointer
before calling the concerned API.

Change-Id: Ia65e7a6dccadbd3fa4a8a8e779ff1f08bf34b5af
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2016-11-11 12:12:18 -08:00
Ingrid Gallardo
8f0b8a126c msm: mdss: fix wrong chroma stride for h2v1/h1v2 formats
Current driver is swapping the chroma subsample
for the read pipe when rotation is in place,
this configuration is already taken care by the
rotator, and it is not needed to swap the chroma
sampling for the rotator pipes.
This fixes wrong stride calculations, causing
wrong colors shown in h2v1/h1v2 tests.

Change-Id: I43a841d6030636f71f271cc21f8177b44b2c0ca3
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-11-11 12:11:53 -08:00
Padmanabhan Komanduru
5d6f763016 msm: mdss: handle DSI error interrupts during dynamic fps
During dynamic fps using PLL approach, it is expected that DSI
FIFO underflow and DSI PLL unlock can happen sometimes. Make sure
to mask these errors so that DSI error interrupt is not generated
because of this. Clear the errors once dynamic refresh operation
is done and unmask these errors later.

Change-Id: I05ccbb7af1588b9ed81fd33ac14ef5b29882a42d
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2016-11-11 12:11:25 -08:00
Krishna Srinivas
04977d266e msm: mdss: hdmi: Send audio notify only in HDMI mode
Check if mode is not DVI before giving audio
notifications.

Change-Id: I1dfc6a77961a24fd4ebeefc10cfc03c9e264be03
Signed-off-by: Krishna Srinivas <krisrini@codeaurora.org>
2016-11-11 12:11:00 -08:00
Krishna Srinivas
52b5beebeb msm: mdss: hdmi: disable 5v line for HDMI suspend state
To optimize power in suspend state, disable
5v line when HPD is not needed.

Change-Id: Ie8caca7161b95a517d94ff418ae1a36461d85181
Signed-off-by: Krishna Srinivas <krisrini@codeaurora.org>
2016-11-11 12:10:31 -08:00
Shalini Krishnamoorthi
665a666fc7 msm: mdss: Add null check for dma buffer memory
The dma buffer is checked only for error and not null. Changes
are added to check if the buffer is null to prevent accessing
invalid MUTEX lock or invalid dma buffer memory.

CRs-Fixed: 1032180
Change-Id: Ia1ed1238b084d04eb787d078f7bb47a4e2a62a8a
Signed-off-by: Shalini Krishnamoorthi <shakri@codeaurora.org>
2016-11-11 12:09:45 -08:00
Krishna Chaitanya Devarakonda
4ba1744f2e msm: mdss: Fix potential NULL pointer dereferences
Fixing potential NULL pointer dereferences in MDSS driver.

Change-Id: I1d8013f4b9079bfd3e142326d92ec4e6bb90c147
Signed-off-by: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
2016-11-11 12:09:18 -08:00
Krishna Srinivas
99b8438d0e msm: mdss: update csc table on cdm block based on configuration
Update csc type table on cdm block based on configuration
from kernel client. Add proper validation checks in wfd
interface before updating the csc table to valid selection.

Change-Id: Id3a0f68c30919029df01e003a1bcb39ff894574c
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Krishna Srinivas <krisrini@codeaurora.org>
2016-11-11 12:08:56 -08:00
Dhaval Patel
db37c5bdcc msm: mdp: reserve cdm block only for output yuv format
WB and HDMI interface reserves the CDM block on start
irrespective of output format selection. This blocks
other interface open operation. CDM block is only needed
for output yuv format to downsample the chroma. This change
starts allocating cdm block on each kickoff for writeback
interface. It allocates cdm block only for yuv format for
hdmi interface.

Change-Id: I4368d1b5c4453c6c4697c060c880833c5ddc17bb
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Krishna Srinivas <krisrini@codeaurora.org>
2016-11-11 12:08:28 -08:00
Dhaval Patel
66c484153d mdss: mdp: add event timer for auto refresh
Display hardware keep generating the vsync isr
during auto refresh mode without any kickoff. These
vsync events may arrive late due to cpu latency and
cause corruption on screen. This change enables the
cpu event timer at vsync timeline to absorbs the
software latency in auto refresh usecase.

Conflicts:
	drivers/video/fbdev/msm/mdss_mdp.h
	drivers/video/fbdev/msm/mdss_mdp_ctl.c
	drivers/video/fbdev/msm/mdss_mdp.h

Change-Id: I24c5180f685be251d1a5f3b393be8ec9b46e21eb
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
[hsahu@codeaurora.org: Resolved conflicts]
Signed-off-by: Harsh Sahu <hsahu@codeaurora.org>
2016-11-11 12:08:07 -08:00
Dhaval Patel
a42b1f1045 msm: mdss: turn off the phy during idle pc only if panel supports
Commit ff19fe24e621ae5dc90f7e45fe4cfe159a647d15 ("mdss:
dsi: turn off phy power supply during static screen")
turns off the dsi phy during idle pc for phy rev 2.0. DSI
lanes are in floating state after dsi phy power off and
all panels may not be able to handle it. This change
allows to turn on the feature based on panel capability.

Change-Id: I9b166df254128a8a53c567f88971779b9ad0f36c
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-11-11 12:07:41 -08:00
Dhaval Patel
5d2b103d52 msm: mdss: fix race condition in dsi clk off request
DSI clocks are requested from mdp and dsi for
different use cases. The master clocks(DSI0 clocks)
are refcounted to avoid toggling during slave
clock ON/OFF sequence. Same applies to split controller
clocks if broadcast mode is enabled. Now, mdp client
can remove the dsi client's vote in below case:

- MDP requested clocks in ECG state
   - clk_ctrl has removed both votes from ctrl-0
     using dsi client handler.
- DSI turns ON clock for ctrl-1
   - clk_ctrl turns on clk for ctrl-0 using dsi
     client handler.
   - clk_ctrl increase the ctrl-1 refcount to 1
   - clk_ctrl turns on clk for ctrl-1
- MDP request to turn OFF the clk for ctrl-1
   - clk_ctrl turns on clk for ctrl-0 using dsi
     client handler
   - clk_ctrl increase the ctrl-1 refcount to 2
   - clk_ctrl turns off clk for ctrl-1
   - clk_ctrl turns off clk(twice) for ctrl-0
     using dsi client handler.

This race condition leads to dsi0 clocks off event when
interface is using clocks. This change start tracking
extra vote based on calling client id.

Change-Id: I4812330453dedacd16dad1d920a2bacc3f67042b
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-11-11 12:07:14 -08:00
Dhaval Patel
e2ef952c4e mdss: mdp: avoid panic if recovery handler is uninitialized
Recovery handler is uninitialized during ctl stop process.
A fifo error occur during stop process leads to panic
which is false alarm. These errors do need panic because
controller is going to stop/start and invokes the
panel power off/power on. This patch removes the panic
from the cases where recovery handler is uninitialized.

Change-Id: I422d53d008223a9b0520f499e629f681bb6afa05
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-11-11 11:46:23 -08:00
Dhaval Patel
6f874e20a4 msm: mdss: add null check before dereferencing src_fmt
Add null check before dereferencing the src_fmt
during layer validation.

Change-Id: I6482dc3d21fdc3e570fd53022e2fb9427668d939
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-11-11 11:46:00 -08:00
Linux Build Service Account
8e69887600 Merge "debug-pagealloc: Panic on pagealloc corruption" 2016-11-10 22:49:44 -08:00
Linux Build Service Account
48247bb879 Merge "msm: kgsl: add egl_surface/egl_image usage count in debugfs" 2016-11-10 22:49:43 -08:00
Linux Build Service Account
a80049346b Merge "regulator: qpnp-labibb: add support to configure PFM for LAB regulator" 2016-11-10 22:49:43 -08:00
Linux Build Service Account
25d7561a4a Merge "ARM: dts: msm: Add IMEM pil entry for msmtriton" 2016-11-10 22:49:42 -08:00
Linux Build Service Account
d87560512f Merge "PM / devfreq: Restart previous governor if new governor fails to start" 2016-11-10 22:49:41 -08:00
Linux Build Service Account
1787801211 Merge "timer: Don't wait for running timers when migrating during isolation" 2016-11-10 22:49:40 -08:00
Linux Build Service Account
befd242303 Merge "sched/core: Fix migrate tasks bail-out condition" 2016-11-10 22:49:39 -08:00
Linux Build Service Account
2401d64a48 Merge "core_ctl: Synchronize access to cluster cpu list" 2016-11-10 22:49:39 -08:00
Linux Build Service Account
896ddc1b32 Merge "ARM: dts: msm: Fix BT current leakage in msmcobalt MTP and CDP" 2016-11-10 22:49:38 -08:00
Linux Build Service Account
d3939fea72 Merge "clk: qcom: Add support to initialize & handle dynamic update for alpha plls" 2016-11-10 22:49:37 -08:00
Linux Build Service Account
e73de78f69 Merge "ARM: dts: msm: Correct camera dtsi place for msmcobalt skuk device" 2016-11-10 22:49:36 -08:00
Linux Build Service Account
de9acd7e8f Merge "arm: dma-mapping: page align size before flush tlb" 2016-11-10 22:49:35 -08:00
Linux Build Service Account
c2183620ea Merge "ARM: dts: msm: Add GPU mempools properties for all msm" 2016-11-10 22:49:34 -08:00
Linux Build Service Account
e0181c29c3 Merge "msm: camera: Change CID array size to MAX_CID_CH_PARAM_ENTRY" 2016-11-10 22:49:33 -08:00
Linux Build Service Account
90bc693dd3 Merge "clk: qcom: gpucc: add and update clocks of GPUCC" 2016-11-10 22:49:26 -08:00
Linux Build Service Account
c24c3c4d70 Merge "ARM: dts: msm: Add camera node for msmcobalt QVR board" 2016-11-10 22:49:25 -08:00
Linux Build Service Account
6a1bff9bbe Merge "msm: camera: Change %p into %pK" 2016-11-10 22:49:24 -08:00
Linux Build Service Account
a2169b6661 Merge "msm: camera: sensor: Change initializer to 0 instead of -EINVAL" 2016-11-10 22:49:23 -08:00
Linux Build Service Account
b584568fe7 Merge "msm: kgsl: Change device-type memory mapping to Normal-NC" 2016-11-10 22:49:22 -08:00
Linux Build Service Account
3a7f3d14d8 Merge "msm: pcie: change the log type for PCIe Synopsys MSI interrupts" 2016-11-10 22:49:21 -08:00
Linux Build Service Account
8a9006341d Merge "ARM: dts: msm: Enable memory allocation for diag on cobalt" 2016-11-10 15:14:42 -08:00
Linux Build Service Account
dd49b991fb Merge "defconfig: Enabling config INET_DIAG_DESTROY" 2016-11-10 15:14:41 -08:00
Linux Build Service Account
a39b207b2b Merge "memshare: Pass device structure to ramdump driver" 2016-11-10 15:14:40 -08:00
Linux Build Service Account
0307dd36e1 Merge "ARM: dts: msm: Update clock gcc node for MSMfalcon/Triton" 2016-11-10 15:14:40 -08:00
Linux Build Service Account
c819db3dd1 Merge "msm: kgsl: use seq_file for mem_entry debugfs" 2016-11-10 15:14:39 -08:00
Linux Build Service Account
1242c04867 Merge "ASoC: msm: qdsp6v2: add support for tx app type config" 2016-11-10 15:14:38 -08:00
Linux Build Service Account
8f000b7b8e Merge "ARM: dts: msm: Add IMEM pil entry for msmfalcon" 2016-11-10 15:14:37 -08:00
Linux Build Service Account
982cdaebe0 Merge "ARM: dts: msm: Enable memory allocation for diag on falcon" 2016-11-10 15:14:36 -08:00
Linux Build Service Account
2516911133 Merge "ARM: dts: msm: Add storage node for QRD interposer msmcobalt" 2016-11-10 15:14:35 -08:00
Linux Build Service Account
77ffe00486 Merge "qcom-charger: smblib: lower delay in OTG soft-start check" 2016-11-10 15:14:34 -08:00
Linux Build Service Account
68776a1e98 Merge "NFC: Detection of NQ chip set and firmware version" 2016-11-10 15:14:34 -08:00
Linux Build Service Account
208399ba94 Merge "ARM: dts: msm: Change LAB precharge time to 500us in pmicobalt" 2016-11-10 15:14:32 -08:00
Linux Build Service Account
dc30c737b0 Merge "regulator: qpnp-labibb: Rename properties to reflect the vendor" 2016-11-10 15:14:32 -08:00