Commit Graph

732 Commits

Author SHA1 Message Date
Abhinav Kumar
849041b3fe disp: msm: replace usage of drm_connector with sde_connector for hdr10+
Since the VSVDB parsing has been moved to the sde edid parser, replace
the usage of drm_connector with sde_connector for hdr10+ so that the
modifications to drm_connector can be removed.

Change-Id: I7d69aa533e71fa45bfc578db24c17bb23e499c4a
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-02-19 13:47:39 -08:00
Abhinav Kumar
28ccb5f9de disp: msm: add VSVDB parsing support to sde edid parser
Add VSVDB parsing support to sde edid parser. This is required
for HDR10+ support. Currently the parsing is done in the upstream
edid parser. This shall be removed in a subsequent change.

Change-Id: Ibd3a31e12bba68e14e278e0e478656453eb111ac
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
2020-02-19 13:08:48 -08:00
qctecmdr
c15f349088 Merge "drm: msm: handle resolution switch for LTM" 2020-02-19 10:32:00 -08:00
Gopikrishnaiah Anandan
1690129d60 drm: msm: handle resolution switch for LTM
DPU configuration should be changed when resolution switch happens at
the layer mixer level for ltm feature. Driver should mark ltm properties
as dirty when resolution switch happens. Change handles dynamic resolution
switch for ltm by marking the properties as dirty.

Change-Id: I5ffc8e74c42da6c2902eb42fd2e3ed1b9f9e3e4c
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2020-02-17 07:52:01 -08:00
Amine Najahi
af07b8a5d4 disp: msm: sde: add support for hardware based rounded corner
Add support for hardware based rounded corner part of
color processing framework.

Change-Id: I3e5f4dac6ffc759bb940215b7621ac716f255169
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-02-16 01:03:58 -08:00
qctecmdr
f1f9f4cdb3 Merge "disp: msm: sde: add pm_qos support for cmd mode display" 2020-02-14 13:18:50 -08:00
qctecmdr
6777ca872c Merge "disp: msm: sde: populate WB display encoder list before dsi" 2020-02-14 12:39:37 -08:00
qctecmdr
b960967df9 Merge "disp: msm: sde: fix issues with dsc config" 2020-02-14 12:00:49 -08:00
Steve Cohen
818651c2f1 disp: msm: sde: use sde_dt_props object to parse dspp dts
Use the new helpers for parsing DSPP device nodes entries.

Change-Id: I620ba80cac90f34faa1f853f00cf856370ae387c
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-02-13 22:06:13 -05:00
Steve Cohen
e1e4771b77 disp: msm: sde: create helper for getting CTL & mixer dts properties
Simplify device node parsing by using a new structure for
temporarily holding the read properties and create helpers for
getting/freeing all the properties in a sde_prop_type table.
This patch uses these helpers for CTL and mixer parsing,
other blocks will be refactored as well.

Change-Id: I546f32baea8fc09c36a7f24b042f1f1615770b72
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-02-13 22:01:19 -05:00
Narendra Muppalla
42a8aea8fc disp: msm: sde: add pm_qos support for cmd mode display
Add/remove pm_qos request during sde encoder resource
controller enable/disable for command mode display.

Change-Id: If3247eb215a58eaae3ee0b4c7a90e7f5254e690c
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-02-13 16:07:03 -08:00
Narendra Muppalla
d28ebf05f4 disp: msm: sde: populate WB display encoder list before dsi
This changes swaps the order of encode initialization between
wb and dsi displays. This ensures that wb encoder is registered
before DSI/DP encoder in mode_list and it allows single CRTC
to loop through WB encoder before other encoder during mirror mode
topology like CWB use case. With existing order of encoder list, CWB
flush is happening after primary commit flush which is causing cwb
failures when there is a cpu latency.

Change-Id: I24d6b4f27271d46e9743d17a624ac7e0930f7474
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-02-13 13:12:37 -08:00
Narendra Muppalla
f5666717c7 disp: msm/sde: add CWB support for lahaina target
This change updates the block offsets for concurrent writeback 
blocks and fixes the register dumping logic.

