Commit Graph

71 Commits

Author SHA1 Message Date
qctecmdr
f92c898192 Merge "disp: msm: replace iommu_attach/detach with iommu_sid_switch" 2024-03-29 06:13:16 -07:00
Akhil Jaiswal
db089cbe45 disp: rotator: add changes to fix offsets for rotator modules
This changes includes updating the rotator register offsets
for Taro family targets.

Change-Id: I5145bd44bba13fd85dd93862b721dcf41dcc0aa4
Signed-off-by: Akhil Jaiswal <quic_akhijais@quicinc.com>
2024-02-26 11:02:47 +05:30
Akhil Jaiswal
d132c7b3fc disp: msm: rotator: add revision check for pitti target
This change includes hw revision check and adds
supported color format for decoder and encoder
of offline rotator.

Change-Id: I0ff20874f756743e1d2bf6b985952b028eeef488
Signed-off-by: Akhil Jaiswal <quic_akhijais@quicinc.com>
2024-01-25 14:58:36 +05:30
Andhavarapu Karthik
3b361d63e7 disp: msm: replace iommu_attach/detach with iommu_sid_switch
From 5.10 kernel, iommu_attach/detach_device is replaced with a call
to iommu_sid_switch.

Change-Id: I80d204d8b7a7013ad88c0c2c2e5fad316984ca8f
Signed-off-by: Andhavarapu Karthik <quic_kartkart@quicinc.com>
2024-01-19 15:03:53 +05:30
Gaurav LNU
e5bd17da29 disp: msm: rotator: fix typecast error
This change fix typecast error seen during
version comparison.

Change-Id: I7c3f98d45742ab4b0f5c13bd00b174507205464a
Signed-off-by: Gaurav LNU <quic_glnu@quicinc.com>
2024-01-04 23:22:15 +05:30
Vinod Polimera
3448ebeca6 disp: msm: rotator: add revision check for blair target
This change includes hw revision check and adds
supported color format for decoder and encoder
of offline rotator.

Change-Id: Ibc9271a8f56221b22ad040183f5311bfd0d2febe
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:22:11 +05:30
Vinod Polimera
e3a8090d04 disp: rotator: remove msm_rtb.h
This change removes msm_rtb.h which is depricated as part of
kernel 6.1 and replaces writel_relaxed_no_log/read_relaxes_no_log
with writel_relaxed/readl_relaxed apis.

Change-Id: Ie0bbb2e186445e16c52be12255c4ffe39869d454
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:22:01 +05:30
Vinod Polimera
dfca0b2264 disp: rotator: update parameters for vb2 get_userptr api
This change updates the parameters needed for vb2 get_userptr
api in kernel 6.1.

Change-Id: I43fb78c701f182e57d3f016ff54d3601f0773fff
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:21:47 +05:30
Vinod Polimera
07e8012420 disp: rotator: add version.h to import kernel version related macros
This change adds the latest header where the linux kernel
version macros are defined in kernel 6.1.

Change-Id: Ie42e0c6af08bad6418e56d00ef9f65a8edb9a51d
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:21:32 +05:30
Vinod Polimera
93e48fe2de disp: rotator: handle debugfs_create_bool properly
The return type of debugfs_create_bool is changed
to void in 6.1 kernel. Add changes to handle
this accordingly.

Change-Id: I1a5413d5f769bc6102918052aa9cdce606185196
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:20:02 +05:30
Gaurav LNU
2d706273cb disp: rotator: update mapped buffer size retrieval from sg_table
This change corrects the logic of accumulated size
of mapped entries of sg table for DMA BUFFER.

Change-Id: I2baef8d438cab8314c5526aac2ea8a3227176888
Signed-off-by: Gaurav LNU <quic_glnu@quicinc.com>
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:19:56 +05:30
Gaurav LNU
fbb942c2bb disp: rotator: use proper dma buf API for cpu access unmap
This change adds support to use dma_buf_vunmap
instead of dma_buf_kunmap as the latter is
deprecated.

Change-Id: I665c410b1f75854a8840e1da8a21ba2b5cc65ad8
Signed-off-by: Gaurav LNU <quic_glnu@quicinc.com>
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:19:50 +05:30
Gaurav LNU
0181500cc8 disp: rotator: handle debugfs_create_u64 properly
The return type of  debugfs_create_u64 is changed
to void in 5.10 kernel. Add changes to handle
this accordingly.

