Commit graph

3806 commits

Author SHA1 Message Date
codeworkx
11c85590a0 Revert "Revert "msm: mdss: hdmi: skip pan_display during handoff""
This reverts commit ac0bcfe881.

Change-Id: I5ed3edd4cdd4a5f8026ba1b5b71c21248f0b1fe7
2019-08-30 09:28:28 +02:00
raghavendra ambadas
65638ab69c fbdev: msm: check for hdmi as primary
skip pan display operation if found hdmi as primary
and handoff is pending. This check will help pan display path
to execute for primary display in recovery mode.

Change-Id: Iedd7e6b98f62d3a0d5b9cdda4ba4591ed8bfac68
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
2019-08-30 09:24:31 +02:00
raghavendra ambadas
3b5389da43 fbdev: msm: check the length of the external input buffer properly
dchdr->dlen is a short variable controlled by the user-provided data.
If the value is negative, loop continues, also increasing the value
of "len". As a result buffer overflow occurs. So define the len as
unsigned and check with length of string input from user space.

Change-Id: I8bb9ab33d543c826eb330e16ae116385d823ca98
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
2019-08-30 09:21:11 +02:00
codeworkx
f6334e63fa Merge tag 'LA.UM.7.4.r1-05400-8x98.0' into lineage-16.0
"LA.UM.7.4.r1-05400-8x98.0"

Change-Id: Iaa6db184c519b1a6f8de9b989ba402f156bec25c
2019-08-10 14:13:49 +02:00
Max Weffers
ac0bcfe881 Revert "msm: mdss: hdmi: skip pan_display during handoff"
* Makes the device get stuck on splash screen
  when booting in offline charging mode.

This reverts commit b03b261cfc.

Change-Id: I79fc04a43a7995c1015464b2d3c481200ddcaf8d
2019-06-16 08:16:12 +02:00
codeworkx
15f81a19b5 Merge tag 'LA.UM.7.4.r1-05300-8x98.0' into lineage-16.0
"LA.UM.7.4.r1-05300-8x98.0"

Change-Id: I8e27939efccb7d0bda0ac7c4e32afdf3c6d62507
2019-06-16 08:15:21 +02:00
Linux Build Service Account
bb646b5795 Merge "msm: mdss: hdmi: fix 4 block EDID read failure" 2019-06-09 08:03:22 -07:00
Narender Ankam
ad283e50ec msm: mdss: hdmi: parse extended EDID block map
As part of EDID parser, add support to parse extended EDID
Block Map (0xf0) block and parse all subsequent CEA (0x02)
extended EDID Blocks.

Change-Id: I581efae59dde3abf6f297d5a2519ac0088554b64
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2019-05-29 13:38:49 +05:30
Narender Ankam
639259bb32 msm: mdss: hdmi: fix 4 block EDID read failure
Only Block0 and Block1 of EDID are being read successfully.
Fix EDID segment read failure for Block2 and Block3.

Change-Id: I2d501878c6089b275e77587f3f41416aec2ef389
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2019-05-29 00:59:36 -07:00
Narender Ankam
526404d09d msm: mdss: assign block_id for INTF_3
As part of destination scalar on HDMI, INTF3 will be
configured as dual LM single display for higher video
timings. Assign block_id for HDMI INTF.

Change-Id: I09f5eb4136c4a8248f3dc9a36e2d94110419112d
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2019-05-24 00:41:02 -07:00
Linux Build Service Account
5bfaf959ac Merge "msm: mdss: hdmi: reset sink_caps before parsing EDID" 2019-05-21 02:24:45 -07:00
Narender Ankam
ee8a9362ca msm: mdss: hdmi: reset sink_caps before parsing EDID
Within EDID parser's data structure, sink_caps of previous
EDID are being retained. Reset sink_caps before parsing new
EDID.

Change-Id: I7927161256ec87ab77b26a9d7bc5e0cd1df5583b
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2019-05-21 00:41:10 -07:00
Narender Ankam
2cbfe924cf msm: mdss: mdp: mixer allocation for pluggable primary display
Try to allocate mixers LM0 and LM1 to an external pluggable
display if it is configured as primary display.

