Commit graph

566368 commits

Author SHA1 Message Date
Padmanabhan Komanduru
bd891cc200 msm: mdss: fix DCS backlight control when broadcast mode is enabled
When broadcast mode is enabled, we trigger DCS commands when cmds_tx
is done on controller 1. This call is missing in the path of
backlight control using DCS commands. Add this call to fix DCS
backlight issues for broadcast mode.

Change-Id: I18193375e180a42fb1db42fb1d52a976b660ae1c
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2016-03-23 20:27:28 -07:00
Xiaoming Zhou
dae49a725d msm: mdss: indicate splash screen condition explicitly
Earlier, we were using if the iommu is attached condition
to check if it is in the splash screen. In the command
mode panel, as part of xo shutdown, we need to detach the
iommu as well, in the idle screen case. So, it is not a
proper condition to determine if it is in the splash screen.

Change-Id: I1740e381abf2e4a8989cfb2f2f7f4819363ffaa2
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
2016-03-23 20:27:28 -07:00
Adrian Salido-Moreno
8a0519cedb msm: mdss: set pipe to solid fill when releasing it
There are cases where pipe can remain active for additional vsync after
unstaging from mixer, if this ever happens it will keep fetching from
memory. In order to avoid this, we can setup the pipe in solid fill mode
so there is no memory access after pipe is released by software and
avoid potential iommu page fault or underrun since pipe is no longer
considered for bandwidth calculations.

Change-Id: I4b5a5deda8c854c504ef523df434509fa5567186
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-03-23 20:27:27 -07:00
Terence Hampson
5489812b63 mdp3: Increase timeout to determine ppp core hung
We were seeing in some corner cases were 40ms was not enough
to complete a ppp request.

Change-Id: Ie2a95bceeddb2f4cf49f6497a449e0755fc36ce7
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:27:26 -07:00
Aravind Venkateswaran
6eac8c7e92 msm: mdss: Turn off MDP GDSC in idle screen for cmd mode panels
For command mode panels, the DSI lanes can be configured to an
Ultra Low Power State (ULPS) during idle screen use case. In such
cases, it is possible to turn off the MDP GDSC as MDP is completely
idle. This would result in reducing any leakage current. Add
support for this feature.

Change-Id: Ic4074f9e12a27fe0fbe95219ffaa2f466abee307
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:27:25 -07:00
Aravind Venkateswaran
23c867e2cd msm: mdss: Add support for ULPS mode for DSI
For smart panels that can refresh display from their internal
RAMs, it is possible to configure the DSI clock and data lanes
in Ultra Low Power State (ULPS) during idle static screen
usecase. Add support for this feature.

Change-Id: I4e94d6a0201262f0675322efc9e39dd93c86edda
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:27:24 -07:00
Aravind Venkateswaran
9b89c7b776 msm: mdss: dsi: remove unused memory mapped resource
There are more than one instances where the DSI registers
are memory mapped in the driver whereas only one instance is
being used. Remove the reference to the unused resource.

Change-Id: Ia213e94b43bf58446eead47b18cadeb36d6795a7
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:27:23 -07:00
Dhaval Patel
e56b049554 msm: mdss: Do not override ARGC setting on LM
Layer mixer configuration overrides the ARGC
setting when it updates the blend color settings.
This removes the ARGC setting configured by post
processing module and calibration tool in tuning mode.
This change reads the ARGC setting and applies
it back during blend color setting.

Change-Id: I72612ad428e58a1e343e94ab965137628bcce661
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:27:22 -07:00
Ujwal Patel
71443cd17a msm: mdss: add support for 565 macro tile formats
Extend macro tile format support to rgb565 and bgr565.

Change-Id: Ida93ac7fbf93819b4d20f7392edc7df5a95f7979
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:27:22 -07:00
Ujwal Patel
7a445b2bf8 msm: mdss: restrict decimation when layer format is macro-tile
When layer format is macro-tile, decimation cannot be supported. Add the
necessary checks to fail HW configuration for such use-case.

Change-Id: I68adbcdf8014f9ad528e945928f309b221c6dcfd
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:27:21 -07:00
Pradeep Jilagam
ab39144279 msm: mdss: signal timeline appropriately for mdp3
There is a chance that we miss signalling mdp3 timeline
when the scheduling of the relevant workqueue goes out of
sync due to system load. Handle this scenario appropriately
so that the fences get releases in time.

Change-Id: Ib2acbb6ad740de8e98ac79171cc441cc70b1155f
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
2016-03-23 20:27:20 -07:00
Ajay Singh Parmar
717256ab02 msm: mdss: hdmi: Proper reauth abort
Properly abort reauthentication to avoid HDCP module going into
bad state and work queue deadlock.

