Commit graph

566354 commits

Author SHA1 Message Date
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
Ingrid Gallardo
54a847e4a1 msm: mdss: add bandwidth check per pipe
Add check to verify that the bandwidth of a pipe does not exceed
the threshold per pipe. The check happens during the overlay setup
and if the pipe exceed the limit, the driver will try to decimate to
reduce the bandwidth; but even if after decimation the limit is
exceeded, it will fail the configuration.

Change-Id: I7ad3654126a503e41540fca250276d564aecccdd
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2016-03-23 20:26:45 -07:00
Adrian Salido-Moreno
f55f10a3f0 msm: mdss: add bandwidth check function
Add function which calculates the bandwidth that would be required by
MDP to display the frame. If the bandwidth is over the defined limits,
an error is returned which means the configuration is not acceptable and
may lead to display underruns.

Change-Id: I991ac458d347487c5c634d271814222aa661fd58
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-03-23 20:26:44 -07:00
Ujwal Patel
9318b730bf msm: mdss: enable fb_split feature for dual-dsi panels
Currently fb_split feature is limited to dual-pipe but single
interface, i.e eDP 2560x1600, panels. Extend use of this feature
to dual-dsi panels as well and by default enable equal split to
support dual-dsi portrait panels, i.e 1600x2560. Default settings
will be over-ridden by split settings from device tree if available.

Change-Id: I38279e1af7dcd1278fa203f51b8b33f82d0848af
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:26:43 -07:00
Mayank Chopra
18b81b9908 msm: mdss: Add pipe null check before usage
Check if pipe pointer points to allocated pipe structure before
accessing its parameters in pipe initialization function.

Change-Id: Id3dbad583d076b67ea64a7f84b56e5d32eeba827
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
2016-03-23 20:26:43 -07:00
Adrian Salido-Moreno
fd1dff9bf6 msm: mdss: ensure atomic access to pipe clock management
While accessing pipe clock status registers, need to ensure that updates
happen atomically while reading and changing the register value. Also
need to ensure mdp clock is enabled to access these registers.

Change-Id: I36aef4332633c33e9ce0f367a20d1b2a8824acd8
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-03-23 20:26:42 -07:00
Padmanabhan Komanduru
bc487b64a7 msm: mdss: avoid probe failure if MDP LUT clock registration fails
MDP LUT clock is not present on all MDSS revisions, so this clock
registration can fail on some targets. Hence, do not fail the mdp
probe during boot up if the clk_get fails for this clock.

Change-Id: Ib46886662e34a39236b6453ec84f63ea4ba815a7
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
2016-03-23 20:26:41 -07:00
Mayank Chopra
2b53b39a36 msm: mdss: Add SMP per pipe parameter into hw capabilites
Additional SMP parameter 'smp_mb_per_pipe' is required by
userspace as part of hardware capability made available
through sysfs node.

Pipes availablity for a use case can be computed taking these
values, based on which, composition decisions can be made.

Change-Id: I2d790506ca895357762e1eca098ea1734077a097
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
2016-03-23 20:26:40 -07:00
Benet Clark
68bf0f9ec0 msm: mdss: Prevent HDMI panels from doing AD checks
Assertive display is meant only for primary display, however the AD
checks are being done on the HDMI frame buffer and its mixers. Adding
a check for HDMI panel type will prevent edge case errors when doing
AD checks.

Change-Id: Iffdec9fcf479f24e9407d6508517fb4103b1e977
Signed-off-by: Benet Clark <benetc@codeaurora.org>
2016-03-23 20:26:39 -07:00
Ujwal Patel
ccbe26f4b9 msm: mdss: fix synchronous split flush
Synchronous split flush was mistakenly disabled by commit 3ae81d4.
Fix this by using correct variable in the condition check.

Change-Id: Ibfce48fc7df66b4fa964211065565bbd29c4cb92
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
2016-03-23 20:26:38 -07:00
Adrian Salido-Moreno
c6814fea42 msm: mdss: add sysfs link to mdss_fb device
Add a symlink to mdss_fb device from fbdev node. This allows referring to
it more easily from userspace applications.

Change-Id: Ie0abacc6c376af89f62a5328afba2245ca082f7c
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2016-03-23 20:26:37 -07:00
Ajay Singh Parmar
fdda2602e7 msm: mdss: hdmi: Use SCM calls for secure HDCP registers
Use TZ (Trust Zone) secure API to program HDCP (High-bandwidth
Digital Content Protection) registers to aviod unauthorized
access.

Change-Id: I7533babd1e626cd032dd4e3e8231f5ac3061ecec
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2016-03-23 20:26:37 -07:00
Murali Nalajala
f7655b4514 msm: move event_timer header to machine independent location
Move event_timer header to a machine independent location in
kernel. Change the source files which are referring to this
header and point them to a new header location.

Change-Id: I52a6624c29a3d959c87570497a90a56649f93ab9
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2016-03-23 20:26:36 -07:00
Manoj Rao
256a3a5535 msm: mdss: compat ioctl for mdss overlay
Implement an entry point for compat ioctl in mdss overlay driver.
Overlay ioctls that require compat layer translation have been added here.
If the calling user process comes from a 32-bit world, then the compat
ioctl does an appropriate command conversion to keep the existing ioctl
implementation unchanged.  Add PP compat structures to include 32 bit
compatible versions of post-processing structures. This allows addition
of pp compat ioctl layer.

Change-Id: I732fcbc84151b813a02d3b4db20e858d4c51291e
Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Signed-off-by: Benet Clark <benetc@codeaurora.org>
[cip@codeaurora.org: Moved mdss_compat_utils.h file location]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:26:35 -07:00
Manoj Rao
79d7171431 msm: mdss: implement compat ioctl for mdss-fb
Implement an entry point for compat ioctl in mdss
framebuffer driver.
Implement compat ioctls in a new file. All the fb
ioctls that require compat layer translation have
been added here. If the user process is
from a 32-bit world, then the compat ioctl
does an appropriate command conversion to keep the
existing ioctl implementation unchanged.

Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
Change-Id: I24c378116b2504db29ce0b17d690b0e4779426d6
[cip@codeaurora.org: Moved mdss_compat_utils.c file location]
Signed-off-by: Clarence Ip <cip@codeaurora.org>
2016-03-23 20:26:34 -07:00