Commit Graph

2091 Commits

Author SHA1 Message Date
qctecmdr
133fc8a6e8 Merge "disp: msm: sde: fix potential race condition" 2021-04-01 11:12:09 -07:00
Ping Li
7ed51b95a2 disp: msm: sde: fix potential race condition
Move the hist irq handling out of callback function, i.e., the hw
interrupt irq_lock context, to avoid dead lock between crtc spin_lock
and irq_lock. This change also extends crtc spin_lock coverage in
_sde_cp_crtc_enable_hist_irq to prevent null pointer dereference on
event node, which can be deleted during crtc event de-registration.

Change-Id: Iadaed54ab93c4c4abe065a8762d2addccb0c65c6
Signed-off-by: Ping Li <pingli@codeaurora.org>
2021-03-31 16:07:40 -07:00
Ritesh Kumar
b02eea56af disp: msm: dsi: update CPHY command mode clock calculation
In CPHY, packet header and checksum is sent twice and SYNC is
sent in between two headers. So, increase packet overhead used
in clock calculation to 15 bytes. Packet Header: 8 bytes,
CRC: 4 bytes, SYNC: 2 bytes and dcs command: 1 byte.

Change-Id: I7a1160cbb57ba4f1faeb4b36a16c322e6069d58f
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-03-31 16:01:26 -07:00
Yashwanth
0a70e05ee5 disp: msm: sde: remove static access specifier for sde_dbg_base
In DLKM builds, all the display symbols are included as part
of msm_drm.ko and symbols are dynamically linked while
loading ramdumps. This change removes static specifier for
sde_dbg_base in order to access the variable from ramparser
and extract the required logs with the help of ramparser
tool and also in automation stability runs.

Change-Id: I3eae0bc9db3bd285642bf9f7930a31ab47c446e3
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-03-31 15:25:21 -07:00
Jayaprakash
ef3a66389b disp: msm: sde: fix null dereference in drm_atomic_get_property
Add changes to fix the null dereference in
drm_atomic_get_property caused by connector->state
being NULL. This change allows the drm_mode_config_reset
operation to happen before drm_dev_register to avoid this.
In current scenario, connector->state->crtc is being
accessed due to call to drm_mode_getconnector ioctl with
the drm_mode_config_reset operation pending.

Change-Id: I374d9485819fad85100d1837f4ae22fc2a3ccc40
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2021-03-31 15:25:12 -07:00
Jayaprakash
b769b30b97 disp: msm: sde: add changes to wait for only one WB_DONE irq
With WB encoder 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"),
sde_kms_wait_for_commit_done during CWB usecase is causing
crtc_commit thread to wait for two WB frame done irqs causing
janks on primary. Add changes to unblock crtc_commit thread and wait
for only one WB frame done irq.

Change-Id: Ie298302fea9df8ba5a1c2fa04f5f585ae455e0c9
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2021-03-31 15:25:03 -07:00
Jayaprakash
7f568a8d71 disp: msm: sde: allow delayed_off_work scheduling always
Add changes to allow delayed_off_work scheduling in all cases.
Skip scheduling only in panel_dead cases where delay_kickoff
is enabled. This will fix the issue seen with commit 08d04c2f3bae
("disp: msm: sde: avoid rc restart when triggered from panel dead").

Change-Id: I4c9a7cd26af9d99ecd3f58023a6fb6d041d91e92
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2021-03-31 15:24:55 -07:00
Mahadevan
bc86c9a0cc disp: msm: sde: avoid rc restart when triggered from panel dead
This change prevents scheduling of rc_restart in case of
panel dead. This early return is required to avoid the list
add corruption when a race condition happens between event
thread and commit thread. When event thread is handling
display failure notification if the virt_enable arrives in
commit thread it will reinizialize kthread for
delayed_off_work without deactivating the existing list
which leads to linkage corruption.

Change-Id: I41d08cd47ba6f887f0860e52bcddf414085524bb
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2021-03-31 15:24:48 -07:00
Yashwanth
43d147f299 disp: msm: sde: save register write logs in dump
Changes are made to add register write logs to memory dump.
This can be extracted from crash dumps and used for analysis.

