Commit Graph

244 Commits

Author SHA1 Message Date
Satya Rama Aditya Pinapala
095f5dd58a disp: msm: dsi: prepare resources for cmd transfer at the start of the cmd packet
For batched commands, prepare resources at the start of the command packet and not for the
command with LAST_COMMAND flag set.

Change-Id: Ibbb0d1d1acd4ddeebd07bf9dd6ea1a949edd8d02
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-07-22 10:37:58 -07:00
Yashwanth
981508c215 disp: msm: dsi: use dynamic memory allocation for dsi_display_mode_priv_info variable
This change adds dynamic memory allocation/free for struct
dsi_display_mode_priv_info variable as it is only temporary
variable to find mode and also reduces stack consumption in
dsi_display_find_mode function.

Change-Id: I2116757f11614f9e8406ddfdb08b5a4b6292cfea
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-07-08 22:13:22 -07:00
qctecmdr
bb76263607 Merge "disp: msm: dsi: add warning message for rx debugfs commands during suspend" 2021-06-30 21:31:16 -07:00
Satya Rama Aditya Pinapala
38a94cc558 disp: msm: dsi: add warning message for rx debugfs commands during suspend
Change adds a check to return a warning rather than an error during a
debugfs read command transfer while the device is suspended.

Change-Id: If65ba642f73f4c8e6b9609bbed6e376ef7836145
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-06-30 15:44:28 -07:00
Ritesh Kumar
fabb811119 disp: msm: dsi: Remove unused for loop in ESD reg read validation
In ESD register read validation, a for loop is used to increment a
local variable with the length of ESD command. But this is unused
in the validation of the read data. This change removes the unused
for loop.

Change-Id: I6d1a9233061ee33a2b5390e2f922a2412af7d605
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-06-29 23:20:47 -07:00
qctecmdr
8b0b1d1c51 Merge "disp: msm: update debug log for color processing features" 2021-06-25 01:58:00 -07:00
Ping Li
e96b53ea1f disp: msm: update debug log for color processing features
Replace the DSI_DEBUG logs with pr_debug logs for backlight related
color processing features. DSI_DEBUG logs cannot be enabled dynamically
by the /sys/kernel/debug/dynamic_debug/control sysfs node, hence move to
pr_debug instead.

Change-Id: I6a6e2fcd81cacef9e5ec7c061fae8f4cf2b7106d
Signed-off-by: Ping Li <pingli@codeaurora.org>
2021-06-24 11:55:23 -07:00
Yuan Zhao
ffd7e1d4b1 disp: msm: dsi: only check clock lane ulps status for DPHY
Clock lane can enter ino ULPS mode only in DPHY mode. For
CPHY, did not need to check the clock lane status for ULPS.

Change-Id: Iceddd8064ec75ce26613469cfb1bde36e883f865
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2021-06-24 14:58:23 +08:00
Michael Ru
f206e6f921 disp: msm: dsi: remove unsupported PHY versions
Removes files and version checks for unsupported DSI PHY versions.

Change-Id: I47223a3860e3bcf48eb3b74e405064d8eb375f16
Signed-off-by: Michael Ru <mru@codeaurora.org>
2021-06-21 17:39:20 -04:00
Linux Build Service Account
2a08ea7da0 Merge "disp: msm: dsi: fix illegal memory access " into display-kernel.lnx.5.10 2021-06-16 15:18:38 -07:00
qctecmdr
9685e229a2 Merge "disp: msm: dsi: fix gpio warning message" 2021-06-11 14:26:06 -07:00
Satya Rama Aditya Pinapala
4f604d5c21 disp: msm: dsi: fix illegal memory access
The priv_info for dsi_display_mode is assigned to NULL after use, so
that it cannot be outside the dsi_find_mode function.

Change-Id: Ifacd1f1ea4edab1e6659b42522c5f216676a9a01
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-06-10 12:37:36 -07:00
qctecmdr
d66e86af95 Merge "disp: msm: dsi: enable DCS command ASYNC wait for video mode panels" 2021-06-09 04:48:39 -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
Santosh Kumar Aenugu
8d9384423c disp: msm: dsi: fix gpio warning message
At present, the sim panels and physical panels booting up as sim
panels have a call flow issue causing reset gpio to be set in the
panel reset sequence even without valid reset gpio. This causes
GPIO warnings as it tries to set value for invalid reset GPIO.
The following change fixes these GPIO warnings, by checking
valid reset GPIO before setting value.