CRs-Fixed: 614803
Change-Id: Iaf9d8d110fd1929394f0a77cfc732f1a5d5c3ba3
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:27:19 -07:00
Terence Hampson
6615c80786 mdss: mdp3: fix logic when verifying is image can be scaled by 1
There was an issue where images that could be scaled by 1 were not
being blit by ppp due to logic error.

Change-Id: I6f8cdf43d5398a7894e5b7f8a867ec59341345b8
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
2016-03-23 20:27:18 -07:00
Xiaoming Zhou
7e681dce07 msm: mdss: properly handle panel on and off
There is some condition that panel off will be called multiple times.
In this case, it was blindly free the gpios that were already released.
This is adding the check to handle this condition.

Change-Id: I0140872be1255fe00ed5abd164a246fa57b2a245
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
2016-03-23 20:27:17 -07:00
Xiaoming Zhou
53ce94f3f7 msm: mdss: fix the display reset error
Increase the dma stop time out value as stopping operation
may take longer than the previous defined value. Gracefully
handle the time out condition to allow it to retry when
the next frame comes in.

Change-Id: I5120f309db2dbaeebef3b2878caa13cec17c9e1f
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
2016-03-23 20:27:16 -07:00
Dhaval Patel
2e888c39e9 msm: mdss: Print task name when fb_open fails
Certain process is trying to open the frame buffer node
when target shutdown is in progress. This process keeps
calling fb_open if request fails. Printing name of the process
helps to pinpoint it when user space log is not provided.

Change-Id: I83601d478113a7b8ee78c1ee0e79d91c11e59826
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2016-03-23 20:27:15 -07:00
Aravind Venkateswaran
824b24b09c msm: mdss: Notify userspace of idle screen case
Expose two new sysfs nodes - idle_time and idle_notify - that
are used to notify userspace whenever the display is idle with
no screen updates. The idle_time node needs to be configured
with the duration in milliseconds to detect no screen updates.
The userspace app can poll on the idle_notify node to get
notifications of the idle state.

Change-Id: I7435a084ad2c928d952c5d106ff9ef92aaa385b9
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
2016-03-23 20:27:15 -07:00
Adrian Salido-Moreno
fa16828560 msm: mdss: refactor command mode vsync control logic
Current logic is prone to corner case when mdss_mdp_remove_vsync_handler
is called twice: once from mdss_mdp_cmd_stop and again from vsync ctrl
logic. Need to properly identify the second call and avoid resetting the
rdptr ticks which prevent from clocks being turned off properly.

Change-Id: I9eeebd0c16e67a249508980427c81fa2e339edec
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-03-23 20:27:14 -07:00
Mitchel Humpherys
4aa5008d04 msm: mdss: hdmi: add missing sentinel to of_match_table
The DT of_match_table is missing the NULL entry that is needed to
terminate the table. Without this there is a risk of corrupting memory.

Change-Id: Ida223b91b00c72a6a2990653e3cb5ee693bd7e05
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2016-03-23 20:27:13 -07:00
Ramakant Singh
8f6bb69fa6 msm: mdss: Don't call pan_idle for MSMFB_OVERLAY_PREPARE ioctl
We keep calling MSMFB_OVERLAY_PREPARE for each composition
cycle, even if there are no changes in params. Because of this
we can hit performance degradation due to pan idle wait.
This change removes pan_idle wait for prepare call.

CRs-Fixed: 600539
CRs-Fixed: 608848
Change-Id: Ie99f4dbc4671caf9bfbd49bd9b200c3180002d56
Signed-off-by: Radhika Ranjan Soni <rrsoni@codeaurora.org>
2016-03-23 20:27:12 -07:00
Adrian Salido-Moreno
a2d8c47e5a msm: mdss: ensure pipe is halted before freeing buffers
When pipe is being detached from mixer, there is potential corner case
if underrun occurs at the same time which can cause pipe to flood the
VBIF. On the other hand unmapping a buffer requires VBIF to be idle to
sync TLB, so need to ensure pipe halt is done before freeing the pipe
buffers.

Change-Id: I9686b9d7d17d8dc2a8334157cfa8fa23ba5b47ee
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-03-23 20:27:11 -07:00
Huaibin Yang
067313a186 msm: mdss: adjust command mode bandwidth with hblank factor
Multiply a hblank factor (h_total/h_active) for command mode overlap
bandwidth vote. The current vote is little lower because transfer may
happen during horizontal blank period.

