Commit Graph

115 Commits

Author SHA1 Message Date
Anand Tarakh
c800498ce6 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>
2024-02-11 14:03:41 +05:30
Anand Tarakh
79073c4b29 disp: msm: dsi: send panel dead for overflow/underflow interrupt
In case of underflow/overflow IRQ storm, send panel dead event from
scheduled underflow and overflow workqueue handler.

Change-Id: Ic6cd6cbae097ea970a392fa99e30b3b620633d40
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-10-31 13:07:45 +05:30
Anand Tarakh
307aea3dc1 disp: msm: dsi: add mutex lock before link clock frequency update
Acquire mngr clk_mutex before updating link clock frequencies.
Failing this may lead to race around condition while setting the
link clock frequency rates.
Make sure byteclk and pclk rates of PLL are configured according
to clock manager and not the controller.

Change-Id: I2cd26e659ce166d5bc55eb6c060672eeee192bea
Signed-off-by: Anand Tarakh <quic_atarakh@quicinc.com>
2023-09-14 12:25:44 +05:30
Rohith Iyer
5413180441 disp: msm: dsi: Send report_panel_dead in underflow or overflow cases
In the case of DSI underflow or overflow, skip enabling back the DSI error
interrupts and instead send panel_dead. The error interrupt will be enabled
later by HAL as part of handling panel_dead event. Not enabling back the
DSI error interrupts immediately can prevent IRQ storm from occurring.

Change-Id: I769872bb5ac9ef8826c3e4caaab7723901dfc7d8
Signed-off-by: Rohith Iyer <quic_rohiiyer@quicinc.com>
2023-08-31 11:54:14 -07:00
qctecmdr
7fa3cad70f Merge "disp: msm: dsi: Use pr_err_ratelimited to log PHY contention error" 2023-06-30 17:16:35 -07:00
Rohith Iyer
446c1b69b5 disp: msm: dsi: Use pr_err_ratelimited to log PHY contention error
Replace DSI_CTRL_ERROR with pr_err_ratelimited to reduce PHY contention
logging errors, as excessive logging in kernel can lead to system crash.

Change-Id: Ibd81a0e852a73186144ebefc8a1c09020a6e74f0
Signed-off-by: Rohith Iyer <quic_rohiiyer@quicinc.com>
2023-06-26 12:08:06 -07:00
Srihitha Tangudu
0331bcf0fe 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-06-04 22:35:01 -07:00
qctecmdr
1a1a7d32d0 Merge "disp: msm: dsi: increase cmd dma timeout to 1200 milliseconds" 2023-05-26 13:59:38 -07:00
Rohith Iyer
b8634f10bd disp: msm: dsi: increase cmd dma timeout to 1200 milliseconds
Change increases cmd dma timeout to 1200 milliseconds from 200 milliseconds.
There are video mode panels which can support one frame per second, if pixel
data transfer is active, then our command transfer timeout should be atleast
1000 msec.

Change-Id: I3d650d787fa6557ce474aca977906b99af1f1cbc
Signed-off-by: Rohith Iyer <quic_rohiiyer@quicinc.com>
2023-05-22 16:11:30 -07:00
Srihitha Tangudu
ddb854d52d disp: msm: dsi: add new function to cleanup post command transfer
Currently we are always doing command transfer cleanup which includes
disabling command engine, clocks, gdsc and unmasking overflow interrupt
as part of post command transfer function only after CMD DMA wait is
done. Cleanup should also be done if an ESD failure happens before
kickoff of a batch command. Organize code so that command transfer
cleanup can be done irrespective of whether command kickoff is done
or not.

Change-Id: Ieb92daa7f5da62c16c71f1b23ceff20adfbf3621
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2023-05-04 10:36:44 -07:00
Ritesh Kumar
5fa719d990 disp: msm: dsi: add support for dual display with shared dsi
In dual display configuration, where only one display is active at a time,
dsi0 and dsi1 can be used to drive primary large display and, one of the
dsi (dsi0 or dsi1) can be used to drive secondary display. This helps to
time division multiplex shared DSI for primary and secondary panel which
solves the bandwidth limitation problem. This change adds support to allow
sharing of dsi ctrl and phy between dual displays.

Change-Id: Ib4ed1bf51f587b544ec24b1b558ff83225b36e4b
Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
2023-04-13 11:13:44 +05:30
Rajeev Nandan
2b15aded33 disp: msm: dsi: Fix DMA window scheduling programming
In DMA start window scheduling, TRIG_CTRL.COMMAND_MODE_DMA_TRIGGER_SEL
is programmed to SW + DMA start window trigger. But if DMS switch
comes after command is scheduled, COMMAND_MODE_DMA_TRIGGER_SEL gets
reprogrammed to SW trigger leading to command transfer failure.