Change-Id: I41b540773fea60e66cab5d476dff1a19b4f4b3db
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-02-13 11:09:06 -08:00
Abhijit Kulkarni
970ea08286 disp: msm: sde: fix issues with dsc config
This change fixes issues which causes corruption for dual dsi
dsc panel. It fixes the number of slices configured on
dsc hw block and handles deriving correct picture width from
mode timings. Additionally it fixes the core max buffer sizes
used by the hw block.

Change-Id: Iec0ef80528425ffcb5f29d469bd181eb7040de16
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-02-12 22:19:15 -08:00
qctecmdr
516ec3cf98 Merge "disp: msm: sde: remove an uninitialized index variable" 2020-02-12 20:50:19 -08:00
qctecmdr
2e6b26c260 Merge "disp: msm: sde: add enc_id check before decrement avail HW resources" 2020-02-12 20:10:24 -08:00
Steve Cohen
dd9f329b96 disp: msm: sde: set prop_count for U32 and BOOL type device node props
Set the prop_count corresponding to unsigned 32-bit integers and
boolean types to 1. With this change prop_count should have a
positive value for all properties which exist under the device node.

Change-Id: I601870dc25ab347b742fcc4aa2f6bea2397c6caf
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-02-12 20:40:40 -05:00
Jayaprakash
f7d08feb38 disp: msm: sde: add enc_id check before decrement avail HW resources
Add changes to commit and decrement only those
hardware resources which are required for the modeset.

Timeline of Commit C1 with CWB modeset:
---> Atomic_check
	Primary encoder has allocated required HW resources.
 	CWB encoder has allocated required HW resources.
---> Atomic_commit
	On primary encoder, connector is seamless hence
	there is no virt_modeset call.
	On CWB encoder, there is virt_mode_set call
	and during commit HW blocks there is unconditional
	decrement for all the HW blocks with rsvp_nxt.

This change ensures hardware blocks are available during
dp display mode validations.

Change-Id: Ifd9439cfc96e727c3093af5f47802c8367775cd7
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2020-02-12 13:34:41 -08:00
Steve Cohen
7fc26f91b2 disp: msm: sde: let dma-fence driver set timestamp on signal
Avoid corrupting the cb_list by setting timestamp before signal.
The fence driver changed in msm-5.4 by creating a union for the
fence cb_list, timestamp, and rcu. Therefore only one of these
fields can be used at a time. Fence driver will take care of
setting the timestamp during dma_fence_signal after it has
cached the cb_list. Also, use fence framework API to set fence
error instead of modifying the dma_fence struct directly.

Change-Id: I58dbaa495027cb575f4f0b03275ca4aa551ecacb
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-02-11 16:57:09 -08:00
Narendra Muppalla
b03a7413a4 disp: msm: sde: remove an uninitialized index variable
Avoid exposing any uninitialized data when setting up the
interrupt tables.

Change-Id: I00d3dc8b5acc843401148585a129fde58e326beb
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-02-11 13:05:00 -08:00
qctecmdr
9beffdfdc6 Merge "disp: msm: sde: program dither based on input data" 2020-02-10 17:19:07 -08:00
qctecmdr
0ee986b2f8 Merge "disp: msm: dp: update the definition of atomic_check function" 2020-02-10 16:11:19 -08:00
Narendra Muppalla
f402d8e542 disp: msm: sde: program dither based on input data
This change programs dither based on user mode input data and
reprograms the dither when device comes out of power collapse.

Change-Id: I83be20c8eb2dc2221cc57cd2395f6512338ff6ef
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2020-02-10 15:33:42 -08:00
Tatenda Chipeperekwa
cf71a83fba disp: msm: dp: update the definition of atomic_check function
Update the definition of the atomic_check function for
DisplayPort connectors to align with the DRM upstream changes.

