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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
Added the histogram related structures and histogram compat ioctls.
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I81725971204c5150944506afede127fefb32fb9c
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
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
Added dither related structures to PP compat ioctl.
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I8eecc585bc9143db6c01c31659a61b5ab435666f
Added PAv2 related structures to the PP compat ioctl.
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I01e694bce8d560e635185e890ea695cd6391fbec
The PP compat ioctl now supports Picture Adjustment.
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I8058164561911bdc384ed3c61dc710741cb60a50
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
Added the histogram LUT to the PP LUT compat framework.
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I85970b987ff5ef034884601b30d045edeca4277b
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
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>
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>
Include proper header files for sleep and OF APIs
Change-Id: I710ae1bb5148f713b874c0d77c31f8ccf8514bdf
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
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>
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
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>