Commit graph

5025 commits

Author SHA1 Message Date
yetta_wu
8ca7624ab7 display: JDI: config backlight level when kernel init
1. Remove the gpio 26 config in board-flo-pmic.c
   since this gpio is already config as PWM function in LK.

2. Add pwm_init function implementation.

3. Config backlight level in pm8xxx_led_probe(), and remove the
   pwm_request() part in panel probe function.

Change-Id: I3ce71a9c792ce155bebabd80a24a8ff8fc361ae9
Signed-off-by: yetta_wu <yetta_wu@asus.com>
2013-04-18 16:09:22 -07:00
yetta_wu
a7957398f7 display: JDI: backlight by mipi commands
1. use mipi command backlight after ER2 hw_id=(1,1)
2. also port cabc, but not turn on yet
3. separate command and backlight "first" parameter

Change-Id: Ie9a2d2d87ab75c2c710c47cf17b7ed1550431e76
Signed-off-by: yetta_wu <yetta_wu@asus.com>
2013-04-18 16:09:22 -07:00
Naseer Ahmed
7d50039bef msm_fb: display: silent blending error warning message
If there had no any pipe blending stage changes, then do not
call belnding set up to avoid unnecessary warning messges.

CRs-fixed: 467556
Change-Id: I07520b3b0917375c41405e736dcb9eb8a3daddc1
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-04-18 16:09:22 -07:00
Naseer Ahmed
d25a3ce0e5 msm: display: plane alpha support
Clean up the blending rule to follow blend_op set from hwc.
Use modulate alpha for plane alpha when it is not 0xff.
Keep backward compatibility if blend_op is not set.

Change-Id: I02fd3c3c7b5ace2e6eec22b2db0284161404a0fc
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-04-18 16:09:22 -07:00
Naseer Ahmed
5e233e2b90 Revert "msm_fb: display: remove background invert alpha option for alpha drop pipe"
This reverts commit 0119007a18aae8a8fb43f4320509bda161da4167.

CRs-fixed: 461574
Change-Id: Ia768030ec859a4ff38549686936789413826df32
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-04-18 16:09:22 -07:00
Naseer Ahmed
7630f0c711 msm: display: Fix composition issues when framework rebooted in suspend.
Currently, if framework is rebooted while in suspend mode, borderfill
is not unset due to which MDP composition can not be enabled. This patch
fixes the issue.

Change-Id: I8b671eccedebf2bb08724cf2d284d4ab27a71360
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>

Conflicts:
	drivers/video/msm/msm_fb.c

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-04-18 16:09:21 -07:00
Naseer Ahmed
74410ce2f0 msm_fb: Fix adb shell start/stop issue when bypass enabled
Currently when 2/3/4 layer bypass is enabled, doing a adb shell
stop/start is failing overlay and composition happens through
GPU. Fix this issue by proper overlay configuration during this
scenario.

Change-Id: Ia04f1839bf80ed552671e48445af63a4dcd6bdfd
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-04-18 16:08:50 -07:00
Padmanabhan Komanduru
aac070cc81 display: JDI: fix resume messy screen
1. remove the workaround for resume messy screen
2. add the fix patch for resume messy screen

Set the backlight after resume only after the first display
commit is done. This will avoid panel specific transients to
show up on the panel during its initialization. Also, avoid
backlight scaling during resume until backlight is set.

case 01124703
Change-Id: Iba158db803a7ea06d564b23d5477d916e8635695
Signed-off-by: yetta_wu <yetta_wu@asus.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-04-18 16:08:48 -07:00
yetta_wu
2945f0907c display: JDI: continuous screen from bootloader to kernel
1. Enable display related gpio when kernel init.
2. Config PWM to .output_value = 0 in mipi_JDI_set_backlight() function
   to prevent PWM be inverted.

Change-Id: I4b9137cf482bfe760a1a1ac3eb9d03abf0100243
Signed-off-by: yetta_wu <yetta_wu@asus.com>
2013-04-18 16:08:15 -07:00
yetta_wu
c3a2d155e9 display: JDI: workaround to fix resume messy screen
1. The backlight turns on before framebuffer comes out.
   In command mode panel like JDI, there would be messy screen
   when resuming.
2. Framebuffer comes out at first msm_fb_commit_wq_handler()
      -> mdp4_overlay_commit() after resume.
   We should delay backlight to after framebuffer comes out.
