3568 Commits

Author SHA1 Message Date
Akash Gajjar
4a5e3080f2 disp: msm: sde: avoid returning vsync count for cwb encoder
In CWB use case along with suspend commit, the function
drm_crtc_funcs.get_vblank_counter returns a zero vsync count
value. This causes blocking of drm_crtc_funcs.disable_vblank,
leading to a wait for vsync timeout while disabling the encoder.
hence clear a cwb encoder mask in encoder disable and set it
while performing mode set.

Change-Id: Ic994aa0a86faf48e2b25955cf6fe12166fe9d328
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-07-21 16:43:08 +05:30
Akash Gajjar
4cb481f5f8 disp: msm: sde: adjust the vblank refcount until the completion of poms
In POMS use case, the handling of the wait for vsync event
completion coincides with the concurrent
drm_crtc_funcs.enable_vblank. This concurrency causes a vsync
event complete timeout while disabling the encoder. to fix this
concurrency problem, increment the vblank refcount in encoder
disable and release the vblank refcount in encoder enable.

Change-Id: I79671e4a2bafdd01a6b2523a80fe511bff23d6b6
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-07-21 10:22:17 +05:30
Andhavarapu Karthik
cd672fbb9d disp: msm: sde: add out of bound check for interrupt id
This change adds out of bound check for interrupt id.

Change-Id: I10e786ee434629b0735c96da3c03eeac708935a1
Signed-off-by: Andhavarapu Karthik <quic_kartkart@quicinc.com>
2023-07-20 14:23:40 +05:30
Soutrik Mukhopadhyay
2fb61f552b disp: msm: dp: Handle aux switch node missing in device tree
Ensure to allocate switch type as bypass in case of dp aux switch
node missing in device tree entry and prevent any scope of null
pointer dereferencing.

Change-Id: I1d50d785e028f2e69a0effaedb2dbb6568a473dd
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-07-18 21:26:29 +05:30
qctecmdr
280b31df88 Merge "disp: msm: sde: add support for CWB + single LM partial update" 2023-07-17 00:27:49 -07:00
qctecmdr
5ea3dc2b41 Merge "disp: msm: sde: clear wb mode and cached cwb encoder mask" 2023-07-17 00:27:49 -07:00
Mahadevan
4cd335d6f6 disp: msm: sde: add support for CWB + single LM partial update
In the current SW design for a CWB commit the need for 3D-Merge
and number of CWB mux which needed to tap the LMs are decided
based on number of mixers on crtc. When there is a partial update
commit in single LM these 3D-Merge and CWB mux active are used
leading to WB commit failures. This change properly check whether
3D-Merge is needed in CWB path based on number of LMs in a partial
update commit.

Change-Id: I2c838a24ad3a259923f6b26934e681cb9a5829b6
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-07-14 12:46:25 +05:30
qctecmdr
a94f99c621 Merge "disp: msm: initialize and register drm device after splash_config" 2023-07-13 04:07:50 -07:00
qctecmdr
e7b6529ec5 Merge "disp: msm: dsi: fix compressed RGB101010 support" 2023-07-11 20:10:35 -07:00
qctecmdr
d4e6b9af67 Merge "disp: msm: sde: avoid returning zero vsync count in poms usecase" 2023-07-10 02:44:54 -07:00
Mahadevan
7e4f99840b disp: msm: sde: clear wb mode and cached cwb encoder mask
The issue scenario is as follows
1. A CWB commit has run and it has disabled. Composer kill is
   done.
2. If Composer starts again or another client has open DRM
   the previous cwb state is intact.
3. When userspace is trying to query wb modes, primary modes
   which are attached to wb as part of cwb commit is exposed.

This leads to commit failures if userspace is trying to trigger wb
on the same CRTC of what primary has run cwb before. This change
properly clears wb mode and the cached encoder mask to avoid commit
failures.

Change-Id: I4ca8bd2b52a980630b7fb1319bf67b718ebb2ac2
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-07-07 18:31:09 +05:30
Linux Build Service Account
155e704e54 Merge changes If50226c5,Iafbee4d9,Iced3b117 into display-kernel.lnx.5.15.r1-rel
* changes:
  disp: config: add support for fsa and wcd aux switch for crow target
  disp: msm: dp: Parse device tree to find specific aux switch
  disp: msm: dp: Add abstract and wcd939x aux switch support
2023-07-07 01:58:26 -07:00
Soutrik Mukhopadhyay
c564969f8e disp: msm: dp: update PHY settings for crow target
Update PHY settings for crow target.

