Commit Graph

24 Commits

Author SHA1 Message Date
Narendra Muppalla
d6141f8472 disp: msm: fix kw issues in sde driver
This change addresses out of range and null checks in
sde driver.

Change-Id: I905d795edf6715aa990dd7bbaf061734e95ddea6
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-03-30 15:22:34 -07:00
Samantha Tran
bf06be4737 disp: msm: queue vblank work on event thread
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>
2020-03-29 19:24:15 -07:00
Renchao Liu
b3cb4343b1 disp: msm: Fix byte alignment problem on 32bits OS
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>
2020-03-29 16:52:16 -07:00
Abhijit Kulkarni
a752925112 disp: msm: sde: re-factor probe time initialization
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>
2020-03-23 12:07:40 -07:00
Satya Rama Aditya Pinapala
d97b665e1d disp: msm: move msm_drv probe to module level
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>
2020-03-02 11:38:00 -08:00
Abhinav Kumar
e3f23771ba disp: msm: add support for variable compression ratios
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>
2020-01-29 13:46:57 -08:00
Linux Build Service Account
6ad6641d3a Merge changes I36a55b91,Icc225bd1 into display-kernel.lnx.1.0
* changes:
  disp: msm: sde: update shmbridge header file path
  disp: msm: delay msm_drv probe
2019-12-09 12:26:54 -08:00
Steve Cohen
ae2dceb0b6 disp: msm: sde: remove all preclose logic
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>
2019-12-09 08:36:00 -08:00
Steve Cohen
ff5365a1e0 disp: msm: make kms a DRM client for lastclose logic
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>
2019-12-09 10:57:54 -05:00
Abhijit Kulkarni
29fecbebc7 disp: msm: delay msm_drv probe
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>
2019-12-06 10:19:45 -08:00
Narendra Muppalla
d1d9ae8b19 Disp: Snapshot change for lahaina display driver
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>
2019-11-24 12:30:51 -08:00
qctecmdr
1f35fd007a Merge "disp: msm: update topology based on clock requirement" 2019-09-21 03:22:17 -07:00
Tatenda Chipeperekwa
da892c0b91 disp: msm: update topology based on clock requirement
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>
2019-09-20 14:39:54 -07:00
Jayaprakash
669557d6eb disp: msm: add changes for bengal target compilation
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>
2019-09-18 19:32:32 +05:30
Abhijit Kulkarni
484d909f94 disp:msm: fix return type from runtime api
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>
2019-06-20 15:53:04 -07:00
Lakshmi Narayana Kalavala
9e17babe6a disp: msm: sde: turn off/on vblank callbacks as per crtc
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>
2019-05-30 16:13:09 -07:00
qctecmdr
9c05197ef9 Merge "disp: msm: sde: use wr_ptr interrupt instead of ctl_start" 2019-05-24 09:38:19 -07:00
Samantha Tran
3be27eafcc disp: msm: snapshot of msm and sde driver
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>
2019-05-22 13:08:31 -07:00
Manoj Kumar AVM
6af277472c Revert "disp: msm: sde: turn off/on vblank callbacks as per crtc"
This reverts commit 16bfab7ddf.

Change-Id: I5c5ef6a2fcb83607acd2c737f574199c010c89fa
Signed-off-by: Manoj Kumar AVM <manojavm@codeaurora.org>
2019-05-21 18:33:54 -07:00
Douglas Anderson
9455b48fbb drm/msm: Only add available components
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>
2019-05-09 14:04:18 -04:00
qctecmdr
8205140d9c Merge "disp: msm: sde: turn off/on vblank callbacks as per crtc" 2019-05-05 19:42:43 -07:00
Lakshmi Narayana Kalavala
16bfab7ddf disp: msm: sde: turn off/on vblank callbacks as per crtc
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>
2019-04-26 17:03:21 -07:00
Dhaval Patel
a74d2cf7fa disp: msm: add runtime_pm ops support in drm driver
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>
2019-04-24 13:27:48 -07:00
Narendra Muppalla
3709853456 Display drivers kernel project initial snapshot
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>
2019-04-14 22:20:59 -07:00