During wb/cwb usecases, connectors_changed flag will be
set and needs modeset condition will be set to true. This
change updates qsync concurrency check with modeset to
fail atomic check only if there is seamless poms, dms or
dynamic clock scenario.
Change-Id: I1183f25cd45310fbd1d0b5ce67ee3d5dd3660fe0
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
The current SDE driver logic during MDP hang cases is to send a capture
event to user-mode if recovery custom event is registered. Otherwise, it
will enforce a device panic for debugging purpose. This might have a race
condition during the display tear-down sequence as user-mode unregisters
the recovery event when the last frame is in progress. If the last frame
causes any MDP hang, it will result in a device reset. Support only the
event registration to avoid this case, since HW recovery is not expected
to be changed dynamically.
Change-Id: I8a11e1060b239ac6827f1d078e3e396cff4c1325
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Setting hbb value based on the ddr type of the target is
not supported in trusted vm environment. Add changes to
retain the ubwc configuration programmed by LA during the
transition to LE environment.
Change-Id: I1fa308ea99f815cfe4d1c75a22dbb6f89a806007
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
In connector atomic check, seamless vrr cannot be
determined since mode doesn't get populated by that time.
This change moves qsync validation from connector to encoder
atomic check to verify & handle modeset concurrencies.
Change-Id: Ia41bde4c05f98d8ba4cb39c18f2da1683cf9e5a3
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Clear any pending flushes after disable so that they are not
re-applied on the next enable for this encoder.
Change-Id: Ic8d387e60b6369062269c48611ee9a9de8887ec7
Signed-off-by: Steve Cohen <cohens@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>
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>
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>
Add changes to extend the current evtlogs for ease
of debug purposes.
Change-Id: Ibe136afbf25b8b8decfc06ef3868e3f628df4dcb
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
This reverts commit 9ce6a2fbb3.
Revert the change for sde_encoder.c, and keep the change for
sde_connector.c.
Change-Id: I19ff26e4543b9b338ccaf363c99c5eb2c115f99b
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Commit Ifa100424733 ("disp: msm: sde: delay
encoder disable for clone mode") delays the CWB
encoder disable but it is also skipping the CWB
disable flush. That can cause the underrun on dp
display if it uses the same 3d_merge HW block. This
change reverts the portion of original code and
only delays the last cwb frame done wait. It still
keep the last CWB frame done wait as it is if crtc
is also moving to inactive state.
Change-Id: I3461188a35197f2925899ceea7ef705adf00a398
Signed-off-by: Dhaval Patel <pdhaval@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>
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>
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>
During virt enable call, sde_enc master will be removed and
re-assigned. If an underrun is observed during this
scenario, it results in crash due to uninitialized access.
This change handles the above scenario.
Change-Id: Iec9e4a0bc4b763e44933334dacf82f1439eacc17
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
This change fixes the vblank wait after system cache read mode
update. Without this change the wait does not happen since there is
no pending kickoff. This change uses encoder api to flush the
configuration and explicitly waits for vblank.
Change-Id: I8942f9b638e784c8fd9b5df33a9ccc7087a5eaef
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Clone WB encoder disable before posted start commit
trigger adds wb_wait delay in current frame trigger
sequence. This adds 1 frame jank if CWB enable/disable
path exercised periodically like 100ms or 200ms. This
change delays CWB encoder disable after frame trigger
and vsync/wr_ptr wait to avoid jank issue.
Change-Id: Ifa10042473397b37396d217d2410e7cf5a1e32a1
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This change updates misr checks so that misr can be
configured during secure display session. In the current
code, misr_reconfigure flag is set only when accessing
through debugfs node.
Change-Id: Ic3a8316a4881551da3f0f340f6ef5ae3fbe4913f
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
During cases where vblank callback registration happens during
CWB is enabled and deregistered at point of no CWB, WB encoder
is left with dangling vblank_cb. Added changes to avoid registering
vblank callback on the clone mode encoder.
Change-Id: I62aa12ef453166d2f5558852d924f87841872f37
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
Display input touch event is replaced with IOCTL in performance HAL
to early wake up DSI clock.
Add a property to enable/disable display input touch event for backward
compatibility.
Change-Id: Ib6b9123d726e79a2927b05d1ef77c343f01d0c5e
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
This change disables the border color on the layer mixer,
based on the caller's request. This is required to totally
disconnect the layer mixer hardware when it is not
participating in blending the pixels. Having empty blendstage
but border color enabled, allows Layer mixer hw to produce
border pixels even when blend stage is empty.
Change-Id: I8e84aeedffbd42ad793a167a6cc5a3a653864c1a
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Encoder CRTC can be null during modeset concurrecy, so change the log
level from error to debug when CRTC is null for display early wakeup.
Change-Id: I67c2413a284d70c415616921608eaebdf0f7a298
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
As per current design misr enable sequence is happening at
atomic check level. At this state, misr configuration may reset
if clocks are enabled through atomic commit sequence. This change
moves misr enable/disable sequence from debugfs context to
encoder kickoff to avoid misr register reset with idle pc.
Change-Id: Ia4faa200f96b76ba8c7ef3f45a26108e34b5e687
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
SDE encoder modeset add and remove the vblank refcount
based on userspace vblank refcount request. This logic
can have race condition with vblank update from
crtc event thread. It is already avoided with
Ibb810ec90e8 ("disp: msm: sde: manage vblank
refcount concurrency").
Change-Id: I1749bff2e2574500db03a405781eab7496f307b2
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
In current SDE driver when misr is enabled, for each commit in
encoder kickoff stage misr is configured for both lm and interface
misr blks. This can clear misr data before client could collect misr.
This change avoids misr data clear and configures misr based on
user input.
Change-Id: I85fc19c78afc6d01346219250c82f2ada824eb0d
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Commit d46cae019e ("disp: msm: sde: trigger pm_qos vote
with irq enable") moves the pm_qos vote with irq
enable/disable state. Such irq enable/disable call may be
triggered from atomic context and lead to scheduling issues
due to mutex_lock usage in pm_qos APIs. This change moves
the vote with encoder idle pc to allow lock usage with sleep.
Change-Id: I2d22566fbfb5399c5d2d2a4efe882a1928cfbbf8
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Add trace logs in display early wakeup function for performance
profiling.
Change-Id: I63392417f03eac60dba1c43cd71fe5032ba59ed3
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
Display clocks and IRQs are disabled during idle state
on command mode for power saving, and will be enabled
when a new frame commits to display driver. But enable
display clocks and IRQs will cause some latency.
So add a new SDE custom IOCTL for user-space to early wake
up display before first frame commits to kernel.
Change-Id: I6ca0188d321c4964f29c46e588b64d06b9634c59
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
Expose an API in encoder to control display irq's
when the VM enters and exits TUI use case.
Change-Id: Ic2386dcebfd8a9dd2ce06f068c6daf066a3e885f
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
This change to address use after free and null checks in
sde driver.
Change-Id: Iade91596748b1b867ae959e61fca0f7072eda8f3
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>