Change-Id: I81672132a6452535dcd7c2977e76f88a5f3aecf9
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2019-05-21 00:35:22 -07:00
Venkata Prahlad Valluru
b03b261cfc msm: mdss: hdmi: skip pan_display during handoff
In case of HDMI as primary, skip pan_display until
handoff completes.

Change-Id: I5af8142292bcac0f085fffab1af99f635d3ff304
Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2019-05-10 01:10:39 -07:00
codeworkx
6861312cbe Merge tag 'LA.UM.7.4.r1-04700-8x98.0' into auto
"LA.UM.7.4.r1-04700-8x98.0"

Change-Id: I777ab5e199fb463581fbfaf4750c8358d6f9e56f
2019-03-10 16:59:28 +01:00
Linux Build Service Account
afbf8abea5 Merge "msm: mdss: Fix potential null pointer dereference" 2019-01-31 10:35:18 -08:00
davidliu
7cd83df04f mdss: Optimized sRGB display mode
repair that the sRGB is not effect after screen on

Change-Id: I568fad38bdaf1129e13e6741664a50986d0d6cd9
2019-01-01 17:59:48 +01:00
codeworkx
96686cfcf2 mdss: use lower case letters for adobe_rgb, dcip3 and srgb to be consistent
Change-Id: Id7955f4c1675bc4b75a177b2bbbd4117694582b4
2018-12-26 08:21:03 +01:00
Padmanabhan Komanduru
22e10c082a msm: mdss: add support to switch the DSI clock dynamically
Add change to support changing the DSI bit clock dynamically
for video mode panels. This helps to avoid interference of
DSI clock with other subsystems runtime.

Change-Id: I05790a6dd9d8a2fc3cf31727d032e5220d6164e5
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2018-12-26 07:58:26 +01:00
Amine Najahi
c6077ea2a2 fbdev/msm: sanitize debugfs inputs when reading mdp memory
Sanitize debugfs inputs to only allow access to mdp memory block
specified in dtsi file. This change will allow only one single block
to be read at the time and will avoid accessing memory outside of valid
decode space which can trigger AHB error bus response.

Change-Id: Icede9a8939a66faa59d674c18183fb0ebcf67908
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2018-12-26 07:54:00 +01:00
liochen
8148b9d900 Synchronize codes for OnePlus5 & 5T OxygenOS 9.0.0
kernel device tree source code for OnePlus 5 & 5T P device

Change-Id: I84f40e66833ea1ce30eb1d9a710d6e1529e9e637
2018-12-26 11:02:39 +08:00
Padmanabhan Komanduru
30d6ebe136 msm: mdss: serialize dynamic fps and dynamic bit clock updates
Dynamic refresh update and dynamic bit clock switch cannot happen
on the same vsync boundary. Serialize them in the commit thread
to avoid vsync timeout issues.

Change-Id: I55077eca7415bf307ddd30040024b3716a78f6fd
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2018-12-08 22:53:13 -08:00
Narender Ankam
87c4ed87e3 msm: mdss: dsi: fix slab-out-of-bounds issue
While handling dsi_gen_read_status, status buffer
was xlogging without checking for its max size.
Add proper conditional check to xlog status buffer.

Change-Id: Ia5a1fe18de123d2911c31ae79492b96f67e1273d
Signed-off-by: Narender Ankam <nankam@codeaurora.org>
2018-11-27 00:01:30 -08:00
raghavendra ambadas
5bd1b3e226 msm: mdss: Fix potential null pointer dereference
Add NULL checks before accessing potential null pointers.

Change-Id: Ibdecaa7664c21a0acf57a3dd2c473f7407520f6b
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
2018-11-12 20:36:50 -08:00
Padmanabhan Komanduru
7c085a95a7 msm: mdss: add support to switch the DSI clock dynamically
Add change to support changing the DSI bit clock dynamically
for video mode panels. This helps to avoid interference of
DSI clock with other subsystems runtime.