Change-Id: Id942c8ef16ae773540c4bc7221e0b784354a527c
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-02-10 11:34:43 -08:00
Tatenda Chipeperekwa
3b1a8807fd disp: msm: dp: use sde_drm.h shared header from techpack path
Update sde_drm.h header to use the display techpack path for
kernel-5.4.

Change-Id: I2b7dcbbde8128eece7a2a8a652f9f7c427b38110
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-02-10 11:34:28 -08:00
Tatenda Chipeperekwa
56d9849705 disp: msm: dp: add mixer count check in dp mode validation
Add mixer count check in dp mode validation for mdp clock.

Change-Id: I37fe3037d7f7efc7bdc2a7446457af8a8e34684c
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-02-10 11:34:06 -08:00
Tatenda Chipeperekwa
27ec789570 disp: msm: dp: fix widebus-enable setting for dp
Fix and decouple widebus-enable flag from dsc_en for dp.

Change-Id: I2d31bc367f007d4c918babc1c051492544bbb05c
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-02-10 11:32:07 -08:00
Tatenda Chipeperekwa
6f0828d9a7 disp: msm: dp: update mode validation logic for widebus
Update the mode validation logic by halving the mode clock
when widebus is enabled.

Change-Id: I8f060d8b60403aa5020496983bec0b3e2878b08b
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-02-10 11:31:50 -08:00
Tatenda Chipeperekwa
dbe4ebc8fd disp: msm: dp: skip edid reading for mst branch
When DP is working in MST mode, reading native EDID from MST
branch is not a valid operation.

Change-Id: I297d2b25b2c3166d68ef3eba941ca787d8bce8d3
Signed-off-by: Xiaowen Wu <wxiaowen@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-02-10 11:31:07 -08:00
qctecmdr
52161a09b6 Merge "disp: msm: sde: move resource state change to display thread" 2020-02-07 15:10:32 -08:00
qctecmdr
394cb141e4 Merge "disp: msm: sde: fix dsc hw resource reservation" 2020-02-07 14:00:32 -08:00
Abhijit Kulkarni
2c6c071e45 disp: msm: sde: move resource state change to display thread
In the current kernel version calling kthread_mod_delayed_work
in irq context is not allowed. Due to this resource control state
change to idle on frame done is handled in display thread context.

Change-Id: I709f7e04ac23d7dde72cea1c19d3767b6abc147e
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-02-07 10:33:08 -08:00
Christopher Braga
e5383fac2e drm: msm: sde: Centralize last command logic for SB DMA
The original SB DMA last command logic results in multi
feature sets being applied across different frames. Update
the SB DMA logic to do a single last command per CTL path
to ensure all features using SB DMA can get applied in the
same frame.

Change-Id: Ida837765c0f018b0e03afb0a33ece625a0df81eb
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2020-02-06 14:34:00 -05:00
Christopher Braga
fe087fde3c drm: msm: sde: Attempt DB DMA fallback if SB DMA not supported
The current implementation of DSPP GAMUT + IGC programming rely on
SBDMA for programming. This will cause GAMUT + IGC to be
unprogrammable on derivative Lahaina chipsets that do not have SBDMA
support.

Update the SBDMA handling to more intelligently check if SBDMA is
present, and fallback to DBDMA module where possible.

Change-Id: I89d07e38459ab59b96c69558178b8e97062ed93d
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2020-02-06 14:33:32 -05:00
Christopher Braga
c5378278f3 disp: msm: sde: Add SSPP Gamut support using new opcode
A new LUTDMA opcode is added to LUTDMA V2 to speed up certain LUT
programming. This change updates the SSPP Gamut LUT programming using
the new opcode and new LUT BUS.

Change-Id: I8b88483dc3acbfcdbd6f441bc2105f4368fa42bb
Signed-off-by: Ping Li <pingli@codeaurora.org>
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2020-02-06 14:22:09 -05:00
Christopher Braga
8d5499f14d disp: msm: sde: Add DSPP Gamut and IGC support using SB LUTDMA
Add new implementation for DSPP GAMUT and IGC features using
newly added SB LUTDMA.