Change-Id: Id43459670ba9340c6027ea69df5a12fb07a4bf8b
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:27:10 -07:00
Kuogee Hsieh
28a2479e9e mdss: display: initialize panel_mode at mdss_dsi_ctrl_init
Initialize dsi controller's panel_mode at mdss_dsi_ctrl_init()
due to mdss_dsi_host_init() is not called during boot up if
continuous splash is enabled. An unnecessary timeout will happen
for dcs command send of command mode panel if panel_mode is
initialized as video mode.

Change-Id: I041abcebb9479f3d55f2f21d560aced6c4b77b91
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2016-03-23 20:27:09 -07:00
Benet Clark
dfee5d8567 msm: mdss: pp: make PP driver 64 bit compatible
This patch fixes all incorrect pointer casts in the driver to make
all addresses 64-bit compatible.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I45c9f6dcf740ee7ade15e8b16b5b4b39e062682c
2016-03-23 20:27:08 -07:00
Ping Li
fbba6f8799 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>
2016-03-23 20:27:08 -07:00
Saurabh Shah
1a76103921 msm: mdss: add bandwidth check while performing frame level checks
Add frame level check inside overlay prepare API, for the bandwidth that
would be required by MDP to display the frame. If the bandwidth is over
the defined limits, then we need to fail the configuration to allow an
alternative composition configuration to happen instead.

Change-Id: I7721047589ce9239f1fb63c37ca5d97127c90f7e
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
2016-03-23 20:27:07 -07:00
Ping Li
cb19edb059 msm:mdss: Fix the issue with AD resume
AD is not configured correctly on dual DSI devices during
suspend/resume. The AD configuration data from user space are
only copied to the master AD configuration structure, and the AD
configuration structure attached to the right mixer (slave AD structure)
is never filled. So in the resume function, we cannot use the AD
configuration data from the slave AD configuration. Use the one
from the master structure instead.

Change-Id: I04cf3c467c2614420e01f9177f564eec7ce7bb23
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
2016-03-23 20:27:06 -07:00
Benet Clark
272a454848 msm: mdss: Add histogram related compat ioctls
Added the histogram related structures and histogram compat ioctls.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I81725971204c5150944506afede127fefb32fb9c
2016-03-23 20:27:05 -07:00
Benet Clark
3c6935ee42 msm: mdss: Add overlay PP param copy functions to overlay compat
The overlay compat ioctl requires the copying of some PP parameters found
in the overlay_pp_params structure. This change also adds the copy
functions for histogram and sharp compat structures that are needed.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: Ifc1681034cc68e45b35fd391d1b529b6b0436516
2016-03-23 20:27:04 -07:00
Benet Clark
90824b6473 msm: mdss: Add calib DCM compat ioctl to PP compat layer
Added calib DCM state compat structures to PP compat ioctl.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I1fcb00490f598a4091845fa19153a0d10e5f378f
2016-03-23 20:27:03 -07:00
Benet Clark
858ae4372a msm: mdss: Add calib buffer compat ioctl to PP compat layer
Added calib buffer compat structures to PP compat ioctl.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: Ie7bc6fce908f965b4922a1367d2f5b3126b2a61b
2016-03-23 20:27:02 -07:00
Benet Clark
2455acec50 msm: mdss: Add calib mode compat ioctl to PP compat layer
Added calib mode compat structures to PP compat ioctl.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I01d8cd01203ed24c0aa8bb6f787255b856eb5bd6
2016-03-23 20:27:02 -07:00
Benet Clark
8fc8f3a1f1 msm: mdss: Add AD input compat ioctl to PP compat layer
Added AD input structures to PP compat ioctl.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I883d7305639b0eec14da6af4044d69fa3bd63e12
2016-03-23 20:27:01 -07:00
Benet Clark
20b46e9782 msm: mdss: Add AD init and config compat ioctl to PP compat layer
Added AD init and cfg compat structures to PP compat ioctl. There are
compat copy functions for each of the AD init and cfg related structures,
in order to simplify the addition of new fields to the structures in the
future.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: Idfc88bf17d95a86a427c82ac03c8e5447db6d329
2016-03-23 20:27:00 -07:00
Benet Clark
7922ba4633 msm: mdss: Add calib config compat ioctl to PP compat layer
Added calib config compat structures to PP compat ioctl.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I0cf88caa1dfaf474664fbfa5f00b1afd39c731ce
2016-03-23 20:26:59 -07:00
Benet Clark
c8b48bda07 msm: mdss: Add Gamut Mapping compat ioctl to PP compat layer
Added Gamut Mapping compat structures to PP compat ioctl.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I53a7a1d472a9f8b87f7c919a8ad9be89faf966d1
2016-03-23 20:26:58 -07:00
Benet Clark
8e8ec63753 msm: mdss: Add dither compat ioctl to PP compat layer
Added dither related structures to PP compat ioctl.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I8eecc585bc9143db6c01c31659a61b5ab435666f
2016-03-23 20:26:57 -07:00
Benet Clark
f5bf91c572 msm: mdss: Add PAv2 compat ioctl to PP compat layer
Added PAv2 related structures to the PP compat ioctl.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I01e694bce8d560e635185e890ea695cd6391fbec
2016-03-23 20:26:56 -07:00
Benet Clark
967a0edb3e msm: mdss: Add PA compat ioctl to PP ioctl framework
The PP compat ioctl now supports Picture Adjustment.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I8058164561911bdc384ed3c61dc710741cb60a50
2016-03-23 20:26:55 -07:00
Benet Clark
e09b58be2c msm: mdss: Add BL scale compat ioctl to PP compat layer
Added BL scale ioctl to PP compat ioctl.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I13a1d2b43513c637126e465ae19c55285a26352e
2016-03-23 20:26:55 -07:00
Benet Clark
eaf06490a5 msm: mdss: Add QSEED compat ioctl to PP compat layer
Added QSEED to the PP compat ioctl framework. There are compat copy
functions for each of the QSEED related PP structures, in order to
simplify the addition of new fields to the structures in the future.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: Ib918e5d4f6e9a4e004846598ab021be8bb5404c8
2016-03-23 20:26:54 -07:00
Benet Clark
1321744e15 msm: mdss: Add histogram LUT compat ioctl to PP compat layer
Added the histogram LUT to the PP LUT compat framework.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I85970b987ff5ef034884601b30d045edeca4277b
2016-03-23 20:26:53 -07:00
Benet Clark
63ca8edc26 msm: mdss: Add ARGC compat ioctl to PP compat layer
Added ARGC to the PP LUT compat framework. There are compat copy functions
for each of the ARGC related PP structures, in order to simplify the
addition of new fields to the structures in the future.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I74ebaeef8402f8de6f67a3f906f8100b6a56de21
2016-03-23 20:26:52 -07:00
Krishna Chaitanya Parimi
39ea88f417 msm: mdss: Reading IGC and PGC LUT from cached values
Certain targets like msm8226 do not have capability of reading
IGC and PGC LUT from hardware registers.
Adding functions to read the LUT values from software cache.

