提交線圖

84 次程式碼提交

作者 SHA1 備註 日期
GG Hou
e29493c71d disp: msm: avoid using #ifdef for configurations
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>
2022-01-17 10:10:04 +08:00
Veera Sundaram Sankaran
4d3e8b1306 disp: msm: sde: extend topology_control to reserve dnsc_blur
Extend the topology_control connector property to support downscale
blur block. This gives user-mode the capability to reserve the downscale
blur block. Add sde rm changes to reserve the block based on this
connector property during sde_rm_reserve.

Change-Id: Ica2d7c57e6f528eb917acb6aae7e860352895a06
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:16 -08:00
Veera Sundaram Sankaran
37ab0f2419 disp: msm: sde: add dnsc_blur HW block support
Downscale blur HW block support is added from MDSS 9.x. The block
can be used to downscale the layer mixer output before feeding it to
the writeback block. It can be used for both writeback & concurrent
writeback usecases. Add hw files and the respective blocks in sw to
program the downscale blur block.

Change-Id: Ic5787e1655eff5ef0960b7569e48d2f35d23bfc9
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-12-01 15:11:15 -08:00
Amine Najahi
c8a4cdc761 disp: msm: sde: add support for WB VBIF clock split
Add support for localized CLK_CTRL access through WB
hardware block.

Change-Id: I408d1bbc798902d1abc7da5bcae9492baa3159c8
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-11-17 13:30:55 -05:00
Steve Cohen
d9794d82cd disp: msm: sde: remove sde_hw_blk
The sde_hw_blk was meant to be a generic base object for all
SDE HW blocks, however, it enforces using a common set of ops
which is not practical when blocks have different capabilities.
Since this object was never used as intended and is not doing
anything functional today, remove the dead weight.

Change-Id: If76006c1ae5c62e8d7d77b100837dbaf6c661bd3
Signed-off-by: Steve Cohen <quic_cohens@quicinc.com>
2021-10-26 11:34:59 -07:00
Steve Cohen
7f0c843da4 disp: msm: sde: move boolean flags in catalog to a bitmap
Move all the individual boolean flags from HW catalog into a
"features" bitmap. These flags are used to specify support of
various target specific features.

Change-Id: I2334b3b873f3737f91bbae4ef576408247710156
Signed-off-by: Steve Cohen <quic_cohens@quicinc.com>
2021-10-26 11:21:33 -07:00
Prabhanjan Kandula
7db951ec69 disp: msm: sde: avoid dsc hw allocation switch for an active display
While hw resources allocation for an active display during modeset, avoid
dsc hw allocation switch by finding which dsc encoders are allocated
previously and allocate same dsc hw encoders. This helps in fixing underrun
issues in below scenario of dual display power ON/OFF.
Use case: Dual DSI display setup, both are DSC enabled, primary in video mode.
    --> when both displays are in powered off, all hw block are free.
    --> enable second dsi display
    Since LM 0/1 marked for primary, LM 2/3 allocated along with DSC 0/1
    --> enable primary display
    LM 0/1 allocated with DSC 2/3 encoders
    --> Now power off secondary DSI
    DSC 0/1 are freed up
    --> Immediate modeset on primary, DSC allocation switched
    LM 0/1 and DSC 0/1 allocated. DSC 2/3 are freed up as per RM but
    decoupling DSC 2/3 blocks with respective pingpong or intf is not done.
    This is causing underruns on primary.
Tracking which DSC blocks are freed during resource switch and programming the
respective DSC control mux configuration is not feasible and not scalable as
any other display can allocate those blocks and would require synchronizing
across display threads. So approach taken is avoid dsc resource switch itself.

Change-Id: I7f740722a52266740c4b168edc0c619e3cf68989
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-10-07 00:04:33 -07:00
Nilaan Gunabalachandran
711eabbf43 disp: msm: sde: account for pref lm when exposing avail resources
If an external display, such as DP, requests for the available
resources, resource manager (RM) will provide a count of all unused
mixers. If the primary/secondary display(s) are not active, the RM
will report the associated preferred mixers as free resources.
However, RM will not allow preferred mixers to be allocated to other
displays. DP driver could look at these available resources and assume
a high resolution mode is possible and fail during resource allocation.