3. Add set_recovery_backlight for the backlight in recovery mode.
   Default backlight 40/255, may modify afterwards.

case 01124703

Change-Id: I62ace8bb85ac62b6eaf214588caa8a89ba094a67
Signed-off-by: yetta_wu <yetta_wu@asus.com>
2013-04-18 16:08:15 -07:00
yetta_wu
3be1e34cd6 display: fix video playback stress test UI hang issue
If vertical porch is too small, we need to set pinfo.lcd.blt_ctrl = 1.
Basically, the vertical porch should be above 10% of active lines.

The fail log of video playback stress test is:
	fence timeout on [ec2c0c80] after 1000ms

case number: 01130006

Change-Id: I035386a5dd33d7b779197cc063c0a2ad80edafa9
Signed-off-by: yetta_wu <yetta_wu@asus.com>
2013-04-18 16:08:14 -07:00
yetta_wu
68fa58273e display: JDI power off sequence on shutdown
add shutdown power off sequence for JDI panel

Change-Id: I4d379020eaba5ff965a7252e9e52cc356bc07108
Signed-off-by: yetta_wu <yetta_wu@asus.com>
2013-04-18 16:08:14 -07:00
yetta_wu
b53b44fa82 display: support both SR1 and SR2 gpio by HW revision
some panel gpio are changed in different hardware version,
modify codes to support both SR1 and SR2

Change-Id: I2ba9b7bc1341ef47aaa307655af63996b2f3e722
Signed-off-by: yetta_wu <yetta_wu@asus.com>
2013-04-18 16:08:14 -07:00
yetta_wu
5853c9f0fe display: JDI panel porting
1. for SR1 gpio
2. use pwm to control backlight
in the run afterwards, we would use mipi commands to control backlight

Change-Id: Ie7b6de6fb5a8866f5e929d12284a1d85dda8582a
Signed-off-by: yetta_wu <yetta_wu@asus.com>
2013-04-18 16:08:13 -07:00
Iliyan Malchev
9189b562aa Revert "Revert "Revert "mako: enable lgit lcd driver"""
This reverts commit 92c73d790fd0295d803edb1b8da3140c5fb4d980.
2013-04-18 16:08:06 -07:00
yetta_wu
f652e968bd Display: fix build break of AU 013 tag
Change-Id: I0dad33baca873b7a3042b12090a89c38f0e2e58d
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/69300
Reviewed-by: Sam hblee <Sam_hblee@asus.com>
Tested-by: Sam hblee <Sam_hblee@asus.com>
2013-04-18 16:08:03 -07:00
yetta_wu
456b8170a0 Display: fix blue screen issue (underrun)
1. set fps back to 60 for LG panel
for panasonic panel, set to fps 60 still have underrun

2. hard code ab, ib (memory clock) to max for mipi video mode panel
because the priority of display is not high enough, the bandwidth may be robbed by others
for JDI mipi command mode panel, there may not be underrun issue because the panel has framebuffer itself

Change-Id: Id95c56ecf570a7cae8db37eede0b3555b3186bd5
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/69094
Reviewed-by: Yetta Wu <Yetta_Wu@asus.com>
Tested-by: Yetta Wu <Yetta_Wu@asus.com>
Reviewed-by: Warlock Tai <warlock_tai@asus.com>
2013-04-18 16:08:02 -07:00
yetta_wu
f16c78bdcd Display: workaround for blue screen issue
Change-Id: Ib90dbea844125c616d595545f22b8c848b5696be
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/68315
Reviewed-by: Yetta Wu <Yetta_Wu@asus.com>
Tested-by: Yetta Wu <Yetta_Wu@asus.com>
Reviewed-by: Sam hblee <Sam_hblee@asus.com>
2013-04-18 16:08:00 -07:00
yetta_wu
71058c072c Display: distinguish different panel type by pcbid
Change-Id: I418178ab8fcbe72fbcd0815b93272c3fd5944d09
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/68118
Reviewed-by: Yetta Wu <Yetta_Wu@asus.com>
Tested-by: Yetta Wu <Yetta_Wu@asus.com>
Reviewed-by: Warlock Tai <warlock_tai@asus.com>
2013-04-18 16:07:56 -07:00
yetta_wu
c25e012c4e Display: slimport porting - update to V0.3
1. slimport basic function
2. set gpio 50 as 27M clock (function_2, refer to document 80-N7752-2 p.435)
3. request USB_ID pin (gpio 77) to let detect pin work
4. the version history:

V0.1
The gerenal slimport ANX7808 driver for customer evalutaion and application.

2013-01-08
V0.2
1. Add pull down ID_OUT pin once the slimport accessary is plugged, and left it to default status
   once the accessay is unplugged.
2. If the incoming video is YUV, convert it to RGB colorspace, since our RGB dangle only support RGB.

2013-01-29
V0.3
1. Correct the error in eye diagram test.
2. Correct the phy auto test.

Change-Id: I0d35945b5682ca736ec00b3d5166001f2ab5dfc3
Change-Id: Ibdf3ba27e119f0ae361b28b1f33f7522d5fdf758
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/67937
Reviewed-by: Yetta Wu <Yetta_Wu@asus.com>
Tested-by: Yetta Wu <Yetta_Wu@asus.com>
Reviewed-by: Warlock Tai <warlock_tai@asus.com>
2013-04-18 16:07:52 -07:00
yetta_wu
3d143f532a Display: SR1 mipi panel porting
1. port LG and panasonic panel
2. remove the choice "LCD Panel" in Kconfig because we need to config multiple mipi panels in one code base
3. pwm and LCD_BL_EN power source change to L17

Change-Id: I793114db222ed7712662495cd7106f1d0d41ddd3
Reviewed-on: http://mcrd1-5.corpnet.asus/code-review/master/67830
Reviewed-by: Warlock Tai <warlock_tai@asus.com>
Tested-by: Warlock Tai <warlock_tai@asus.com>
2013-04-18 16:07:51 -07:00
Deva Ramasubramanian
923748c24e msm: vidc: add support for the bitstream_restrict flag
Adds support for the MFC core to add the bitstream_restrict flag in the
sps/pps for H264 codecs.  This allows for the decoder to determine how
many frames to buffer when decoding.

Change-Id: I30dc17a29b9fcc1ee76265f0318a0a581316dd49
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl.h
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_properties.c
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.h
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_vidc.c
	include/media/msm/vcd_property.h
2013-03-18 10:12:44 -07:00
Iliyan Malchev
24a803537e Revert "msm_fb: display: Copy splash image to kernel memory"
This reverts commit 4b105e60c4e889c4069bf725113a89f3a7d66ced.

Signed-off-by: Iliyan Malchev <malchev@google.com>

Conflicts:
	drivers/video/msm/msm_fb.h
2013-03-15 17:29:25 -07:00
Iliyan Malchev
97b83c2355 Revert "Revert "mako: enable lgit lcd driver""
This reverts commit ba14d0b42c.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-15 17:13:31 -07:00
Iliyan Malchev
7b3f249b1a msm: display: clear suspend flag at end of mdp4_dsi_video_on
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-15 17:13:07 -07:00
Devin Kim
8db2dc270f mako: add lcd turn-off sequence on shutdown
In the normal case, when the device is turned off, lcd off function doesn't
work.  However, we still need to turn off the panel and DSV convertor. This
patch adds an LCD turn-off function and calls it on device shut down.

Change-Id: I5526f0f08567190050527121d7e0890c05607a68
Signed-off-by: Iliyan Malchev <malchev@google.com>
2013-03-15 17:09:28 -07:00
Huaibin Yang
f332bc0695 msm_fb: display: balance secure map and unmap in each mfd
Make sure secure map and unmap get called in each mfd and balanced.
Otherwise, secure contents can not be played for both primary and
hdmi.

CRs-fixed: 450427
Change-Id: I5399be64fbb104dc3cbe2c5c65b3f4406f47473c
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
2013-03-15 17:09:21 -07:00
Naseer Ahmed
8e4d11495c msm_fb: Update MDP fence wait behaviour
The current fence wait times out too early in cases where the GPU
is under a heavy workload. Change this behaviour to warn and wait
for a longer time for GPU to complete it's work.

Change-Id: I8b20c22733a77c1aaea4a1fd1e4daaa14b5ec2fd
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2013-03-15 17:09:19 -07:00
Kuogee Hsieh
88191d9b1e msm_fb: display: fix fence fd list be put twice
msm_fb_wait_for_fence() will put fence fd list if sync_fence_wait()
failed. After that same fd list wil be put one more time. This
cause a fd put twice and cause system crash at the time fd
was closed.

