Wykres commitów

38 Commity

Autor SHA1 Wiadomość Data
Narendra Muppalla
daa511cb90 Merge remote-tracking branch 'quic/display-kernel.lnx.5.10' into display-kernel.lnx.5.15
* quic/display-kernel.lnx.5.10:
  disp: msm: sde: avoid error during fal10_veto override enablement
  disp: msm: update copyright description
  disp: msm: sde: configure dest_scaler op_mode for two independent displays
  disp: msm: dp: updated copyright set for 4nm target
  Revert "disp: msm: sde: consider max of actual and default prefill lines"
  disp: msm: sde: Reset backlight scale when HWC is stopped
  disp: msm: dp: avoid duplicate read of link status
  disp: msm: dsi: update vreg_ctrl settings for cape
  disp: msm: fail commit if drm_gem_obj was found attached to a sec CB
  disp: msm: dp: updated register values for 4nm target
  disp: msm: sde: update framedata event handling
  disp: msm: dsi: Add new phy comaptible string for cape
  disp: msm: sde: software override for fal10 in cwb enable
  disp: msm: update cleanup during bind failure in msm_drm_component_init
  disp: msm: sde: dump user input_fence info on spec fence timeout
  disp: msm: sde: add null pointer check for encoder current master
  disp: msm: dsi: enable DMA start window scheduling for broadcast commands
  disp: msm: sde: avoid alignment checks for linear formats
  disp: msm: reset thread priority work on every new run
  disp: msm: sde: send power on event for cont. splash
  disp: msm: sde: always set CTL_x_UIDLE_ACTIVE register to "1"
  disp: msm: use vzalloc for large allocations
  disp: msm: sde: Add support to limit DSC size to 10k
  disp: msm: sde: add tx wait during DMS for sim panel
  disp: msm: dsi: add check for any queued DSI CMDs before clock force update
  disp: msm: sde: correct pp block allocation during dcwb dither programming
  disp: msm: sde: avoid setting of max vblank count
  disp: msm: sde: add cached lut flag in sde plane
  disp: msm: sde: avoid use after free in msm_lastclose
  disp: msm: sde: update TEAR_SYNC_WRCOUNT register before vsync counter
  disp: msm: dsi: Support uncompressed rgb101010 format
  disp: msm: sde: update idle_pc_enabled flag for all encoders
  disp: msm: sde: flush esd work before disabling the encoder
  disp: msm: sde: allow qsync update along with modeset
  disp: msm: dp: avoid dp sw reset on disconnect path
  disp: msm: sde: consider max of actual and default prefill lines
  disp: msm: ensure vbif debugbus not in use is disabled
  disp: msm: sde: update cached encoder mask if required
  disp: msm: sde: while timing engine enabling poll for active region
  disp: msm: enable cache flag for dumb buffer
  disp: msm: sde: disable ot limit for cwb
  disp: msm: sde: avoid race condition at vm release
  disp: msm: dsi: set qsync min fps list length to zero
  disp: msm: sde: reset mixers in crtc when ctl datapath switches
  disp: msm: sde: update vm state atomic check for non-primary usecases
  disp: msm: sde: reset CTL_UIDLE_ACTIVE register only if uidle is disabled

Change-Id: If480e7f33743eb4788549f853ba05e744ecb38d3
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-02-08 16:38:13 -08:00
Jayaprakash Madisetty
3fb9c29953 disp: msm: fail commit if drm_gem_obj was found attached to a sec CB
This change fails the drm_atomic_commit and avoids S2 translation
fault if drm_gem_object is found attached to a secure context bank
during non secure session. In the current codeflow, we are detaching
the gem object from secure CB and reattaching it to non secure CB,
but only S1 pagetables entries get modified and S2 pagetables entries
are not corrected since hyp_unassign is not called with CP_PIXEL
VMID which can only be done by client when buffer gets allocated.

Change-Id: I62302064f96276ef82044ee88fb89e295fb96b4b
Signed-off-by: Jayaprakash Madisetty <quic_jmadiset@quicinc.com>
2022-01-21 16:20:14 +05:30
Prabhanjan Kandula
dddb10147f disp: msm: enable cache flag for dumb buffer
For dumb buffer allocation switch to cached flag
from current use of write combine.

Change-Id: Ic3dc88ff83a083e4f386c2aecc27ce71324e06f5
Signed-off-by: Prabhanjan Kandula <quic_pkandula@quicinc.com>
2021-12-09 16:08:25 -08:00
Narendra Muppalla
7c5d715673 disp: msm: snapshot change for mdp driver to support multiple SIs
This change adds support in mdp and dsi driver to support
multiple SIS.