Change-Id: I1242154cdb3aef5c9a84954d69e40f0520157620
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-07-06 23:46:48 -07:00
Kashish Jain
2c8b12d2a5 disp: config: add support for fsa and wcd aux switch for crow target
Add support for fsa and wcd aux switch for crow target.

Change-Id: If50226c5f9f7cbb3a1ab1d469bc2c9efa0b541c4
Signed-off-by: Kashish Jain <quic_kashjain@quicinc.com>
2023-07-06 23:46:24 -07:00
Soutrik Mukhopadhyay
0a9bb868d0 disp: msm: dp: Parse device tree to find specific aux switch
Changes to select particular dp_aux_switch based on board
requirements. Currently provision to support both fsa4480
and wcd939x as aux switches are provided.

Change-Id: Iafbee4d91d14aafb1e7a37ddfa2b1ea0d0e5e784
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-07-06 23:45:57 -07:00
Nisarg Bhavsar
489e038851 disp: msm: dp: Add abstract and wcd939x aux switch support
Add functionality to change which aux switch is used
at compile time for different targets. Add wcd939x
switch support.

Change-Id: Iced3b11733009680063790dfa8f180b19002f963
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-07-06 23:45:29 -07:00
Akash Gajjar
15a6e6deda disp: msm: sde: avoid returning zero vsync count in poms usecase
In POMS use case while disabling the virtual encoder, the virt
reset function sets the current master to null. concurrently, if
there is a query from the DRM client for the current vsync count,
it returns a zero value. This results in the blocking of the
drm_crtc_funcs.disable_vblank function. since the vsync count
has been relocated to the virtual encoder, remove the physical
encoder structure.

Change-Id: Ie692df657b5a86b6b8915a15e9a070642243fcfb
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-07-06 23:19:10 +05:30
qctecmdr
f15ca355ce Merge "disp: config: add support for fsa and wcd aux switch for crow target" 2023-07-06 02:29:17 -07:00
qctecmdr
79216fa2c2 Merge "disp: msm: dp: update PHY settings for crow target" 2023-07-05 22:23:48 -07:00
Kashish Jain
191d8b78c4 disp: config: add support for fsa and wcd aux switch for crow target
Add support for fsa and wcd aux switch for crow target.

Change-Id: If50226c5f9f7cbb3a1ab1d469bc2c9efa0b541c4
Signed-off-by: Kashish Jain <quic_kashjain@quicinc.com>
2023-07-04 06:00:26 -07:00
Soutrik Mukhopadhyay
4232c28148 disp: msm: dp: Parse device tree to find specific aux switch
Changes to select particular dp_aux_switch based on board
requirements. Currently provision to support both fsa4480
and wcd939x as aux switches are provided.

Change-Id: Iafbee4d91d14aafb1e7a37ddfa2b1ea0d0e5e784
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-07-04 05:59:51 -07:00
Nisarg Bhavsar
ffb63d1248 disp: msm: dp: Add abstract and wcd939x aux switch support
Add functionality to change which aux switch is used
at compile time for different targets. Add wcd939x
switch support.

Change-Id: Iced3b11733009680063790dfa8f180b19002f963
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-07-04 05:59:09 -07:00
Mahadevan
b56a9415bd disp: msm: initialize and register drm device after splash_config
If continuous splash is enabled crtc_state active is set to true
from the driver. During the handoff commit this new_state is compared
with the older state and active change will be set to false. If there
is a race condition between the continuous splash config and atomic
check of the first commit, an improper state with active change to
true is formed leading to commit failure. This change makes sure drm
device will get initialized and registered after continuous splash
config which will block the userspace from the handoff commit.

Change-Id: I91aa64c480a3341488f1e2c9422c9a2b8200fe53
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-07-03 23:21:54 -07:00
Linux Build Service Account
c922debfcc Merge 59417d5d89 on remote branch
Change-Id: I803a082cacbec0ce6e0b37cdbefc8fd66ca5203f
2023-07-03 21:56:29 -07:00
Lei Chen
e85260e6a1 disp: msm: sde: set layer mixer for each wb display mode
Set the number of layer mixer for each wb mode based on the
current mode hdisplay width. If the hdisplay width of current
mode is greater than the maximum layer mixer width of HW supported,
set dual layer mixers for this mode and check if the split
hdisplay width is an even number.