Change-Id: If46aaa4ae68f83c79d4b51cbe5dfd22340aa991d
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-03-31 15:02:54 -07:00
Rajeev Nandan
bb66bea78f disp: msm: dsi: fix boot display name parsing
The boot_disp_en flag for secondary display is getting enabled
all the time, even if its boot_param string is empty.
Correct the boot display name parsing from boot_param string
to fix this issue.

Change-Id: Ica1465611f592b22518061987571919838914891
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2021-03-31 15:02:47 -07:00
Lipsa Rout
46fb68a8f1 disp: msm: dsi: Update ctrl & phy refcounts for defer probe
ctrl and phy refcounts get incremented even on deferring probe
for display panels which need backlight through wled.As a
result, while probing, it considers that the device is already
in use. This change decrements the ctrl and phy refcounts for
defer probe.

Change-Id: Ica1f5712dd28ed4c635946f2ac89d5f4f074a4c5
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
2021-03-31 15:02:35 -07:00
Andhavarapu Karthik
3aa443223b disp: msm: sde: disable uidle for yupik target
Made changes to disable uidle feature in yupik target.

Change-Id: If122a86ed14002399e2dbd0b62385d47c854136f
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-03-31 15:02:24 -07:00
Narendra Muppalla
21f527d47d disp: msm: sde: use different spin lock for frame events
Due to lock sequence inconsistency between sde_crtc->spin_lock and
sde_kms->hw_intr->irq_lock can cause deadlock, to avoid this possible
deadlock this change uses different spin lock for frame events.

Change-Id: I51b1184dfa1069c87653099b95b992b277721daf
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2021-03-31 15:02:14 -07:00
Dheeraj Madiraju
f5148f4a7c disp: msm: sde: add hdr flags for yupik
Add hdr flags for yupik.

Change-Id: Ica8d752499dae5d80d99f3f0caccbbfed4e539ec
Signed-off-by: Dheeraj Madiraju <dmadiraj@codeaurora.org>
2021-03-31 15:01:59 -07:00
Andhavarapu Karthik
1ee9dc4a55 disp: msm: sde: add rev check for mdp in yupik target
Add required revision checks for mdp in yupik target.

Change-Id: I2747a0addfb3b4880397d56b18a9e9aa9644df34
Signed-off-by: Andhavarapu Karthik <kartkart@codeaurora.org>
2021-03-31 15:01:00 -07:00
Raviteja Tamatam
090b3ad235 disp: msm: sde: perform cmd encoder disable only for master
In dual DSI cases sde_encoder_helper_phys_disable needs to be
called only for master encoder.

Change-Id: If2d327a4800914fe365c6877bf7854275a4434ae
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2021-03-31 14:59:40 -07:00
Veera Sundaram Sankaran
159e5d8123 disp: msm: dsi: add stub function parse power_cfg in trusted-vm
In trusted-vm, there are no power cfg entries in device-tree as
there is no support. Add stub function to avoid parsing errors
related to power cfg in trusted-vm.

Change-Id: Id28ad9a4d5608d561e22b318a08c6bc1ccc5f2ee
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-31 14:59:22 -07:00
Veera Sundaram Sankaran
04fea2ede3 disp: msm: dsi: avoid debugfs HW access based on HW ownership
Add VM ownership checks before accessing the HW through the debugfs
path in dsi display/ctrl modules to avoid illegal access.

Change-Id: Ia6e2ab0ef60d0f11e5945a63885d939db2ef78b0
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-31 14:58:34 -07:00
Veera Sundaram Sankaran
b261fe33db disp: msm: avoid sde_dbg HW access based on HW ownership
Add VM ownership checks before accessing the HW through the debugfs
path in sde dbg module to avoid illegal access. Set the ownership
status on bootup based on the VM.

Change-Id: I30f2a1eb7e049740f1f7fe3ed03aa411264ba7b3
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-31 14:57:04 -07:00
Veera Sundaram Sankaran
d26e510b77 disp: msm: sde: avoid sde debugfs register access based on HW ownership
Add VM ownership checks before accessing the HW through the debugfs
path in sde crtc/encoder/connector modules to avoid illegal access.

