Commit Graph

113 Commits

Author SHA1 Message Date
qctecmdr
2bd58a2e46 Merge "disp: msm: sde: add explicit sub-driver mappings for TVM" 2021-06-09 02:43:04 -07:00
Jeykumar Sankaran
5ec8dc1afc disp: msm: dsi: update gpio mappings using tlmm api
Use tlmm api to retrieve and populate address mappings of
the panel gpio pins participating in the VM swtich
on Trusted UI.

Change-Id: Ibf2d13eac3fe907b729f4c2b54c63a3808022583
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-06-07 23:48:09 -07:00
Jeykumar Sankaran
77d648442f disp: msm: dsi: implement ESD trigger for trusted vm
DSI driver stubs out GPIO parsing in trusted vm. Add support
for ESD trigger in trusted vm by explicitly parsing the
reset gpio and setting the value.

Change-Id: I8c04e4b27b234eb236ec51df633c06738f2a5c96
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-06-07 23:48:01 -07:00
Lei Chen
484091de41 disp: msm: dsi: clear ctrl_flags for private DCS panel command
DSI or panel configurations might be changed dynamically, so clear
ctrl_flags of private DCS command to regenerate it according
to current display configurations.

Change-Id: Iddfcbe7f14de65ed0edf408a75b0a50bdb0a2d29
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2021-06-07 16:59:28 +08:00
qctecmdr
5bb6a168b4 Merge "disp: msm: dsi: update transfer time calculation during RSC disable" 2021-06-02 15:18:00 -07:00
qctecmdr
3f9b08b09e Merge "disp: msm: dsi: add parsing for RSC solver disable property" 2021-05-28 13:41:24 -07:00
Satya Rama Aditya Pinapala
e993215979 disp: msm: dsi: update transfer time calculation during RSC disable
If RSCC solver is disabled, the transfer time calculation can be
skip using TE jitter. This case threshold time becomes prefill
time + DCS command transfer threshold. The threshold for DCS
command transfer is configured to 40us.

Change-Id: I1260df33e9d928aacd8961bdedfcd136563a806b
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-05-24 15:54:30 -07:00
Raviteja Tamatam
3789258773 disp: msm: sde: add allowed_dsc_reservation_switch capability
This change adds allowed_dsc_reservation_switch to determine if
dsc seamless switch is supported for DP. Also, based on the
flag, it determines and populates the required number of
available resources for DP.

Change-Id: I9cd7219a50d352369c5bc8386ce7dc25c30b80b6
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2021-05-20 21:36:05 -07:00
Raviteja Tamatam
b89a3f739a disp: msm: populate submode blob information
Mode information apart from the fields in
drm_mode_modeinfo that can trigger a modeset like
dsc-nondsc, video-cmd are defined in sub mode.
For each mode in connector->modes there can be
multiple submodes.

Change-Id: Ib8697d3fa4ea5261d9ac4943b1a4149e22c4da2f
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2021-05-20 21:35:38 -07:00
Satya Rama Aditya Pinapala
134e62f655 disp: msm: dsi: add parsing for RSC solver disable property
For higher refresh, to provide higher transfer time we need to disable
RSC solver in MDP. This can be configured through the panel timing node
devicetree property. This change adds the parsing of the devicetree
property.

Change-Id: I9e708325da35086d2f955cbcc80bb164ccb116cd
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-05-20 12:24:05 -07:00
Santosh Kumar Aenugu
323f1b54d3 disp: msm: dsi: handle gpios for sim panels
For simulation panels, GPIOS are not needed for panel bootup.
This change handles GPIO parsing, toggle sequences in
simulation panels.

Change-Id: I0a3f03d1958ffe9079a7d9fef3f412e2445b0b9b
Signed-off-by: Santosh Kumar Aenugu <santoshkumar@codeaurora.org>
2021-04-26 13:37:05 -07:00
Steve Cohen
e5fa459062 disp: msm: restrict AVR_STEP based on panel requirement
Some panels require a fixed step rate for a particular mode.
This change allows DSI panels to specify a single supported
step rate for each nominal fps rate which SDE will enforce
during atomic check of AVR parameters.

Change-Id: I049415449bc88ccd396fced16d4534251eac3a06
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2021-04-04 18:45:40 -04:00
qctecmdr
133fc8a6e8 Merge "disp: msm: sde: fix potential race condition" 2021-04-01 11:12:09 -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
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
qctecmdr
a40c87b676 Merge "disp: msm: sde: enable tui flag for waipio hw catalog" 2021-03-31 13:05:06 -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
3090ffd63f Merge "disp: msm: dsi: update DSI PHY configuration to support splitlink" 2021-03-25 08:49:41 -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
qctecmdr
b2c440bffe Merge "disp: msm: dsi: use single mode for RFI feature" 2021-03-24 14:16:57 -07:00
Jeykumar Sankaran
c9ac265816 disp: msm: dsi: parse panel gpio's with dsi parser util
Panel GPIO's pins can be provided through DT or firmware data.
Use dsi parser util in consistent with other node parsings to
read their values.

