Commit Graph

368 Commits

Author SHA1 Message Date
Yuchao Ma
683585ad7a disp: msm: sde: remove checks in LTM hist disable function
The right_mixer and hist_en checks in LTM hist disable function are
not valid for dual display use cases, since in dual display use cases,
right_mixer will always be NULL.
When device enters suspend state, hist_en will be set to false in
sde_cp_crtc_suspend(), and together with the right_mixer check,
it will block the ltm buffer lists from resetting and cause LTM has
no buffers to use after resume.

Change-Id: I51b1b00f4af59e42105322de68019479c65f2fbb
Signed-off-by: Yuchao Ma <yuchaom@codeaurora.org>
2019-06-26 19:45:52 -07:00
Fuad Hossain
1fb461e35e disp: msm: sde: Ensure that dirty dsc blocks are flushed properly
When a dsc block gets disabled, it is not being
flushed properly because the kms_commit clears
the flush bits before the next vsync.

In a two commit scenario where the first commit
disables both dsc blocks within the same dsc
block pair, and where the second commit enables
only one of the dsc blocks in the pair, only the
second commit's dsc block gets flushed properly
because checks for dirty dsc blocks are currently
only happening if dsc is disabled for the
encoder. Since the first commit's disabled dsc
block was not flushed to hardware, there will be
errors such as pingpong timeouts and fifo
underruns, which can lead to distorted images on
the panel.

This problem manifests itself in suspend/resume
scenarios involving dp dsc connections which only
use one dsc block. During a suspend, the two dsc
blocks that were used by dsi are released due to
a null commit coming from userspace. While
resuming, depending on the mode, one of these
released dsc blocks will be alloted to dp,
leading to the problem described above.

CRs-Fixed: 2471336
Change-Id: Ifd71c980a04d63a87923eb0bece96646d4804533
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-06-26 16:49:15 -04:00
Nilaan Gunabalachandran
c6092f3e66 disp: msm: sde: log intf framecount in event logs
Log hardware interface framecount during te and vblank irqs for
command and video mode panels, respectively. This will help in
debugging any missed frames.

Change-Id: Ie86f686c4cc12de6a1f31aa47d4c7a5b8a68ea55
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-06-26 11:54:51 -04:00
Zube Molokwu
e23e3e27bf disp: msm: dp: skip audio notify wait for completion
Skip the wait on audio subsystem response in case of external display
connect event.

Change-Id: Id7a0ac48f540f025293717e60c28967b83ad46ee
Signed-off-by: Zube Molokwu <zmolokwu@codeaurora.org>
2019-06-25 18:26:22 -07:00
qctecmdr
6a9e397c73 Merge "disp: msm: dp: add session check for audio register programming" 2019-06-25 18:13:35 -07:00
Samantha Tran
e9548a791b disp: msm: dsi: increase mode max allowed
This change updates the DSI_MODE_MAX macro from
5 to 32.

Change-Id: Ic5ef1005bec525248315daab71bae9ac591ee149
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-06-25 10:46:18 -07:00
Veera Sundaram Sankaran
6da6eb6774 disp: msm: sde: reset ctl during wr_ptr_irq timeout
wr_ptr_irq timeout signifies that the MDP is stuck
on either the current or previous frame. Handle
ctl reset and fence signalling as part of this
timeout handling. This logic would help to recover
the HW faster in case of posted-start.

Change-Id: I09b3d21772df431f9fc4a58b2fd9b4fcac4a7de7
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2019-06-24 15:33:56 -07:00
Xu Yang
9b14f40e90 disp: msm: sde: Add DSPP NULL pointer check in reg dma
Add DSPP NULL pointer check in reg dma when get dspp block.
Change fixes the possibility of kernel NULL pointer dereference
issue in stress test.

Change-Id: I9aa5514f7508cd7e316daf9e73fef313e6d1c9d4
2019-06-24 16:01:29 +08:00
Ping Li
c4b9783866 disp: msm: sde: clean up LTM driver states when lastclose is called
Clean up LTM buffers and reset LTM related lists when lastclose is
call to make sure LTM will be in clean state when hwc restarts or
when user runs LTM driver lua tests.