Change-Id: I4ff8f29353835d263beb2091bdeec40125addbf8
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-31 14:56:57 -07:00
qctecmdr
a40c87b676 Merge "disp: msm: sde: enable tui flag for waipio hw catalog" 2021-03-31 13:05:06 -07:00
qctecmdr
c215cee1e0 Merge "drm/msm: remove msm_gem_free_work" 2021-03-31 11:56:53 -07:00
qctecmdr
9a6cf71691 Merge "disp: msm: dsi: add qsync fps value to the connector blob" 2021-03-31 10:25:48 -07:00
qctecmdr
467493d9d8 Merge "drm: msm: Add mmrm api to display" 2021-03-30 03:41:05 -07:00
qctecmdr
c7ec7ac299 Merge "disp: msm: dp: fix mode filtering for 4K120" 2021-03-30 02:33:20 -07:00
qctecmdr
289fefb14a Merge "disp: msm: fix compilation issues for out of tree compilation" 2021-03-30 01:22:38 -07:00
qctecmdr
71067d8b83 Merge "disp: msm: sde: add proper null checks before hw_intf access" 2021-03-30 00:11:19 -07:00
qctecmdr
10766ebd0f Merge "disp: msm: sde: provide rm status through debugfs node" 2021-03-29 23:04:55 -07:00
Samantha Tran
dc162469ab disp: msm: sde: add proper null checks before hw_intf access
This change adds proper null checking before trying to access
hw_intf pointer.

Change-Id: Id1817dca24c176c0c97bf7d637ca08da31693c37
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-03-29 22:58:37 -07:00
qctecmdr
f42268675d Merge "disp: msm: dsi: add indexing for panel timing nodes" 2021-03-29 21:13:27 -07:00
Rajkumar Subbiah
efea534641 disp: msm: dp: avoid setting multi_func when pin value is zero
During dp altmode driver initialization, the dp altmode driver is called
with a null data packet. Even though this callback indicates a disconnect,
the multi function flag is incorrectly set to true. If the DP is enabled
later using simulation mode, the multi function flag is not cleared thereby
limiting the lane count to 2 irrespective of capability applied through
DPCD.

This change checks for the zero pin value while setting the multi function
flag.

Change-Id: I974fbf1630eed26f406ac9e4c99140b27f0cb635
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2021-03-29 17:57:08 -04:00
Sudarsan Ramesh
a89e5da1c9 disp: msm: dp: copy sink_dsc_caps object in mst connector install
In an MST DSC setup, the sink_dsc_caps object is read into the base
panel. In the process of creating different connectors and panel
objects, the sink_dsc_caps panel object is not copied correctly to
the new panel objects. This causes an error where a fallback DSC
version is used.

This change correctly copies the sink_dsc_caps object over to the
panel for the MST connector from the base connector.

Change-Id: I66af823bbe08c8b1fbd68d628e759416162e9d53
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-03-29 17:31:26 -04:00
Rob Clark
245ac819b6 drm/msm: remove msm_gem_free_work
Now that we don't need struct_mutex in the free path, we can get rid of
the asynchronous free all together.

Change-Id: I82406450e3a5d0d49d3fb753c621f55e8f4af088
Signed-off-by: Rob Clark <robdclark@chromium.org>
Git-commit: c951a9b284b907604759628d273901064c60d09f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-03-29 13:17:21 -07:00
Rob Clark
fd50a1ec69 drm/msm: Add priv->mm_lock to protect active/inactive lists
Rather than relying on the big dev->struct_mutex hammer, introduce a
more specific lock for protecting the bo lists.

Change-Id: I4c876a1c3ae51ff62372703a99a8daff0c4a7950
Signed-off-by: Rob Clark <robdclark@chromium.org>
Git-commit: d984457b31c4c53d2af374d5e78b3eb64debd483
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[samtran@codeaurora.org: avoid changes related to debugfs and shrinker]
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-03-29 13:16:53 -07:00
Kristian H. Kristensen
a145e793b2 drm/msm: Implement .gem_free_object_unlocked
We use a llist and a worker to delay the object cleanup. This avoids
taking mmap_sem and struct mutex in the wrong order when calling
drm_gem_object_put-unlocked() from drm_gem_mmap().

