Commit Graph

2211 Commits

Author SHA1 Message Date
Linux Build Service Account
f035d89da8 Merge "disp: msm: sde: fix set property retire fence return code" into display-kernel.lnx.5.10 2021-04-02 09:48:51 -07:00
Linux Build Service Account
e6a3b40d7a Merge "disp: msm: dp: pass correct vdo value to the simulate_attention cb" into display-kernel.lnx.5.10 2021-04-02 08:08:03 -07:00
qctecmdr
6aa0fabaf3 Merge "disp: msm: dsi: change rule to initialize display in firmware" 2021-04-01 22:56:00 -07:00
qctecmdr
b0d2030f38 Merge "display: msm: sde: update qos lut after scaler config" 2021-04-01 22:56:00 -07:00
qctecmdr
de293ac6a9 Merge "disp: msm: sde: do on demand registering for te irq" 2021-04-01 20:45:27 -07:00
qctecmdr
7dd54040fe Merge "disp: msm: dsi: fix DSI PLL configuring sequence" 2021-04-01 15:30:13 -07:00
Satya Rama Aditya Pinapala
95b04d09fe disp: msm: dsi: fix DSI mode index parsing
The change fixes DSI mode index parsing required for setting
preferred node.

Change-Id: I6f91543843e697491c68d89b22103b2ac281e936
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-04-01 13:13:22 -07:00
qctecmdr
133fc8a6e8 Merge "disp: msm: sde: fix potential race condition" 2021-04-01 11:12:09 -07:00
Amine Najahi
e3597ef9a0 disp: msm: sde: fix set property retire fence return code
Change return code in set property retire fence function
to properly handle the cases when the user value is 0.

Change-Id: I32481ba6bdb13df707cf36a70aa2d49506cd7d7c
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-04-01 14:05:58 -04:00
Sudarsan Ramesh
3bb21d12c2 disp: msm: dp: pass correct vdo value to the simulate_attention cb
In DPSIM, while calling the hpd callback from dp_sim_host_hpd_irq,
the hpd argument is passed in as false. In the hpd callback, both
the hpd_irq and hpd arguments need to be encoded into the vdo
parameter. Currently, MST DPSIM testcases are broken because this
is not implemented properly.

This change sets the hpd argument to true in the hpd_irq callback, and
encodes the hpd and hpd_irq parameter in the vdo object before passing
it to the simulate_attention callback.

Change-Id: I07155716699aad8554b6e08b446139bcd0d7fa74
Signed-off-by: Sudarsan Ramesh <sudarame@codeaurora.org>
2021-04-01 12:28:44 -04:00
Samantha Tran
ebedf4b7f4 disp: msm: dsi: expand matching requirements to find DSI mode match
This change expands on the checks comparing different dsi modes.
Previously, only h and v active and refresh rate were checked to
decide if a matching mode is found. Now the check will include
all h and v components in dsi_mode_info.

Change-Id: I6a4ca3456138c38615fbd5c50dfd9658cc3a2119
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-04-01 09:21:59 -07:00
Rajeev Nandan
329b8bc7ee disp: msm: dsi: change rule to initialize display in firmware
Request for display in firmware only if no display enabled form
the UEFI.

In the targets supporting dual DSI display having both displays
DT nodes part of the connector list, if only one display is
enabled from the UEFI, then the driver requests for display
in firmware for the second display. Getting the display panel node
from firmware is time taking process, and it can take up to
ten seconds. This causes a delay in adding the component for the second
display, resulting in a delay in bind calls for components of the
msm drm driver.

Change-Id: Ic0aa5ca890fc874d38d3e7eef745f2942e12f9bc
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2021-03-31 17:41:05 -07:00
Abhijit Kulkarni
559620308e display: msm: sde: update qos lut after scaler config
This change moves the code of updating the qos lut for qseed3
to each plane after updating the scaler configuration. This
avoids using stale values for qos settings.

Change-Id: I2c55a98e1ba9790d596c55160933cd5afd2388e5
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2021-03-31 17:32:30 -07:00
Xiaowen Wu
2f36a8f57a disp: msm: sde: add scaler3_cfg and pixel_ext to sde plane
Add scaler3_cfg and pixel_ext to sde plane to avoid updating state
variables in commit thread. This fixes atomic check failure when
scaler lut is not set.

Change-Id: I936b124ca6f90af22a87df31536204e837422a70
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2021-03-31 17:31:44 -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
Satya Rama Aditya Pinapala
7471069739 disp: msm: dsi: fix DSI PLL configuring sequence
Change fixes issues with the recalculation and DSI PHY PLL
toggle sequences while using continuous splash.

Change-Id: I6e63dd176e3ad5160b4df9f2da6d981951b696ab
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-03-31 15:20:15 -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
Shashank Babu Chinta Venkata
b8223cc869 disp: msm: sde: do on demand registering for te irq
Register and unregister te irq only during a ping
pong timeout to check the health of panel.

Change-Id: I38d7f178b55d252840aad6fae08b5f34296d75ab
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-03-31 14:04:07 -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