Commit graph

177 commits

Author SHA1 Message Date
choongryeol.lee
01fc0013e4 mako: display: enable CABC function
CABC(Content Adaptive Backlight Control) is supported by
mako lcd panel. So this patch enables it to reduce power
consumption.

Change-Id: I433281bc5fe4e638cfeba1beb9cb61e1775f3896
2013-03-04 12:43:27 -08:00
choongryeol.lee
58aa102331 Revert "mako: temoprarily blocked mdp error message"
This reverts commit 0fca8a4db86917c28b9c8161b1ae5ee73743605d.
2013-03-04 12:43:20 -08:00
choongryeol.lee
b4826d07a0 mako: slimport: enable slimport for mako
apply slimport driver to mako

Change-Id: I411d89784ab2796db61cb9f3202952e0e5744107
2013-03-04 12:43:20 -08:00
choongryeol.lee
fe01ac999e mako: display: update lcd initial code
update lcd initial code and change power on sequence for
new initial code.

Change-Id: Ic876d5dbef3528591ca374ba0f67f073f4584534
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 12:43:14 -08:00
choongryeol.lee
c56669fd51 mako: display: clean up the mako display code
remove unused features and clean up the mako
display related code

Change-Id: I1a6fa783a83eef747a98a3e70341c50de2cfd74f
2013-03-04 12:43:13 -08:00
choongryeol.lee
572895635a mako: display: remove unused config from Kconfig
Change-Id: I8ea6a5600869d41480eb8fbcfe54ea1bea03802a
2013-03-04 12:43:13 -08:00
Devin Kim
578dee3739 msm_fb: clean fb to prevent displaying old fb
clean fb to prevent displaying old fb on resume.

Change-Id: Iab169e7a36b6bd168631bbf9763319ba4388f82d
2013-03-04 09:12:34 -08:00
Devin Kim
f203643910 msm_fb: HACK: wait until completing backlight control
sleep 300ms until completing the backlight control. and then set
the panel_power_on and bl_updated as false

Change-Id: Ia289cdcd08ad012d192a079dd1b765d74b911be2
2013-03-04 09:12:24 -08:00
Devin Kim
9690f1d0a6 mako: add LCD calibration codes and enble
- set initial qcom lcdc lock up table
- interface to calibrate lcd color temperature
- interface to calibrate lcd color temperature by qlut

Change-Id: Iae2607a2ec3447211cdce5e55fac5767cc6d7fb4
2013-03-04 09:12:04 -08:00
Devin Kim
3259f9d959 hdmi: able to build kernel without hdmi feature
If not using HDMI, compiling errors occur. it's fixes to build
kernel without HDMI feature

Change-Id: Ida5babdc2f8ebaf73cd5c52b3f4686b27f6f1aa1
2013-03-04 09:11:48 -08:00
Jaeseong GIM
da8dc4323c mako: enable lgit lcd driver
bring-up lgit lcd for mako board.

Change-Id: I343064255935eacba4ea48bec4dbaff59fd7026d
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-04 09:11:42 -08:00
Devin Kim
90b502b496 mako: temporarily enable fake display (for booting)
temporarily enable fake display for booting.

Change-Id: I55a5e11167c7c96c9de87952983c0189f2977f38
2013-02-28 12:14:24 -08:00
Devin Kim
06ce948e5c mako: temoprarily blocked mdp error message
blocked until enabling LCD. if not, too much errors in console

Change-Id: I38bc1bec4559f9d4d830d8f6e024cb5a121abf35
2013-02-28 12:14:23 -08:00
Adrian Salido-Moreno
c5180403ed msm: mdss: fix suspend coming to MDP before panel drivers
If suspend event is received by MDP before panels, MDP needs to ensure
other panels are off before turning MDP clocks off. Remove handlers from
framebuffer driver and handle all suspend logic within MDP driver to
handle this scenario.