Program the COMMAND_MODE_DMA_TRIGGER_SEL only from the CMD DMA Tx path.

Change-Id: I01062497bb70aa5fdcb25be3715c7cbc4c68b681
Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
Signed-off-by: Rajeev Nandan <quic_rajeevny@quicinc.com>
Signed-off-by: Kirill Shpin <quic_kshpin@quicinc.com>
2023-03-23 18:29:00 +00:00
qctecmdr
76cbb717c4 Merge "disp: msm: dsi: optimize wait time in DSI timing DB update" 2023-01-29 22:32:24 -08:00
Amine Najahi
d4a444a3d1 disp: msm: dsi: add DCS get scan line command
Add DCS command to read the panel scan line value and associated
time stamp in nano-seconds.

Change-Id: I06a76d3a6c5ad7a2e7681413c741e5b97b34d73f
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2023-01-25 13:35:12 -08:00
Shamika Joshi
495a6a8731 disp: msm: dsi: optimize wait time in DSI timing DB update
Timing DB needs to be disabled after panel vnsyc.
Update the wait time to reflect difference in line time
between MDP and panel vsync.

Change-Id: Ib5282d67995e8379ead928218f31a8f9fe7fa978
Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
2023-01-18 13:11:13 -08:00
Alex Danila
b77d92fab3 disp: msm: dsi: remove PHY isolation support
DSI PHY isolation is unused and considered deprecated. Previous uses
were for power measurements and emulated platform support. Use on
emulated platforms has been supplanted by PHY PLL bypass.

Change-Id: I547681912ff82f0df09a1b98c671eac32c19412a
Signed-off-by: Alex Danila <quic_eadanila@quicinc.com>
2023-01-04 11:41:28 -05:00
Rajkumar Subbiah
6d5a850504 disp: msm: dsi: add support for phy/pll bypass
This change adds support for bypassing hw access in DSI PHY/PLL
drivers which enables the DSI driver to run on emulation
platforms that might be missing those modules.

Change-Id: I3e83155a79d60f2357606746214d776cefabd651
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
Signed-off-by: Alex Danila <quic_eadanila@quicinc.com>
2022-12-06 07:25:12 -08:00
Srihitha Tangudu
6fb25a2f3d disp: msm: dsi: Correct minimum bit clk calculation for cphy cmd mode
For calculating bit rate in cphy, we multiply bit rate by a factor of
7/16 where 7 is the number of symbols and 16 is the bits per symbol.
But we are currently not considering the 7/16 factor while calculating
minimum bit clk value for command mode which is resulting in a smaller
bit rate value than the minimum bit clk.

Bit rate should always be greater than the minimum bit clk which otherwise
can lead to discrepancies. Correct minimum bit clk calculation for command
mode, by multiplying a factor of 7/16 if cphy.

Change-Id: I39b202dcafe60e2047549f84ff9388b46ae490a5
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2022-11-23 09:19:03 -08:00
Kirill Shpin
60965fdeae disp: msm: dsi: add ctrl version support for pineapple
Added dsi ctrl version 2.8 support for pineapple hardware

Change-Id: If9beb77c53d70d94b498b5b837c26892a4df9089
Signed-off-by: Kirill Shpin <quic_kshpin@quicinc.com>
2022-10-25 09:31:49 -07:00
Narendra Muppalla
7fcbec0c8d disp: msm: dsi: add dsi ramdump support without DEBUG_FS
This change adds dsi display ramdump support when DEBUG_FS
is not enabled.

Change-Id: Ic6659a9380acd5eb55a3270d3e3b7016a9cd2bd7
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2022-10-05 03:53:37 -07:00
Nisarg Bhavsar
5e0d93196b disp: msm: dsi: Enable TPG functionality
Allow TPG patterns to be displayed on command mode and
video mode panels.

Change-Id: Ie9ba9b404ceb965f8a06d1f19e932dd2e051983b
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2022-08-03 15:04:54 -07:00
Rajeev Nandan
d26a3a480e disp: msm: dsi: add missing dsi ctrl mutex lock in host timing update
Acquire dsi_ctrl->ctrl_lock lock before programming dsi ctrl
registers. Failing this may lead to race conditions in register
programming.
Add missing mutex lock inside dsi_ctrl_host_timing_update().

