In few cases, even though input fence is freed, it might
get accessed through debugfs node while dumping fence list.
This change updates input fence to NULL in plane state
destroy once it is freed to prevent accessing it further.
Change-Id: I1a3799249e6a177af87653e17d014d1dad7ca638
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Due to power-domain, if rotator driver is registered early,
probe might get deferred several times and get stuck
indefinitely. So, this change adds driver registration
after genpd init to handle such cases.
Change-Id: I8dcb640d0ab0cdf0818cbce1b1fb460c28d8b9e7
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Check for invalid topology value before extracting the number
of LMs in dither setup path. This occurs when there is a race
condition between runtime supend/resume and dynamic FPS switch.
Change-Id: Ibf4bd2fe5f094ddec11ebc5b85ea9a5cfa0e91a7
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
This change enables and exports configs to support SDE
offline rotator in GKI. It also removes unused ioctls
for rotator compilation with GKI config.
Change-Id: I7f67aec394f644478173dcfe9e3ff52fe9129615
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Added code for dummy probe defined under
CONFIG_SDE_ROTATOR_INIT_ONLY to address cases where
rotator device node is defined but driver needs to be
disabled. This is stop gap arrangement until v4l2
configs are available in GKI.
Change-Id: I069b37f818d2e4401b3992f1f1e308858a7e29e6
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
Currently, trusted VM accepts and releases the resources
on RM notifications.
In cases, where TUI fails to submit the first frame on the trusted
vm, display cannot rely on the teardown commit IOCTL to release the
resources back to primary VM.
To handle scenarios where RM notification drops, the VM's should be
able to ACCEPT/RECLAIM resources without relying on the RM.
To address above scenarios, this change moves the resource handling
calls from notification handlers to user prompt. With this change,
trusted VM will ACCEPT the resource only on the first frame commit and
primary VM can RECLAIM the resources back if the TUI use case fails
or any of the RM notifications fail to deliver.
Change-Id: Iebb1724a7558e52567f8af1a49e38f8adbec88a0
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
When continuous splash is enabled, KMS populates the modes of
a connector during splash config. With TUI VM enabled, this path
will also be exercised by trusted vm for splash handoff, where for
a given display we try to use the same HW blocks configured by
the primary VM.
Since the trusted VM invokes the path under connection_mutex lock,
calling fill_modes will lead to a deadlock. So, move the connector
mode population during init for DSI displays, since the modes are
available for the connector during initialization.
Change-Id: I12f920f4af84b7bccc97a5f5edb5117ada49b960
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
ESD recovery schedules KICKOFF event on event_thread,
switches the vsync source to wd_timer and waits for
pending frame. This work is triggered from workthread
and it must be finished before panel dead event
notification to avoid race condition with power off
sequence. This change also cancels the delayed work
after encoder is disabled.
Change-Id: Iadc5753238a54e6dad3ff57a9b8ae3bd9644c0dc
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This patch addresses 2 issues with RSC; 1) internal tracking of
certain state updates, and 2) skipping certain timing updates
in CLK state that are required.
1) With primary in video mode, RSC will override the video mode
state in favor of clock mode on RSC rev3+ HW but this override
is applied after updating the client's state and checking if a
state change is required.
If RSC is already in clock state and the client provides a video
mode state update, the state change check will proceed since the
client request doesn't match the current state, but then the
requested state gets overridden so that it does match and another
switch to clock state occurs. Fix this by moving the state update
and state change check after applying the override. Also update
the event log so the state transitions are logged properly to
help identify similar issues in the future.
2) If continuous splash is still active on a secondary display
and primary gets a mode switch, the timing update is skipped
since the RSC client requests for a CLK state update. When
secondary is then used and goes idle, solver mode can get
enabled with the wrong timing.
Primary is the only encoder allowed to provide timing updates
and it votes for CLK state when splash is active on another
display or if QSync is enabled. In both cases timing updates
should be applied in case of later transitions to solver mode.
To address the issue, add a check which ensures timing updates
are applied for these corner cases.
Change-Id: I54ca0898d2f430b7e8c601de7309fc57d717e0bb
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Setting a lower load can make the regulator enter into LPM. Now the
lower load was set before the regulator disable, there's a risk here.
The regulator has been LPM, while it was not disable, if the cosumer
has a higher current needed than LPM at this time, that will lead OCP
on this regulator. The right operation for a regulator enable/disable
should be:
1. regulator_set_voltage(vreg, active_min_uV, active_max_uV) and
regulator_set_load(vreg, active_load_uA); in either order
2. regulator_enable()
3. regulator_disable()
4. regulator_set_voltage(vreg, inactive_min_uV, inactive_max_uV)
and regulator_set_load(vreg, inactive_load_uA); in either order
Change-Id: Ibe4f888a5675baf2691e479daa163d8867902e69
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
The macros for HH_RM_MEM_NOTIFY_[RECIPIENT/OWNER] have been
updated to be more descriptive, so update the macro
usage in the display files.
Change-Id: I46d866830a2586c647da0f821bdc6f16a3d1c0b1
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Kernel RM IRQ wrapper has changed the prototype of the
notification callback function to support per event
notifications. This uncouples the VM IRQ operations from
their respective notifications.
Adapt the changes in SDE driver by making the notification
handler generic and invoking the notifications calls
explicitly.
Change-Id: I02ddb1d2fa70fdab8002325e0472b43e94b6b09c
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Currently, SDE relies on DSI to set a flag for POMS however
if a power ON modeset comes with a different mode than
previously configured, DSI is unable to detect the mode change
and does not set the flag nor perform the mode switch itself.
DSI should always align the panel mode to match the timing node
that is selected regardless of prior configurations.
SDE encoder can detect if POMS is required for the INTF block
without the flag from DSI by comparing the currently configured
INTF mode with the panel mode that is being set. The POMS flag
from DSI is still needed for any active panel mode change so
that the post-modeset cleanup operations are triggered.
Change-Id: Ib198b3098f21338ab35b2022b04be1c01c4cbd94
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Need to check trusted VM environment when loading DSI
firmware. Add this missing check due to propagation
issue.
Change-Id: I7c84b487a58133df49ba23e80e6b6ff8783cdf6c
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Add the altmode communication events in xlog to help
debug the stability issues.
Change-Id: I29d4821a8222e6139187f92b75ec1d05b5ce4939
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
If trusted vm is disabled, the DRM_PANEL_EARLY_EVENT_BLANK
notifier does not get called because of this touch early
suspend does not happen which leads to continuous touch
i2c transfer failure during suspend.
Change-Id: I6abaacb9f8343eec24d5642f7eda9e7c410fd8b7
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
Enable catalog entry to support trusted vm support
for shima target.
Change-Id: I1bdabf20243f7b52ad5978e75cd6decfa30c9b36
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
There is a corner case when dp-mst stream is disabled twice:
1. stream 1 is enabled
2. cable plugged out, stream 1 is disabled by kernel
3. cable plugged in, enable stream 0 first
4. disable stream 1
Stream 1 is double disabled and will cause hw crash. This change
will add the check and skip stream_off if already disabled.
Change-Id: Icd1e815a1ed14cd4e784924f3db19b98eb06d571
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
To avoid use after free issues this change gets latest rsvp_next pointer
in poll timeout scenario.
Change-Id: I4bd4ce1ce9d4f5f2df0e814ceb8babe544578fc6
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Currently driver determines the RC regions to enable/disable by
combining partial update ROI information and RC mask flag field.
This lead to invalid outcome when a transition from partial update
frame to full update frame occurs.
This change modifies the enable/disable logic to only use RC mask flags
from usermode client. It also adds the non-intersecting RC and ROI use
case to global use case table and fix the y_start programming when ROI
is only in bottom region.
Change-Id: Ie05c5ecba6bd0323d1c8fd6949e12cec1f56b477
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
It is not applicable for all DFPS cases to update UIDLE state
according to current frame rate. If DFPS changes frame rate
through vertical front porch values, the SDE clocks and transfer
time will not get changed accordingly, and it always get fixed
at max frame rate configuration of DFPS.
Add this change to check max FPS of DFPS instead of current
frame rate for UIDLE update, if DFPS is enabled with VFP.
Change-Id: I7634bce6a9eb1af212ba19a267735be08b20ae1f
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
SDE RSC and core perf avoids BW vote trigger if current
and previous AB/IB BW votes are same. This may cause
issue if target enters in idle power collapse state
with stale AMC vote. This invalidates the sleep vote
and does not remove disp_drv vote. This change triggers
BW vote on all rsc state updates.
Change-Id: Id738206ade0feeb067dfda3d06cc0c7e19d66df1
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
In the current code during affinity change, irq cpu mask is
being updated without clearing previous pm qos vote. Due to
this, even after entering idle state, qos vote is still
present on other cpus. This change clears previous pm qos
vote before adding another.
Change-Id: Ic0326a09d37d03d5a8b0444362a6f1492993040c
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>