Change-Id: Idcda2dd29b28a9993edca78b7e0778985e44b664
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2013-02-27 18:21:27 -08:00
Adrian Salido-Moreno
b6d7c6c8f9 msm: mdss: improve clock and bus scaling logic
Current clock logic only considers panel pixel clock to calculate mdp
clock speed, MDP clock speed should also consider other factors such
as surface scaling. Bus scaling should also consider surface scaling
factor. Update logic to consider these new factors and perform these
performance updates together.

Change-Id: If274a7f40f496e1a730e1d0e8d7c35fa4384a832
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2013-02-27 18:21:27 -08:00
Adrian Salido-Moreno
659be67242 msm: mdss: allocate framebuffer memory from ion pool
When panel size is increased dma_alloc_coherent is not able to find
a chunk of contiguous memory big enough to hold framebuffer, this causes
framebuffer initialization to fail. Allocate buffer from ion pool which
has reserved contiguous memory at earlier stage.

Change-Id: Ibf7e3f7fc2c7ad991d69c106bbb6a9dd4c7f0e79
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2013-02-27 18:21:25 -08:00
Huaibin Yang
f98218cd22 msm_fb: display: commit mdp baselayer pipe
When in resume or boot time, baselayer pipes need to be committed for
mdp to play, otherwize underruns and blue screens are seen. The
previous pipe stage up func has this commit which is removed now, so
the commit calls have to be added for the cases where base pipe is
initialized.

Change-Id: I63a7d0ac3fb078b3d7f604eb646a0430326a478c
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-02-27 18:21:17 -08:00
Adrian Salido-Moreno
c6f7e9ceed msm: mdss: fix incorrect programming of timing generator setting
Fix typo in code which is causing incorrect setting of vertical front
porch on timing generator settings and incorrect output to panel.

Change-Id: I4de61209443fcb284b7d4064a2039b5f546935d1
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2013-02-27 18:21:05 -08:00
Siddhartha Agrawal
911d294bef msm_fb: display: change implementation of updating mdp_clk and blt mode
Currently mdp clk and bw requests are predefined in a 4-entry table
passed from the board file, and the logic to decide which level to use
is mainly based on source resolution. This patch is intended to
address several issues with this approach.

One major issue is clk and bandwidth depends on seperate things, and
need to be considered seperately. e.g. with mdp composition of
multiple pipes, bw request may be high but clk requirement may still
be low. The current approach that binds these two things together
causes inefficiency of power.

Another major issue is that there is no logic to calculate mdp clk
requirement of a single pipe based upon panel clk and downscale
parameters. Further the worst case of mdp clk should be determined by
all pipe usage. Without proper logic, many underrun have been
experienced, and blt mode may not be enalbed properly.

Also mdp_clk or blt mode update must be on right timing especially
between these two pathes: overlay play and pan display. In the
situations of performance from high to low or from low to high clk and
blt must be handled properly to avoid underruns.

In a summary, to support many different panels and targets and
complicated mdp pipe usage(mdp composition), mdp driver related to clk
and bw needs to be implemented differently. This patch is to seperate
clk and bw, and maily to deal with mdp clk and blt. Later increasing
granuity of bw will be added.

Change-Id: I678fbf86d6997ed7b602ce81cf2e0fff6164d129
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-02-27 18:21:04 -08:00
Siddhartha Agrawal
5bcec1d31d msm_fb: display: Set timing generator after register flush
Timing generator was getting started before the register flush.
Stale values were sometimes causing IOMMU page faults on bootup.

Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Change-Id: Ia671c3603e383af94197a23a8e5e5f32274a9978
2013-02-27 18:20:53 -08:00
Kuogee Hsieh
17555c096f msm_fb: display: add stage commit before kickoff to WFD
Since stage commit had been splited out of stage up fucnction,
it needed to be called to stage pipes into mixer befroe
kickoff mixer. Add this function into overlay writeback for WFD.