Change-Id: Ic86cbe282333c0b4d63ae3d5b3356a5d24752203
Signed-off-by: Rajeev Nandan <quic_rajeevny@quicinc.com>
2022-05-26 21:50:47 -07:00
Narendra Muppalla
daa511cb90 Merge remote-tracking branch 'quic/display-kernel.lnx.5.10' into display-kernel.lnx.5.15
* quic/display-kernel.lnx.5.10:
  disp: msm: sde: avoid error during fal10_veto override enablement
  disp: msm: update copyright description
  disp: msm: sde: configure dest_scaler op_mode for two independent displays
  disp: msm: dp: updated copyright set for 4nm target
  Revert "disp: msm: sde: consider max of actual and default prefill lines"
  disp: msm: sde: Reset backlight scale when HWC is stopped
  disp: msm: dp: avoid duplicate read of link status
  disp: msm: dsi: update vreg_ctrl settings for cape
  disp: msm: fail commit if drm_gem_obj was found attached to a sec CB
  disp: msm: dp: updated register values for 4nm target
  disp: msm: sde: update framedata event handling
  disp: msm: dsi: Add new phy comaptible string for cape
  disp: msm: sde: software override for fal10 in cwb enable
  disp: msm: update cleanup during bind failure in msm_drm_component_init
  disp: msm: sde: dump user input_fence info on spec fence timeout
  disp: msm: sde: add null pointer check for encoder current master
  disp: msm: dsi: enable DMA start window scheduling for broadcast commands
  disp: msm: sde: avoid alignment checks for linear formats
  disp: msm: reset thread priority work on every new run
  disp: msm: sde: send power on event for cont. splash
  disp: msm: sde: always set CTL_x_UIDLE_ACTIVE register to "1"
  disp: msm: use vzalloc for large allocations
  disp: msm: sde: Add support to limit DSC size to 10k
  disp: msm: sde: add tx wait during DMS for sim panel
  disp: msm: dsi: add check for any queued DSI CMDs before clock force update
  disp: msm: sde: correct pp block allocation during dcwb dither programming
  disp: msm: sde: avoid setting of max vblank count
  disp: msm: sde: add cached lut flag in sde plane
  disp: msm: sde: avoid use after free in msm_lastclose
  disp: msm: sde: update TEAR_SYNC_WRCOUNT register before vsync counter
  disp: msm: dsi: Support uncompressed rgb101010 format
  disp: msm: sde: update idle_pc_enabled flag for all encoders
  disp: msm: sde: flush esd work before disabling the encoder
  disp: msm: sde: allow qsync update along with modeset
  disp: msm: dp: avoid dp sw reset on disconnect path
  disp: msm: sde: consider max of actual and default prefill lines
  disp: msm: ensure vbif debugbus not in use is disabled
  disp: msm: sde: update cached encoder mask if required
  disp: msm: sde: while timing engine enabling poll for active region
  disp: msm: enable cache flag for dumb buffer
  disp: msm: sde: disable ot limit for cwb
  disp: msm: sde: avoid race condition at vm release
  disp: msm: dsi: set qsync min fps list length to zero
  disp: msm: sde: reset mixers in crtc when ctl datapath switches
  disp: msm: sde: update vm state atomic check for non-primary usecases
  disp: msm: sde: reset CTL_UIDLE_ACTIVE register only if uidle is disabled

Change-Id: If480e7f33743eb4788549f853ba05e744ecb38d3
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-02-08 16:38:13 -08:00
Yashwanth
107f473e54 disp: msm: update copyright description
This change updates copyright description with correct
license marking as per the guidelines.

Change-Id: Ia74b721e78afcc7f8e88bcbccfcf15430111ec37
Signed-off-by: Yashwanth <quic_yvulapu@quicinc.com>
2022-02-01 11:29:21 +05:30
GG Hou
e29493c71d disp: msm: avoid using #ifdef for configurations
Use #if IS_ENABLED() instead of #ifdef for configurations as vendor module
guidelines.

Use #if IS_ENABLED(CONFIG_XXX) instead of #ifdef CONFIG_XXX to ensure that
the code inside the #if block continues to compile if the config changes
to a tristate config in the future.

The differences are as follows:
	1.#if IS_ENABLED(CONFIG_XXX) evaluates to true when CONFIG_XXX is set to
		module (=m) or built-in (=y).
	2.#ifdef CONFIG_XXX evaluates to true when CONFIG_XXX is set to
		built-in(=y) , but doesn't when CONFIG_XXX is set to module(=m).
		Use this only when you're certain you want to do the same thing
		when the config is set to module or is disabled.