Change-Id: I326ae223bb4d1377d0c1c9ec7f64a5064888133c
Signed-off-by: Gaurav LNU <quic_glnu@quicinc.com>
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:19:15 +05:30
Gaurav LNU
fbfef15361 disp: rotator: use VFL_TYPE_VIDEO instead of VFL_TYPE_GRABBER
VFL_TYPE_GRABBER is renamed with VFL_TYPE_VIDEO
in v4l2 driver code. Add required changes to
handle this in rotator driver.

Change-Id: Ia4165295003867f661324bbf8a471fa1f27ddf72
Signed-off-by: Gaurav LNU <quic_glnu@quicinc.com>
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:19:05 +05:30
Gaurav LNU
985f8bc0da disp: rotator: set priority for rotator threads
Set the rotator threads priority (commit and
done) to RT.

Change-Id: Ia2db4a86efe1d3ca990cade8424a5c72b3d4595b
Signed-off-by: Gaurav LNU <quic_glnu@quicinc.com>
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:18:43 +05:30
Gaurav LNU
126186bb88 disp: rotator: remove deprecated dma_buf_ops callbacks
Map and unmap calls are removed from dma_buf_ops.
Add support to remove the deprecated callbacks
from rotator driver.

Change-Id: I93dff0629d1393983807e015dbd06293940dceb3
Signed-off-by: Gaurav LNU <quic_glnu@quicinc.com>
2024-01-04 23:18:16 +05:30
Gaurav LNU
ca333561cf disp: rotator: use proper color format name for sde rotator
This change updates the color format names and adds
the correct header file for rotator.

Change-Id: I198df87bc4f93a9b390beeba01c29c0c4fb641cc
Signed-off-by: Gaurav LNU <quic_glnu@quicinc.com>
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
2024-01-04 23:07:21 +05:30
GG Hou
398572ab21 disp: msm: rename dma-buf-map to iosys-map
The dma-buf-map struct has been renamed to iosys-map.
This change updates the usage of the struct and APIs in
the display driver.

Link: https://patchwork.freedesktop.org/patch/472236/

Change-Id: I5b48424dd5f8c60a28958a036ee2859963b059d2
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:07:55 -07:00
GG Hou
5624dc5b2e disp: msm: import DMA_BUF module symbols
This change imports the necessary DMA_BUF symbols from the module
as they are now contained within the module namespace.

Link: https://patchwork.kernel.org/project/dri-devel/patch/YU8oVDFoeD5YYeDT@kroah.com/#24477195

Change-Id: I18a0a812567425d55fedbab67f7a42d3f54351ca
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-10-10 11:05:05 -07:00
GG Hou
e29493c71d disp: msm: avoid using #ifdef for configurations
Use #if IS_ENABLED() instead of #ifdef for configurations as vendor module
guidelines.

Use #if IS_ENABLED(CONFIG_XXX) instead of #ifdef CONFIG_XXX to ensure that
the code inside the #if block continues to compile if the config changes
to a tristate config in the future.

The differences are as follows:
	1.#if IS_ENABLED(CONFIG_XXX) evaluates to true when CONFIG_XXX is set to
		module (=m) or built-in (=y).
	2.#ifdef CONFIG_XXX evaluates to true when CONFIG_XXX is set to
		built-in(=y) , but doesn't when CONFIG_XXX is set to module(=m).
		Use this only when you're certain you want to do the same thing
		when the config is set to module or is disabled.

Change-Id: Ia806b9b01ad8414d0e4de027a382cb68e7fb4a6a
Signed-off-by: GG Hou <quic_renjhou@quicinc.com>
2022-01-17 10:10:04 +08: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
Nilaan Gunabalachandran
2c320baeaf Revert "disp: msm: sde: update smmu fault handler to print debug info"
This reverts commit 0623a02a84. It leads to
panic during smmu faults because we do not have any recovery. Reverting
this will give the control to the client to dump if necessary.

Change-Id: I85982e129cabc73b041e25c35e965117d60f3bfa
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-07-13 17:43:37 -04:00
qctecmdr
72fb431a00 Merge "disp: msm: sde: update smmu fault handler to print debug info" 2021-04-02 18:50:47 -07: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
Nilaan Gunabalachandran
0623a02a84 disp: msm: sde: update smmu fault handler to print debug info
This change updates the smmu fault handlers in the display driver
to return -ENOSYS. This will print out useful debug information
from smmu driver.