Fixes lockdep problem with copy_from_user() in msm_ioctl_gem_submit().

Change-Id: Idfe54ae8108158b69f3835f26991642d1e21f8ee
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Git-commit: 48e7f18392c66f9b69ebac11c54f1a2e033ced54
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[samtran@codeaurora.org: resolve trivial merge conflict]
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-03-29 10:47:03 -07:00
Satya Rama Aditya Pinapala
2fec1685d0 disp: msm: dsi: add indexing for panel timing nodes
The order of the panel timing nodes specified in the device tree is
not guaranteed to be the same while being parsed in the driver. This
results in unintended modes being set as preferred timing mode. The change
introduces cell-index property, so that the timing modes can be
accurately indexed and parsed.

Change-Id: I8ccd4d5a15643bfe72bc8be084f5e91fac26feb4
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-03-26 16:04:48 -07:00
qctecmdr
19e9831a45 Merge "disp: msm: sde: modify SDE_DBG_DUMP to use blk_mask instead of blk_name" 2021-03-25 14:22:21 -07:00
qctecmdr
3090ffd63f Merge "disp: msm: dsi: update DSI PHY configuration to support splitlink" 2021-03-25 08:49:41 -07:00
qctecmdr
abd8dbd256 Merge "disp: msm: add support for splitlink in sde drm" 2021-03-25 08:49:41 -07:00
Vara Reddy
fcb3849c69 disp: msm: dsi: update DSI PHY configuration to support splitlink
Change updates DSI PHY programming sequence for splitlink configuration.

Change-Id: I708cf83717c6f640c918d41cc122794a10f979ba
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2021-03-24 23:15:52 -07:00
Vara Reddy
142bb24d7c disp: msm: dsi: add support to send commands to each sublink
Change adds support for transferring commands to each sublink.

Change-Id: Iefc0dca7343325cdfe0cf48d41d50e6e2a13bc05
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2021-03-24 23:15:25 -07:00
Vara Reddy
13b88147a1 disp: msm: dsi: add support for splitlink sublinks video data swap
Change adds support for enabling splitlink sublinks video data swap.

Change-Id: I731b85a5e8fe8638005433819957dd0658f72963
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2021-03-24 23:14:53 -07:00
Vara Reddy
02a4648999 disp: msm: add support for splitlink in sde drm
Change adds support for splitlink and disables
dsc merge or 3dmerge which is not needed for splitlink.

Change-Id: I77a794d3ea6f53988f493a7af792add81abb22f0
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2021-03-24 22:15:38 -07:00
qctecmdr
2177667f89 Merge "disp: msm: sde: remove rotator llcc" 2021-03-24 16:52:43 -07:00
Jeykumar Sankaran
c3959896c3 disp: msm: sde: enable tui flag for waipio hw catalog
Enable trusted vm flag for waipio HW catalog.

Change-Id: I7cd5ba0354e2ed66a21f5f3b923c1855af1a0f14
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-03-24 15:24:53 -07:00
Jeykumar Sankaran
5960a1b8b5 disp: config: enable CONFIG_DRM_SDE_VM for waipio
Enable CONFIG_DRM_SDE_VM to enable trusted VM support
for waipio target.

Change-Id: I4d70b3a84f7b612390f5a9925330cf77929b6e7b
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-03-24 15:24:49 -07:00
qctecmdr
b2c440bffe Merge "disp: msm: dsi: use single mode for RFI feature" 2021-03-24 14:16:57 -07:00
qctecmdr
ee2a505703 Merge "disp: msm: dsi: defer clk setting when doing const_fps RFI" 2021-03-24 14:16:57 -07:00
qctecmdr
7d1ca7c295 Merge "disp: msm: sde: add multi-mode RFI support" 2021-03-24 14:16:57 -07:00
qctecmdr
b884dbf3e7 Merge "disp: msm: dsi: Fix DFPS sequence when constant fps is enabled" 2021-03-24 14:16:57 -07:00