Change-Id: I0190830ed559f008f9e2c0752858ddc5e7cb83cd
Signed-off-by: Lei Chen <quic_chenlei@quicinc.com>
Signed-off-by: Yojana Juadi <quic_yjuadi@quicinc.com>
2023-07-03 16:44:24 +05:30
Linux Build Service Account
c4fce2e724 Merge 74c700ca88 on remote branch
Change-Id: I2b50643dad4e548584ceea7af65a2250ff31f268
2023-06-28 23:01:35 -07:00
Soutrik Mukhopadhyay
65c37a6e5d disp: msm: dp: update PHY settings for crow target
Update PHY settings for crow target.

Change-Id: I1242154cdb3aef5c9a84954d69e40f0520157620
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-06-26 21:20:34 -07:00
Kashish Jain
59417d5d89 disp: msm: dsi: change log level for dsi pll slave config
Change log level for unavailable slave pll from warn to debug
to avoid redundant logs as parrot supports only one DSI.

Change-Id: I200a2f382a1dca7035e4960d3bb0c877867f8ba8
Signed-off-by: Kashish Jain <quic_kashjain@quicinc.com>
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-06-24 15:27:06 +05:30
qctecmdr
f9251258ff Merge "disp: msm: sde: add vsync count in virtual encoder" 2023-06-15 07:56:08 -07:00
qctecmdr
fea2f03e95 Merge "disp: msm: sde: select vbif QOS LUT based on ddr type" 2023-06-15 07:56:08 -07:00
Akash Gajjar
bbcece0f23 disp: msm: sde: select vbif QOS LUT based on ddr type
Add property to parse the ddr type and select the vbif QOS
values based on the detected ddr type.

Change-Id: Ifc980b5bdadc38b7b0882568a1f07e4e8441303a
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-06-14 17:00:44 +05:30
Akash Gajjar
f4865f480d disp: msm: sde: add vsync count in virtual encoder
Introduce vsync count variable in virtual encoder structure
to keep the vsync count variable value in sync while performing
the poms. Consequently, this prevents the blocking of
drm_vblank_put and the invocation of
drm_crtc_funcs.disable_vblank.

Change-Id: I74903a89b17a8f46fb1b21338500553f36771dd0
Signed-off-by: Akash Gajjar <quic_agajjar@quicinc.com>
2023-06-14 15:50:35 +05:30
Anand Tarakh
74c700ca88 disp: msm: dsi: sync the command DMA packet buffer after update
Sync the command DMA packet buffer after update.

Change-Id: I01b91400bb15ab75cbb7ce3cf9adc4b64f7e923d
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-06-11 23:19:33 -07:00
Linux Build Service Account
d119e2e4bb Merge dfc4131bc6 on remote branch
Change-Id: Idb7143f5703ab4df7c9b9e20b22b516fb4f115c5
2023-06-09 03:28:39 -07:00
qctecmdr
da135c4071 Merge "disp: msm: sde: avoid reprogramming of vbif and RP remap" 2023-06-08 00:05:16 -07:00
qctecmdr
25a7896d16 Merge "disp: msm: dp: Release connector reference after reading crc frame value" 2023-06-08 00:05:16 -07:00
qctecmdr
1a8a70eab6 Merge "disp: msm: sde: disable CWB in quad pipe" 2023-06-08 00:05:15 -07:00
Soutrik Mukhopadhyay
d4ae697767 disp: msm: dp: Release connector reference after reading crc frame value
This change decrements the specific drm connector's reference count
after it has been used for reading crc frame value. Without this
change, there might be a chance of a connector's reference count
still remaining positive, even if it is not accessed anywhere
further in code.

Change-Id: I9058ca046fa114bc10159045f98c40ac68ade751
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
2023-06-05 22:13:28 -07:00
qctecmdr
dfc4131bc6 Merge "disp: msm: sde: get proper mode while populating layout split" 2023-06-05 18:21:54 -07:00
Mahadevan
277561a241 disp: msm: sde: disable CWB in quad pipe
Disable CWB in quad pipe for quad LM CWB not supported
to avoid out of bound access.

Change-Id: I0348a7fa318b9fa9886d35d5e233d81c8135d2ee
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-05-31 10:15:47 +05:30
Mahadevan
b15068b500 disp: msm: sde: get proper mode while populating layout split
When continuous splash is disabled current drm mode is not assigned
in old crtc state. While enabling quad-pipe topology invalid layout
split is populated from this mode causing commit check failure. This
change properly gets the required mode from the new drm_crtc_state
to avoid such issues.