Change-Id: If6a358e051c98841e34c23d81098243003ef0836
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:09:16 -07:00
Kuogee Hsieh
1ef7647717 msm_fb: display: add mutex to video_off
It is possible  that pipe_commit still be issued by
frame work after suspend had been started. Therefore
mutex lock within video_off is necessary to prevent
race condition from happening between these two threads.

Change-Id: I57f51744c1654d6def8664c492035631a5b7081e
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:09:14 -07:00
Ravishangar Kalyanam
f1c764d118 Revert "msm_fb: display: Register MDP fault handler with IOMMU driver."
This reverts commit 9f36ce34dc0e6f840c6198430adfb44142d91f4b.
This enables the IOMMU page fault register dumps from default
handler.

Change-Id: Icddd2394f5aa337e1a4998247cc4e3201f752e84
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
2013-03-15 17:09:01 -07:00
Kuogee Hsieh
848c8f8de6 msm_fb: display: calculate mdp clock including borderfill pipe
For hdmi case, mdp clock calculation needs including borderfill
pipe to prevent dtv underrun while system is in suspend.

Crs-fixed: 449027
Change-Id: I98789343317d5cfdf1f56e496cecb4dd663c907f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:08:55 -07:00
Maheshwar Ajja
7ccb844344 vidc: Turbo mode for multiple instances
If macroblock count per second goes beyond 1080p 30fps,
then bump the clock to turbo on supported platforms.

CRs-fixed: 455464
Change-Id: I48c34c9b6987706ea3e6b412b57791e2ae07ba52
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2013-03-15 17:08:54 -07:00
Deepak Verma
ed1ab2ee7d msm: vidc: Fix klocwork error
This change fixes the klocwork errors

Change-Id: I73a6ed0e568e98a51c8e095b824a783f91ce6657
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
2013-03-15 17:08:49 -07:00
Deva Ramasubramanian
06e5e6ec87 msm: mdp: Move wfd state signalling into mdp driver
Previously the WFD driver was reponsible for signalling the
online/offline events to userspace listeners.  This led to redundant
notifications due to the manner in which the WFD driver is used. The
signalling is better purposed when done from MDP driver.

Change-Id: Ifffbacb565f8758b65139f7b0e32df0773247e2d
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2013-03-15 17:08:48 -07:00
Mayank Chopra
8eb221e7d3 msm_fb: display: Program source address registers correctly
Scale filter FIR uses the adjacent pixels as part of the
processing. Source address registers should be program such that
they point to the first valid pixel so that non-ROI pixels are
ignored. This is done by making source x,y offsets to zero and
adding the computed offset to source address.

CRs-Fixed: 380020
Change-Id: I998fdd46f39dc67f32c422ec209da59d1add2e95
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c

Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
2013-03-15 17:08:46 -07:00
Kuogee Hsieh
c4917bf54e msm_fb: display: check active queue before signal timeline
This patch make sure active queue is not empty before signal
timeline.

Crs-fixed: 453745
Change-Id: I450c0923a67bdc90d06249e3ba83edb0b3b4b319
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:08:42 -07:00
Kuogee Hsieh
dfd02b2265 msm_fb: display: provision of mixer reset function
Mdp has hardware bug which cause fetch engine stalled if less than
3 pixels at begin or end of line be cropped into destination. Reset
mixer can fix this problem. However frame work can provide better
work around solution by falling back to gpu if the condition detected.
This patch will not reset mixer but provide mixer reset function in
case of mixer reset is need in future.

CRs-fixed: 443018
Change-Id: I38ee591f28bf1b81f4fbd58838281b43ba0a8498
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:08:40 -07:00
Maheshwar Ajja
2347c7222f msm: vidc: Reduce priority of unwanted logs
Change reduces the priority of unwanted logs
which are coming in kernel logs by default
in video driver. Now these logs will come
only when enabled.

Change-Id: I18a534c7aaf8a2819be1b8812fad9e0710c49bd3
CRs-fixed: 454273
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2013-03-15 17:08:39 -07:00
Carl Vanderlip
8ed6b6247d video: msm: Add revision check to calibration API
Add ability to check MDP revision to the calibration config API. Allows
calibration tool to check specific MDP revision for proper tuning.

