In the current code, previous crtc state is used to know
the idle timeout period and to schedule the idle notify
work. Due to this, notify work is not getting scheduled
in some cases even when idle timeout is specified. This
change uses current state for idle timeout period.
Change-Id: I3ff4df6a8edd6a5a20d2e19c3c27ebb221694ac1
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Avoid setting backlight to max/0 during bridge enable/disable
for trusted-vm as the transition between the VMs are expected
to be seamless without any implicit changes to backlight.
Change-Id: Ib828113e49af1be4effea2b71b3106e3cbf401c2
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Trusted VM can support dynamic backlight updates through DCS
commands. Allow SDE to register for the backlight device
only if the panel supports DCS backlight update mode.
Note that thermal driver is disabled in trusted vm. So we are
still avoiding registering with msm thermal driver. The
backlight updates are only supported through backlight driver
provided sysfs nodes.
Change-Id: I9cd41d473445387c8bc9048d7e565d49124a36b7
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
This change adds support for delaying kickoff in case of ESD error.
This delay is required to handle a race condition between esd
workqueue and display thread.
When ESD workqueue detects the esd and while handling the failure
notification if the new updates arrive on display thread, there
is a possibility that ESD workqueue will keep on waiting on pp_done.
This could happen if display thread keeps on incrementing the kickoff_cnt
before workqueue can check the condition. With this change the kickoff is
delayed, allowing the workqueue to get scheduled and avoiding the race
condition.
Change-Id: I8e6fff5ea5494ae801d1e60ae85b7ad19cc12961
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
This change fixes the detection logic for overriding the ich
reset in both single and dual dsc case. In the previous logic
ich reset override was not getting triggered when partial update
on single dsc was enabled. This override is required to change the
default Hw behavior of changing the ich reset position.
ICH reset needs to be overridden in dual dsc merge case when
partial update disables the dsc merge and no. of slices per
encoder drops to 1. Similarly for single dsc case partial update
case when DSC encoder configuration changes from 2 slices to
single slice this override is required.
Change-Id: I435dc7ff10c9fb0edb8e40e6701608aa22136981
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
This change adds dsi display ramdump support when DEBUG_FS
is not enabled.
Change-Id: Ic6659a9380acd5eb55a3270d3e3b7016a9cd2bd7
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Linux message queues(msgq) are used to communicate between VM's
This change creates a display specific msgq and a set of
framework api's for the VM layer to invoke communication
between the VMs'.
Display msgq is bidirectional. Tx end is created by default for
both the VM's. Rx is kept optional to avoid unnecessary creation
of listener threads.
Change-Id: If4e6410045293d6b21087a76ec018d4784dd5238
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
If event register is called from LA VM when the HW is owned by trusted
VM, it will lead to a crash. This change adds checks to prevent illegal
register access when the HW is not owned by LA VM.
Change-Id: Ib4d956fdce4b5aae41e765d7355082c5e233efe2
Signed-off-by: Ping Li <pingli@codeaurora.org>
RSC is updated during encoder enable/disable/modeset or power-
collapse/wakeup. The RSC vote for primary display will change
depending on QSYNC status which might change without modeset or
power-collapse. Add a call to update the primary display's vote
when the QSYNC property is updated.
Change-Id: I664754e4aae689ef2db5b1ef7b8b55a4c5fad3be
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Add checks to block transition to trusted-vm when multiple encoders
are attached to a crtc. This ensures, concurrent writeback is
disabled before trusted-ui usecase. Additionally, avoid enabling /
disabling the IRQs associated with the cwb encoder during all
the transitions to avoid any unbalanced calls.
Change-Id: I022077018ac9b7dfb62506cfaddcb60cb8b35ed8
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Iterate over the crtc old/new state and decide which ones
to process by checking the active state of both during
the vm release in error cases.
Change-Id: Iab20e89792c53fb72e0c00f1fa5091616c7afbf3
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Fix the checks done as part of the trsuted-ui transition.
Allow full validation to go through whenever the new vm request
or old vm request is not NONE. Split the checks and the vm acquire,
so vm acquire can be done after all necessary checks are over.
Change-Id: I91165010ad110193c2ca3947af8c6504cd259919
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Add changes to re-apply the dma_map attributes during secure UI
to secure-video transition to avoid mismatch of attributes
between the import_attach newly created and the msm_iommu
mappings already existed.
Change-Id: I5a902d6d88c6ea9f633b4396e8121c2b14708f31
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
Add changes to increment refcount of dma_fence before accessing
the input_fence structure in plane_state through debug_fs node and
decrement once access is finished. This prevents the use after free
issues when accessed through debug_fs node.
Change-Id: I262336ce2b86a94d7662d834e8fd3509dadda1bd
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
Currently, in SST mode, sink edid is read once after hpd
and reused on subsequent mode enumeration calls. But in
MST mode, there is no caching and the driver re-reads the
edid from the sink on every get_modes call for each monitor.
Each read takes more than 500ms causing unnecessary delays
during MST enumeration.
This change reads the edid once per hpd and uses the
cached data on subsequent calls.
Change-Id: I27545a44b9f9bd40000dde60735815f9c47fa54c
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
Prior to Makena, hardware requires SW to retry FEC EN sequence when first
attempts fails. This is needed because hardware doesn't prevent FEC EN
logic to be inserted while BS symbols are sent. Which can lead to some
sink device to not being able to detect FEC EN sequence.
This change implements HPG guidelines, by monitoring FEC_STATUS and
retrying 3 times before failing the enable call.
Change-Id: I350eabe31d39f619e536ef87648874b4d58a7292
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
During ESD check failure, DSI video engine can get stuck
sending data from display engine. In use cases where GDSC
toggle does not happen like DP MST connected or secure video
playback, display does not recover back after ESD failure.
This change adds support to perform soft reset when DSI
video engine gets stuck.
Change-Id: I9cb31e6c71c4da171f9fe22fc3bee9175711831d
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Change clears the DSI TX command buffer allocated for debugfs
command transfers and destroys the command packets in case of
error during command transfer.
Change-Id: Ia1e822b9b60d44f7eba325116d416916419471fa
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
This patch allows event log and display ramdump
module compilation when DEBUG_FS config is in disabled
state.
Change-Id: Ibe1ff7d9d4a4f3c64091df757caba2450295e7ec
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
The change batches DSI commands sent using the debugfs node, in a
separate buffer from the TX command buffer to ensure that they are not
triggered before the last command bit is set. Once the last command
bit is set the buffer is then copied to the DSI TX buffer and triggered.
Change-Id: I9ba624e4e19341696a974994817603315c6c8a45
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Currently, PLL_CFG1(1:0) register is updated with cached values
in dsi_pll_enable. This can create issue when UEFI and kernel
cfg1 programming is not same. To fix it, return cached value
of cfg1 when its read in pclk_mux_read, so that pclk_mux_write
is called and cached value is updated.
Change-Id: I1e45ff0685797bf4dd2e3a52af4753425f31edfc
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
When a physical DP sink is connected after a simulation
session, the attention events from the sink are ignored.
The forced_disconnect flag prevents handling of attention
events when disconnect is simulated or forced. This flag
does not get reset when a physical sink is connected.
Certain sinks which lose link integrity after link
training sequence fail to display image.
This change will reset the flag so that the attention
events which occur after the cable hotplug can be processed.
Change-Id: Ie551ead19ecff0e93da48acc2dbb1d761c55fa20
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
Currently, changing panel configuration from firmware approach is present
for single display. This change adds support for secondary display using
firmware approach.
Change-Id: I8095dceed1567d8582c7473c0ac7f59c4666a200
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
This change adds support to program both qsync and variable
refresh rate in the same atomic commit. During vrr
usecase, if qsync is enabled, avr ctrl gets programmed
during prepare phase as well as after configuring timing
engine. This change also handles such scenarios to prevent
double programming of avr ctrl.
Change-Id: I19461423b0ae08c8204b5edeb98e3d73ce16a21b
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
In current implementation qsync min fps is single value.
It is same for all the list of supported dfps list.
Added support for new dt entry dsi-supported-qsync-min-fps-list
corresponding to the fps supported in the dfps list
dsi-supported-dfps-list.
Change-Id: Ifd5309c2f51865a3c0d9fadb65cbcd291b6ef42b
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>