Change-Id: I198fd1c9c91995e282927e246d96373b4f0fc8b1
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-05-30 22:39:10 +05:30
Srihitha Tangudu
8fa935d667 disp: msm: dsi: avoid taking ctrl lock while waiting for CMD DMA done
Currently, ctrl lock is taken while waiting for CMD DMA done even in
case of ASYNC command transfer, which doesn't allow any other operation
on the controller until the command transfer is done. Avoid this by not
taking ctrl lock while waiting for CMD DMA done.

Change-Id: I91f2638fa02f48ec4c7a41c750daa46b52c5e2f2
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2023-05-30 03:07:29 -07:00
Sankeerth Billakanti
42b95b8660 disp: msm: dp: set frequency in hz for all dp clocks
The dptx link and pclk rcg clocks will be using byte2_ops
and expects the frequency to be set in hz.

Change-Id: Ia961dbd3441c8e37ba3afa5a68bbb76ea9be7f07
Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
Signed-off-by: Kashish Jain <quic_kashjain@quicinc.com>
2023-05-26 10:09:48 +05:30
Xiaowen Wu
21e4d4cffc disp: msm: dp: Convert clock operations to byte2 ops
Convert clock operation to byte2 ops to meet DISPCC requirement.
Clock unit is changed from KHZ to HZ. Added link clock parent as
freq table is no longer supported in byte2 ops.

Change-Id: Iefeca1ecf7fb6335c45f7664a661d1bbe2d6f1e5
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Soutrik Mukhopadhyay <quic_mukhopad@quicinc.com>
Signed-off-by: Kashish Jain <quic_kashjain@quicinc.com>
2023-05-24 22:47:29 -07:00
Andhavarapu Karthik
0088f38efe disp: msm: add build configs for crow
Add config files for crow target and enable compilation.

Change-Id: I9877424ec6389624617881ed297297b50a3f8a35
Signed-off-by: Andhavarapu Karthik <quic_kartkart@quicinc.com>
2023-05-19 00:37:37 -07:00
Andhavarapu Karthik
ea6a5d1fbc disp: msm: sde: add rev checks for crow target
Add required revision checks from display for crow target.

Change-Id: I430b1ef07d9a3ad048eb4dd1210b0a0be12c8e9e
Signed-off-by: Andhavarapu Karthik <quic_kartkart@quicinc.com>
2023-05-18 22:30:55 -07:00
Linux Build Service Account
d3b53d1d9d Merge cff5b253c3 on remote branch
Change-Id: I23030be4c6caddc379da2652cd7cfda8b8a2bce7
2023-05-16 10:07:53 -07:00
qctecmdr
803e7b1860 Merge "disp: msm: sde: trigger a suspend commit if display in video mode" 2023-05-14 23:23:32 -07:00
Mahadevan
9d9c3342d9 disp: msm: sde: trigger a suspend commit if display in video mode
When there is runtime PM suspend and a video mode panel is Doze
state or Doze suspend state PM suspend will fail as clocks are on.
To avoid this do a suspend commit while entering runtime PM suspend
so that xo shutdown will be successful.

Change-Id: I108184bf2e5ea18ef54eab879556e9c941514176
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-05-11 03:37:23 -07:00
Mahadevan
7e6f9bdc81 disp: msm: sde: wait for pending vsync event on pm_suspend
Before pm_suspend is called when there is a vsync enable event
from sf and disabling is not done pm_suspend will fail.
Following are the commit states when a pm_suspend is called:

 1. Normal Active Commit - When an active commit is going on
    and pm_suspend is called then forcefully do a disable
    commit. This will make sure in encoder virt_disable
    wait for vsync disable is exited only after vsync is
    disabled.
 2. Suspend Commit - When suspend commit is going on
    the wait for vblank disable in encoder virt_disable will
    make sure the pending vsync event from sf is already
    triggered.
 3. Doze mode - When in doze mode in pm_suspend we will
    forcefully do a commit to change to doze suspend.
    In this case, we will make sure that the commit is
    completed and rc_idle is kicked in. There is a chance
    disabling of vblank irq is not done in this case.
 4. Doze Suspend mode- This is same as Doze Mode where
    vblank irq may not be disabled.

To resolve the issue in Case3 and 4 wait for a vblank irq is added
which will queue the vblank disable work to event_thread and make
sure the queued work is completed by doing a kthread_flush.

Change-Id: I8f9969c3865f7396d6e87819d65c7b16be73ad39
Signed-off-by: Mahadevan <quic_mahap@quicinc.com>
2023-05-10 22:52:52 +05:30