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)
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>
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>
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>
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>
Check if mode is not DVI before giving audio
notifications.
Change-Id: I1dfc6a77961a24fd4ebeefc10cfc03c9e264be03
Signed-off-by: Krishna Srinivas <krisrini@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>