Change-Id: I11e4486d92b89a15e58531033d474b3137b5935a
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-02-27 18:20:35 -08:00
Lei Zhou
286342fc1a msm_fb: display: Correct LVDS bitmap setting
In case ASIC 1.1 is used on 8064 platform, LVDS bit mapping
misalignment is fixed and no remapping is needed. LVDS bit
mapping should comply with VESA format to get correct panel
display.

Data line #3's bit mapping should be coded in this sequence:
DE + VS + HS + .... Change the original codes to go with this
sequence.

Change-Id: Iaebcfcea9c52207e16bac54ec37dc63e97286ff4
Signed-off-by: Lei Zhou <leizhou@codeaurora.org>
2013-02-27 18:20:35 -08:00
Huaibin Yang
2353b50a01 msm_fb: display: add dmap waiting before turn off timing generator
Wait for dmap done to turn off TG to avoid underruns before base
pipe setup and after constant splash during boot time.

Change-Id: I64bc3935d996af1d2d54db4c11319301ea454ced
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-02-27 18:20:34 -08:00
Riaz Rahaman
b3d8206872 msm: 8660: Add config setting for enabling content protection
Enable content protection by setting CONFIG_MSM_VIDC_CONTENT_PROTECTION in
target config file

Change-Id: I8e9b43b6eb09a11c0b5d987903b8bbffde1572e3
Signed-off-by: Riaz Ur Rahaman <riazr@codeaurora.org>
2013-02-27 18:20:33 -08:00
Deepak Verma
5218c0ec5c msm: vidc: Reduce the priority of incorrect PAR value message
We get the error message for the incorrect aspect ratio
with each frame of the video. By reducing the priority,
error message will appear only when we enable it.

Change-Id: Iacb8002383ea6c0b7ee86e9cfe14478c0e5ca5c3
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
2013-02-27 18:20:30 -08:00
Mayank Chopra
c5f73ed5b2 msm_fb: display: Update mdp clock counter for unsuccessful probes
If a panel probe does not succeed, call mdp_clk_ctrl to maintain
mdp_clk_cnt counter else mismatch in counter results in mdp clock
to never go off in cases like suspend-resume.

CRs-Fixed: 385560
Change-Id: I4ca54b051af98e823dc7f3ff7b9bcb960532c7e8
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
2013-02-27 18:20:16 -08:00
Chandan Uddaraju
825b800e91 msm_fb: Increase the pixel clock range for DSI panels
Increase the upper limit for the pixel clock that
changed with the newer version of the DSI controller.

CRs-Fixed: 380003
Change-Id: Ibbeaa478b4d12ae8f350be41f959d53a6ae6c923
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2013-02-27 18:20:16 -08:00
Chandan Uddaraju
e46979d2ba msm_fb: Display: Fix Dithering issue for rgb565 format
Using RGB888 as source format and rgb565 as destination pixel format,
will cause image corruption on the display. Fix this issue by
setting the destination format as RGB888 in MDP and DSI controller
pixel format as RGB565 for DSI specific panels.

CRs-Fixed: 377484
Change-Id: If58976ee9cd4825efb39437170e54796fa2213e0
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2013-02-27 18:20:16 -08:00
Deepak Verma
ed0b88a700 msm: vidc: Correct calculation of yuv buffer size
Improper yuv buffer size is being calculated using frame
height directly, which is resulting into failures during
encoding if the frame height is not aligned to 16.
With this change, yuv buffer size calculation is done
properly by using scanlines in place of frame height.

Change-Id: I22602d6a0eddfa4016f4bdc3479e5b7d9b89a4e7
CRs-Fixed: 378988
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2013-02-27 18:20:09 -08:00
Kuogee Hsieh
f525fa2753 msm_fb: display: Add BLT support to dsi command mode panel
At run time, mdp BLT (writeback) mode is enabled and disabled
base on performance level to avoid mdp underrun. Move BLT
enabled/disabled logic to pan display so that enabled/disable
is done per commit instead of per queue. Since all panels
are shared same logic, dsi video mode and lcdc panel BLT logic
have been changed accordingly.

