- video core is bumped up to turbo mode, if more performance
level required from multiple clients.
- Enable turbo mode atleast one of client set turbo mode.
Change-Id: Ied777463fdfe54ea6ff3b2a29cbaf0d27a9586cb
CRs-Fixed: 385454
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
Wait for 2 ms to make sure both dsi lanes are in stop state and
fifo are empty before reseting dsi controller.
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
During the blank sequence, base layer will be removed if mfd
reference count is 0. Need to add some delay to make sure it
takes effect before turning off panel.
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
The transition of BLT enable and disable start at the beginning
of vsync. This ensures that the transition is completed within the
same vsync period. We Wait for DMA-P done after turning off the
timing generator and do not prefill the frame.
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
- Add switch device node for hdmi audio on initialization.
- Final node path will be /devices/virtual/switch/hdmi_audio
- Set the node state to 1 when the HDMI EDID for the sink
supports audio
- Set the node state to 0 otherwise(DVI)
Signed-off-by: Arun Kumar K.R <akumarkr@codeaurora.org>
msm_fb_blank_sub might be called for UNBLANK from
display update work queue, which is at commit state.
Idle detection is invalid in this situation
Add detection for external snd earlyuspend/resume interface.
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Currently switching mdp blt mode is done in dmap done isr which could
cause mdp hang for some panels/targets. One option is added: turning
off timing generator when switching blt mode, to avoid hang issues.
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Before execute operation on display, make sure it is complete idle
Because non-blocking display update has been introduced, need make sure
display update has finished in all entrances except the ones for
initialization.
Change-Id: I0660080262b7e5895f5f558c0a9f71aa84b9aa99
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
While searching for the available buffer entry in the buffer pool the search
should begin from index 1 as zeroth entry is reserved.
Change-Id: I051b0232bb782f073ba9ad0b757a799703814df3
Signed-off-by: Mohan Kumar Gubbihalli Lachma Naik <mgubbi@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Mako's MIPI line clock is a little bit higher than LGSI's recommendation. Due
to this higher clock, flickering could happen in some panels. This patch
reduces the MIPI line clock as LGSI's recommendation.
This also reduces current consumption by ~10mA when the LCD is on.
Signed-off-by: Iliyan Malchev <malchev@google.com>
In suspend state, fb_open cannot turn on panel, need save this info
for resume.
In suspend state, blank setting needs be cached to be used at resuming.
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Allowing the MDP clock to use its Max clock in order to avoid the blt
mode switch issues for both MDP mixers, as blt mode switch resulting
in HW hung
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Non-secure session should be rejected if a secure session is
running.
Change-Id: I13364a7bc4417a682728be333681278e7de8a1f7
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Overlay_play() adds a pipe into pending queue and pan_display()
will commit those pipes to hardware and empty queue. This patch
will make sure queue is empty at suspend so that no unexpected
pipes will be commited to hardware by pan_display() at resume.
Otherwise, iommu page fault may happen.
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
HDCP authentication should be kicked off as a scheduled work
item so as to ensure that MDP is already configured and frames
are being transmitted over the HDMI channel prior to the start
of the HDCP authentication procedure.
Change-Id: I27cab44babfc24d91a318b0641674f85910cc33f
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
Support waiting for acquire fences in the buffer sync ioctl.
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Display commit ioctl will do what pan_display
can do, addtionally has customized setting, such
as non-blocking call.
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Schedule a workqueue, do the current job in the workqueue handler.
Block the second entry if the first one has not finished
Change-Id: I9466c7795bd9d6765f468bf30f4021802d904c36
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Conflicts:
drivers/video/msm/msm_fb.c
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Wait for fence signaled before commit, signal previous
fence after commit done. Same as pan display
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Replace sending of vsync timestamp using uevents with sysfs entry
as uevent result in increase in power numbers due to broadcast in
nature. Also, for smart panel, wait4vsync is removed.
Change-Id: I5219e85b837b8bab9d00a9f40c1048d2a2355194
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Conflicts:
drivers/video/msm/mdp4_overlay_dsi_video.c
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
DSI dcs commands and mdp pixel stream share same dsi link.
Add dcs command list to serialize sending dcs command and mdp
pixel stream to avoid contention which may cause dsi controller
to stall.
Change-Id: Ie0e687f45be479d2137eb7b56b8d32040fba2044
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Conflicts:
drivers/video/msm/mdp4.h
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Reverting this change allows display underflows to cause flashes of blue, which
will help prove that underflows are occurring.
This reverts commit e6f596dbcd307e33e4e4842914a027c7f7138bd9.
If we don't apply CABC register setting at the first bootup, then it makes a
power difference between the bootup time and the first suspend and resume,
approximately 38mA.
Change-Id: I91c915af31e9ff6934ce733f3fb2c8b96e1adf31
Signed-off-by: Iliyan Malchev <malchev@google.com>
Video driver will close the instance if secure call fails.
Change-Id: I39147272a9183f011529078fe8a18ac8cb2726fd
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
MSMFB_OVERLAY_COMMIT ioctl is used to display on external.
This is used instead of the default PAN mechanism to avoid delays in that path.
This ioctl for external also waits for DMAE thus fixing tearing.
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Arun Kumar K.R <akumarkr@codeaurora.org>
Memory heap should be unsecured if secure call is successful.
This change will make sure that an unsecure will be called
only if securing of the memory heap went through fine.
CRs-Fixed: 393041
Change-Id: I49dd81d1846fc6936518c750a32921c8498ddb95
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Riaz Ur Rahaman <riazr@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Add sysfs nodes to export the data contained in the
audio data block and the speaker allocation data block
from the EDID of a connected HDMI sink.
Change-Id: Ie558e930cc5790965d46eb2c30156a23643fa1f7
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Fix bugs in the parsing of the Audio Data Blocks and the
Speaker Allocation Data Blocks in the EDID data.
Change-Id: I666cf82d149c8ebb02d3bca3a053e494890870c0
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
You might see the white line while lcd off. You should turn lcd backlight
off before lcd off to avoid that issue. So call the notifier for backlight
before handling of FB_BLANK_POWERDOWN in msm_fb.
Change-Id: I3bd08025a949ec02a1fba7cef98a13d8977c135b
Do not put sync point if it has been added to
a fence successfully in error handling
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
irq enable and disable need to be called symmetrically.
Remove an extra dmap irq disable call.
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
During boot up, we observe random lines on screen between the
splash_screen image and the android animation. MDP clocks
were turned off during bootup. Fix this issue by enabling
the clocks when this feature is enabled.
Add check to see that the video mode engine is not busy before
turning off the dsi controller to avoid any underruns.
CRs-Fixed: 399634
Change-Id: I8fdb50fa848362a548b8cdd53ee1817346b57716
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Blt mode may be enabled during system suspend. Need to make
sure blt overlay done before turn off video/lcdc timig generator.
Change-Id: Iad54ee544499213bb7c9cfe60d00919f819aacb1
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Add MSMFB_BUFFER_SYNC ioctl for the communication of
the acquired and released fence fd between kernel and hwc.
Wait for acquired fence before pan display.
Release the previous released fence after pan display
Change-Id: I6534aed574a025d948581e70465f06a86b46c868
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Clear original pipe attributes in the pipe free call.
Change-Id: I776869e7997e5b70e4c2b102e1a394034247bbcd
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Use wait_for_completion_timeout instead of wait_for_completion
not to stuck in the kernel even when the DMA fails.
Change-Id: I29702c3c62f78399c173d660bbbc17a07ed27468
Signed-off-by: Iliyan Malchev <malchev@google.com>
Preserve original dsi-off sequence to remove DMA failure. Previously the power
off sequence was modified to resolve display turn on/off issue, but the changes
were not necessary in current kernel and just caused side effects which
resulted in fb_blank being stuck due to occasional DMA failures.
This reverts commit e1a9b1bda7691e4f62728d09e1993eb9ae9db8d6.
Change-Id: Ia0a60cfdf697675d34066852f106d9e37578073d
Signed-off-by: Iliyan Malchev <malchev@google.com>
Preserve original mdp off sequence to remove DMA failure. Previously the power
off sequence was modified to resolve display turn on / off issue, but the
changes is not necessary in current kernel and just causes side effects
resulting in fb_blank being stuck due to occasional DMA failures.
This reverts commit 0b3bc7e958f98432538a8537739fbaa560761434.
Change-Id: Ia82fb79b56b57f6696c55d9b079eeadebe8c40bf
Signed-off-by: Iliyan Malchev <malchev@google.com>
This reverts commit af3f22de5dd769b555c018c12be837450cd59dd6.
Due to the order of backlight and lcd on/off will be guaranteed by
PowerManagerService, this patch is reverted.
Change-Id: I2e54dc14d338b5bfa1aca1bddcc37b46928a94e8
Signed-off-by: Iliyan Malchev <malchev@google.com>
Conflicts:
drivers/video/msm/msm_fb.c
Adds support to enable or disable mixer commit during pipe staging operations.
Depending on the current activity, this selection can be made.
Change-Id: Ia2f5dbab58f73ef4de90abf7f278332d8d73df46
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Base layer pipe need to be freed at adb stop so that same
pipe can be allocated at adb start.
CRs-fixed: 390644
Change-Id: I948bb27687cfe1c96cc3b071b7bb9bb84b2c52c6
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Video core stop should be called only if start is successful.
Change-Id: Ie2a8d970355387ee3fcdc34b62184972e89dd6cc
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Encoder driver will expose a new node for clients
intending to start a secure encoding session.
Change-Id: I2a104155fd19534a3b3b35e6606d39047f34c42f
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
We are incorrectly using the firmware heap to allocate prediction
buffers. This violates an agreement between TZ and HLOS that only
the firmware will reside in the FW heap. As such, move the buffer
to MM heap.
Change-Id: I2c91499c38043abfa21ae3443d3a8f22d6474eaa
CRs-fixed: 380161
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
An iommu page fault may heppen When a pipe_commit is executed
in between of frame dropped and pipe_queue during overlay play.
An mutex is necessary to mutual exclusive between pipe_commit
and overlay_play.
Change-Id: I736e821c6c648a6ebd435303a1906a40e9b75791
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Dcs command mode BLT involves both overlay0 done interrupt
and dmap done interrupt. A transaction is start at kickoff and
end with done interrupt. At some cornor cases both overlay0 and
dmap transaction need to be completed before kickoff new transaction.
Change-Id: I5a3cc6e8255acf2c61fc627d35f990182d226f63
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
To avoid double freeing writeback at end of blt mode, let
both alloc and free writeback buffer done at do_blt().
Change-Id: Ida5d24589c19be8f6f655eca6add00badca356b2
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
There has VG1 pipe commit (pan display) happen after system
suspended. This left VG1 still staged up at mdp mixer. Once timing
generator is enabled at resume, VG1 pipe start fetching contents from
address 0 since VG1 has not yet be configured. This cause page fault.
This patch has sanity check at system suspend to make sure no any pipe
stage up at mixer after suspend.
Change-Id: Idcf974ceb4afe2a3ec55b9603b700fa497f84045
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
An earlier commit(ec5b2f)increased the number of reserved fields
in the kernel standard fb.h header changing the struct size.
This caused issues with userland applications using the corresponding
bionic header. This patch revert the earlier increas in size
and makes corresponding adjustments to the reserved field usage.
A follow up patch will remove usage of reserved fields entirely.
Fix the problem crashed while playing video clips and VT camera test.
ion_share_dma_buf is called in pr_debug.
So, it is called depends on build option and makes crash problem.
Since msm_fb_blank_sub() can be called from hdmi which has no
backlight, we should check the null pointer before to run the
get_backlight_on_status().
Change-Id: I9a91dc337b56e20fbfd82347cf429350f1a72b37
To avoid dispalying garbage during lcd on/off, the turning on
lcd should be done before backlight on and turning off backlight
should be finished before lcd off. But current implementation
doesn't guarantee these on/off sequence. This patch ensure the
sequence of lcd and backligth on/off.
Change-Id: I11771d395c1a68b4e70b63639f50c773a665b441
Signed-off-by: Iliyan Malchev <malchev@google.com>
Conflicts:
drivers/video/msm/msm_fb.c
When application calls FBIOBLANK ioctl without backlight control,
even though bl_set_intensity() is called by fb_notifier_callback,
the backlight level cannot be set properly. So this patch add the
level changing to bl_set_intensity().
Change-Id: Id512c2f1bffbde2d47186d40071d05bc1388dc03
In case of data underflow, MDP display specific color on lcd.
Due to data underflow rarely happen during display on/off,
we can see unintended blue screen at that time.
So this patch changes this underflow control color from blue to black
for hiding unintended blue image displaying during display on/off.
Change-Id: I26910065b5210a2571125d25f3f1b41a67ba1c1c
Add lcd color temperature calibration interface and apply
the calibrated value to the target using mdp lut.
Change-Id: Ibdd606a155e0d7708ba79be6f817c3d89b51a282
CABC(Content Adaptive Backlight Control) is supported by
mako lcd panel. So this patch enables it to reduce power
consumption.
Change-Id: I433281bc5fe4e638cfeba1beb9cb61e1775f3896
update lcd initial code and change power on sequence for
new initial code.
Change-Id: Ic876d5dbef3528591ca374ba0f67f073f4584534
Signed-off-by: Iliyan Malchev <malchev@google.com>
sleep 300ms until completing the backlight control. and then set
the panel_power_on and bl_updated as false
Change-Id: Ia289cdcd08ad012d192a079dd1b765d74b911be2