This change addresses out of range and null checks in
sde driver.
Change-Id: I905d795edf6715aa990dd7bbaf061734e95ddea6
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
This change queues vblank work to event thread rather than
the display thread. This allows vblank events to be processed
without potentially being delayed by crtc commit being processed.
Change-Id: I9cbf9b3de646716e4698af9f338a7140346b65fd
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
There is potential byte alignment problem on 32bits OS which will
cause incorrect histogram blob id getting from the user space.
This change fixes byte alignment problem on 32bits OS by keeping
the struct members in one complete struct as the user space using.
In previous code start address of 'info' would align to multiple of 8,
so there would be 4 bytes padding between member 'event' and 'info'
on 32 bits OS. It is affected by member 'base'. But user space just
uses struct drm_msm_event_resp only, not affected by member 'base'.
Driver code intends to send drm_msm_event_resp, but actually send
unpacked members.
Change-Id: I5410f5b1626387707a57cbcef9c651aa11914d9d
Signed-off-by: Renchao Liu <rencliu@codeaurora.org>
This change moves the msm_driver power resource initialization from
bind time to probe time. This keeps the resource vote on until all the
devices are bound. This is required since the regulator and clock
sync_state driver will remove the proxy votes as soon as msm_driver
has probed.
Change-Id: Icb0e59e4ff0290ef0c1bd3914d6fdbf99bf5d9fa
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
With the introduction of sync state drivers, msm_drm probe can be
moved back to module level from late init. It is now guaranteed
that the dependencies are probed before the actual driver is.
Change-Id: Ib7c3e0e3c3d32b37b7672b6119bcf5371783659d
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Currently the compression ratio is hard-coded to either 2:1 or
3:1 in several places. This is not sufficient for new compression
algorithms as they can support higher compression ratios.
Add support for calculating the compression ratios from the source
and target bpp thereby eliminating hard-coding.
Change-Id: I6383f3d0c781193d0a9ed74df5a95d8e856edb3d
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
The DRM framework only calls the driver's preclose callback
function if the LEGACY driver feature is enabled. Therefore
strip out this logic as it never gets executed since LEGACY
is not supported for msm_drm driver.
Change-Id: I95474cd5424423ef194faae12f1241698f3e467e
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
Since some APIs previously used during lastclose are no longer
exposed to drivers (__drm_atomic_helper_disable_plane, and
__drm_atomic_helper_set_config), make kms a DRM client and use
the drm_client_modeset_commit_force API to do lastclose cleanup.
Change-Id: I543392fe79558a3996e326a0f222793c56d71e4f
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
This change delays the probe of msm_drv by changing the init call
order to ensure that all the dependent resource drivers are
probed and all resources are available for use by the msm_drv.
Change-Id: Icc225bd14052a8d83e9976fbaa9c83c17f5319aa
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
This snapshot change adds downstream support
for drm 5.x+(msm_lahaina branch) linux kernel.
Change-Id: Ia691c95da155a00e449c91a2f1a5b20a8e71aed4
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Update the topology allocation by considering the required
mode clock (vtotal x htotal x fps * fudge factor). Modes with
a clock that exceeds the maximum SDE clock will be denoted as
requiring a topology that uses two layer mixers.
Change-Id: I3c773598b0d79cb6fea9d3a0e04d89ff84d67e13
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This change corrects the definitions of functions
invoked when their config keys are not enabled.
Change-Id: Iba4631b8019a5e5a6b95516c5c9f9e28942e60c9
Signed-off-by: Jayaprakash <jmadiset@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>
Current sde driver allows vblank enable and wait requests
even after crtc is disabled which would eventually lead to
enable of irq and timeouts in caller context. This change fixes
it by updating vblank callback status as 'on' during crtc enable
and shutdowns vblank callbacks before crtc disable is complete.
Change-Id: I52b74f685107f4dc8c83305c28f23cdcb4747730
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
This snapshot ports changes from 4.14 to 4.19 into
the msm and sde layer. Snapshot was taken as of
commit 0f8fb25421ff ("cnss2: Add device version to
SOC info structure").
Change-Id: I59b799a78319c2db6930a2a10bc38976f8c09898
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
When trying to get the display up on my sdm845 board I noticed that
the display wouldn't probe if I had the dsi1 node marked as "disabled"
even though my board doesn't use dsi1. It looks like the msm code
adds all nodes to its list of components even if they are disabled. I
believe this doesn't work because all registered components need to
come up before we finish probing. Let's do like other DRM code and
only add available components.
Change-Id: I00738a7f9fa572f12067066e86ea7974693b3aab
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Link: https://patchwork.kernel.org/patch/10712329/
Git-commit: d1d9d0e172
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Current sde driver allows vblank enable and wait requests
even after crtc is disabled which would eventually lead to
enable of irq and timeouts in caller context. This change fixes
it by updating vblank callback status as 'on' during crtc enable
and shutdowns vblank callbacks before crtc disable is complete.
Change-Id: I9085103ced06e5fad51219f26bd8dd655fa36fea
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
Add runtime_pm ops support in drm driver instead
of direct sde_power_resource_enable/disable call.
It allows drm driver to use runtime pm refcount logic
to track the resources instead of custom implementation.
The change also removes the NRT_CLIENT support from
sde_power_handle code to simplify it further.
Change-Id: Ib14692dca5876703d0a230da2512d731b69b8ebb
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This change brings msm display driver including sde,
dp, dsi, rotator, dsi pll and dp pll from base 4.19 kernel
project. It is first source code snapshot from base kernel project.
Change-Id: Iec864c064ce5ea04e170f24414c728684002f284
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>