Change-Id: Ifd0f5f131b7ff1fd7d1fb122425241a0e0cec328
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
2016-03-23 20:26:51 -07:00
Krishna Chaitanya Parimi
bffa797e41 ARM: dts: mdss: Add boolean property for LUT readability
LUT read is not supported by hardware in the case of msm8226.
Adding property to dtsi file to denote the absense of support
for read in hardware.

Change-Id: I29cf869af4135e1199bc0feb4369700b994520ec
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
2016-03-23 20:26:50 -07:00
Ajay Singh Parmar
51844883dd mhl: sii8334: Proper header file inclusion
Include proper header files for sleep and OF APIs

Change-Id: I710ae1bb5148f713b874c0d77c31f8ccf8514bdf
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:26:49 -07:00
Padmanabhan Komanduru
b65461bb89 msm: mdss: Avoid GPIO warnings during boot up
During continuous splash screen handoff, we see GPIO
warnings since we try to free the GPIOs without
requesting them before. This change takes care of avoiding
these warnings.

Change-Id: I574bcf0bd28e3c33dca618103cf0285675917189
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2016-03-23 20:26:49 -07:00
Benet Clark
a7b17493b6 msm: mdss: Add PP LUT compat framework and IGC compat ioctl
Added the LUT op to the PP compat ioctl. The only LUT based PP feature
supported in this patch is IGC. There are compat copy functions for each
of the LUT and IGC structures, in order to simplify the adding of new
fields to the structures in the future.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I5dad93afd7b5f9f1b01bc64d6af771630375157b
2016-03-23 20:26:48 -07:00
Benet Clark
fc0a940438 msm: mdss: Add CSC compat ioctl to PP compat layer
The PP compat layer now has CSC functionality. There are compat copy
functions for each of the CSC related PP structures, in order to
simplify the adding of new fields to the structures in the future.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: Icdae479a655d8d8cf5cce66682b611edd587ba06
2016-03-23 20:26:47 -07:00
Benet Clark
ffa4da2447 msm: mdss: Add PP compat ioctl framework and PCC compat ioctl
The MDP overlay compat layer now calls the PP compat ioctl. The only
PP feature supported in this patch is PCC. The PP compat ioctl handles
the copying of parameters from 32-bit to and from 64-bit structures, as
well as calling the FB ioctl.

The PP compat layer has one copy function per PP structure, in order to
simplify the adding of new fields to PP structures in the future.

Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: Ibe4f15e1eab00fd4f26fdb2ac5505c2cbb0cbf58
2016-03-23 20:26:46 -07:00