Change-Id: I432068cea17e1784d7570a472fbadaa86695df07
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-11-30 14:42:51 +08:00
Bruce Hoo
88c7d83030 disp: msm: adapt inactive list management for multiple SIs
Commit bfb91aa ("Fix a null pointer access in msm_gem_shrinker_count()")
moves the point at which msm_gem_object is added to inactive list. Moving
this ensures that initialization will be complete before adding the
object to the list.
This change makes commit bfb91aa adaptive for both kernel-5.10 and
kernel-5.15.

Change-Id: I8efb66e239e2f8f56a3989370a58b96932a19f76
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
2021-11-30 11:56:30 +08:00
Bruce Hoo
87c65e29e4 disp: msm: adapt msm_gem ops and drm_drver callbacks for multiple SIs
Commit d1d1173 ("disp: msm: update msm_gem ops and remove unused
drm_driver callbacks") Update msm_gem and msm_drv to comply with
latest 5.15 kernel.Modify dma_buf_vmap() and dma-buf's vmap callback
to use truct dma_buf_map. Rename dma_resv_get_excl_rcu to _unlocked.
Remove deprecated GEM and PRIME callbacks.
This change adapts all the interface change for kernel version 5.10
and version 5.15..

Change-Id: Icb495dc4e5d20999f773ed5881eff233ff3a48bc
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
2021-11-30 10:50:34 +08:00
Steve Cohen
5fe7c2f8a0 disp: msm: remove gem functions without callsites
Many upstream files and APIs have been removed in downstream
driver. Some function definintions are left dangling without
any caller. Remove the functions which are not used downstream.

Change-Id: I9f936e7cdac3be6f854b3c67725164fad785f0d4
Signed-off-by: Steve Cohen <quic_cohens@quicinc.com>
2021-10-26 11:34:59 -07:00
Bruce Hoo
d1d11731f1 disp: msm: update msm_gem ops and remove unused drm_driver callbacks
Update msm_gem and msm_drv to comply with latest 5.15 kernel.
Modify dma_buf_vmap() and dma-buf's vmap callback to use
struct dma_buf_map. Rename dma_resv_get_excl_rcu to _unlocked.
Remove deprecated GEM and PRIME callbacks.

Change-Id: Ifdfc7f872c988d8455f465e7d17dfbcf212bb5f6
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:27:27 -07:00
Bruce Hoo
bfb91aa63f disp: msm: Fix a null pointer access in msm_gem_shrinker_count()
This change moves the point at which msm_gem_object is added to
inactive list. Moving this ensures that initialization will be
complete before adding the object to the list. This change also
removes unused functions from msm_gem.c.

Change-Id: Id8fa04cc88a21e04108ae21b18d5acc761ef4c6e
Signed-off-by: Bruce Hoo <bingchua@codeaurora.org>
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:27:01 -07:00
Jeykumar Sankaran
83ddc159d0 disp: msm: remove stale ION references
After adapting dma buf api's these references and
paths are unusable. Clean it up.

Change-Id: Id6fa76945132e312e8bacf6e430633b0db9e48a3
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-10-15 17:24:53 -07:00
Samantha Tran
8c62ff4082 disp: msm: retry dma buf attach on msm_gem_delayed_import error
In the event when msm_gem_delayed_import returns an error, reset
the obj_dirty property to true to allow the buffer to detach and
attach again.

Change-Id: Ib8da8f237c5a4ab696675cbcf66f1a3dfae02639
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-09-16 14:14:02 -07:00
Samantha Tran
9c771fe6e1 disp: msm: avoid begin/end cpu_access calls based on dma-coherent attribute
This change avoids unnecessary calls to dma_buf_end_cpu_access and
dma_buf_begin_cpu_access for context banks which have dma-coherent
attribute set.

Change-Id: I5120e55bed372d166d05da988714551428964b8b
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-08-27 09:48:45 -07:00
Samantha Tran
2c2224bdf3 disp: msm: remove use of DMA attributes LLC_NWA and Upstream Hint
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>
2021-08-16 12:00:33 -07:00
Satya Rama Aditya Pinapala
28f8734077 disp: msm: fix CPU mapping for memory buffers
The DMA buffers used by the display module are cached buffers. While
mapping to the CPU, pgprot_writecombine should only be used for uncached
buffers. The change fixes this mismatch during virtual address mapping.

Change-Id: I2f54375b4eb4071d9bbcae44449bb6c99feb24a6
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-07-08 10:47:21 -07:00
Nilaan Gunabalachandran
9f954a19ff disp msm: sde: add get gem buffer utility
This change adds a utility for mapping gem buffer objects based
on a frame buffer object. This utility will be used as
a basis for different driver components.

Change-Id: Ia9f2a42a9f8898c98478091b8e1cd06849145417
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-04-06 08:48:30 -04:00
Prabhanjan Kandula
81ecb37301 disp: msm: add qcom dma mapping header for dma attributes
Refactoring of iommu headers is moving few downstream attributes
defines to new header from dma-mapping.h. This change includes
the qcom header for downstream attribute defines.

Change-Id: Ia1f9f40f2cb8090dc7b7e3cbe0b632449c44c3b0
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-04-02 11:24:55 -07:00
Rob Clark
245ac819b6 drm/msm: remove msm_gem_free_work
Now that we don't need struct_mutex in the free path, we can get rid of
the asynchronous free all together.

Change-Id: I82406450e3a5d0d49d3fb753c621f55e8f4af088
Signed-off-by: Rob Clark <robdclark@chromium.org>
Git-commit: c951a9b284b907604759628d273901064c60d09f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-03-29 13:17:21 -07:00
Rob Clark
fd50a1ec69 drm/msm: Add priv->mm_lock to protect active/inactive lists
Rather than relying on the big dev->struct_mutex hammer, introduce a
more specific lock for protecting the bo lists.

Change-Id: I4c876a1c3ae51ff62372703a99a8daff0c4a7950
Signed-off-by: Rob Clark <robdclark@chromium.org>
Git-commit: d984457b31c4c53d2af374d5e78b3eb64debd483
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[samtran@codeaurora.org: avoid changes related to debugfs and shrinker]
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-03-29 13:16:53 -07:00
Kristian H. Kristensen
a145e793b2 drm/msm: Implement .gem_free_object_unlocked
We use a llist and a worker to delay the object cleanup. This avoids
taking mmap_sem and struct mutex in the wrong order when calling
drm_gem_object_put-unlocked() from drm_gem_mmap().

Fixes lockdep problem with copy_from_user() in msm_ioctl_gem_submit().

Change-Id: Idfe54ae8108158b69f3835f26991642d1e21f8ee
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Git-commit: 48e7f18392c66f9b69ebac11c54f1a2e033ced54
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[samtran@codeaurora.org: resolve trivial merge conflict]
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-03-29 10:47:03 -07:00
Abhijit Kulkarni
11bb31225c drm: msm: set non-secure context bank as default address space
This change defaults each msm_obj buffer to non secure context
bank. This allows the cache maintenance operations to be performed
correctly on the msm_obj if it is used for GEM buffers.
For dma-buf heap buffers plane would assign the correct aspace
based on fb translation mode property.

Change-Id: Id07f844f0fe55bbe6b4d0748019a13455b510fb8
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2021-02-11 10:31:27 -08:00
Samantha Tran
262099e94a disp: msm: replace kzfree with kfree
This change replaces kzfree with kfree as kzfree has been
renamed.

While moving to the latest 5.10 tip, additional small changes
were required to resolve compilation issues:

set_dma_ops has moved from dma-mapping to dma-map-ops header.
This change includes the new header file required.

drm_panel_add returns void, this change removes the expected
return value check.

drm_prime_pages_to_sg takes an additional parameter. This change
passes in the drm_device pointer the function is looking for.

Remove an unused variable in sde_crtc vblank function.

Change-Id: I47c085c0cb64432873c2e750ae64cbdc2b5340da
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2020-12-22 10:42:18 -08:00
Samantha Tran
bb6569b1ab disp: msm: gem_free_object removed from drm
Commit 1a9458aeb8eb ("drm: remove drm_driver::gem_free_object")
deprecates gem_free_object. This changes updates the msm driver
to call msm_gem_free_object from gem_free_object_unlocked.

Change-Id: If6bd6252232045975357e1bdfbeae6017b0f2ed5
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:49:19 -05:00
Samantha Tran
6fa94ff382 disp: msm: rename drm_gem_object_put functions
Commit b5d250744ccc ("drm/gem: fold drm_gem_object_put_unlocked
and __drm_gem_object_put()"), commit eecd7fd8bf58 (drm/gem: add
_locked suffix to drm_gem_object_put", commit be6ee102341b ("drm:
remove _unlocked suffix in drm_object_put_unlocked") updates
the drm_gem_object_put call APIs. This change updates the relevant
changes to the msm driver.

Change-Id: I006b51b5f3d1f8b2e88ed7b4c73b5a98afcaf455
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:49:19 -05:00
Jayaprakash
babaee2f7f disp: msm: re-apply dma_map_attr during secure-UI to secure-vid transition
Add changes to re-apply the dma_map attributes during secure UI
to secure-video transition to avoid mismatch of attributes
between the import_attach newly created and the msm_iommu
mappings already existed.

Change-Id: I5a902d6d88c6ea9f633b4396e8121c2b14708f31
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-10-23 16:40:46 +05:30
Jayaprakash
d1b2e0be42 disp: msm: sde: add verbose evtlogs for debug purpose
Add changes to extend the current evtlogs for ease
of debug purposes.

Change-Id: Ibe136afbf25b8b8decfc06ef3868e3f628df4dcb
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-10-14 11:19:05 +05:30
Veera Sundaram Sankaran
88037da799 disp: msm: fix vram allocation when IOMMU is not present
Allocate DSI/LUTDMA buffers from VRAM when IOMMU is not
available. Add checks in msm_gem to avoid few operations
when aspace is not available due to no IOMMU. Parse the
VRAM size from device tree, when available.

Change-Id: Iedf5749b71c2e772ac5434048520a34705c54b45
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-06-24 16:20:38 -07:00
Krishna Manikandan
9cb06f9b21 disp: msm: avoid unlocking mutex_lock twice
Remove mutex unlock from msm_gem_get_iova_locked
as acquiring and releasing the lock are handled
in the caller function.

Change-Id: Ie4a8408d3e6308d19eb26aafee8dfe15bcb682da
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-06-08 11:39:54 -07:00
Veera Sundaram Sankaran
68b75aac24 disp: msm: use FB_NON_SEC_DIR_TRANS plane hint for TUI VM buffers
Add plane buffer flag to get the correct aspace during
TUI VM usecase. FB_NON_SEC_DIR_TRANS plane flag is set
by user-mode to indicate S2-only non-secure buffer in
TUI VM. Return the default drm device when SMMU is not
available during get_aspace_device to make the working
seamless with/without SMMU.

Change-Id: I158dc17ba51ff4b2f302d3e7017db8ab3cfe2b84
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-05-11 12:11:39 -07:00
qctecmdr
dfc3e3ddc8 Merge "disp: msm: sde: add sys cache usage for static image" 2020-05-01 17:58:07 -07:00
Nilaan Gunabalachandran
83ee51cb5a disp: msm: sde: add sys cache usage for static image
Store full or partial static image in system cache (L3 cache)
for video mode primary display. Added additional commit to
crtc commit thread to transition to read cache state.
The change also updates llcc APIs to support generic functionality.

Change-Id: I6b2a45da946d7e0e0b326da9d214be3f01a9420e
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-04-27 15:12:17 -04:00
Narendra Muppalla
d07ef2efe0 disp: msm: fix kw issues in sde and dp driver
This change addresses out of range and null checks in
sde and dp driver.

Change-Id: I142196d7394f0bf0abab1bfa89abfd784a5521c8
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-04-24 16:01:02 -07:00
Yashwanth
9d7c72743d disp: msm: remap dmabuf attach during secure transitions
During secure cb detach, gem objects stored in the aspace
active list are not cleaned up properly leading to crash
when secure cb attaches again. This change remaps dma
buffer for those gem objects.

Change-Id: I7626e87ab60a61261c802a7e7763982546c4c2e7
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-03-29 19:25:27 -07:00
Veera Sundaram Sankaran
a9574eb8c2 disp: msm: perform delayed buf attach during secure transitions
While transitioning from secure usecases, the secure
context bank is attached back only during the commit
phase. This leads to invalid secure context-bank device
issue, when the prime_to_fd call is made for the next
frame. Avoid it, by attaching to default drm device
during the prime_to_fd call and reattach it to the
secure context-bank device at the delayed import time.

Change-Id: I43e6da7f117f20746943a48b5f2657e9ae2947ea
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-03-29 16:50:07 -07:00
Steve Cohen
79d42e98f1 disp: msm: attach address space to msm_gem_object
Ensure the msm_gem_object gets a reference to valid address space
so that sg sync can be properly performed.

Change-Id: Iee7cf49689861b863b3b3bfb3b4b9919ad17caa9
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2019-11-26 14:30:24 -05: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
Samantha Tran
27b60379d1 disp: msm: get and release lock on msm_obj before put iova
This change will acquire the proper lock before calling
put_iova and release the lock on return.

Change-Id: I04334597018a6041eab0107660b2d441f8e3cc92
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-08-19 11:55:59 -07:00
Krishna Manikandan
da4c79c55b drm/msm: avoid unmapping the buffer twice during msm_release
The dma buffer associated with the gem object is already
unmapped during put_iova. Avoid unmapping it again in
put_pages.

Change-Id: Iac57e164dde6f3e5913070acbe74b42691049913
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2019-05-03 11:29:59 -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