Change-Id: I6e04bf0f7bf1c13634e19b18d8ac4368affbc4d8
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-02-27 18:20:09 -08:00
Rajeshwar Kurapaty
2b93cd78cc vidc: 1080p: Reset meta data offset to zero
For multi-resolution clips, the meta data offset used while
doing cache clean of meta data buffer is from the previous
resolution & resulting in kernel panic. Resetting the offset
to zero during meta data buffer initialization for new
resolution fixes the issue.

Change-Id: I06b20e10efc837fcfe44f532e90293734b4d2df8
CRs-fixed: 386245
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
2013-02-27 18:20:07 -08:00
Ajay Singh Parmar
675b4daa08 msm_fb: hdmi: Give proper buffer size
Need to give proper buffer size for snprintf function calls.

CRs-Fixed: 378343
Change-Id: Ia4df74c9871b26255572bb3ba226317c3076b5b6
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2013-02-27 18:20:00 -08:00
Kuogee Hsieh
f2495f9688 msm_fb: display: retrieve correct base layer pipe
Base layer pipe is cloned and cached at satge array.
Retrive the real base layer pipe before used it.

Change-Id: I6fc606559684156348a57b500083ed4089fc71b5
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-02-27 18:19:59 -08:00
Kuogee Hsieh
f4844bd8ab msm_fb: display: free dtv iommu buffer
Free iommu buffer after pipe is committed to hardware.

Change-Id: I00506d6fd55d99fec7921c02953fd755a7536d3e
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-02-27 18:19:58 -08:00
Pravin Tamkhane
e0392a217f video: msm_fb: Increase display timeout to 2 seconds
One second time out for no frame update, as in current implementation,
does not allow CABL to reach minimum backlight level possible because
histograms dont get generated after one second. So increase time out
period to two seconds which seem to be sufficient for complete black to
complete white and vice versa transitions.

CRs-Fixed: 370804
Change-Id: I0712924d669abcb820654cd6ca5f7da37bed57e6
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
2013-02-27 18:19:57 -08:00
Pradeep Jilagam
c7fd27e761 msm_fb: Allow MDP hardware init for continuous splashscreen
MDP hw init is getting avoided for MDP3.x targets to support
continuous splashscreen. This avoids complete initialization
of MDP and hence usecases are failing. This change allows the
hw init.

Change-Id: Ib0304b54bda4a62a20716bde85fe94b2dcfe6824
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
2013-02-27 18:19:54 -08:00
Huaibin Yang
a03d536c88 msm_fb: display: clean pipe free or unlock calls
A few places have unnecessary mutex unlock calls, and iommu pipe free
depends on pipe parameters so move it before pipe is zeroed.

Change-Id: I7ef39c66be611907b1b0c38675b15f8bc919d0c0
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-02-27 18:19:53 -08:00
Huaibin Yang
4bf6321bd9 msm_fb: display: fix fake iommu buffer drop
During pipe free, some content of pipe is backed up and then after
pipe is zeroed out, the content get restored, in between there should
be no actions to change the content since any change will be wiped out
by the restore.

Change-Id: Ia6da0162d1f9b614682e1fc36edab1db003b42ab
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-02-27 18:19:52 -08:00
Gopikrishnaiah Anandan
b877256f5d vidc: 1080p: Handle flush for interlaced clips.
Video core expects one field per buffer for interlaced
clip playback.If a flush is issued we should reset the
need next field flag, so that new bitstream is processed
after flush is completed.
Reconfig flag shouldn't be reset in case of EOS.

Change-Id: Idf50a24c29e904a958b0b1e850813e2d9fc4346d
CRs-fixed: 382368
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2013-02-27 18:19:36 -08:00
Kuogee Hsieh
c72cdf38b5 msm_fb: display: clear correct pending isr
Clear correct pending isr during irq enable/disable
to avoid unexpected side effects

