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. This fix is for 10nm pll.
Change-Id: I8465cb9027a1639f3cdeb02274513ac680f84632
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
When qsync is enabled, if there is a large start threshold
window, there might be a case where two frame transfers
could happen in single TE period if second frame trigger
start is issued within the window and could cause tearing
on the screen. This change adds a atomic variable to detect
multiple frame count and adds vsync wait in such cases to
fix this issue. This variable will be set whenever
wr_ptr_irq arrives and will be reset during rd_ptr_irq.
Change-Id: Ice77b8a717a18d39d70dc08647e15b761ad1c126
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Add changes to avoid clone_mode encoder for detection of panel mode.
This allows cmd mode display to signal the release_fence right after
pp-done/wb-done interrupt and unblocks any input buffers waiting
on release_fence.
Change-Id: Id87e54f29c960e301d42d49d4763220e6e4cc6f5
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
Add changes to clear the cwb_enc_mask in sde_crtc_state post
phys_enc->in_clone_mode is set. This is required to avoid
race issues seen when cwb gets enabled in alternate commits.
Change-Id: I555cc0401b3200f7e8bcc6be8884d04cb3ce69fb
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
This change increases the size of KMS_INFO which helps
to accommodate large number of timing nodes for exposure
to userspace.
Change-Id: I32b1f47a32dba8ba62731e522fabd406b023ed69
Signed-off-by: Mahadevan <mahap@codeaurora.org>
Add changes to skip RM allocation during atomic_check for dsi connectors
which can have a seamless transition during CWB usecase. When CWB gets
enabled in alternate commits N, N+2 on dsi connectors there is back to
back connectors_changed modeset and poll gets enabled for the consecutive
commit N+1, N+3 on rsvp_nxt to get cleared. This rsvp_nxt will be cleared
on drm_atomic_state_put of commit N, N+2, hence atomic_check of commit N+1,
N+3 is blocked until this time causing commit failures.
Change-Id: I06f7a8d9dadb42b6d69201afeff099d554edd98e
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
If no planes are staged during non-secure to secure transition,
dim layer should be staged at the highest blend stage. Add
check to fail those commits where dim layer is not staged
in such scenarios.
Change-Id: Ifd49b00a8ff64547ea12751f6c765fd12e55629e
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
Change pr_warn to pr_debug to avoid extra logging.
Change-Id: I4baf22083005641c77c2ca5a48157d1238b091a2
Signed-off-by: osaisruj <osaisruj@codeaurora.org>
This change updates rsvp_cur pointer to latest to avoid use
after free issues. rsvp_cur pointer can be freed in few cases due
to the unlock, wait and lock of rm_lock present in
_sde_rm_poll_get_rsvp_nxt_locked.
Change-Id: I389048188e8a615edc3e75dd1102d4ca8c74af65
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
This change adds additional logs in dsi driver for
easy debugging of issues related to command transfer.
Change-Id: Ica784bed6c360b2760d6606d625837e23a22410c
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Add changes to set merge_3d_active in ctl datapath when
mode3d is enabled without half panel partial update.
Change-Id: I35c1f4c6045c4040cac730f23a6d9ce5f36cf5fb
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
During idle power collapse, dim layer dirty flags are
stored in sde_crtc_state which might be invalid if state
swap occurs. This change adds revalidate mask in sde_crtc
structure to revalidate after coming out of idle power
collapse.
Change-Id: Ie2f34a794896a3f8e729ef7d1f3ae35340123257
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Drm file is not set to NULL after freeing it from drm
release. This can result in use-after-free issues in
some scenarios. Add a mutex lock and other proper null
checks to prevent such issues.
Change-Id: Ic35b0a76166b0f47a354b1737e6f4c3ac1437ed4
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
QPIC display is used to send frame data to panel over Qualcomm Parallel
Interface Controller on MDM project.
Old QPIC display driver is base on framebuffer framework, but now
msm framebuffer driver is no longer used.
So add supoport for QPIC display driver base on tiny DRM framework.
Change-Id: I4f2434c9f9ad536e2ea56ed3daa6eb12ad56255b
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
During mode enable after idle, rsvp next would be set without
rsvp cur. Back to back test only should be serialized, but currently
this would be possible right after idle. This is established by
commit 11aab5f9c3 ("disp: msm: sde: Fix null dereference errors").
This change updates the condition to poll for rsvp next clear
during this usecase as well.
Change-Id: I300254967cbec69fff8b31545b8d659afc56f283
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This change uses kvzalloc to allocate memory for lutdma buffers.
This is needed since kernel cannot guarantee that physically
contiguous allocations greater than 32 KB will succeed.
Change-Id: I91c12bbd612408692ba8e4a3cd9ac1ce308eda64
Signed-off-by: Anjaneya Prasad Musunuri <aprasad@codeaurora.org>
This change allows signalling of sde fences when sequence number is
less than done_count. In current scenario, fence is not signaled as
the subtraction result is not typecasted to int before updating
the status causing the UI thread to block on sde fence.
Change-Id: I3ca62222e0c67223b9eaf299474a2c282d761d3a
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
Some panels may require that the DSI link returns to the low-power
stop state (LP11) after transmission of every line. If a panel
requires that the DSI link returns to LP11, apply the LP11
insertion between lines feature.
This change adds support to
- Disable the command mdp burst mode
- Enable mdp idle ctrl
- Program the No. of dsi pclk cycles of idle time to
insert between command mode mdp packets. The idle time
must be long enough to cover the time link takes to
switch between HS to LP11 mode.
Change-Id: Ie718d334f05ce6c1ecd1a05b379bbbe18dec6330
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Add support for SDE version 6.8.0.
Change-Id: I899be796f95dd63d2e3f0cecdb7693e94f5d17f3
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
In ESD register read validation, a for loop is used to increment a
local variable with the length of ESD command. But this is unused
in the validation of the read data. This change removes the unused
for loop.
Change-Id: I6d1a9233061ee33a2b5390e2f922a2412af7d605
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Imbalance power vote caused with below scenario:
1. Primary display running with CWB enabled.
2. Idle-PC has kicked in causing primary and cwb encoder to rc_idle state.
3. Post idle-PC with DMS switch enabled along with CWB.
Changes made are to avoid pre_modeset and post_modeset callbacks
for CWB encoder as it not required and it puts a unnecessary power
vote causing power issues in suspend usecase.
Change-Id: I95b7ba093484f50be5f575cafa63a02e8fbca441
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
This change adds register blk id for reglog while dumping
through debugfs.
Change-Id: I59ce35a0b6cb4199dd5489568c8d315e584650be
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Add changes to set CTL id preference for primary and secondary
builtin displays. This change check for preference if already set
from DT. If not preference will be set during connector init.
This avoids CTL datapath switches on secondary when there is dual
display usecase running concurrently with dp connect/disconnect.
In current issue scenario, due to the secondary ctl datapath
switch CTL_LAYER programming is happened on CTL_2 but CTL_FLUSH is
happened on CTL_1 causing pp_done timeout issues.
Change-Id: I5f1f52b7673740c48b249ab4d36e80b7a1d3db96
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
In video mode for fps greater than 60, perf cpu dma latency votes
are not removed during idle fallback. Made changes to remove and
add the perf cpu dma latency votes during idle fallback and idle
exit scenarios respectively.
Change-Id: I8dffc743bd48c96a6022935f71057a0223d9696e
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
This change avoids upstream drm issuing drm_atomic_commit in
drm_fb_release which is leading to artifacts on screen or
atomic_check failures due to atomically unstaging each fb
from plane_state and committing remaining planes on hardware.
a) This patch moves the state operations for setting crtc to
connector state to a helper api.
b) This patch clears any dim_layers present in the crtc_state
as part of null commit.
c) This patch removes any framebuffers attached to a drm_file
in msm_preclose whose refcount is not managed by composer kill
inadvertently and issues null flush to hardware in such cases.
d) This patch handles msm_preclose as part of msm_release
operation since legacy feature is not supported
for msm_driver.
Change-Id: Ib2068d74d4b23b73b7c84544858c9f6bb6adfa67
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
This change reverts commit ae2dceb0b6 ("disp: msm:
sde: remove all preclose logic"). This change also
modifies the force disable plane logic since
__drm_atomic_helper_disable_plane is not exposed to
drivers.
Change-Id: I89e19dead9ade724798952b1934b45b5663e1a42
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
This change enables offline rotator in holi target for
gki defconfig.
Change-Id: Ic128d46fc1cfa98b873c6edb3e1b5e10396b8954
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>