After freeing MST sim context memory the pointer isn't set
to NULL leading to unauthorized memory access. Along with
this fix, this change also defers checking sim device ports
pointer at a more appropriate place in the function call.
Change-Id: I20c09edbd454c9d491060815dc73bae34aab6b08
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
DP sim ports created during DP sim enable aren't cleared
during disable path. This would retain the last status of
the DP sim port or the connector. This would impact the
next iteration of DP sim test, if done without device
reset. This change will set the port number to 0 during
DP sim disable and clear the memory allocated for these
ports.
Change-Id: I386a62e87fcaf006db8dd18e5751b33bbe70fc9b
Signed-off-by: Sandeep Gangadharaiah <quic_sandgang@quicinc.com>
Add existing debug logs to ipc logging to be
accessed through debugfs.
Change-Id: Id9bfe61cb7921674eadc5635847c81a0fbdaef5c
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
Use #if IS_ENABLED() instead of #ifdef for configurations as vendor module
guidelines.
Use #if IS_ENABLED(CONFIG_XXX) instead of #ifdef CONFIG_XXX to ensure that
the code inside the #if block continues to compile if the config changes
to a tristate config in the future.
The differences are as follows:
1.#if IS_ENABLED(CONFIG_XXX) evaluates to true when CONFIG_XXX is set to
module (=m) or built-in (=y).
2.#ifdef CONFIG_XXX evaluates to true when CONFIG_XXX is set to
built-in(=y) , but doesn't when CONFIG_XXX is set to module(=m).
Use this only when you're certain you want to do the same thing
when the config is set to module or is disabled.
Change-Id: Ia806b9b01ad8414d0e4de027a382cb68e7fb4a6a
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
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>
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>
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>
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>