Change-Id: I427982286abe4d592f270477c8ad2e2be74700c9
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-03-23 08:17:18 -07:00
Tatenda Chipeperekwa
c6257272d4 disp: msm: fix compilation errors for dlkm compilation
Fix dlkm compilation errors that are due to the use of -Werror
flags used by the build system.

Change-Id: I5e1e9bc63c1361d73e4930aab123212717872ecb
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2021-03-22 15:25:36 -07:00
orion brody
a076fe6f5c disp: rotator: Add msm_rtb.h header for no_log support
rtb driver is moved to tracepoint method as of 5.10, and there is no proper
support for no_log variants of read/write operations. Add dummy no_log apis
to msm_rtb.h file as temporary solution, and include msm_rtb.h in rotator
for no_log support.

Change-Id: I3f833fdfb741039a30a7d23aee2b20b9f62e14e1
Signed-off-by: orion brody <obrody@codeaurora.org>
2021-01-26 13:10:24 -08:00
Samantha Tran
13bb35435c disp: add changes to generate display dlkm in android
Add Android make files and Kbuild files to support dlkm
for display driver. Also resolve header and config issues
to allow successful compilation of display driver.

Change-Id: I04d6233864ea54c0a808b295fbdccb83058f1fd2
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-01-15 00:32:42 -08:00
Samantha Tran
df3f51f9c4 disp: msm: replace PTR_RET with PTR_ERR_OR_ZERO
Commit fad7c9020948 ("err.h: remove deprecated PTR_RET for good")
deprecated PTR_RET. This change updates the msm driver by
replacing it with PTR_ERR_OR_ZERO.