Change-Id: I5e7afc778cb8d5feda40f359ff2aae6493dc7cd2
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-02-27 18:19:30 -08:00
Kuogee Hsieh
2754ec7303 msm_fb: display: fix iommu leaking
Fixed iommu map buffer dropped after overlay unset by saving
origianl iommu list before zero out overlay pipe structure.

Change-Id: I498dd4cf62e93f4571883fe20a0298e9fad4ccab
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-02-27 18:19:24 -08:00
Padmanabhan Komanduru
3fcd1d0f89 msm_fb: Add support for Vsync driven composition on MDP 3.03 targets
Add support for vsync notification to user space using user events.
This is to trigger frame composition based on Vsync.

Change-Id: Ie94edfcdb5e540dd2f9a4a5df4bc3b7c4eb9041c
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2013-02-27 18:19:22 -08:00
Maheshwar Ajja
f5a3312d0e msm: vidc: Add support for ION memory on 8x55 target
This commit will add support for ION memory on
8x55 target for video encoder and decoder.

Change-Id: I23be61d698cf3c6ee81846bad61be15b9e3f824f
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2013-02-27 18:19:17 -08:00
Kuogee Hsieh
d4348b12ab msm_fb: display: enable sending uevent as default
Enable sending vsync uevent as default so that uevent will
be sent to usersapce frame work when first request recevied

Change-Id: If72248007d68cba8fc814d449b46a58d842544ba
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-02-27 18:19:13 -08:00
Ajay Singh Parmar
b4a90273a7 msm_fb: display: vsync support for HDMI as primary
When HDMI is primary, dtv is associated with node 0. In this case,
DTV vsync and ctrl need to be called for node 0.

CRs-Fixed: 383877
Change-Id: I425cddf453dd159259883e71f92c32918ca8e6c7
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2013-02-27 18:19:12 -08:00
Chandan Uddaraju
c350849461 msm_fb: MDSS: Add DSI driver support for MDSS
Add the dsi driver implementation for
DSI version 3.0. Use the panel information
retrieved from the 'dts' to configure the
interface parameters.

Add the device tree binding file to specify the
basic configuration and panel features.

Change-Id: I6a3677401454ad1d2bc29b0b845b0366eb7842b7
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2013-02-27 18:19:10 -08:00
Huaibin Yang
ef86cf8310 msm_fb: display: add iommu mapping for mdp cursor buffer address
The mdp h/w cursor buffer physical address needs to be mapped to an
iommu virtual address when iommu domain is enabled.

Change-Id: I73b4492fc4d63632117074136e4d908f5089eb93
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-02-27 18:19:09 -08:00
Huaibin Yang
e65fd5191d msm_fb: display: set pipe src and dst size same in solid fill mode
When a mdp pipe is in solid fill mode, the pipe outputs constant color
and pipe itself does not fetch data from memory, so pipe src size
should not matter. However, when src size is greater than dst size in
solid mode which means downscaling, underrun happens. In this
situation, setting src size to be same as dst size can remove underrun.

CRs-fixed: 368478
Change-Id: Ie3ffc34486129cddcc872fe6e5317873db985b97
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-02-27 18:19:02 -08:00
Huaibin Yang
0814419a71 msm_fb: display: remove mdp_lut_enable call to avoid hang issue
Calling this function is not necessary in mdp overlay2 writeback
driver. If called, it causes command mode primary hang.

CRs-fixed: 365332
Change-Id: Id7054c3e56224035ec5939d91f8ce152b038e858
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-02-27 18:19:01 -08:00
Huaibin Yang
c5cef34a76 msm_fb: display: no early suspend for writeback panel
Writeback panel is not real physical panel and no power consumption
concern, so it is removed from early suspend registration to avoid
open fb2 error during suspend/resume.

Change-Id: Ic61f69e069f2da8c73f2b5a13d103a2f20034d20
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-02-27 18:19:00 -08:00