Change-Id: I6dc687516aa0ce51fc56e54f4b5cbadc17f0dc1d
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-03-24 13:00:05 -07:00
Amine Najahi
c5f2bd7401 disp: msm: sde: add multi-mode RFI support
Currently, RFI feature only supports panel that contains
a single timing node. This limits the feature availability
for panel with multiple modes or with DFPS support.

This change adds support for RFI on panels that contains
multiple timing nodes.

Change-Id: I3a7aadf7b6da3518350b2eb815602b13b5c259f5
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-03-24 06:32:45 -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
Amine Najahi
50de265951 disp: msm: dsi: use single mode for RFI feature
Currently, a different dsi_display_mode is created for
each combination of RFI frequency, but only one of
those modes is reported to the user. Hence,
it is not necessary to create multiple RFI modes anymore.

This change removes code to inflate the list of modes
by the number of RFI frequencies, removes pclk from
the mode name as it will change dynamically.

Change-Id: I0714de5e53f46d9f142da1f4562f65793de38e54
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-02-17 09:39:08 -05:00
Satya Rama Aditya Pinapala
c3c683472d disp: msm: dsi: remove custom upstream MSM DSI flags
Change removes the use of custom MSM DSI flags that will not be
available as part of GKI.2.0

Change-Id: I2337a54b1d6346ebdc18e9e6c3c8e7a07f421bdd
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-01-15 17:55:19 -08:00
Lei Chen
8cdb80455f disp: msm: dsi: update panel commands for panel operating mode switch
Update panel commands to support panel operating mode switch in
one timing node.

Change-Id: Ieb8303cebe78c699dfd5f274830418e87655ff56
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2021-01-13 07:43:52 -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
Samantha Tran
262099e94a disp: msm: replace kzfree with kfree
This change replaces kzfree with kfree as kzfree has been
renamed.

While moving to the latest 5.10 tip, additional small changes
were required to resolve compilation issues:

set_dma_ops has moved from dma-mapping to dma-map-ops header.
This change includes the new header file required.

drm_panel_add returns void, this change removes the expected
return value check.

drm_prime_pages_to_sg takes an additional parameter. This change
passes in the drm_device pointer the function is looking for.

Remove an unused variable in sde_crtc vblank function.

Change-Id: I47c085c0cb64432873c2e750ae64cbdc2b5340da
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2020-12-22 10:42:18 -08:00
Samantha Tran
da5f5ff1ae disp: msm: fix always true/false conditionals
Remove unnecessary error conditionals that are
always true or false.

Change-Id: Ied1041b3165647364b741d3d95edca85039491c2
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:58:38 -05:00
Samantha Tran
df3f51f9c4 disp: msm: replace PTR_RET with PTR_ERR_OR_ZERO
Commit fad7c9020948 ("err.h: remove deprecated PTR_RET for good")
deprecated PTR_RET. This change updates the msm driver by
replacing it with PTR_ERR_OR_ZERO.