Change-Id: Iebc099351fde058d7f0e20a9e256bcd71c557506
Signed-off-by: Ping Li <pingli@codeaurora.org>
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2020-02-06 14:22:01 -05:00
Christopher Braga
5e28b86e3c disp: msm: sde: Add support for SB LUTDMA
A new LUTDMA HW instance has been added to support programming of
SB features via LUTDMA. This change adds corresponding support for
the new SB LUTDMA, including catalog parsing, reg_dma init/deinit/ops
updates and new opcode support.

Change-Id: I0fed7a6e93cd96fe9fe562d2470a8789b161d1bc
Signed-off-by: Ping Li <pingli@codeaurora.org>
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2020-02-06 14:21:53 -05:00
Christopher Braga
aa818a2f5b disp: msm: sde: Add flush support for DSPP SB
Extend unified flush bit support to control new DSPP
SB LUTDMA bit.

Change-Id: Iba941a4bcd140ceb88e49ab83700c4baef804e0f
Signed-off-by: Ping Li <pingli@codeaurora.org>
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2020-02-06 14:21:44 -05:00
Tatenda Chipeperekwa
9fd310830e disp: msm: sde: remove colorspace property from connector
Remove colorspace property from connector until upstream
changes are merged and we can validate the related features.
This change is required to enable DP bring up activities.

Change-Id: I6c1af61732e572b2ffd16e0a323d08154aa83b53
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2020-02-06 11:19:37 -08:00
Abhijit Kulkarni
06ca9dd1e5 disp: msm: sde: fix dsc hw resource reservation
In atomic test phase DSC Hw block should be allowed to be reserved
without checking the mode information. Mode information is not
available before bridge enable is called and this results into dsc
not programmed very first mode set.

Change-Id: Ia9ec9a3c9387e34a8bb1d98ee6932aef8725bc8c
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-02-06 10:56:56 -08:00
qctecmdr
3da2742a90 Merge "disp: msm: sde: fix max downscale check for legacy HW" 2020-02-06 10:02:45 -08:00
qctecmdr
ebb7a67bd3 Merge "disp: msm: sde: reduce complexity for sde_crtc_install_properties" 2020-02-05 17:25:56 -08:00
qctecmdr
6eab0179f2 Merge "disp: msm: sde: fix spacing of #defines" 2020-02-05 16:21:37 -08:00
qctecmdr
5e8abb667b Merge "disp: msm: sde: use helper to determine plane pre-downscale cap" 2020-02-05 15:38:02 -08:00
qctecmdr
1f146a39a5 Merge "disp: msm: dsi: call pll set rate directly instead of a function pointer cb" 2020-02-05 13:55:32 -08:00
qctecmdr
23c62b5d23 Merge "msm: drm: uapi: add rounded corner uapi" 2020-02-05 12:51:43 -08:00
qctecmdr
13c967c3cf Merge "disp: msm: sde: intf accept 64-bit compressed pixels" 2020-02-05 11:54:03 -08:00
Steve Cohen
6a2bd3aabb disp: msm: sde: reduce complexity for sde_crtc_install_properties
Reduce the cyclomatic complexity for installing CRTC properties.

Change-Id: I42572413713b3a079fb5edcaa25d9050b76adc6c
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-02-04 16:04:35 -05:00
qctecmdr
c89633ed36 Merge "disp: msm: add support for variable compression ratios" 2020-02-03 00:11:10 -08:00
Satya Rama Aditya Pinapala
64ee7e84b3 disp: msm: dsi: call pll set rate directly instead of a function pointer cb
The clock framework nulls the clock hardware init data, after a variant
of clk_register is called on the clk_hw pointer.  This results in a null
pointer dereference when we try to call set rate in the PLL prepare
function. The call can be a direct call to the function rather than
trying to access through the init_data pointer of the clk_hw.

Change-Id: I3613eea915d4f5620d7f0258ae391ad2ac624148
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-02-02 14:35:06 -08:00