This change updates the available resources info API to account for
primary/secondary preferences while exposing available resources.

Change-Id: I134a1047f24ac9f1fcee695aa14a1d3e43c1571f
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-09-27 12:13:37 -04:00
Nilaan Gunabalachandran
3b303c57de disp: msm: sde: avoid mis-allocating dummy mixers
Dummy mixers for dedicated concurrent writeback can be allocated
as valid mixers. However, they should only be allocated for DCWB
usecases. Allocating these virtual resources incorrectly can lead
to underrun on external monitors. These dummy mixers should not
be tracked as available resources and exposed to dp for
mode validation.

Change-Id: I04f583d5b722e0a384a5446e3a8a2313a338aa12
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-09-09 09:48:08 -07:00
Jayaprakash Madisetty
0a56792383 disp: msm: sde: update rsvp_cur when poll is enabled for rsvp_nxt
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>
2021-07-28 05:40:24 -07:00
qctecmdr
a44120edf1 Merge "disp: msm: sde: correct num_datapath during PM resume with CWB" 2021-07-15 13:14:46 -07:00
Jayaprakash Madisetty
436efb403c disp: msm: sde: modify in_clone_mode after wb_reset is done
Add changes to modify the phys_enc->in_clone_mode variable
post wb_reset_state since this is a shared variable used
during atomic_check and atomic_commit. In current issue case,
wb_atomic_check has set in_clone_mode to true in commit N,
and in commit N-1 CWB is being disabled and re-sets the
in_clone_mode variable to false causing pp_done timeouts in
primary in commit N.

Change-Id: I8159bbdb5622a351d76bdc4dba75d48df20f4365
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-07-14 13:43:21 -07:00
Jayaprakash Madisetty
a29369e224 disp: msm: sde: correct num_datapath during PM resume with CWB
In PM resume with CWB concurrency usecase, crtc pointer in
conn->state is NULL since drm_mode_config_reset operation is
performed on pm_resume. This change relies on conn_mask in
new_crtc_state for primary connector retrieval and also adds
get_num_lm_from_mode callback to DSI for LM count retrieval
from dsi panel topology. Existing get_mode_info api cannot
retrieve the topology info because mode->priv_info is NULL.
This occurs as WB encoder is added in the drm encoder_list
before primary encoder, introduced as part of commit d28ebf05f4
("disp: msm: sde: populate WB display encoder list before dsi").

Change-Id: I55358fd88ab778bd81475cf3628be13335de1cb5
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-07-09 09:12:26 -07:00
Nilaan Gunabalachandran
ab52bfd181 disp: msm: sde: poll for rsvp nxt after idle
During mode enable after idle, rsvp next would be 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>
2021-06-15 13:12:32 -04:00
Yashwanth
ffc7cdbe08 disp: msm: add connector state along with crtc state to detect modeset
During modeset, private mode changed is detected from
msm_display_mode which is present in sde_connector_state.
In the current code, sde_connector_state is found from the
drm_connector variable which will not be valid
during atomic check phase and new connector state is
required here. To handle this, drm_connector_state is passed
along with the drm_crtc_state while detecting
msm_atomic_needs_modeset condition.

Change-Id: I62c162eff6e1c091cb05b3f049a40a0f25b710ba
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-21 03:48:21 +05:30
Abhijit Kulkarni
944a0629f5 disp: msm: sde: fix cont splash pipe identification
This change fixes the continuos splash logic that identifies the
pipes staged by bootloader. The same code flow is used in trusted ui
handover as well. Existing logic was counting the pipes twice if the pipe
is staged on both the layer mixers. This change simplifies the pipes
already staged before handover by using the pipe index to convey if
it is staged or not.

