In plane atomic_check function, the error code
from one of the checks is overwritten by the
return-value of subsequent check. This leads to
wrong return-value propagation resulting in
undefined behavior. Fix it to return the appropriate
error code on any failure.
Change-Id: I53b427d1b69c3ebfaa6709814bd9095676ff942d
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
allow other device drivers to find this drm panel in global registry
Change-Id: I945bdbe9d8ed85dbb20f876e72687d6363c27492
(cherry picked from commit 9fd9ee68951d477aa9be580b047adcb72eff55c3)
Signed-off-by: Harpreet "Eli" Sangha <eliptus@google.com>
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Remove deprecated smmu api's and add support for new api's
in rotator driver.
Change-Id: Ib7a3f48fe22867725e1224caf3489bf47044e37b
Signed-off-by: Shubhashree Dhar <dhar@codeaurora.org>
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>
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>
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>
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>
This change updates the DSI_MODE_MAX macro from
5 to 32.
Change-Id: Ic5ef1005bec525248315daab71bae9ac591ee149
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
Changes to incorporate the different clock names for
lito and kona.
Change-Id: I607366f75426a819226aa252819b507dba07109d
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
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>