Logging connector id will help debug the issues related to
DP MST stability and pre-merge tests. This change will log
the DP MST connector IDs modified during stability tests.
Change-Id: Ifaf8e319697a809b02c24c473acec8da521286e2
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Check for pixel1 rcg only for mst supported platforms. On sst only
devices bind gets failed.
Change-Id: I73cc4a572d4d0791205c342f57618b226eb91fef
Signed-off-by: Rajat Gupta <rajatgu@codeaurora.org>
Currently, the max voltage swing supported is level 2. This change
adds support for voltage swing level 3 in the dp driver.
Change-Id: Idf1dbb4e74edff924067130a5edea869f392bf38
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
This change adds logic to determine dsc switch based on
the connector property "CONNECTOR_PROP_DSC_MODE" and
performs seamless DSC switch if there is any change in
DSC configuration. The connector property is populated
in msm_sub_mode based on which suitable mode is selected.
Change-Id: Ifc4931f16dfb814781bc1d72b103e09103e6bfee
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
In dumping display registers, physical address will be appended after
each block name. This is to support register compare between kernel
and UEFI.
Change-Id: Ic20d3e2bd4c95aa7c71c4b646a149f7e83ad731a
Signed-off-by: Yu Wu <zwy@codeaurora.org>
This change fixes a regression related to resetting the edid
segment and address when reading port edid introduced by
896cf4fd01 (disp: msm: dp: reset
edid segment and address when reading port edid).
Change-Id: Ie39fb9558d9f3206e4ded17b97018a966aab3a7c
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Current debugfs dpcd node only dumps last written dpcd
string in dpsim mode. This change adds support to dump
dpcd information in real monitor use case.
Change-Id: I8a716f30df72feadf9012c65f5a56fe7194d91d2
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Currently, edid read failures are seen when transitioning from a
resolution with larger edid size to a resolution with smaller
edid size. Edid segment and address values are not getting reset,
and any edid read after switching to a lower resolution
reads the incorrect segment.
This change clears edid segment and resets edid address in the
read_edid function so that the affected values are cleared every
time edid is read.
Change-Id: Iedb231c877b85d645ca74071f9c663393a204ff7
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
This change fixes issue, where USB driver was not properly updated
with the number of dp lanes being used for altmode usecase.
Change-Id: Ic93d3e3b37aa8ad2d664e006ede3cf6c27d7133a
Signed-off-by: Vara Reddy <varar@codeaurora.org>
Originally, a call is made to dwc3_msm_release_ss_lane to
notify the USB driver that DP 4 lane is in use. This was
cleared on USB disconnect. Combined with the autosuspend
timeout and UCSI notifying that USB was not needed, this
caused issues in bringing up the monitors.
This change implements a new api call from the USB driver,
dwc3_msm_set_dp_mode. DP driver makes a call to this api to
notify USB driver for 2 lane, 4 lane, and disconnected states.
Change-Id: I051e5424c518ca84e2cc6dc27c114715dc287ac0
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Currently, any edids read by the driver are cached in the
sde_connector object. In the event that subsequent edids are written,
the cached edid is used instead of the newly written edid.
In the event a new edid is written to the edid debugfs node over
dpsim, this change clears the current cached edid before overwriting
the new one.
Change-Id: I53f870e97c3b9ac5954d193f74e4b272386f67a8
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
In DPSIM, while calling the hpd callback from dp_sim_host_hpd_irq,
the hpd argument is passed in as false. In the hpd callback, both
the hpd_irq and hpd arguments need to be encoded into the vdo
parameter. Currently, MST DPSIM testcases are broken because this
is not implemented properly.
This change sets the hpd argument to true in the hpd_irq callback, and
encodes the hpd and hpd_irq parameter in the vdo object before passing
it to the simulate_attention callback.
Change-Id: I07155716699aad8554b6e08b446139bcd0d7fa74
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
During dp altmode driver initialization, the dp altmode driver is called
with a null data packet. Even though this callback indicates a disconnect,
the multi function flag is incorrectly set to true. If the DP is enabled
later using simulation mode, the multi function flag is not cleared thereby
limiting the lane count to 2 irrespective of capability applied through
DPCD.
This change checks for the zero pin value while setting the multi function
flag.
Change-Id: I974fbf1630eed26f406ac9e4c99140b27f0cb635
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
In an MST DSC setup, the sink_dsc_caps object is read into the base
panel. In the process of creating different connectors and panel
objects, the sink_dsc_caps panel object is not copied correctly to
the new panel objects. This causes an error where a fallback DSC
version is used.
This change correctly copies the sink_dsc_caps object over to the
panel for the MST connector from the base connector.
Change-Id: I66af823bbe08c8b1fbd68d628e759416162e9d53
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Currently, 4K120 mode is being filtered by DP driver
due to invalid topology assignation. When 4 LMs are
needed, the number of DSCs must match the number of
LMs since only DSCMERGE based topologies are supported
for driving DSC capable panels.
This change fixes the topology validation logic and
aggregates LM and DSC validation functions in the topology
one since the number of LMs and DSCs must now be considered
in calculating the topology requirement.
Change-Id: I95577eabb34068cd490d23e70ffbb899d1c2d03a
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Fix dlkm compilation errors that are due to the use of -Werror
flags used by the build system.
Change-Id: I5e1e9bc63c1361d73e4930aab123212717872ecb
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
Currently, SDE_DBG_DUMP takes any number of hw block names along with
few defined strings as arguments. This set of arguments is used to
determine which HW block registers needs to be dumped. Move to a
blk bitmask to avoid passing a large set of arguments. The bitmask is
split based on the clks required to access the HW block for ease of use.
The lower 0-23 bits are used for HW blocks which can be accessed by just
enabling the MDP clks. DP is kept separate as it needs DP specific
clks to be enabled. Add a debugfs node through which the mask can be
modified, which can be useful while using the debugfs dump option to
force a panic.
As part of the change, remove in-log/in-mem enable mask debugfs node
for every debugbus and use a single node to control the logging
mechanism for all the HW blocks debugbus.
Change-Id: Ibb6354b3e3265c9911104bb0f964616eb8a898c9
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Add support to the dump the DP register space and debugbus information.
Change-Id: I903471b07fdd1926b0fc505a980b2a5048387b69
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
The offset for DP pixel clock configuration registers in disp_cc has
changed in waipio. Currently the driver is using incorrect offsets to
read M/N values to calculate SW MVID/NVID during MSA programming. This
results in a blank screen as the sink is not able to restore the pixel
clock.
This change fixes this issue by selecting the correct base address
based on dp core version.
Change-Id: I44214ce52c1bc346715362df0a138f1f8cc011e1
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
With the change in the clock names for newer targets, this fix
updates the driver to support different clock names per target.
Change-Id: I58c35fce34356f8c79adb0ac8a907e2fb60813ae
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Currently the timing configuration for test pattern generator in DP
controller assumes that the widebus is disabled. This change adds the
check for widebus and adjusts timing configuration accordingly.
Change-Id: Id86601c910e88705a1a6d0ff4a4b38df6a843409
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
Updating the link clock name in dp parser to account for
the changes made in the dtsi file.
Change-Id: Ic5c018a04b0e3dd3ac90387d76b5b0295323b144
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Remove edid/dpcd simulation function from dp_debug and calls to
sim bridge instead to simplify dp_debug module. Also add mst edid
support and mst hpd simulation from aux level.
Move selected mode from dp_debug module to dp_panel module to
simplify mst handling and decouple dp_debug from main dp driver.
Remove custom edid/dpcd mode from dp_panel and dp_aux module.
Remove mst connector list handling from dp_display module.
Change-Id: Ife1d2deb0e353f0a9695b7b90e5bf3459e1c81f7
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Add up_req support for mst_sim_helper when port state is updated.
Add reset support when hotplug becomes low.
Change-Id: I72341bd845f9061a59af6740b9862ebbc4c8979e
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Add below new APIs to dp_mst_sim to allow more controls from other
dp modules:
dp_sim_create_bridge: create dp_sim bridge simulator.
dp_sim_destroy_bridge: destroy dp_sim bridge simulator.
dp_sim_set_sim_mode: enable/disable simulation mode.
dp_sim_set_mst_mode: update dp-mst simulation mode.
dp_sim_update_port_status: update dp-mst port status in simulator.
dp_sim_update_port_edid: update dp-sst/mst port edid in simulator.
dp_sim_write_dpcd_reg: update dpcd register in simulator.
dp_sim_read_dpcd_reg: read dpcd register from simulator.
With the new functions dp_debug can move its internal debug function
to dp aux simulator, and dp_display can switch between simulation
mode and physical mode dynamically.
Change-Id: I26296b45a38dac422b8a098b50dca287909c8000
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Add dpcd/edid support to dp aux simulator to enable below features
as options:
skip edid read
skip link training
skip dpcd read
skip dpcd write
skip hot plug
skip sideband message
Also added debugfs support to update dpcd/edid and enable/disable
above features.
Change-Id: Ifa9153f2f00442f3cd5ee3db63fa93384ebc638f
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Add sideband simulator aux bridge to re-direct sideband message
from aux channel to internal emulation software stack. When this
bridge is connected to DP device, simulator will read ports configuration
from device tree and fake all sideband messages.
Change-Id: Ib8af2e0f4ba9b0d02413d40b796e5006b376ada8
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Add dp-mst sideband message protocol simulator to simulate
downstream reply. This is useful for special bridge that
doesn't support sideband message.
Change-Id: I7670abd3505affb9db3232747b86681cea0b4310
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Create the framework to support external dp aux bridge device which
can handle DPCD/I2C/HPD from external.
Change-Id: Iabd0998efc8bf7134d186b1751d219c00217385c
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Karim Henain <khenain@codeaurora.org>
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
DP driver maintains the number of allocated DSCs per stream for managing
the availability of DSC blocks for each stream. In the current driver,
if there are errors in the disable path, it is possible for the refcount
to go negative thereby affecting the availability of DSC blocks in
subsequent enables.
This change fixes the refcount logic by making sure the DSC count in the
context correctly reflects the usage.
Change-Id: Id595ec87c186ddb3ed300e1390384f367ef79148
Signed-off-by: Sandeep Gangadharaiah <sandgang@codeaurora.org>
This change adds the support to request the dp link clk rate
through the mmrm driver. In the case the system can not
support the rate, user space is notified of the failure and
dp is diconnected.
Change-Id: I4a074054ce42425ca940d4aec505723724736b44
Signed-off-by: Christina Oliveira <coliveir@codeaurora.org>
The modeset lock acquired in dp_mst_connector_detect is not
being released after the detection is completed, which
causes subsequent deadlock.
Added a call to drm_modeset_drop_locks when coming out of
dp_mst_connector_detect.
Change-Id: Ibce79934d0ac23fed4985291c5c6078cb982e812
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
When doing mode set, check the given videomode, if it
can be only supported in YCBCR420, set the output
format to YUV420.
Change-Id: I74224e5ad70f4fd8834b5b1e19109d4868cc14ff
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
Add Android make files and Kbuild files to support dlkm
for display driver. Also resolve header and config issues
to allow successful compilation of display driver.
Change-Id: I04d6233864ea54c0a808b295fbdccb83058f1fd2
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>