Change-Id: Idb255f2077161dc3553114ac5d04e0ef743bb5ea
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2021-05-14 12:23:57 -07:00
Prabhanjan Kandula
7c5fde4c27 disp: msm: sde: update back to back atomic check polling
In case of back to back atomic check only commit with modeset
handling, enable client to retry same commit and increase
timeout value used in polling for clear of rsvp-next.

Change-Id: Ied7acfbf0fe1f68282cfc36cdadf2d6aec6db40a
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-05-10 14:50:58 -07:00
Veera Sundaram Sankaran
506508e1cd disp: msm: sde: remove unused functions from sde code
Cleanup unused functions from all modules in sde driver.

Change-Id: Ia0e72ab9c281b4200a63ce35bf184e83fe1db5d2
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-05-09 11:41:54 -07:00
qctecmdr
10766ebd0f Merge "disp: msm: sde: provide rm status through debugfs node" 2021-03-29 23:04:55 -07:00
qctecmdr
3ffb2db08c Merge "disp: msm: sde: fix tracking of pending rsvps" 2021-03-24 09:41:12 -07:00
Tatenda Chipeperekwa
c6257272d4 disp: msm: fix compilation errors for dlkm compilation
Fix dlkm compilation errors that are due to the use of -Werror
flags used by the build system.

Change-Id: I5e1e9bc63c1361d73e4930aab123212717872ecb
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2021-03-22 15:25:36 -07:00
Christopher Braga
812782e76b disp: msm: sde: check fetch active registers for active data planes
Continuous splash setup checks the CTL configuration to determine and
log all planes that have been enabled for continuous splash boot.
This logic currently only checks the planes mapped to each LM on
a given control path, resulting in data planes being missed.

Update the boot plane enumeration logic to additionally check the CTL
fetch active registers to detect and log missed planes. This logic
checks against all planes found through the original enumeration path
to avoid logging the same plane twice. Note that planes found via the
fetch registers are assumed to be used across both rectangles due to
hardware logging limitations.

Change-Id: Ic1f4aaba94111fe096ba9764eeaef242beb6adf5
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:07 -07:00
Steve Cohen
36470038e6 disp: msm: sde: fix tracking of pending rsvps
Previous logic expected rsvp_nxt to always be the 2nd rsvp for
a given encoder. This does not work for releasing back-to-back
test-only reservations (with no current rsvp). If new
resources become available between the 2 test-only commits we
may end up reserving more resources than necessary. Change the
logic by adding a pending flag to the rsvp to simplify lookup
of both current and pending/next resource reservations.

Change-Id: Iefa8085f1b4c0cf49bb744dcc2deb7fb92608454
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2021-03-16 14:18:03 -04:00
Dhaval Patel
c9a5def3b2 disp: msm: sde: provide rm status through debugfs node
Provide rm status through debugfs node.
cat /d/dri/0/debug/rm_status.

Change-Id: Ic1950b1881f0b57582701a342793aa06adb9da39
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-03-09 17:14:53 -08:00
Chandan Uddaraju
1b7fba16bd disp: msm: sde: update RM to support dedicated CWB
Add dummy layer mixer blocks to be used for dedicated
CWB.

Change-Id: Ie1fe4fa7502cf5cf4dba3f2c129257887a20b7ad
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2021-02-19 12:53:09 -08:00
Lei Chen
ab3f86f918 disp: msm: use connector properties to expose and set panel mode
Expose panel mode from kernel to SDM with SDE connector property
CONNECTOR_PROP_MODE_INFO and set panel mode from SDM to kernel
with SDE connector property CONNECTOR_PROP_SET_PANEL_MODE for
avoiding private change in upstream code in QGKI kernel.

Change-Id: I0629dad9399967cc1118ac02ce30597076ca367d
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2021-01-13 23:40:22 +08:00
Krishna Manikandan
55099ebe9a disp: msm: sde: ignore sspp check in rm splash init during vm handoff
The last commit in primary-vm before transitioning to
trusted-vm during trusted-ui usecase will be NULL
commit for video mode. In the current splash path,
rm reserve during cont splash res init will succeed
only if there are sspps staged on the mixer. Avoid
this check for vm handoff usecase.