Change-Id: I05790a6dd9d8a2fc3cf31727d032e5220d6164e5
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2018-10-11 20:23:49 -07:00
Amine Najahi
28dfcdc51a fbdev/msm: sanitize debugfs inputs when reading mdp memory
Sanitize debugfs inputs to only allow access to mdp memory block
specified in dtsi file. This change will allow only one single block
to be read at the time and will avoid accessing memory outside of valid
decode space which can trigger AHB error bus response.

Change-Id: Icede9a8939a66faa59d674c18183fb0ebcf67908
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2018-10-10 03:07:44 -07:00
Linux Build Service Account
8079168996 Merge "fbdev: msm: try recovering from PP timeout without panic" 2018-09-14 10:02:32 -07:00
Ch Ganesh Kumar
6bd5371814 msm: mdss: Fix Gamma LUT bounds condition
Validate the Gamma correction feature with all bound condition.
This change corrects the Gamma LUT block bound condition.

Change-Id: I3fc460b6a6e2e76f7c07b649e1db1e01ce208476
Signed-off-by: Ch Ganesh Kumar <chganesh@codeaurora.org>
2018-09-03 03:20:44 -07:00
raghavendra ambadas
a406b7c240 fbdev: msm: try recovering from PP timeout without panic
Driver dumps mdp register and xlog as soon as pingpong timeout
occurs. It is possible to recover device while waiting for TE signal,
so call panic if pingpong timeout happens for 10 consecutive frames.

Change-Id: I1661b21b3179f77a0a8daa8d2cde2115c7a38f5e
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
2018-08-31 09:48:22 +05:30
Linux Build Service Account
53e0e0d476 Merge "msm: mdss: Change function from disbale_irq_nosync to disbale_irq" 2018-08-07 15:24:14 -07:00
Rashi Bindra
fdbc0d26cc msm: mdss: Change function from disbale_irq_nosync to disbale_irq
Potential deadlock can happen while we disable irq and at the same
time an irq is triggered to request for the same resource. Thus,
it will pre-empt the spin-lock. Hence, change the function call to
disbale_irq to prevent local interrupts.

Change-Id: I7b80810b13660df8801533d418c78f2db75dd5b6
Signed-off-by: Rashi Bindra <rbindra@codeaurora.org>
2018-07-30 12:54:52 +05:30
Linux Build Service Account
60384a417c Merge "msm: mdss: use uaccess routines to access user space buffers" 2018-07-26 19:19:42 -07:00
Linux Build Service Account
de5fd0b3ce Merge "msm: mdss: Constant fetch across dfps" 2018-07-26 04:06:18 -07:00
Linux Build Service Account
b2cbbffddd Merge "msm: mdss: cleanup used pipes during overlay off" 2018-07-25 17:04:09 -07:00
Linux Build Service Account
4e72dda720 Merge "drm/sde: bridge chip error and smmu fault handling for recovery" 2018-07-25 17:04:06 -07:00
Animesh Kishore
43af76ad09 msm: mdss: Constant fetch across dfps
Timing engine HW restricts changing programmable fetch
start when off. Program constant fetch start in SW drivers.
Fix fetch start is calculated based on panel DT timings.

Change-Id: I2124c92b2f83d9c963e05c14421f61a08878d63b
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
2018-07-24 11:59:14 +05:30
Nirmal Abraham
a1655ade5d msm: mdss: use uaccess routines to access user space buffers
Use routines defined in uaccess.h (like put_user, get_user)
while accessing user space buffers. Otherwise this leads to
userspace access violation when PAN is enabled.

Change-Id: Iea16e347ee71f0845711a21b6b9b01e16a6ab619
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
2018-07-23 17:54:22 +05:30
Nirmal Abraham
5dda52d4de msm: mdss: cleanup used pipes during overlay off
During overlay off, cleanup pipes which are currently active
in used pipes list. This is to avoid to a race condition
wherein the pipe params gets changed in prepare cycle,
but the commit cylce has not executed to queue the buffers
associated with the pipe and the same pipe which has old
buffer(stale content) gets used from overlay_off flow.

Change-Id: I117e6ee9854ff287f7bb1055ca745760db980bed
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
2018-07-19 18:19:32 +05:30
Rahul Sharma
faa4206fb7 drm/sde: bridge chip error and smmu fault handling for recovery
This implementation adds the following support:

1. handle bridge chip error reported by driver to DBA. error reported
   to DBA will be send to recovery manager to recover the faulty
   bridge chip by performing a power cycle.

2. smmu fault error notification.

3. detection on errors in bridge chip driver.

Change-Id: I86cc491e3cd25fdcf9b998a0d687baba0a06d836
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
2018-07-19 10:08:28 +05:30
Animesh Kishore
6ab8fbb872 mdss: mdp: Constant fetch start across dfps change
Timing engine HW restricts changing programmable fetch
start when off. Fix fetch start in SW drivers.

Change-Id: I8ec80408a4ae36a7dfd963bc570fca9672d12341
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
2018-07-09 12:06:52 +05:30
Linux Build Service Account
3ff5bbb593 Merge "fb: msm_dba: disable timing generator correctly during suspend" 2018-05-24 02:46:42 -07:00
Sachin Bhayare
e9d6a3f0a7 msm: mdss: Increase fbmem buf ref count before use in mdp3
The reference count for fbmem buf is not increased before use,
which means it can be get freed unintentionally when the reference
count is decreased to "0". In this case, there is possibility of
use after free. Ensure that fbmem buf refcount is incremented
before use mdp3 driver.

Change-Id: I38787c27a26ae550c6fb28697a7583490ad19df8
Signed-off-by: Sachin Bhayare <sachin.bhayare@codeaurora.org>
2018-05-09 05:32:43 -07:00
Rahul Sharma
b324b3a169 fb: msm_dba: disable timing generator correctly during suspend
Disable the timing generator appropriately.

Register : 0x27, DSI Internal Timing Generator Enable register
BIT 7: DSI Internal Timing Generator Enable
BIT 6: DSI Internal Timing Generator Reset Enable

Change-Id: I8e0ddc9ca84db013393c75778a4117bf7279a804
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
2018-05-07 11:20:12 +05:30
Sachin Bhayare
b2edddb0e7 msm: Allocate fd with O_CLOEXEC flag
(cherry-pick from 'commit 580ec70acac4 ("fbdev: msm: Allocate fd
 with O_CLOEXEC flag")') and made similar changes
for MDP3.

When fd is requested during get_metadata call, create
fd using O_CLOEXEC flag.

Change-Id: Iaa55927ac04b019ea45fbdfe9c64b10d1f0e3ceb
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Signed-off-by: Sachin Bhayare <sachin.bhayare@codeaurora.org>
2018-04-27 14:18:05 +05:30
Linux Build Service Account
fa6082745d Merge "fbdev: msm: check buffer size before writing to user buffer" 2018-04-05 18:47:21 -07:00
Harsh Sahu
d24de74649 fbdev: msm: check buffer size before writing to user buffer
Check the number of bytes to copy against the size of the
user buffer before copy to user to avoid buffer overflow.

Change-Id: Icdd3d4e755deca19fa431e903620bd9e4c701c89
Signed-off-by: Harsh Sahu <hsahu@codeaurora.org>
2018-04-04 16:36:01 -07:00
Linux Build Service Account
8fd574794d Merge "msm: mdss: Fix for wrong length in copy_to_user" 2018-04-04 11:24:24 -07:00
Linux Build Service Account
907c971904 Merge "msm: mdss: hdmi: add pll_enable property to support clock recovery" 2018-03-24 00:27:22 -07:00
Linux Build Service Account
c4d8eef8df Merge "msm: mdss: hdcp_1x: call HDCP 1x APIs only if HDCP 2.2 is not present" 2018-03-23 14:43:47 -07:00
Rashi Bindra
a9c93223f4 msm: mdss: Fix for wrong length in copy_to_user
The caller could have a small buf passed (less then < blen).
Since, the length of count and blen is not checked, it can
write beyond the end of buf.

Change-Id: I9138cd742b6166937f3cc1cbf1af36f280c94bdb
Signed-off-by: Rashi Bindra <rbindra@codeaurora.org>
2018-03-19 17:06:12 +05:30