Change-Id: Ibe8cefd7b9ce27dc63886eb3861aab5fc8ba268a
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:58:38 -05:00
Samantha Tran
e199ecbfb8 disp: msm: remove debugfs_create_u32 return value
Commit 2b07021a940c ("debugfs: remove return value
of debugfs_create_u32()") removes the return value
from debugfs_create_u32. This change updates the msm
driver to remove cehcks on this return and corrects
for unnecessary line wraps.

Change-Id: I8d50dd7168921edfb2d5edad13941f91117d3c30
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:58:38 -05:00
Samantha Tran
790eda032e disp: msm: drmP.h removed, add new headers
Commit ("drm: delete drmP.h + drm_os_linux.h") removes the
drmP header file. This changes updates the msm driver
by adding the individually required header files.

Change-Id: I360aa028c2ce75317d33da988b36164041177014
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:50:47 -05:00
qctecmdr
2cff4ac8e7 Merge "disp: msm: register rotator platform driver after genpd init" 2020-09-28 04:39:41 -07:00
Yashwanth
2683324973 disp: msm: register rotator platform driver after genpd init
Due to power-domain, if rotator driver is registered early,
probe might get deferred several times and get stuck
indefinitely. So, this change adds driver registration
after genpd init to handle such cases.

Change-Id: I8dcb640d0ab0cdf0818cbce1b1fb460c28d8b9e7
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-25 21:16:42 +05:30
Yashwanth
af9841fa44 disp: msm: enable SDE rotator driver configs for GKI
This change enables and exports configs to support SDE
offline rotator in GKI. It also removes unused ioctls
for rotator compilation with GKI config.

Change-Id: I7f67aec394f644478173dcfe9e3ff52fe9129615
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-25 14:32:24 +05:30
Raviteja Tamatam
74dd4682cd disp: msm: sde rotator driver configs for probe only
Added code for dummy probe defined under
CONFIG_SDE_ROTATOR_INIT_ONLY to address cases where
rotator device node is defined but driver needs to be
disabled. This is stop gap arrangement until v4l2
configs are available in GKI.

Change-Id: I069b37f818d2e4401b3992f1f1e308858a7e29e6
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-09-25 13:49:23 +05:30
Zhao, Yuan
d9c2a8d3a6 disp: msm: disable regulator load after the regulator was disabled
Setting a lower load can make the regulator enter into LPM. Now the
lower load was set before the regulator disable, there's a risk here.
The regulator has been LPM, while it was not disable, if the cosumer
has a higher current needed than LPM at this time, that will lead OCP
on this regulator. The right operation for a regulator enable/disable
should be:
 1. regulator_set_voltage(vreg, active_min_uV, active_max_uV) and
    regulator_set_load(vreg, active_load_uA); in either order
 2. regulator_enable()
 3. regulator_disable()
 4. regulator_set_voltage(vreg, inactive_min_uV, inactive_max_uV)
    and regulator_set_load(vreg, inactive_load_uA); in either order

Change-Id: Ibe4f888a5675baf2691e479daa163d8867902e69
Signed-off-by: Zhao, Yuan <yzhao@codeaurora.org>
2020-09-22 00:45:36 -07:00
qctecmdr
6d59f959d3 Merge "disp: rotator: modify the args for sid switch call" 2020-09-10 03:35:50 -07:00
qctecmdr
32c625dba0 Merge "disp: rotator: add ubwc plane atomic check in rotator" 2020-09-09 02:29:19 -07:00
Mahadevan
6987497452 disp: rotator: set ib, ab bandwidth votes in KBps for interconnect
icc_set_bw api requires ib, ab votes to be in KBps.
The votes received from the userspace will be in the order
of Bps. This change makes the conversion from Bytes to
KiloBytes before applying vote on interconnect path.

Change-Id: I1c02e91be91bda7dcbfe058f3681034a12aedbc5
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2020-09-08 16:01:45 +05:30
Yashwanth
f4ce8b66ce disp: rotator: add ubwc plane atomic check in rotator
In some targets with offline rotator, ubwc might not be
supported. For those cases, this change adds ubwc
verification for plane during atomic check to prevent
crash.

Change-Id: Ie24a7ba823773204062993996746aa08171fe90f
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-08 13:56:55 +05:30
Yashwanth
d71039da0a disp: rotator: modify the args for sid switch call
Modify the size of SID's passed as an argument during
scm call as per client requirement.

Change-Id: I84bbd1e034ba6dcd8ded1ddf3913a735a2139663
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2020-09-07 22:54:31 +05:30
Raviteja Tamatam
4e007479a6 disp: msm: update uapi and device_caps change in rotator
Added uapi and device_caps changes to enable rotator
compilation and address video device registration failure.
Device_caps field is must for video device registration
unless it is sub device.

Change-Id: I7e2f517e5eb3fc5ec6306bd7cee5972dbbaff3d1
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-07-29 19:59:55 +05:30
qctecmdr
5cd8505102 Merge "disp: remove kernel mapping of writeback framebuffer" 2020-07-24 02:22:42 -07:00
qctecmdr
7c4ab87985 Merge "disp: msm: make rotator in msm_drm module" 2020-07-20 22:06:27 -07:00
qctecmdr
202cacbbc6 Merge "msm: disp: rotator: changes to enable rotator on 5.4 kernel" 2020-07-20 22:06:26 -07:00
Raviteja Tamatam
0a0acb4162 msm: disp: rotator: changes to enable rotator on 5.4 kernel
Few v4l2_ioctl_ops are deprecated on kernel upgrade. Made
changes to use the new simulated ops. Addressed compilation
issues on enabling rotator on 5.4 kernel.

Change-Id: I37add012306da433c4d7f8aaada3089b6ecdd819
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-07-13 13:33:53 +05:30
Krishna Manikandan
8303bc2669 disp: rotator: add rev checks for rotator for holi target
Add revision checks required for rotator for holi
target.

Change-Id: Ie35d888d7681c97d681e2b2d6b564e0a7e1f11f2
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2020-07-13 11:23:45 +05:30
Raviteja Tamatam
a36cdf6368 disp: msm: make rotator in msm_drm module
Make msm_drm into single module where rotator
is not separately compiled as different object.

Change-Id: I534cc19e6762c8584b6b87c2246b07beb85f84f4
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-07-10 14:49:26 +05:30
Narendra Muppalla
472784dfdd disp: remove kernel mapping of writeback framebuffer
This change removes the fb_kmap debugfs node along with kernel
mapping of writeback framebuffer. It also replaces dma_buf_kmap
calls with dma_buf_vmap.

Change-Id: I2fbee7fa5922071f6805d8e6df540ce87056bc0b
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-07-07 14:22:14 -07:00
Shashank Babu Chinta Venkata
8b8bfe0165 disp: msm: make msm_drm into single module
Make msm_drm into single module and all child driver
registers and unregisters are handled from parent's
register and unregister respectively.

Change-Id: I017513d1de3b6b25dd5543d7fa7741c0bac1740d
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2020-04-28 15:52:39 -07:00