Change-Id: Ia806b9b01ad8414d0e4de027a382cb68e7fb4a6a
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2022-01-17 10:10:04 +08:00
Ritesh Kumar
fd2dc5be06 disp: msm: dsi: enable DMA start window scheduling for broadcast commands
As per the HW requirements it is highly recommended to use DMA start window
to trigger broadcast commands. If not used then it can result in a hardware
hang with the DSI controllers going out of sync. This behavior is even more
prominent in cases of higher refresh rates.

Currently, reset_trigger_controls is called as part of next command.
Due to this, when unicast command is sent after broadcast command,
reset_trigger_controls does not get called for slave controller,
leading to issues.

As part of this change, DMA start window scheduling is enabled as default
for broadcast commands and reset_trigger_controls is done as part of
post_cmd_transfer operations.

Change-Id: I2402214ed79b376d102b88d4f7e6a06fcb5712d3
Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
2022-01-12 09:57:42 +05:30
Veera Sundaram Sankaran
56862f8118 disp: msm: use pm_runtime_resume_and_get instead of pm_runtime_get_sync
pm_runtime_get_sync increases the usage_count refcount immaterial of
success/failure of the call, leading to invalid refcount on failures.
Use pm_runtime_resume_and_get instead, which takes care of reducing the
refcount on failure cases before returning from the function.

Change-Id: Ib96050d5d7ecbd717e58b8a0dde2d03312444e15
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-01-05 17:28:41 -08:00
Rajeev Nandan
f259cf68d1 disp: msm: dsi: Support uncompressed rgb101010 format
Add support for uncompressed rgb101010 format.

Change-Id: I60c2f7817eb2ea3e462c4692b1beb7f523836326
Signed-off-by: Rajeev Nandan <quic_rajeevny@quicinc.com>
Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
2021-12-16 20:03:44 +05:30
Jeykumar Sankaran
cf39b00660 Merge branch 'display-kernel.lnx.5.10' into display-kernel.lnx.1.0
Change-Id: I5d2b08380b6b0eb09492b950fb38cd9a0b3196c1
2021-12-08 12:37:35 -08:00
Jeykumar Sankaran
c890f9d88f disp: msm: dsi: add ctrl and phy version support for Kalama
Add dsi ctrl version 2.7 and dsi phy version 5.2 support for
Kalama hardware.

Change-Id: Ia7b4c8a2e1579458f114e466de8b24855e9251ce
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-11-24 16:51:34 -08:00
Ritesh Kumar
986c7b1028 disp: msm: dsi: Logging Improvement in dsi driver
This change adds additional logs in dsi driver for
easy debugging of issues related to command transfer.

Change-Id: Ica784bed6c360b2760d6606d625837e23a22410c
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-11-05 02:08:17 -07:00
Ritesh Kumar
13f4082d58 disp: msm: dsi: Fix post cmd tx sequence for read commands
For read commands, wait_for_done() should be called in dsi_message_rx function.
Currently, its being called twice from dsi_message_rx and dsi_ctrl_post_cmd_transfer.
This change adds a check to skip wait_for_done() from dsi_ctrl_post_cmd_transfer.

Change-Id: Icb7ccd0f8dde24c6c26732f7cb92a20bebb26f5d
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-11-05 14:34:58 +05:30
Ritesh Kumar
f2499b50d8 disp: msm: dsi: remove early return from dma_cmd_wait_for_done
In ASYNC wait mode, next command kickoff can happen before previous command ISR execution is
completed in below sequence:

ASYNC command A -> triggered

dsi_ctrl_isr for command A -> fired and executed atomic_set(&dsi_ctrl->dma_irq_trig, 1);

wait_for_done for command A -> returns early as dsi_ctrl->dma_irq_trig is 1

ASYNC Command B -> triggered

wait_for_done for command B -> waiting for cmd_dma_done

dsi_ctrl_isr for command A -> executes complete_all(&dsi_ctrl->irq_info.cmd_dma_done);

wait_for_done for command B -> returns success incorrectly based on complete_all of previous
	command isr and disable_status_interrupt() is not called.

This leads to refcount of dma_done going wrong and dsi_ctrl_isr is not enabled on suspend resume.

To fix this issue, mark command transfer successful only based on complete_all(cmd_dma_done). This
way disable_status_interrupt() will be always called either from dsi_ctrl_isr or wait_for_done().

Change-Id: I0379ea7ff82a1e077b95f6996d11d1722de00936
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-11-04 17:50:11 +05:30
Satya Rama Aditya Pinapala
1317b11bc2 disp: msm: dsi: implement ESD recovery cleanup
After an ESD failure, the PHY lanes and controller can be stuck in
an unknown state. This can result in interrupt storms and watchdog
failures, if these error states are not handled correctly. The following
change implements the below mechanism to avoid failures.

