When plane is detached from crtc in one atomic commit and then
attached to another crtc in the next atomic commit, the second
plane state swap will happen when the first commit is still running
in the previous crtc's worker thread, which will result in two
threads programming the same plane and run into undeterministic
state.
Fix is to add plane_mask check before state swap, together with
crtc_mask check. This will make sure there is no pending worker
thread working on the same plane.
Change-Id: I64cd4b68fa9746e988d933069ac0f8083d974c79
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
With the new ASYNC power-mode changes, user-mode can
request for retire/release fences during power-mode
changes. This is used as a signal for power-mode
completion by user-mode. Allow preparing/signalling
these fences during crtc enable/disable to support it.
Change-Id: I7709cd4762c8d77776ba6ba2d07aa6b76b5262d0
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Update minimum prefill lines for command mode
displays based on system recommendation for
different fps. Video mode display can support
prefill lines based on panel porches.
Change-Id: I52dc67035fa80668281926ce4d7dd1b292fbc3b7
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This change adds a check for the length of the buffer
before copying it to avoid a buffer overflow.
Change-Id: I9af9d422e0b3cf02c8d6662af3310337a9861a7a
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Limit clock rate of shadow VCO clock as normal VCO clock.
For larger bit clock rate gap between switched ones, the clock switching
would fail due to mismatched VCO clock rate between normal VCO clock and
shadow one.
Change-Id: I9d68725de360ac28c243a3ce1800bfb139f39757
Signed-off-by: Yujun Zhang <yujunzhang@codeaurora.org>
Add support to pass extended capability information to the DPCD
debugfs node. This will help to validate features like VSC support
using debugfs node.
Usage will be the same as before and the change will automatically
detect the presence of extended capability field and expect
additional bytes of information.
Change-Id: If541fd8837aac4794c3db0fa3badeab4143ff9c3
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Add the colorspace property for DP controller for MSM. Also, change
the default method to send the colorimetry information to the sink
from MISC bits of MSA to VSC SDP packets if the sink supports it. This
helps to avoid dynamic switches between the packet types for sending
the colorimetry information during BT2020 and DCI-P3 use-cases.
Change-Id: I7ddf879a187b023fcf7404d64028e4d19b031119
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
CRTC client type is wrongly identified as RT_CLIENT
for WB as the API considers only RT and RT_RSC. Resolve
it by adding a new API to check for RT CTRC.
Change-Id: I1f216f60a18215426e594d0f8b09852af376799d
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Currently a lot of information is packed into the HDR data structure of
the catalog panel making it difficult to individually control the
parameters like colorimetry and other information sent using
VSC SDP packets.
Break up the structure into individual VSC SDP colorimetry, HDR
infoframe and DHDR VSIF packets.
This makes it easier to control each of these parameters independently.
For example, when only the colorspace is changed its sufficient to
update only the VSC SDP colorimetry packets.
Also align these packets with the upstream DP helper header defines.
Change-Id: Ia208f30a480fd203192624fe4f3d99c1c89350dc
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Populate the supported colorspaces property for DP
as part of getting the display modes.
This will expose the supported colorspaces of the sink to
userspace and in-turn the userspace shall pick the colorspace
suitable for the use-case.
Change-Id: I70408c719610bc63f9c06dad8cd50f7fa5d94908
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
The UIDLE s/w maintains few state variables based
on which ctl & debug counter hw setup is skipped
few times. Skipping this during idle-pc restore
leads to UIDLE not setup correctly. Fix the state
checks to allow programming the HW.
Change-Id: Ie4be207ebaa4bd1eaebc63b3548837ef611efde7
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
Input handler is used for early wakeup DSI and MDP clocks from
idle power collapse. DSI clock won't be disabled in video mode
during idle power collapse, so the input hanlder isn't needed
for video mode.
This change avoids the input handler to be registered in
video mode.
Change-Id: Id23bad192b6671126978d707db464e7aaee1c77f
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
DP specification mandate test pattern #4 for CTS 1.4a. Add
support for the same in link training #2 as per specification.
CRs-Fixed: 2490128
Change-Id: I2f72fec340b56270e7fd1c2940adafe1068bab43
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Print uidle status fal10 enable bit as part of checking status.
Change-Id: Ibe00216ac22bb31fbe0925db3abc1d5dc4371ad3
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
RM does not currently check dsc pairs while reserving, but
this could lead to an incompatible pair being allocated. The
hw restrictions are populated from dtsi and checked during
rm reservation.
Change-Id: If561e2bd64c7643ed9ee71a255242eab84576673
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
This change adds a check for the length of the buffer
before copying it to avoid a buffer overflow.
Change-Id: I146895660be4060d9896706636257a57c6aef94f
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
During an ESD trigger, a check must be done to ensure
that ESD is enabled on the particular panel. If not the
panel might end up in a bad state, if the trigger is
propagated successfully instead of reporting a failure.
Change-Id: I310578e7136301ab75ba7f44f14d36ed7e6a519c
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Helper function is returning the width of single mixer. During
atomic crtc check, the number of destination scaler is not
considered before width check and can fail possible higher
resolutions. The mixerwidth should be taken as a multiple of
num_ds_enabled.
Change-Id: Id9e5e0ccf0cebb54d2a242e039d8dc3676b3729f
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Adding prefixes for error, debug and info
messages in dp files. To enable debug logs
run "echo 0x100 > /sys/module/drm/parameters/debug"
CRs-Fixed: 2493739
Change-Id: Ibf509e837f527be6bff6b7a1c34b0cde2921b388
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Update the minimum encryption level only when there is a request
to do so coming from the DRM framework. This will ensure that any
previously set value will not be overwritten while processing
other commands. Failure to preserve the minimum encryption level
can result in secure content playback failure if the sink device
is not updated with the correct value.
Change-Id: Ie9a555a57617096fbdb9e46dd29a973b9223e237
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This change makes the post PPS command delay a panel property.
By default the value is set to zero if not specified.
Change-Id: I50c86ba0f0cb28ff617435e92e9675e5c35404ca
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Adding debug, info and error prefix for log messages
in dsi files. To enable debug logs
run "echo 0x1 > /sys/module/drm/parameters/debug"
Change-Id: I438ac16954bd1d39450f8adeb7fb17f9ea6f8140
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>