Dsi errors happen at interrupt context while xlog
dumps can only be called at normal priority. This change
makes sure that xlog registers dumps and panic happen
from a work queue during dsi erros to prevent slow
path errors.
Change-Id: Ib9928d653221d0dbb0b87a5965ef3c4b20ebb662
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Most of the DSI panels do not support refresh rate lesser than 48.
So change the default value to 48.
Change-Id: Id47fe3488d7cd85b1eefaea18f3a7b9e6e8b3e31
Signed-off-by: Prashant Nukala <pnukala@codeaurora.org>
Since DFPS mode can be dynamically configured through device node,
shadow clocks used by DFPS clk mode need to be initialized during boot
time regardless the default DFPS mode specified in device tree.
Change-Id: I580a05ed62a2207666ea6569abbdf588a4f8d39d
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
Allocate buffer for panel register results, which is
to support any length of register reading request.
Change-Id: I67905b3771ecfe5d56fe29928b2953b8435f1d71
Signed-off-by: Yang Xu <yangxu@codeaurora.org>
Bringup 2 instances of ADV7533 for 8996. Change all register writes
from constant to pdata variables. Move the DBA init from
mdss_dsi.c to mdss_dsi_panel.c.
Change-Id: Ib0fc9f7c2348efa04a44bc021cb50973e90d7f22
Signed-off-by: Siddharth Zaveri <szaveri@codeaurora.org>
[cip@codeaurora.org: Removed spurious drivers/video/msm/Makefile change]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Prevent accessing memory beyond buffer size. Prior to this check
rotator was page faulting trying to handle invalid requests, in which
offset + region of interest size was greater than the image size.
Change-Id: Ifffed0e908b29fb6e326314ec1eda148bb72db64
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
When framebuffer device is released, the AD status variables need
to be reset.
Change-Id: I7240a43949b429214cc8e0b4fa7c59823aeafb87
Signed-off-by: Ping Li <pingli@codeaurora.org>
During MDSS DSI controller initialization, program the DSI HS
timer value with the recommended value from the DSI h/w team.
This is needed for proper trigger of DSI HS timeout errors.
Change-Id: Ia83a5abd901ec7d632cb9ad8588249a5a64d4d1f
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
While exiting ULPS, there are instances where the phy incorrectly
reports an error causing the logs to be flooded with the error prints.
Disable printing such error message during such cases only.
Crs-fixed: 800136
Change-Id: I8fd321f57f5c00910e2b0637d31da0dc7f9d88b2
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
All clients need to call register API exposed by DBA module to check
if the down stream transmitter driver is configured or not. In case
DBA is not enabled, define a null register function which returns
a NULL pointer to let the clients know of non availability of DBA.
Change-Id: I2b6066babe5a7e464a31752720da8f299997e977
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Siddharth Zaveri <szaveri@codeaurora.org>
Add driver for ADV7533 to support DSI to HDMI output.
Configure the ADV7533 via I2C for audio/video setup.
Change-Id: Iec0b922e1257d6974ea1755b49a6087f85eb8499
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Signed-off-by: Siddharth Zaveri <szaveri@codeaurora.org>
[cip@codeaurora.org: Moved adb7533.c location]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Add display bridge abstraction driver to provide an abstract interface
for different types of bridge chips used on MSM platforms. This
interface allows driver development for bridge chips from different
manufactorers while allowing users, of the funcationality provided by
these bridge chips, to re-use the same code across different boards.
Change-Id: I64457e3a44479a3b1be5482691d4727a86dc9b87
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
Signed-off-by: Siddharth Zaveri <szaveri@codeaurora.org>
[cip@codeaurora.org: Moved file locations]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
If userspace tries to set the same autorefresh enable value as before
do not return an error, since it is not, and bail out silently.
Change-Id: If2699817dc5cb06dd8182e5125c1ae868c925ddf
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
Currently, RESET event is being issued from commit which
assumes panel power on has been successful. In case RESET of
the panel fails, this error needs to be propagated back to
unblank to avoid display commits.
Move issuing of RESET event to panels to unblank to detect
panel power on failure and stop the display thread.
Change-Id: Id13cc479b6a837e0c28a1504bda9f23e0c251f45
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
If continuous splash screen feature is disabled and ULPS during suspend
feature is enabled, DSI phy initialization does when device is booting
up, due to incorrect checks in the current implementation. Fix this issue
by ensuring that DSI phy initialization is always done when DSI interface
is turned on.
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Change-Id: Icdc90eef8d5f3380b47f67268249eb670f8ca824
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
DSI phy reset and initialization should only be done when as part of
the power up sequence. This can happen at two different places:
(1) During bootup or resume sequence
(2) When exiting idle power collapse in static screen
The checks in the current implementation to ensure the above make use
of the panel blank status. However, it is possible that the DSI clocks
can be toggled even after panel has been blanked. This may result in phy
init sequence getting called resulting in spurious transitions on the
DSI lanes. Fix this issue by modifying the existing sequence
appropriately.
Change-Id: I1f67b24058b3c98fb4472867c0421ae47fdcd9c7
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
acquire pipe before overlay start so that splash cleanup
can happen in overlay start.
Change-Id: I1ef3dbabf264925fee2eb903beed183eba335bb2
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
Updating writeback through pan_display would be pointless as
there is no output buffer available. So, ignore wb updates
through this path.
Change-Id: Icfb0a8252c707eb5ac72810bc3b213aea95b7373
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
The frame done event updates the release timeline
for command mode interface. Avoiding this timeline
update will cause the fence timeout issue for two
buffer clients.
-> buffer 0 submitted with acq fence for N update
-> buffer 0 acq fence triggered because client
holds the buffer 1.
-> MDSS updates the release fence for buffer 0.
-> buffer 1 submitted with acq fence for N+1 update.
-> client wait for buffer 0 release fence before
triggering acq fence for buffer 1.
It ends up in fence timeout situation if MDSS software
misses the last update. Ideally, MDSS software should
update the timeline as soon as buffer 0 is unused by
hardware to allow client for reusing it in next update.
Change-Id: I99bd968d11adc3a52ae6bc761857a6edcedcd785
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Fix crash when read the perf_mode debugfs property
that was accessing memory beyond the size of the
array.
Change-Id: I82c6aaf263ea9f688856eade009008c10ec65e36
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
For single interface video mode displays, the utilization
of the ddr channels is not as efficient as the dual interface
displays, and in some scenarios this efficiency gets reduced
by half. This is valid when display driver is doing an honest
voting and causes underruns in multiple scenarios.
Therefore this change adds a factor that account for those
inefficiencies, specific to single interface controllers.
Change-Id: I925db9defa16346c4400732310dbb679458dd0dd
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
Currently secure restore cfg is called in LK and then after every
resume or after MDSS comes out of power collapse. As per TZ
recommendation, ensure restore cfg is called before first secure
session and first suspend resume.
Change-Id: I0cc820636da4f4a137bdaadc737ed71d78940b10
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
The CDM CSC registers for writeback are currently written during the
validate stage of atomic commit. This logic is incorrect, and the
CSC register should be configured during the commit. The CSC table
being used is incorrect as well. This change fixes the tables being
used and when the table is configured.
Change-Id: Ica1e743d5ec70b6f652f37c059db39520d485628
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Currently dynamic fps configuration is checking for the
status of timing generator enable for slave controller in
the case of pingpong split. But this check will always
fail as timing generator wont be enabled for slave controller.
Remove this check to make sure dynamic fps feature works fine.
Change-Id: I097938f2b7b09a31df216c9e4879f12ed783794b
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
During the early wakeup event, current code
cancel any pending Gate or Off work items
pending and only schedules a delayed Off
work if we are transitioning from OFF state.
This is a problem since resources remain
enabled when multiple early wakeup calls
happen and the state is different than off.
Fix this problem by making sure that
early wakeup schedules an Off work item
if any previous work was cancel by this call.
Change-Id: I3c773221b53080443c62a0e7e09ed51ec43028a4
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Additional offset is needed for MISR CTRL and SIGNATURE
registers on 8952. Add the required offset of 0x10.
Also add logic to select appropriate registers for video
and command mode.
Change-Id: I148200bdac98dfb446d7958ab700ed221e3d48d0
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
The name member in mdss_debug_base struct is not a pointer,
so the current method to check whether this name string is
empty is invalid. Use strlen to fix this bug which might
introduce NULL pointer references in some cases if the name
string is empty.
Change-Id: I52b5eeae5f303e5690ce1e6a4ce00debf3435ee2
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Fix to flush any pending early wakeup work item and
prevent to schedule more if we are in the middle of
an stop request.
Change-Id: Id87eb8d37f68584811da5ce9d9dd87f35529689e
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Add ftraces to the qos luts, danger and safe per
pipe configuration.
Change-Id: I409ca413e5bf76fcdc6a565ac3c41f4f53aa4f29
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Adjust per pipe qos settings as per
recommendation.
Change-Id: Iec3eefdfbd15ee33607c5fcb0096ae4bf79a24e2
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Current code does not reflect the correct panel information
when user space request the panel info and fps data after
the fps update.
This change fix the code, so further calls to get the
screen info have the correct panel data.
Change-Id: I3e0382748cbf8b480c2516223cfe14444d388e29
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Timing generator update cannot happen in the
same frame boundary/vsync cycle where a change
in the mixer configuration is requested.
Enforce this sequence by moving timing generator
programming to the commit thread, so driver can
wait for one vsync cycle when timing generator
has been modified due a dynamic fps update.
Change-Id: Ifac5332f3de45479ebc0a6ab0c1f7cf7b48a41b0
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Starting with 6a55d9204af7aed1c279d6563aba4763ef1b67e9, msm: mdss: add
support to call panel events for one panel, pingpong split with smart
panels is broken because MDSS_EVENT_PANEL_CLK_CTRL event is not sent
for the slave panel. Add support to send event to slave panel when one
control path is driving two panels, like in pingpong split. Also balance
the resource management for smart panels to re-enable pingpong split
based configuration.
Change-Id: Iebe94bdd28af7aa9cb5c35031f3f89a9ab99a7eb
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
[cip@codeaurora.org: Resolved merge conflict]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
In the current implementation, driver makes a decision to use
pingpong-split data path if HW supports pingpong-split and connected
panel is a dual-DSI. However, in the high tier targets like msm8996 it
is possible to use dual-dsi panels in multiple modes, i.e with single
layer mixer + pingpong-split or dual layer mixer. So the correct place to
define if pingpong-split will be used or not is with panel configuration
not with the MDP driver.
In order to support this, MDP device node will continue using its
property qcom,has-pingpong-split to tell driver that underlying HW
supports pingpong-split. Introduce a new panel property,
qcom,split-mode, which will be used to decide if pingpong-split
for a given panel should be used or not.
Change-Id: I210e7f2a8b03d5c8a161241120c7d3c7081fa971
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Rename qcom,has-dst-split device tree property with qcom,has-pingpong-split
to align terminology used by the hardware and software drivers.
Change-Id: I8af3809f6c28d232dee457901719b6f13a216c76
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Starting patch I36dbf8d9e325675bb3affa1794b2fc93ee6151b4,
msm: mdss: enable different panel configuration modes, dsi panels can
have multiple topology configurations. Currently chosen configuration
is selected only through device tree using qcom,config-select property.
Add support to override this configuration using existing module param.
This module param can be changed by boot-loader display driver if present
or directly by user through kernel command line.
New module param usage:
panel=<lk_cfg>:<pan_intf>:<pan_intf_cfg>:<panel_topology_cfg>
where
<lk_cfg> = "1" lk/gcdb config or "0" non-lk/non-gcdb config;
<pan_intf> = dsi:<ctrl_id> or hdmi or edp;
<pan_intf_cfg> = panel interface specific string matching dt node name;
<panel_topology_cfg> = Optional. If used, format is "config%d";
Ex: panel=0:dsi:1:qcom,mdss_dsi_nt35597_dsc_wqxga_video:config2:0:none
panel=0:dsi:0:qcom,mdss_dsi_nt35597_wqxga_cmd:config1:1:
qcom,mdss_dsi_nt35597_wqxga_cmd:config1:cfg:split_dsi
Change-Id: I583ee801737282d3a0eb189e1bf8d66dd7a9b480
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
When a partial update is requested in the right
controller only, driver kicks off the update in
the right controller only.
Current driver has a problem where even when the
kickoff is only in the right side for this scenario,
we mark the SW status as busy for the controller of
the left side as well. This causes that if only
right updates are coming, driver holds the mdp
clock and keeps it enabled during static screen
scenarios.
Fix this problem by making sure that the busy
status of the SW for the left controller is only
set to busy if an update is requested for this
controller.
Change-Id: I357c80955666e9d7e8da55d3189c482ae445435a
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Use spin_lock_irqsave instead of spin_lock for mdp_lock as the
former would disable the interrupts before acquiring the lock
and saves the previous interrupt state. The states are restored
during spin_unlock_irqrestore. Using raw spin_lock would allow
interrupts and that might lead to deadlock since the mdp_isr_handler
also waits on the same mdp_lock.
Change-Id: If34fe27055b704e9606f772b421662d140fa7ddf
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
For HDMI usecases, set the correct split_mode and split_fb
values on resolution change. Previously, HDMI resolution switch
within the same split_mode was not updating the split_fb values.
Update the mode and values according to the new resolution.
Change-Id: I56d0d937056a1aeff114d6addd674287b202ee60
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
3D Gamut block programming sequence requires disabling the clock gating
when the tables of the feature are being programmed. Clock gating can be
enabled on the next vsync after the gamut settings have been flushed.
Change implements the recommended programming sequence to resolve image
screen corruption issues.
Change-Id: If99007debb00b358c9d6266dcc2240269b9947aa
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Gamut color scale and offset should only be programmed if
the table is non-uniform
Change-Id: I55790d5076ef2aedc3c0593ca744b792bb66cdf5
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Print 256 xlog entries in kernel log but keep 1024
entries in memory. This will be helpful while debugging
issue where user needs larger xlog information.
Change-Id: Ic8b6143eef7afd1220ccf40f8ad7617b94017532
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Enable burst mode for DSI command mode panels, so that
dsi pixel data and dcs commands can be sent independent
of each other. In case of burst mode we don't need to
wait for DSI command transfer to complete before command
kickoff.
Conflicts:
drivers/video/msm/mdss/mdss_dsi.c
drivers/video/msm/mdss/mdss_dsi_host.c
Change-Id: I5777a72b8ad84a7929aa6e06849060efdebb0d7b
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
The audio clock frequency for a given YUV mode must be scaled at the
same ratio as the pixel clock when programming the hardware for
audio transmission. This will ensure that the video and audio
data for YUV modes are transmitted at the same rate, and ensure
smooth playback on the sink.
Change-Id: I9405a0e0e39405c5c287e3e8a764d5c21bb42adb
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Reset the AD event notification count whenever ALS or backlight
input of AD has been made. This provides a way for user space to
track and sync with the AD sync iteration numbers in driver.
Change-Id: I4e4a2a93378c6abacb4ffbcf8f4a14aaf38789af
Signed-off-by: Ping Li <pingli@codeaurora.org>
Inverse gamma correction(IGC) linearizes the incoming pixels of a layer
before blending it with other layers. Change adds support for sRGB
format.
Change-Id: I2b30adeae5a10354f485c8e78c9d8c938e1ccf1f
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>