1) Disable error interrupts during an ESD reg read, which are re-enabled once
ESD check is successful.
2) On ESD failure, before turning off LP clocks, reset the PHY lanes and DSI
controller.
3) After the HS clocks are turned off, issue a PHY hard reset.
4) Before enabling/disabling error interrupts, clear the error status registers
as they are not cleared as part of controller reset.

Change-Id: If10e4edf095a334a9416d109ec4b1401d1a84505
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-10-21 16:25:44 -07:00
Jeykumar Sankaran
425df29bb6 disp: msm: sde: avoid checking debugfs_create_bool return value
Adapt 5.15 kernel upstream change to return void for debugfs_create_bool.

Change-Id: I9f2ece04dddeba8f43d603fbb62517ea5fb48e7c
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:25:51 -07:00
Steve Cohen
1416e72e62 Revert "disp: msm: dsi: allow cmd-engine enable/disable HW op at all times"
This reverts commit 65f3cc37a4.

This change breaks TUI use-cases by allowing CMD engine to be
disabled on trusted VM without primary VM having knowledge of
this HW update.

Change-Id: Ieb67dc841299a149e9f1028fd8f98bd857f1f711
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2021-08-26 12:37:45 -04:00
qctecmdr
c9fb272a73 Merge "disp: msm: dsi: allow cmd-engine enable/disable HW op at all times" 2021-08-13 20:50:45 -07:00
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
Steve Cohen
65f3cc37a4 disp: msm: dsi: allow cmd-engine enable/disable HW op at all times
In cases of continuous splash, when command engine is
enabled/disabled as part of commands that are sent before
continuous splash config is called the HW op will disable the
command engine by the end of the command transfer. As part of
continuous splash handoff, the command engine enable call skips
the hardware operation to actually set the CMD_ENGINE_EN bit
as it is guarded by the skip op flag.

With the current change, we allow the HW op to take place, despite
continuous splash being enabled. This way, the HW will always maintain
the correct state pre and post continuous splash handoff.

Change-Id: Id32ebf6f0d7eac46c118b701c138fcf6b9b10318
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-07-09 12:22:17 -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
qctecmdr
4487d04c54 Merge "disp: msm: dsi: create generic interface for read poll timeout" 2021-06-23 04:01:00 -07:00
Michael Ru
421281c0f6 disp: msm: dsi: remove unsupported Controller HW
Removes files and version checks for unsupported DSI Controller
HW versions.

Change-Id: Ic0acd34959ddfcf2db79102857e15f4e06da1d3a
Signed-off-by: Michael Ru <mru@codeaurora.org>
2021-06-21 17:37:51 -04:00
Ritesh Kumar
d52b019c50 disp: msm: dsi: fix kasan out of bound in dsi reception
Fix out of bounds access that occurs when reading dsi
commands with custom non 4 bytes aligned payload.
When misaligned, the code is overfetching data due
to 32 bits reading constraint. This creates an offset
in receiving buffer. Using a local copy buffer large
enough to hold the extra bytes fixes the issue.

Change-Id: Ia0ee791d2e87639edd58191cfd5cb6f8f825f8c8
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2021-06-15 21:48:42 +05:30
Harigovindan P
98767bf22b disp: msm: clear dma done interrupt status for slave controller
When Broadcast is enabled, DMA_DONE bit gets set for slave
controller on command transfer completion but it is not
getting cleared. Due to this, DMA transfer failures on slave
controller are not getting caught. This patch add supports for
clearing DMA_DONE for slave controller on every successful
transfer. This also prints error if transfer fails on slave
controller.

Change-Id: I61ce7b2d8be323adc70d888b5a2416afd9ae9fac
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
2021-05-27 16:44:26 -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
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
Veera Sundaram Sankaran
179a858272 disp: msm: fix dsi debugbus in-mem logging
Update the dump_mem pointer offset while storing the debugbus
data for the second DSI to avoid overwriting to same memory.
As part of the change, register the DSI ctrl with sde_dbg from
ctrl_init directly, instead of debugfs_init to avoid code replication.

Change-Id: I4089f3038ffa89136eaea956d27270f638a99043
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-05-10 08:53:35 -07:00
Yu Wu
55340a43c3 disp: msm: add physical address info when dumping display registers
In dumping display registers, physical address will be appended after
each block name. This is to support register compare between kernel
and UEFI.

Change-Id: Ic20d3e2bd4c95aa7c71c4b646a149f7e83ad731a
Signed-off-by: Yu Wu <zwy@codeaurora.org>
2021-05-06 02:59:16 -07: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
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