This change resets panel_dead property at the end of dsi bridge post disable.
Currently as part of the ESD recvoery sequence, dsi_bridge_enable resets this
property, but WD vsync source is selected before this point based on the older
panel_dead status. With this change, panel_dead will be in a proper state and
the correct vsync source will be selected during recovery.
Change-Id: I6d614113cfb0ae8a857974bb4d4f8ceb5988a0c8
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Secondary VM will do a disable commit when transferring HW
ownership back to primary. This will end up disabling the CMD
engine before releasing HW back to primary VM. Primary is
unaware that the engine has been disabled and ends up in a
bad state until it gets re-enabled.
This issue was introduced by: commit 65f3cc3 (disp: msm: dsi:
allow cmd-engine enable/disable HW op at all times).
Fix the issue by ensuring CMD engine does not get turned off
in the display disable path for trusted VM.
Change-Id: I1638a181d136e18a836c3ba08daee1c5fcaa9de3
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
This reverts commit 3617430855.
This change will re-enable qseed programming through lutdma.
Change-Id: I57b897088eeccddc63ee010e296b5d4622d27a9f
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Current DSC intial line calculation is giving extra line on top of
recommended value from systems since number of active soft slices
considered is wrong. Fix the number or usage of active soft slices
in an encoder to align dsc initial line with recommended setting.
Change-Id: I321260e22b7824b8c481a55b54831ce9535661cc
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Update dsc configuration and pps programming for 422 and
420 encoding as per the DSC hardware spec.
Change-Id: I4251614cdcd550ed724b1d0dba4846cada4b5392
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Current SDE driver computes rc parameters considering only bpp
and chroma format and its values do not match the recommended
settings. Add a look up table for these dsc encoder format
specific initial rate control settings.
Change-Id: Iff4cd0534618eb043351fd2a9c7759b8ee503f76
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Simplify dsc encoding format index look up by clubbing
dsc v1.1 and v1.2 tables.
Change-Id: I145ff4e301758d2991ca992fc6616ed2e7b72754
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Add safety checks to check for dp link and core clocks before accessing
the main control registers during dp teardown or dp setup.
Change-Id: Ic80050b7c1cec59d7fc27a1c5f12fa1b244f86fb
Signed-off-by: Vara Reddy <varar@codeaurora.org>
Bottom start must be lesser than display height by at least
one line.
Change-Id: I36fbf68ee6733c020f235dca04c4b00c1e5a2312
Signed-off-by: Anjaneya Prasad Musunuri <aprasad@codeaurora.org>
During DSC-NonDSC usecase, submode should be passed to
dsi_display_find_mode to differentiate between the modes
containing same timing info. This change adds submode
argument to find the correct mode in such cases.
Change-Id: I82284aeb9c3fd187c4f0961443dd1d0893a3c094
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Remove DMA_ATTR_IOMMU_USE_LLC_NWA and DMA_ATTR_IOMMU_USE_UPSTREAM_HINT
attributes as they are no longer needed since io-coherency is enabled.
Passing this attribute is a no op since buffer is io-coherent and will
be mapped with a write allocate policy contradicting intention
of that attribute.
Change-Id: I882f148d770c795eb005c5391171a6280c083d37
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Drm file is not set to NULL after freeing it from drm
release. This can result in use-after-free issues in
some scenarios. Add a mutex lock and other proper null
checks to prevent such issues.
Change-Id: Ic35b0a76166b0f47a354b1737e6f4c3ac1437ed4
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
To ensure that no other command transfer is in progress, during DSI
TX operation through debugfs, panel lock needs to be acquired.
Change-Id: I8d3871e32277840867d9494720e77df3566e30d3
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Add a utility function to check if HW has been handed over to
another VM.
Change-Id: Ic36ca1e7f15f7608e69d69fc3f4e7ad40be15704
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Early wakeup ioctls from perf HAL driver can access display HW
registers and come as a sideband to atomic commits. Since the
atomic validate checks are not part of this code path it's
possible for HW access to occur during a trusted UI session.
Prevent this whenever the HW is not under this VM's ownership.
Also, move the VM ownership check for the register/deregister
event ioctl to cover both the CRTC and connector events since
new connector events are being added which can access HW.
Change-Id: I39660ae60e7e8f8a405e819c43ec42fbac3f492a
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Unmult feature is currently using offsets from previous targets.
This leads to unexpected alpha transparency errors on screen.
This change updates the new offsets based on hw version and
retains the original offsets for backward compatibility.
Change-Id: Icdba050371a583f1a20b91a451be3324de12c2cf
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Current timeout values in sde driver for vblank, kickoff and
frame complete timeouts are fixed and can be much lower than
a vsync incase of low refresh rate display. Compute timeouts
based on refresh rate for low refresh rate displays.
Change-Id: I9dda41feb15446de7451824e185321de421ad575
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
SDE IRQ callback can run in parallel thread to modeset after removing
pp_done wait before pre_modeset.
If cur_master is cleared in encoder enable function and irq callback
is triggered at the same time, the irq callback could not be handled
properly as cur_master is NULL.
So remove clearing cur_master in encoder enable function to avoid the
race condition between modeset and irq callback.
Change-Id: I2059c699a68838b3c9f6a7dd658a35f178b18c42
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
Currently the DP driver always uses a compression ratio of 3, if
DSC is enabled. So if the sink supports 30bpp, the compressed
output is set to 10bpp. But since the hardware supports
compressing this to 8bpp, it would require less link bandwidth
than 10bpp compressed output. For compliance testing, the
test equipment limits the link bandwidth based on the most
efficient compression ratio and for some resolutions there
is not enough link bandwidth for 3:1 compression.
This change always sets the compression output to 8bpp to
minimize the link bandwidth utilization.
Change-Id: Ifa6129444c2bab4e9c357ddfe49f76efa5b04be0
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
Updating the TU calculator to fix the formulas for the following
two use cases:
* 3.75:1 DSC compression
* Modes with RB2 (reduced blanking) timing.
Change-Id: I295e3fc252691a7fb42b610101da32c9f31d1855
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
This change adds support for qsync min refresh rate per
timing mode and populates qsync min refresh rate based
on the current fps when qsync is enabled.
Change-Id: I191d1d72e95dd065c8c0b56a6100104c00c6d8f6
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
When all instances of driver fd's are closed by user-space client, drm driver
will be closed. When last close of driver is called, custom reset properties
api will be called where driver should cache the properties that it wants to
clear. Current behavior of color processing driver is to clear hardware
configuration instead of caching which can cause crashes if clocks are off.
Change updates the driver to cache the pending disable and update hardware
during display commit.
Change-Id: I9703f860ed0ae3c859d6fc3995b58be13203f259
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Expose the number of RC hardware blocks to handle multi-display
use cases where RC feature needs to be enabled only if there
are sufficent RC hardware blocks available.
Change-Id: I37fe3ee4ac72894d9d51e832551d3fc19c0354b8
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Currently mode fixup function is called multiple times
in the same commit. This causes invalid combination of
DSI mode flags to be set when there is an RFI change
with proch compensation feature enabled.
This change modifies the mode switch condition for DMS
to compare internal dsi mode and flags and fixes the
dynamic clock change detection by using a single variable.
Change-Id: Iaf9c8ca7c6a27f26aefead399bc93fbbb02b404b
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Currently when RFI is used on a video mode panel the horizontal or
vertical front porch values can be adjusted to maintain a constant FPS.
When this feature is enabled, driver is not propagating the new
htotal or vtotal values to usermode for accurate BW and MDP clock
calculation, which may lead to underrun in some usecase.
This change publishes beforehand all the RFI related timing
such as compensation type, hfp or vfp and clock values for
each mode for accurate BW and clock calculation.
Change-Id: Ib89c5e318fe978b0ae2215dedc430e057a9a81b9
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
The brightness value from backlight device is OS brightness, not panel
backlight value. This change corrects the brightness bound check to
check against the OS brightness max value instead of panel backlight max
value. This change also move the bound check in dsi display to make sure
the max backlight value send to panel is within the expected range.
Change-Id: Ic9e3ba69700ae4c0e950cb665837a1f0a1317b26
Signed-off-by: Ping Li <pingli@codeaurora.org>
This change updates rsvp_cur pointer to latest to avoid use
after free issues. rsvp_cur pointer can be freed in few cases due
to the unlock, wait and lock of rm_lock present in
_sde_rm_poll_get_rsvp_nxt_locked.
Change-Id: I389048188e8a615edc3e75dd1102d4ca8c74af65
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>