Change-Id: I9829c66f8eb856cc009edc35e489bc9adad1c5d7
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-09-23 23:54:37 -07:00
Narendra Muppalla
6e8693a6ef disp: msm: sde: return latest rsvp_next pointer on poll timeouts
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>
2020-09-15 17:57:06 -07:00
qctecmdr
52610a646b Merge "disp: msm: sde: update ctl v1 topology table" 2020-09-10 18:45:36 -07:00
Jayaprakash
940830690a disp: msm: sde: modify dsc blocks reservation check in RM
Add changes to reserve dsc blocks by routing even numbered
dsc encoders to even pingpong blks and odd numbered dsc encoders
to odd numbered pingpong blks.

Change-Id: I9242b3f7a2784194f9e4a7d30eff6ae3ec16b196
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 00:21:55 -04:00
Amine Najahi
e7cf04beae disp: msm: sde: use proper API to retrieve connector state in check phase
Use sde_connector_state_get_topology API instead of
drm_atomic_get_connector_state since the latter can
return a blank connector state if not found in
global atomic state.

Change-Id: Ib5b58c6cab438a367a885308341d6bccc624f777
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-08-10 13:57:14 -04:00
Yashwanth
5c4635d434 disp: msm: sde: update ctl v1 topology table
This change updates split display flag for ctl v1 topology
table since it is not required for CTL_ACTIVE targets.

Change-Id: Ic669cb6f2c1ca60b2299ebb59a8132a5177ad133
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-07-31 12:19:14 -04:00
Linux Build Service Account
026b9de2e2 Merge "disp: msm: sde: fix kw issues in sde driver" into display-kernel.lnx.5.4 2020-07-10 12:35:48 -07:00
Narendra Muppalla
47638eae8c disp: msm: sde: fix kw issues in sde driver
This change to address use after free and null checks in
sde driver.

Change-Id: Iade91596748b1b867ae959e61fca0f7072eda8f3
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-07-09 11:13:01 -07:00
Amine Najahi
2d624f6ab8 disp: msm: sde: refactor topology group check helpers
Refactor topology group check helpers into a single
function to remove duplicate code. This change also
uses atomic state to extract topology information
since those functions can be called during atomic
check phase.

Change-Id: Ia262009e0b8fe9fcdeff05e544d2e59be35c9c54
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-07-09 09:40:08 -04:00
Prabhanjan Kandula
690139ccd1 disp: msm: sde: serialize rm reserve for check only commit
During back to back mode set, current driver logic fails
atomic check during resource allocation with test only if
previous commit also with modeset, has tagged resources for
allocation but did not commit the resources yet. Since client
invoking atomic check before previous mode set commit complete
is an expected scenario now, instead of failing atomic check,
this change allows resource allocation for next commit also go
through by pollong till the first mode set is complete.

Change-Id: I1261b7d205bb0d886085664fab3664162a419c99
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2020-06-26 10:38:43 -07:00
qctecmdr
d9b4204aad Merge "disp: msm: sde: add vig formats before qseed and csc initializations" 2020-06-12 00:11:19 -07:00
Jayaprakash
11aab5f9c3 disp: msm: sde: Fix null dereference errors
Add changes to avoid NULL dereference access and
uninitalized access in sde driver.

Change-Id: Ic9c06f54d1ccd820973fc0ba4aa75d2848f2ce03
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-06-08 11:39:25 -07:00
Jayaprakash
bada02f317 disp: msm: sde: add changes to fix get connector failure in rm_release
Currently during rm_release, drm_conn is available only if connector
and encoder are bound together. If a test_only commit occurs
before a non-blocking modeset commit, this bound is uncertain.
The resources allocated by test_only commit will not be released
and leads to resource allocation failures for the consequent
commits. Add changes to modify this by checking for the encoder
attached to sde_connector which happens during bootup.