Change-Id: Id8f54a563c61dd3d244d31b10081042e376287d4
Signed-off-by: Santosh Kumar Aenugu <santoshkumar@codeaurora.org>
2021-06-07 17:18:10 -07:00
qctecmdr
1b9345b3af Merge "disp: msm: sde: add support for digital dimming" 2021-06-02 17:20:03 -07:00
Satya Rama Aditya Pinapala
78ec57538d disp: msm: dsi: enable DCS command ASYNC wait for video mode panels
With the new design of moving clock voting and command engine state
transition to DSI controller APIs, asynchronous wait after a command
transfer can now be supported on video mode panels.

Change-Id: Idec665fc5e9e8dadf20a77f9b1edbb685563eb4d
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-05-27 16:44:35 -07:00
Satya Rama Aditya Pinapala
aecc86dfb2 disp: msm: dsi: add pre and post DSI command transfer controller APIs
To transfer a command on the DSI lanes, the following programming needs
to happen prior and post a command transfer:
- Vote/Unvote for clocks
- Enable/Disable command engine
- Mask/Unmask overflow and underflow errors.
These operations are done from the display context currently. This can
lead to issues during an ASYNC command wait, where in we queue the
dma_wait_for_done rather than wait in the same display thread.

The following change adds new DSI controller API that does the above
programming from the controller context. This way, post command transfer
operations can only happen once command is successfully transferred and
dma_wait_for_done completes.

Change-Id: I61db0d8a2656dc6e0e56864dbef01283b813d7c6
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-05-27 16:42:04 -07:00
Samantha Tran
f74a09e94d disp: msm: dsi: disable ESD te_signal_check option
While altering ESD check to te_signal_check, return error
as this option is no longer allowed and should not
change ESD mode.

Change-Id: I32a9a47aba4e41451ba3d8ffc1eeba41d9f547d7
Signed-off-by: Samantha Tran <samtran@codeaurora.com>
2021-05-26 12:02:59 -07:00
Ping Li
9a17c5783b disp: msm: sde: add support for digital dimming
Add a new connector property to allow DC dimming feature to set
dimming backlight LUT. This change also adds a connector event
for client to register for backlight info needed for digital dimming
feature, including OS brightness, OS brightness_max, panel_backlight,
panel_backlight_max, and scale factors from ABA and LTM features.

Change-Id: I78f713fb2b965ca24effd973b4dfa9ff07a852f8
Signed-off-by: Ping Li <pingli@codeaurora.org>
2021-05-25 16:16:18 -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
Yashwanth
7e03fb61fd disp: msm: add support for seamless dsc switch
This change adds logic to determine dsc switch based on
the connector property "CONNECTOR_PROP_DSC_MODE" and
performs seamless DSC switch if there is any change in
DSC configuration. The connector property is populated
in msm_sub_mode based on which suitable mode is selected.

Change-Id: Ifc4931f16dfb814781bc1d72b103e09103e6bfee
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-20 21:34:27 -07:00
qctecmdr
1961183b41 Merge "disp: msm: dsi: check for null pointer during debugfs deinit" 2021-05-19 09:23:00 -07:00
qctecmdr
26327ae64b Merge "disp: msm: dsi: avoid PLL configure and toggle during TUI" 2021-05-19 09:23:00 -07:00
Shashank Babu Chinta Venkata
6c16356706 disp: msm: dsi: check for null pointer during debugfs deinit
Add null pointer check for debugfs deinit during
unbind path. Additionally, fix debugfs init to
not free debugfs directory unintentionally.

Change-Id: I430fe8810608a8e56d6d02e996044e69b4116421
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-05-17 12:53:46 -07:00
qctecmdr
394040535c Merge "disp: msm: dsi: skip panel read for simulation panels" 2021-05-16 21:28:57 -07:00
qctecmdr
ceba43ca89 Merge "disp: msm: dsi: avoid te check for simulator panel" 2021-05-16 17:35:53 -07:00
Satya Rama Aditya Pinapala
d7bcdcd91a disp: msm: dsi: add more info to display bind logs
Change adds more panel and display information during the DSI
display bind.

