msm: mdss: brin include/linux/msm_mdp.h up to speed (thx to Arter97)

msm: mdss: Add SMP parameters into hw capabilites

To handle use cases better, expose smp_mb_cnt and
smp_mb_per_pipe to userspace as part of hardware capability.
Pipes availablity for a use case can be computed taking these
values, based on which, composition decisions can be made.

Change-Id: Ia7cc4db153cdb164a29ae2369d3e991b95aaba65
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

msm: mdss: Add backlight attenuation mechanism in AD auto strength mode

AD backlight attenuation provides the ability to modulate backlight based
on calibration before feeding it to AD core for strength computation.

Change-Id: Iea011807b25882463b1142e17324fa0509007aa4
Signed-off-by: Ping Li <quicpingli@codeaurora.org>

msm: mdss: Add update notify for backlight change in static screen

Previously, the change of backlight sysfs node value will not trigger
notify updates if display is in static screen case. This will cause
delay or wrong configuration for assertive display. This patch fixes
the above issue by adding an update notify if backlight changes when
there are no display updates.

Change-Id: I1475896214a50dc1fa71739aa751b2e626d27adb
Signed-off-by: Ping Li <quicpingli@codeaurora.org>

msm: mdss: synchronize wfd driver iommu mmap/munmap with mdss

Add clocks reference during wfd driver iommu mdp_mmap/mdp_munmap
to ensure iommu is in proper state while wfd driver map/un-map
any buffers.

Change-Id: Id1a24285b81d5047e5e9f002ade9694ea49be59d
Signed-off-by: Pawan Kumar <pavaku@codeaurora.org>

msm: mdss: move MDSS revision macros to /linux/msm_mdp.h

Currently kernel driver and user mode libraries keep their own
copies of HW revision numbers. This strategy is prone to errors
and usually frowned upon. Fix this by moving revision information
to sanitized header which is shared by kernel drivers and user mode
libraries.

Change-Id: I59d1256ffd98e07f4ef9ae2b534f04b67abd2119
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>

msm: mdss: Use MDP_SOLID_FILL to enable color on pipe

To enable constant color on a pipe, set MDP_SOLID_FILL in pipe
flag. This will do a solid fill on the pipe with the color
specified in bg_color.

CRs-Fixed:592032
Change-Id: I3201e2fa657a6fc6d0e7f51f8585366afc3d29a3
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

msm: mdss: Define AD BL linearity LUT size independent of maximum BL value

Previously the AD BL linearity LUT size was dependent on the maximum BL
value for the hardware. Now it has been defined to a fixed value so that
the LUT is consistent across hardwares.

Change-Id: I11cc2f135118cf3f63fdeca820f4c8430f9d127d
Signed-off-by: Benet Clark <benetc@codeaurora.org>

msm: mdss: Add six zone LUT size as PAv2 parameter

Added six zone LUT size as a parameter to PAv2 in order for the size to be
specified by the user. This size is sanitized based on the required LUT
size.

Change-Id: Iaf1b418ce1a3ec4b5013b1192c7f3b7de5827e3d
Signed-off-by: Benet Clark <benetc@codeaurora.org>

msm: mdss: Block postprocessing updates during DTM

When calibration tool requests the fb driver to enter in
Display Tuning Mode (DTM), PostProcessing blocks should
not update the HSIC, Memory color, Six Zone colors, etc.
Updating them during DTM conflicts the update from
calibration tool.

Change-Id: I11fcac57a651581d85e771911f83b2fdd9c3c681
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>

msm: mdss: Support demo mode for post processing

Add demo mode feature for numerous post processing features. In dual pipe
case, demo mode allows for either the left or right pipe's feature to be
disabled to showcase its effects. Features supported include assertive
display, gamut mapping, panel gamma correction, inverse gamma correction,
dithering, picture adjustment (v2 only), and polynomial color correction.

Change-Id: I8bceeffc11967ff23497df7739e6f99c30d2b10f
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>

msm: mdss: Realign PAv2 structure

Changed fields in the PAv2 struct in order to pack it more efficiently

Change-Id: I81fbebd4e2df87d922cc318675c5c4ae7e6e00c0
Signed-off-by: Benet Clark <benetc@codeaurora.org>