Change-Id: Ibe8cefd7b9ce27dc63886eb3861aab5fc8ba268a
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:58:38 -05:00
Samantha Tran
d2aea44026 disp: msm: dsi: drm_panel_init parameter change
Commit 6dbe0c4b0fc0 ("drm/panel: Initialise panel dev and funcs
through drm_panel_init()") and commit ba2fad4c9648 ("drm/panel:
Add and fill drm_panel type field") modify input parameters for
drm_panel_init. This change updates the relevant changes to the
dsi driver by passing in the device and panel type.

Change-Id: I76a271fea08190bd8633831442ca48882f8a97e6
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:25:54 -08:00
Veera Sundaram Sankaran
c99f3fd6ae disp: msm: dsi: enable ESD trigger through debugfs in trsuted-vm
Add support to trigger ESD through debugfs by directly
modifying the reset GPIOs TLMM register in trusted-vm as GPIO
driver support is not enabled.

Change-Id: I859affe69c13dbe115a48b0a63a600a57027db58
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-12 23:34:22 -08:00
Veera Sundaram Sankaran
6dd2c3cd87 disp: msm: dsi: parse & store gpio registers used by the host & panel
Parse all the GPIO pins used by the DSI host and the display panel
along with its register ranges and store it in panel struct. This
avoids parsing the device-tree everytime during transitions between
trusted and primary vm.

Change-Id: Ibbb646358c0409703afda1c4f758f044fc8c0001
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-12 22:27:10 -08:00
Satya Rama Aditya Pinapala
bbe18a1689 disp: msm: dsi: batching multiple DSI commands using debugfs node
The change batches DSI commands sent using the debugfs node, in a
separate buffer from the TX command buffer to ensure that they are not
triggered before the last command bit is set. Once the last command
bit is set the buffer is then copied to the DSI TX buffer and triggered.

Change-Id: I9ba624e4e19341696a974994817603315c6c8a45
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-10-21 15:25:48 -07:00
Raviteja Tamatam
e5ff0b8f30 disp: msm: sde: add support for qsync min fps list
In current implementation qsync min fps is single value.
It is same for all the list of supported dfps list.
Added support for new dt entry dsi-supported-qsync-min-fps-list
corresponding to the fps supported in the dfps list
dsi-supported-dfps-list.

Change-Id: Ifd5309c2f51865a3c0d9fadb65cbcd291b6ef42b
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-10-15 12:32:25 +05:30
Rajeev Nandan
19a54c5650 disp: msm: dsi: enable xlog in critical paths
Enable xlog in critical paths to increase debug coverage.

Change-Id: I177acd3f2c2ab349f533bb9fbd8a8122539d524b
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2020-09-16 13:00:11 +05:30
qctecmdr
20db960f01 Merge "disp: msm: dsi: do not enable PWM when setting bl to 0" 2020-09-09 18:55:26 -07:00
Zhao, Yuan
8050179062 disp: msm: dsi: do not enable PWM when setting bl to 0
Check backlight value, if it's 0, do not enable PWM.

Change-Id: I6fccb42555731bf3faa88a93cbf1a36a417ff49d
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
2020-09-08 19:02:14 -07:00
Ritesh Kumar
269ead80c7 disp: msm: dsi: Add support to keep display reset pin high
This change adds support to keep display reset pin high during
suspend state.

Change-Id: I8fab43d8f7b30fce72cc95277d016b72b914aa99
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 19:14:56 -04:00
qctecmdr
ead6a35953 Merge "disp: msm: dsi: add parsing logic for panel gpio pins/address" 2020-08-21 12:36:22 -07:00
qctecmdr
86d25d0c03 Merge "disp: msm: dsi: update min prefill lines for lahaina" 2020-08-21 12:36:22 -07:00
Veera Sundaram Sankaran
30757e8c8a disp: msm: dsi: add parsing logic for panel gpio pins/address
Add parsing code for getting the TLMM base address and size
of each GPIO pin register space along with the GPIO pins
used for the specific panel. This list is used to lend
these IO ranges to trusted vm during the trusted UI usecase.

Change-Id: I10429cfa14265d52e898815c6cf94be27daa5677
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-08-17 09:47:49 -07:00
Yuan Zhao
c810238fb4 disp: msm: dsi: support LP mode for DCS brightness setting
DCS brightness settng can only use HS mode. Add a new
DT property for LP mode choose for DCS brightness setting.

Change-Id: Ibe5867fe344776871eb3a410a8d79d347775f3d4
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-08-12 23:08:06 -07:00
Satya Rama Aditya Pinapala
ec6f97fd9d disp: msm: dsi: update min prefill lines for lahaina
Change updates minimum prefill lines for lahaina target.

Change-Id: Ic3c4f498eb2b73ddfc4445d94850c72dd242d575
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-08-06 17:26:26 -07:00
Satya Rama Aditya Pinapala
50af1eb43b disp: msm: dsi: add support for DMA CMD scheduling for CMD mode panels
The change allows for configuring a command DMA window during which
the command is triggered. The DMA window must not intersect with the
MDP tear check window. Once the command transfer is successful, the
trigger control needs to reset to the default DMA trigger specified
by the panel.

Change-Id: I5485ca1f8e141ed92dc8c77c2daf579634271022
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-08-05 20:31:24 -07:00
qctecmdr
da06015241 Merge "disp: msm: dsi: update MDP/DSI transfer time calculation" 2020-07-24 14:10:39 -07:00
Yuan Zhao
b54107cfa3 disp: msm: dsi: add a new PWM pinctrl configure
The default PWM gpio pin mode was not right for PWM backlight
control. If needs to use PWM backlight, must config the
gpio pinctrl.

Change-Id: I5fd6b947d379b53ef4c358be1b935a2ad4970f99
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-07-23 19:54:02 -07:00
Satya Rama Aditya Pinapala
ab5d2638de disp: msm: dsi: update MDP/DSI transfer time calculation
This change ensure that in cases panel transfer time is specified,
the final transfer time is calculated in accordance with the minimum
threshold time allowed.

Change-Id: I3442d4d3e8a27ec30d93725cb96b229bb94f2ce2
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-07-23 18:55:40 -07:00
Satya Rama Aditya Pinapala
19c01f38bc disp: msm: dsi: drive backlight enable gpio low during power off
Change drives the LCD panel backlight enable GPIO low during panel
power off sequence.

Change-Id: Icfd22cf8d5216fcff857bbeab9c183dfb02b83bd
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-07-19 23:14:20 -07:00
Jeykumar Sankaran
4b27380f07 disp: msm: dsi: reuse continuous splash path for trusted vm
Display in trusted VM works in a handover mode i.e, all
display components need to be initialized by the primary VM
before switching to trusted VM on the usecase boundary.
That makes it a hard requirement for the trusted VM not to
re-program any of the display configuration registers before
it could hand the HW back to the primary VM.

Also, most of the linux framework drivers including pintrl, clocks
are not enabled in the trusted VM.

In order to address the above two limitations and to control the
probe/commit sequences, this change adapts the same path as that
of continuous splash to bypass some of the critical functions
which are identified to be HW intrusive. Based on the DT property
read from SDE handle, dsi drivers will choose to bypass
enable/disable HW state updates when executing in the vm environment.

Change-Id: Ica71c924d189ab65fe3be5b0ac870633e3b749e1
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-07-12 15:00:09 -07:00