Change-Id: I3571244501149a95ea4f6ab0e496112199f7bbde
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-05-13 00:12:27 -07:00
Satya Rama Aditya Pinapala
dee1d7802f disp: msm: dsi: skip panel read for simulation panels
For simulation panels read commands need to be avoided. The change
also adds and substitues sim panel check with a new is_sim_panel API.

Change-Id: Idafdad8a852cad87d97bbc64e9c7cb82460e25b7
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-05-11 15:41:49 -07:00
Shashank Babu Chinta Venkata
30be58de15 disp: msm: dsi: avoid te check for simulator panel
Avoid registering for te interrupts to check te status
for ESD detection during commit failure path.

Change-Id: I447473f7c32a396f72d838c68287bed0eda64b20
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-05-10 12:31:14 -07:00
Satya Rama Aditya Pinapala
6bebbc2e05 disp: msm: dsi: avoid PLL configure and toggle during TUI
The change ensures that during a Trusted UI case, configuring
and toggling the DSI PHY PLL is skipped.

Change-Id: I3246c8e5f01d47ac6fd58098f859ef8436a762bf
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-05-06 10:45:11 -07:00
qctecmdr
6614e279eb Merge "disp: msm: dsi: reduce log level in demura parsing" 2021-05-01 23:40:38 -07:00
qctecmdr
50dccee98e Merge "disp: msm: dsi: add full mode information to debugFS node" 2021-05-01 17:06:42 -07:00
Santosh Kumar Aenugu
e96c1e444e disp: msm: dsi: reduce log level in demura parsing
Currently, the demura parsing has info logs, this change reduces
the log level to debug for all the parsing logs.

Change-Id: Icd9e73a7788cb01e09068e4d0957bc1e11a329da
Signed-off-by: Santosh Kumar Aenugu <santoshkumar@codeaurora.org>
2021-04-28 14:08:09 -07:00
Amine Najahi
73479659e0 disp: msm: dsi: add full mode information to debugFS node
Add full mode information to dump panel info debugFS
node to allow for additional verification.

Change-Id: Ie56f3b44a8b35075d78575def1469b12bed60252
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-04-27 15:18:01 -04: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
qctecmdr
a417ffc4cc Merge "disp: msm: dsi: remove porches value check from mode matching for RFI" 2021-04-23 09:21:58 -07:00
qctecmdr
b510da17bd Merge "disp: msm: dsi: force VRR on RFI default value setting" 2021-04-23 09:21:58 -07:00
Amine Najahi
d594991e69 disp: msm: dsi: force VRR on RFI default value setting
Currently on video mode panel, when the RFI bit clock
rate is set back to the default rate, the driver is not
detecting that a VRR operation is necessary due to
unchanged porches value.

This change is forcing a VRR update on video mode panel
whenever the RFI bit clock rate is changed.

Change-Id: I16520b6ca1909f878bff1bb97472b15fe2a3d13b
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-04-20 17:39:48 -04:00
Amine Najahi
210edd6ba5 disp: msm: dsi: remove porches value check from mode matching for RFI
Currently, on a video mode panel when a mode switch occurs after the RFI
bit clock rate has been changed, the driver fails to find the new mode
in the list of panel modes due to different porches value between
the adjusted mode and the default panel mode.

This change removes the front and back porch value check from mode
matching function when dynamic bit clock and maintain constant FPS
features are enabled.

Change-Id: If267a4f732fea2c7d84c8bb3d5650f3e93722ec4
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-04-20 11:13:23 -04:00
Satya Rama Aditya Pinapala
3f8ac6983f disp: msm: dsi: add check for DSI resources during display probe
The change adds a check for DSI controller and PHY resources during the
DSI display probe. The validation now only checks for the availabilty
of the resources without increasing the refcount of the controller or
PHY till an exact match is found after the device tree is parsed.

Change-Id: I96a5022a8ab5f55271e0df36675037b597e1ec85
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-04-16 09:19: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
2f70c01c06 Merge "disp: msm: dsi: expand matching requirements to find DSI mode match" 2021-04-03 02:35:42 -07:00
Linux Build Service Account
39e9184452 Merge "disp: msm: dsi: fix DSI mode index parsing" into display-kernel.lnx.5.10 2021-04-02 10:35:25 -07:00
qctecmdr
6aa0fabaf3 Merge "disp: msm: dsi: change rule to initialize display in firmware" 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
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
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