Change-Id: Icb1d9595efda8a104ba527175b2dbc6a2c856d44
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-06-08 11:39:03 -07:00
Amine Najahi
b121756b5d disp: msm: sde: adjust DSC encoders to support all 4LM topologies
Add support for all 4LM topologies in new DCE encoder framework.
This change also aligns with the new way of checking topology
information.

Change-Id: I5358d60634070bdb26059056db884ad4161c073e
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-05-28 19:25:09 -07:00
qctecmdr
db766d7c86 Merge "disp: msm: sde: modify check for active datapaths" 2020-05-21 13:41:41 -07:00
Alisha Thapaliya
e2f98dc79b Revert "disp: msm: sde: adjust DSC encoders to support all 4LM topologies"
This  reverts commit 6a50aedbfa.

Change-Id: I3570b18728cfad2843ca7f3a7d0276cda32c9492
2020-05-14 11:51:15 -07:00
Krishna Manikandan
5541a20748 disp: msm: sde: modify check for active datapaths
In some cases like suspend and cwb concurrencies,
the number of mixers in the sde_crtc structure
can become zero. Add support to get the number
of mixers from topology in those cases to
avoid incorrect resource allocation request.

Change-Id: Id9b82e805ff50a107ad06514b4e41c0917abdf33
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-05-08 13:48:49 -04:00
qctecmdr
2e3e5cb274 Merge "disp: msm: sde: avoid resource reservations clean up leak" 2020-05-06 23:27:07 -07:00
Prabhanjan Kandula
441dc79ab0 disp: msm: sde: avoid resource reservations clean up leak
Resource reservation of an atomic state should be cleared
irrespective of the state of a display. This change relaxes
the encoder - connector chain up check as this may not be
available during a modeset disable outputs scenario.

Change-Id: I8a51973b7c77787ff19d894458a1b73580b93de2
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2020-05-06 13:16:29 -07:00
Amine Najahi
6a50aedbfa disp: msm: sde: adjust DSC encoders to support all 4LM topologies
Add support for all 4LM topologies in new DCE encoder framework.
This change also aligns with the new way of checking topology
information.

Change-Id: I20785c96569fd07cbd8016d244a7e4c929bfa071
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-05-06 14:16:40 -04:00
Amine Najahi
8dd5deed11 drm: msm: sde: reserve LM in pairs for 4LM topologies
Reserve LM in the sequence of primary-peer and then
primary-peer again until all required LM are reserved.
Searching sequence will not change for single/dual LM
reservation. For single LM reservation it will return
right after the first primary LM is found. For dual LM
reservation it will return after the first primary-peer
pair is found.

The logic can also work for triple/quad or any number
of LM reservetion and make sure that all the reserved
LMs are in pairs except the last one if total LM number
is odd.

Change-Id: Ia28bb64fedeb43430039775051943d751259a3d2
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Signed-off-by: satbir singh <satbsing@codeaurora.org>
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
2020-05-06 11:32:53 -04:00
Amine Najahi
89c7e1dadf disp: msm: sde: add plane staging management for 4LM topologies
When a 4LM topology is used each plane attached to a CRTC
is tagged with a L/R layout value and an offset value
depending on where destination X coordinate lands on the display.
The layout information is used to determine SSPP to LM
pair mapping and local coordinate space.

This change also handles source-split and Z-order
validation checks for planes staged on different mixer
pairs.

Change-Id: I1b20223388e65fc36a8b379ad9df23a277fcd1a5
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-05-05 23:06:39 -04:00
Amine Najahi
e7a890df11 disp: msm: sde: add 4LM topology variants in resource manager
Add 4LM topology variants in resource manager and in drm
connector topology name property.

Change-Id: I13e6eaafe60037b48d2c9d356f668b69720cbf48
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-05-05 23:04:15 -04:00
Narendra Muppalla
218244e58b disp: msm: update rm topology mapping tables
This change updates resource topology mapping tables and includes
logic to compare compression types for dsc vs vdc.

Change-Id: I1735edeb07aec8ed0065f84ac0824c58158412f3
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-05-04 22:47:11 -07:00