Change-Id: Ib2af68e70f2e5ff246aca890487085bc46dca7da
Signed-off-by: Ping Li <pingli@codeaurora.org>
2019-06-21 11:29:12 -07:00
Nilaan Gunabalachandran
14d6b4a342 disp: msm: sde: use high bandwidth threshold for crtc check
SDE curently uses two different bw thresholds, depending on
video and command mode panels. The lower threshold that was
being used with video mode caused perf check to fail, even
though it was still a valid functional use case. The driver
should always use the higher max bandwidth when checking
core crtc performance.

CRs-Fixed: 2470842
Change-Id: I59b85dd320ce5fcb94848d4cd4ce6d1eaf7abeaa
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-06-21 09:48:16 -04:00
Jayaprakash
25c23149d7 disp: msm: sde: update max supported display height
Update maximum supported display height.
This fix allows videoplaybacks of src height upto 5760.

Change-Id: I31ccf40a0b1b7a12e64b026235b6b39c970fc8fe
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-06-21 14:56:46 +05:30
Dhaval Patel
7b5c2fff43 disp: msm: fix vsync wait for poms and dms
SDE RSC does not need to wait for vsync during
dms. It was removed unintentionally with commit
a74d2cf7fa ("disp: msm: add runtime_pm ops
support in drm driver"). However, Panel mode
switch still needs vsync wait based on
recommendation. This change fixes vsync wait
for both cases.

Change-Id: Ic9119132eb15a8c33f3841ba5df2624189d93395
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2019-06-20 22:12:01 -07:00
Abhijit Kulkarni
484d909f94 disp:msm: fix return type from runtime api
pm_runtime_get_sync api can return non-zero return value
for success case. For such cases the IOCTL should return
success.

Change-Id: I5868cfc3c0cdeb63c3b2e68f1dcddadcd0aae9ce
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2019-06-20 15:53:04 -07:00
Shubhashree Dhar
944b545245 msm/sde/rotator: Initialise rotator module after MDP module init
Doing late initialization of rotator module since it depends
upon providers which are initialized during msm bind time.
Hence, calling rotator module init only after msm module
init is complete.

Change-Id: I15ea08251c639cf121e9bed1d7bd579ade78cd12
Signed-off-by: Shubhashree Dhar <dhar@codeaurora.org>
2019-06-20 13:07:26 +05:30
qctecmdr
5411cf5dee Merge "disp: msm: dsi: add check for buffer length before copy" 2019-06-19 10:26:17 -07:00
qctecmdr
3c4d5f3557 Merge "disp: msm: dp: Ensure peak pxl rate does not exceed maximum supported by sink" 2019-06-19 05:21:38 -07:00
qctecmdr
f49f2c2153 Merge "disp: msm: dp: fix the dsc line buf bit depth selection for dp dsc" 2019-06-19 03:51:13 -07:00
qctecmdr
d50b6d456c Merge "disp: msm: dp: fix dsc parameters for 10bpp compression" 2019-06-19 02:21:30 -07:00
qctecmdr
7082075b68 Merge "disp: msm: dsi: remove scratch register logic for cont-splash" 2019-06-19 00:50:11 -07:00
qctecmdr
6b22de88f0 Merge "disp: msm: sde: Init LTM phase init_h with single pipe value" 2019-06-18 23:20:19 -07:00
qctecmdr
c32734d175 Merge "disp: msm: sde: fix null access for wb modes" 2019-06-18 20:22:37 -07:00
qctecmdr
0ab21016ee Merge "disp: msm: sde: Add null pointer check for plane state" 2019-06-18 18:48:20 -07:00
qctecmdr
6232bdd503 Merge "disp: msm: sde: modify vig pipe linewidth" 2019-06-18 00:41:09 -07:00
Prashant Singh
0c5e316fe9 disp: msm: add array out of bounds index check
Add check for plane used as index on accessing
for bytes per pixel value.

Change-Id: I3642f9a57bf2eee7fa0dbf0965bd8497f3911e18
Signed-off-by: Prashant Singh <prasin@codeaurora.org>
2019-06-18 12:15:22 +05:30
Tatenda Chipeperekwa
68f8b1a047 disp: msm: dp: add session check for audio register programming
Add a check to ensure that audio registers are programmed only
when the DP timing engine (audio session) is enabled. This will
reduce the likelihood of un-clocked register access for audio
related operations.

Change-Id: I6fe59cf53dc721b5470ad4cf7d84e8606800a246
CRs-Fixed: 2465406
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-06-17 17:06:50 -07:00
Lakshmi Narayana Kalavala
6da86ccee2 disp: msm: sde: fix null access for wb modes
Writeback modes are passed from DRM driver client and it may provide
invalid configuration. Add null checks for sde_wb_config provided by
client to avoid null access in subsequent calls.

Change-Id: I0924f8907d98e2ecb891cfc0c09191823d9033e8
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-06-17 12:32:25 -07:00
Fuad Hossain
33284a9f4c disp: msm: dp: Implement dsc slice selection logic based on sink caps
The dp sink explicitly states the numbers of
slices it can support. When calculating the
number of slices for dsc configuration, ensure
that the sink supports the calculated number of
slices.

If the sink does not support the calculated
number of slices, keep rechecking sink support
for the subsequent slice increment, until we
reach the highest number of slices possible
according to the dp spec. If no compatible
sink slice support is found, do not enable dsc.

CRs-Fixed: 2325207
Change-Id: I485adacd258963cdec9cc52aa041373883ecadc7
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-06-17 12:25:44 -04:00
Xu Yang
5b176bf444 drm: msm: Do not check for 0 mixer count
The first frame may not have the mixer setup, but the properties
can be applied later on.

Change-Id: Ic21d751ee7b5375ed49bacb481d8f34875bf0190
2019-06-16 21:30:32 -07:00
Sankeerth Billakanti
31d659e7e7 disp: pll: changes to support lito dp clks
Changes to incorporate the different clock names for
lito and kona.

Change-Id: I607366f75426a819226aa252819b507dba07109d
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2019-06-16 19:18:59 -07:00
Yuchao Ma
9cb470521d disp: msm: sde: Init LTM phase init_h with single pipe value
Initialize LTM phase init_h values with single pipe configuration
value for both LTM blocks, so in dual panel use case, the correct
init_h values will be programed for LTM_0 and LTM_1.
As for dual pipe merge configuration, init_h value for LTM_1 will
be overwrite with the correct configuration if merge_en is set.

Change-Id: I8719b217cf7e5677e23c17b3c3f62f4ee23f43e9
Signed-off-by: Yuchao Ma <yuchaom@codeaurora.org>
2019-06-14 01:02:40 -07:00
Prashant Singh
f434c0c38c disp: msm: sde: Add null pointer check for plane state
Add null check for plane state pointer before
dereferencing it.

Change-Id: Ic66efd11a70162ffe65c2137a5f19688314c45a5
Signed-off-by: Prashant Singh <prasin@codeaurora.org>
2019-06-14 11:18:10 +05:30
Lakshmi Narayana Kalavala
b69f691680 disp: msm: sde: enable reg write only for debug defconfig
Write to hardware registers should be exposed for only debug
purpose. Hence use CONFIG_DYNAMIC_DEBUG to restrict register
writes only for debug defconfig.

Change-Id: I0b67b46a69920f6620570ace9d4faf732076126d
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
2019-06-13 14:53:17 -07:00
Satya Rama Aditya Pinapala
aed315f32b disp: msm: dsi: add check for buffer length before copy
The change adds a check to make sure the length of bytes being
copied don't exceed the size of the destination buffer
causing an overflow.

Change-Id: Ib3ca3705e4179ccda1af11279e96e167baee6a3b
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-06-13 14:18:20 -07:00
Fuad Hossain
5cb73d66bc disp: msm: dp: fix dsc parameters for 10bpp compression
Add configuration data to handle 10bpp 3:1
compression ratio based on hardware recommended
settings.

CRs-Fixed: 2325207
Change-Id: I7086dc235e0063a79c661fa8cee77d4e47e9c826
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-06-13 15:51:19 -04:00
Fuad Hossain
a9028ef4cf disp: msm: dp: Ensure peak pxl rate does not exceed maximum supported by sink
Ensure that the dp dsc peak pxl rate does not
exceed the maximum supported by the sink device.
If the mode's peak pxl rate per slice exceeds the
max, mark the mode as invalid.

CRs-Fixed: 2325207
Change-Id: Ic8904c759b8621c3aff258206599e1994f70e26e
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-06-13 15:19:26 -04:00
qctecmdr
13a11e75b0 Merge "disp: msm: sde: add snapshot of SDE from 4.14 to 4.19" 2019-06-13 11:29:00 -07:00
Fuad Hossain
b706052927 disp: msm: dp: fix the dsc line buf bit depth selection for dp dsc
The line buffer bit depth is used as part of dp
dsc calculations. Read the max supported line buf
bit depth supported by sink, and use that
restriction as part of the dsc calculations.

CRs-Fixed: 2325207
Change-Id: I4c995acad5f484edd1b438bdbf6c145b2d35ee41
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-06-13 13:37:44 -04:00
qctecmdr
c396d0bbc1 Merge "disp: msm: dp: force disconnect at simulation mode off" 2019-06-13 00:19:10 -07:00
Jayaprakash
5dff7b8301 disp: msm: sde: modify vig pipe linewidth
As per hardware recommendation, DMA pipe
width is reduced to 2880, while vig
pipewidth is 4096.

Change-Id: I70dbd44b4883f49879686003ba1fe9694434daab
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-06-13 12:15:14 +05:30
qctecmdr
93ce60cb80 Merge "disp: msm: update clk and cmd state switch sequence" 2019-06-12 19:34:53 -07:00
qctecmdr
397b8234e2 Merge "disp: msm: dp: report HDR10+ parameters with other HDR properties" 2019-06-12 15:30:26 -07:00
Dhaval Patel
e05daba83d disp: msm: update clk and cmd state switch sequence
Disable double buffer vsync configuration while
enabling clk and cmd state switch sequence. Leaving
this configuration in enable state may cause different
issues for different state switch. Clock state switch
may see a vsync delay for solver disable. Command
state switch may not update the vsync source.

Change-Id: I910fc7e33a20a04b602435020173d85a4ee926d1
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2019-06-12 10:39:39 -07:00
Yujun Zhang
86162602c5 disp: msm: dsi: Fix incorrect DSI PHY timing of version 4
For DSI PHY timing of version 4, adds the missing configuation
of phy_clk_params and updates some extra clock parameters.
The less precision during calculation is fixed, which is caused by
not exactly following PHY timing document.

Change-Id: Ibb75d4d3e5b4a5979ff4a85dba1accf3677a6584
Signed-off-by: Yujun Zhang <yujunzhang@codeaurora.org>
2019-06-11 20:00:48 -07:00
Aravind Venkateswaran
a545123901 disp: pll: remove unsupported dividers for DSI pixel clock
Remove dividers that are not recommended for DSI DPHY mode
when setting up the clock tree for the DSI pixel clock.

Change-Id: I2563a35ece541c1f5b46c72af7bd2cc79e72a90e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2019-06-11 16:38:34 -07:00
Satya Rama Aditya Pinapala
03295175d6 disp: msm: dsi: update DSI PHY sequence for Kona
This change updates the DSI PHY sequence for Kona target as
per latest HW team recommendation.

Change-Id: I110cc5044d2676ade58f947b3efca53d1d72753c
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-06-11 15:11:37 -07:00
Tatenda Chipeperekwa
d1fb3ace28 disp: msm: dp: force disconnect at simulation mode off
Force a disconnect if the simulation client disables simulation
before disconnecting from the simulated sink. This ensures that
the driver will not erroneously attempt AUX transactions in
subsequent interactions after simulation is disabled.

Change-Id: Ibc581deafe46753c514bccc70ba5c953c8d49bd8
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2019-06-11 11:36:49 -07:00
qctecmdr
ba12b2cd36 Merge "disp: msm: sde: update ubwc constant color feature" 2019-06-10 19:55:02 -07:00
Steve Cohen
e8e0c91207 disp: msm: dp: report HDR10+ parameters with other HDR properties
Report the HDR10+ sink capability and payload data when user-space
reads the "hdr" debugfs node. Also add support for reporting HDR
properties for MST sessions via the new "hdr_mst" debugfs node.
Write support for this node was removed since it updated the
connector state in an inconsistent way, therefore HDR updates must
come from the atomic commit.

Change-Id: I58af4042c1b3198eb78fe413728104071cf50caf
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2019-06-10 12:08:01 -04:00
qctecmdr
a8974603d1 Merge "disp: msm: fix rscc branch offset for lito" 2019-06-10 08:51:30 -07:00
Animesh Kishore
c559230464 disp: msm: fix rscc branch offset for lito
Branch address offset for TCS sleep/wake has
changed for lito, add changes to support it.

Change-Id: Id938c4c85df17f6709b9533ff737cf5a0186bc09
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
2019-06-10 16:43:40 +05:30