Change-Id: I926ed21704507cb390c283e5c4383dcf7fbf8030
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
2013-03-15 17:08:38 -07:00
Siddhartha Agrawal
fd50a7a472 msm_fb: display: Configure solidfill color to black
The solidfill color was getting reset to to default state to white.
Correctly reseting to black by default.

Crs-Fixed: 453600
Change-Id: I203ce61867d009509bf6acd01169f1fb0b223652
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-15 17:08:38 -07:00
Ken Zhang
8a2eb95560 msm: display: reset vsync state when display is turned on
In the case that vsync ctrl is unbalanced, vsync IRQ is cleared
in suspend,  vsync cannot be enabled after resume.
Clear the status when display is turned on

CRs-fixed: 449155
Change-Id: I5ecf23053b60d1fbd91f042758d67d39c83ab444
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-15 17:08:29 -07:00
Ken Zhang
cd39a1efba msm: display: dsi command mode vsync time generation
In each vsync cycle there will be two vsync interrupts
generated, need ignore the wrong one to provide the correct vsync
timestamp.

CRs-fixed: 452269
Change-Id: Ic13eea77d15eb46f4879f818d346425c63efe41a
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
2013-03-15 17:08:27 -07:00
Nagamalleswararao Ganji
00c0980018 msm_fb: Optimize the resolution change on hdmi interface
HDMI resolution is changed twice on cable connect.
This will optimize resolution change by turning on
HDMI core only once, with best possible resolution.

Change-Id: I7f636b0c2c64eb3c661fda2a709b5480db05bd27
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Abhishek Kharbanda <akharban@codeaurora.org>
2013-03-15 17:08:24 -07:00
Kuogee Hsieh
128c3afaf1 msm_fb: display: add early_off during panel off
Some panels need to send display_off command before
dsi controller turned off. This patch add early_off
feature for this purpose.

Change-Id: Id377120e9d6972c5f773760369ec056be37e93ff
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:08:24 -07:00
Siddhartha Agrawal
90f633305e msm_fb: display: Send pixel data while sending on/off commands
To avoid LCD off sequence violeation for some LCD vendors,
we need to keep sending video data during off/sleep commands.
This fixes issues seen while going to a suspend.

Crs-Fixed: 445707
Change-Id: I0ba2704502e8959d0f82deea60481cd5b1f0be20
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2013-03-15 17:08:23 -07:00
Kuogee Hsieh
24683eeb25 msm_fb: display: wait4vsync before set suspend flag
Since wait4vsync checks suspend flag, wait4vsync needs to
be executed before suspend flag set to enforce wait happen.
Also, when timing generator is turned off, wait4vsync can
not be used anymore since the last vsync may have passed
before wait4vsync called. This patch fixed commit_comp
timeout cause fence timeout happen on hdmi plug and unplug
cases.

CRs-fixed: 449027
Change-Id: I0f5520538bb290643a648c937296b6bc097fe051
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2013-03-15 17:08:20 -07:00
Maheshwar Ajja
f7f116bf52 msm: vidc: Fix iommu pagefault in concurrent scenario
IOMMU pagefault is seen while running decoder and
encoder concurrently for specific codec combination.
Map double the buffer size to ion_map_iommu() API for
encoder reconstruction buffers to avoid the pagefault.

Change-Id: Ib5546a42a75c4c628767310f1a291e7ed443056c
CRs-fixed: 450621
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2013-03-15 17:08:20 -07:00
Ajay Singh Parmar
a2ccaef971 msm_fb: hdmi: HDMI resume delay
Remove the delay in HDMI resume sequence by not waiting for HPD
to be switched on. HDMI panel will not be turned on by default
when the device resumes and would instead be turned on by HPD
sense if it is still connected.

CRs-Fixed: 440559
Change-Id: Id276dddbcebf9226e9688aa1b5dad4b281545b21
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
2013-03-15 17:08:13 -07:00
Vishnuvardhan Prodduturi
c485e86f15 msm_fb : display : Change fps level dynamically.
This change lets the user modify the fps level dynamically using
sysfs interface.

Change-Id: Ie99bbca5ec1a0b5ff5fa3570874b254e3fb7235c
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2013-03-15 17:08:12 -07:00