summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev (follow)
Commit message (Collapse)AuthorAge
...
* | msm: mdss: Add support for dynamic mode switch on mdp3Shivaraj Shetty2016-03-23
| | | | | | | | | | | | | | | | | | | | | | Add support to dynamically switch between dsi video mode and command mode for MDP3 driver. For a panel which is configured in video mode and can support command mode, it would be power efficient to dynamically switch to command mode on need basis. Change-Id: Iefb3c8aa453a8be4396fd04b65dcc462d01e26fb Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
* | msm: mdss: Avoid mutex lockup in dynamic switchingShivaraj Shetty2016-03-23
| | | | | | | | | | | | | | | | | | Calling blank/unblank after locking the backlight mutex will result in mutex lockup as blank/unblank would again try to aquire the same lock. Avoid this situation in Dynamic Switching. Change-Id: I7ddb2afec605f236071976420e0d6bd0c707e4d0 Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
* | drivers: msm: Fix a handful of compiler warningsStepan Moskovchenko2016-03-23
| | | | | | | | | | | | | | | | | | Compiling the kernel with the -O2 GCC flag reveals a number of warnings relating to potentially uninitialized variables and other edge cases. Change-Id: I3758dbe1af276d79f55188b9f2db850c730acb80 Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
* | msm: mdss: Flush Interface timing registers only onceSree Sesha Aravind Vadrevu2016-03-23
| | | | | | | | | | | | | | | | MDSS interface timing engine registers need to be flushed only once during the first commit to the respective panel. Change-Id: I7a619f2eeeb57baf5429346a11eb41eedac252f3 Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
* | msm: mdss: synchronize recovery handler accessXiaoming Zhou2016-03-23
| | | | | | | | | | | | | | | | | | | | | | The recovery handler is used in the dsi event thread, and the recovery handler variable was configured from a different thread. Earlier, there is no synchronization between the two threads when accessing the recovery handler, causing kernel panics. Change-Id: Iee990276fdabd65e2e1f2e3c21ad574fc0d8a7bc Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
* | mdss: fb: ensure that shared memory is available during probeJeevan Shriram2016-03-23
| | | | | | | | | | | | | | | | | | Populate shared memory length during probe for availability to userspace through FSCREENINFO ioctl. Also, ensure that fb length is always available. Change-Id: I94d3f83098fbfd81a7aa20f6fc1f19e756aebc4e Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
* | msm: mdss: IOMMU ref count implementationJayant Shekhar2016-03-23
| | | | | | | | | | | | | | | | | | | | Currently MDP is attaching/detaching iommu based on bus bandwidth requests. This can lead to performance issues, so implement ref count on iommu such that iommu is attached where needed. Change-Id: Ic4d35e2dc7f83291d1ab93d3e0109a2d69c98844 Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
* | clk: qcom: mdss: add mdss 20nm pll clock driver supportChandan Uddaraju2016-03-23
| | | | | | | | | | | | | | | | | | Add support for new 20nm PLL clock driver to handle different DSI panel resolutions. Add seperate files to support this new 20nm PHY PLL block. Change-Id: I4ee5309449f317daddba7106cb8e1829fd6e76cf Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
* | msm: mdss: Use correct error checking for mdss bus scale registerBenet Clark2016-03-23
| | | | | | | | | | | | | | | | | | Previously, we were checking the error value for mdss bus_scale_register incorrectly. Now we check the error value for null rather than a negative value. Change-Id: If7fda0584df82d6c007829f2e63af9b735cafb7e Signed-off-by: Benet Clark <benetc@codeaurora.org>
* | msm: mdss: Move msm register bus setup outside of postprocBenet Clark2016-03-23
| | | | | | | | | | | | | | | | | | | | The msm register bus is currently configured by postprocessing. If the mdss driver wants to modify the msm register bus bandwidth at any point in the future, then the bus should be configured in a more central location of the mdss driver. Change-Id: I4ae65f4448f0b2be1371446d08bd4ab55c830d19 Signed-off-by: Benet Clark <benetc@codeaurora.org>
* | msm: mdss: Parse fixed MMB's for VIG pipesJeykumar Sankaran2016-03-23
| | | | | | | | | | | | | | | | | | Similar to RGB fixed MMB's, msm8994 reserves fixed MMB's for VIG pipes too. Parse fixed MMB allocation for VIG pipes from device tree and update MMB alloc map. Change-Id: Ie7c7dea77fe8a2afc6bfeffdb5d7f69c48b802cd Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
* | msm: mdss: Flush interface registersSree Sesha Aravind Vadrevu2016-03-23
| | | | | | | | | | | | | | | | The timing engine flush registers for display interfaces need to be programmed before enabling their respective timing generators. Change-Id: I6144233e9dbad5ce5699652fac4834f0744fe2e0 Signed-off-by: Sree Sesha Aravind Vadrevu <svadrevu@codeaurora.org>
* | msm: mdss: fix quality issues when source split is disabledUjwal Patel2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | When source split is disabled on split display panels, a layer can be split un-evenly into two pipes. When in this condition along with vertical decimation specified by user-space, it is possible that driver infuse extra decimation if per pipe BW is exceeded. Now when we do this, it is possible that both halves of the same layer get different decimation and can lead to quality difference between two panels. Fix this by not allowing extra decimation when split display is enabled. Change-Id: Ib47953fd94400b01d02ee07059bf008310abbc84 Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
* | msm: mdss: Change DSI backlight pwm_config to use nanosecondsBenet Clark2016-03-23
| | | | | | | | | | | | | | | | | | | | The DSI panel backlight is now configured using nanosecond duty cycle and period for pwm. A nanosecond duty cycle is needed in order to satisfy the granularity needed for 255 backlight levels and the DSI period. If the pwm_period is very large, then a microsecond configuration is used. Change-Id: I9551f52360f9d5da47ab7e2da6e039ad6f2695fb Signed-off-by: Benet Clark <benetc@codeaurora.org>
* | msm: mdss: Allow display commit in DCM state for CMD panelsZohaib Alam2016-03-23
| | | | | | | | | | | | | | | | | | Allow display-commit in DCM state for command mode panels. QDCM tool requires explicit display kickoff during the calibration stage in which the panel power is turned off. Change-Id: Id6c7a0becf488ad2bfe9652b05d781384109f5c4 Signed-off-by: Zohaib Alam <zalam@codeaurora.org>
* | msm: display: kickoff lock release centralizationKen Zhang2016-03-23
| | | | | | | | | | | | | | | | Centralize kickoff lock releasing, use notify event to trigger in display commit thread. Change-Id: I06fbe0660917a0c570b1337953f7334f3706ce8e Signed-off-by: Ken Zhang <kenz@codeaurora.org>
* | msm: mdss: Add debug message to profile rotator timesJayant Shekhar2016-03-23
| | | | | | | | | | | | | | | | Add debug message which calculates time taken by rotator to process a frame. Change-Id: Iffc79477c8b72230bc916631303b31bf0be9a494 Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
* | msm: wb: Ensure iommu reference is available in wb terminateJeevan Shriram2016-03-23
| | | | | | | | | | | | | | | | | | | | In static screen case on command mode, when wifi display is disconnected, buffers don't get free as there is a probability that iommu is not attached. Ensure that iommu is attached when wifi display terminate is called. Change-Id: I3cd92072cc44074b31766a5542a9b59e1a2bdad1 Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
* | msm: mdss: Add traffic shaper for rotator pathJayant Shekhar2016-03-23
| | | | | | | | | | | | | | | | | | | | Rotator is a non real time client. Traffic shaper helps spread out rotator bandwidth request so that this non real-time client won't compete with other real time read clients. Change-Id: I07dbc0a6287e31d33084e27a8e1f3e9ea365d3ab Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
* | msm: mdss: release rotator bandwidth once rotator finished processingIngrid Gallardo2016-03-23
| | | | | | | | | | | | | | | | | | | | | | Once rotator finished processing the data, the bandwidth for the rotator can be removed from the bandwidth vote. This change remove the rotator bandwidth from the vote after rotator completed the transaction. Change-Id: Ic79398006a1514c4b422e8b3aa7cafcb7fb3c002 Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org> Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
* | msm: mdss: handle race condition between ov_off and ov_commitDhaval Patel2016-03-23
| | | | | | | | | | | | | | | | | | Handle race condition between ov_off and ov_commit by acquiring the ov_lock in off API. This gives the exclusive behavior between ov_off and ov_commit call. Change-Id: Iaa13f9e5991a53feff12b8efaec497cae49d28d1 Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
* | msm: mdss: Allow smp change during composition switchJustin Philip2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The composition fallback mechanism might not ensure unsetting of the pipe whose prepare call failed due to smp configuration change, typically in the cases where change in composition requests same pipe. This scenario is a deadlock where composition switch does not happen, due to these pipe failures. To handle such cases, for changed SMP request for a pipe doing non backend composition, allow smp configuration to happen, so that the composition could be successfully switched, thereby preventing the deadlock. Change-Id: I2d29ac6591671494abc7c4caf7c6c53f058d12f6 Signed-off-by: Justin Philip <jphili@codeaurora.org>
* | msm: mdss: add fb sysfs property to indicate how to split layerUjwal Patel2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When source split is enabled, a layer can be split into two at layer mixer (LM) rather than splitting into two source pipes. But splitting at LM is not always optimal from power and performance aspects. Display panel properties and information about other system resource including other layers dictate the best balance between power and performance of this layer split. i.e 1080p video layer can always be sent through single pipe on 1440x2560 portrait panel but that leads to higher MDP clock compared splitting 1080p video layer into two source pipes. Since decision to split the layer into two is done by user-land, aid in their decision by providing information if they should split such layer or not. Change-Id: I1009412f127423aee3f083dd2ea879dbaf2ed2ae Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
* | msm: mdss: acquire list_lock before calling free pipeDhaval Patel2016-03-23
| | | | | | | | | | | | | | | | | | | | If unblank call and display thread tries to free pipe list at the same time; one of the caller might hit the null free list and leads to crash. Acquire list_lock before calling the free pipe API. Change-Id: Ieb6af1700803e3049ea918e2be358e55e43d477a Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
* | mdss: mdp: update fix screen variable in mmap callJeevan Shriram2016-03-23
| | | | | | | | | | | | | | | | Update shared memory start address with iommu virtual address for proper display on panel Change-Id: I49495969f9085b76547d1f919bec5b7353a028dc Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
* | mdss: fb: Add page protection flag in mmap callJeevan Shriram2016-03-23
| | | | | | | | | | | | | | | | Add page protection flag to avoid screen corruption in pan display path. Change-Id: Iae57ee85fd20730f5842629c5cf8778da56a13d3 Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
* | msm: mdss: enable MRPS command for short read commandsPadmanabhan Komanduru2016-03-23
| | | | | | | | | | | | | | | | | | | | Currently, we specify the size of payload that the panel needs to send back via the MRPS command only for DCS/Generic long read commands. Enable the MRPS command to be sent for short commands also based on the return length of the payload expected. Change-Id: I634a8e5d12a8ea8d0a8118f360aef27610b21c9c Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
* | msm: mdss: fix under-runs during suspend resumeUjwal Patel2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | When device goes into suspend, MDP driver will put pipeline into border color only without staging any pipes. Similar pipeline is setup while resuming the device. When MDP pipeline is in border color only, minimum MDP clock requirement is based on mixer width. Currently MDP clock calculations are skipped if number of layers staged are 0. This set MDP to minimum clock rate and device under-runs. Fix this by allowing MDP clock rate calculations even when number of staged layers are 0. Change-Id: I1c00e00b0b4ac76866a7863293bf29d2bc6a423d Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
* | msm: mdss: Update slave controller dfps at the same timeSiddhartha Agrawal2016-03-23
| | | | | | | | | | | | | | | | | | Update the dynamic fps configuration of the slave dsi controller while updating the master controller itself. This fixes corruption issues for dual dsi panels that have dynamic fps feature enabled. Change-Id: Ibf4f49dcf7a228be839c511bae14e66d60340070 Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
* | mdss: mdp3: Remove scaling by 1 for ppp compositionTerence Hampson2016-03-23
| | | | | | | | | | | | | | | | | | | | Scaling by 1 logic was complicated. After trying to understand what use cases we were preventing with this check, we verified that ppp is actually able to handle scaling by 1 with hw team. There is no need for this check. Change-Id: I9f3cda5e61740fffdbda92dc768a98796b9a8238 Signed-off-by: Terence Hampson <thampson@codeaurora.org>
* | msm: mdss: avoid flagging error for retire fence fdManoj Rao2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | For cases such as the rotator interface, flags to indicate retire fence file descriptors are not set. Do not return error while copying these file descriptors for such interfaces. This avoids the driver from setting false positive error flags to user space processes in usecases where retire fence fd is not present. CRs-Fixed: 663793 Change-Id: I7918520764c364ee11f469ea757c38ef46bf93cd Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
* | msm: mdss: Reset NULL ROI to full panel resolutionJeykumar Sankaran2016-03-23
| | | | | | | | | | | | | | | | | | Don't expect user space to validate for NULL ROI. DISPLAY_COMMIT can be called by any module. So validate the ROI before configuring MDP. Change-Id: Iba52731e2c603f237099ad560773437bbfac112f Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
* | mdss: fb: Correct the error check for RGBA formatJeevan Shriram2016-03-23
| | | | | | | | | | | | | | | | Currently it is failing RGBA format though it is valid condition. Change-Id: I2ee26a4f3fbef3d001e5f9ff1ebdc7fd093c3a26 Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
* | msm: mdss: support PP features with mdss power collapse enabledPing Li2016-03-23
| | | | | | | | | | | | | | | | | | | | | | Add support for post processing features when power collapse feature is enabled. Every time MDSS enters power collapse mode, all the post processing registers will get reset to 0, hence we need to restore those PP registers when MDSS comes out of power collapse mode. Change-Id: I4abb41f17f24a12dddf50e01d8f69db19a464f3b Signed-off-by: Ping Li <quicpingli@codeaurora.org>
* | msm: mdss: Dynamic FPS using VFPJustin Philip2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using Fixed fps and v_total for BW calculations, it results in underrun if dynamic fps and v_total is used. Dynamic FPS change should be Mutex protected for synchronization between read/write so that multiple processes don’t change fps at the same time. Line count should be checked to make sure we have sufficient lines before we start programming FPS. Do not configure new fps when vsync timeout happens. Add support for FIFO empty recovery. CRs-Fixed: 651333 Change-Id: Icff48a7f85755484a321f0de26d4816f895c367e Signed-off-by: Justin Philip <jphili@codeaurora.org> Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
* | msm: mdss: handle WB2 irq for MDSS 1.8.0Kalyan Thota2016-03-23
| | | | | | | | | | | | | | | | | | In MDSS 1.8.0, bit 2 in intr enable and intr status register is marked for WB2 which is different from the other targets. Add changes to handle the same. Change-Id: I76947bc218c897e121bb22fbda7aaa57723ec708 Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
* | msm: mdss: control backlight level during blank and unblank eventsChandan Uddaraju2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | Add code to set the backlight level to zero for blank event and restore the backlight level to its previous value during unblank event. This will fix any unexpected panel flicker that might show up on the screen during panel ON sequence. CRs-Fixed: 608091 Change-Id: I871a067b0cc40d893b8b7e5a25103ebb914f9b7a Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org> Signed-off-by: Benet Clark <benetc@codeaurora.org>
* | msm: mdss: Consider FLIP flags while optimizing pixel fetchJeykumar Sankaran2016-03-23
| | | | | | | | | | | | | | | | While calculating source and destination rect of a pipe for the programmed ROI, consider FLIP flags set for the pipe. Change-Id: I631453c26f443b08a23556f83195d9914e05b41d Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
* | mdss: display: use local_clock() instead of ktime for xlogKuogee Hsieh2016-03-23
| | | | | | | | | | | | | | | | | | For better analysis, time stamp of xlog should synchronize with the time stamp of printk. Use local_clock() to log time stamp. CRs-Fixed: 673350 Change-Id: I00e456fdc35f5a85d8029d12f4507990444e2821 Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
* | msm: mdss: Increase commit count for first kickoffTerence Hampson2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | During panel unblank a kickoff is done to turn on the panel so that the first update is not delayed. It is also used to give buffer to command mode panel prior to enabling backlight prevent junk data from appearing. In order to prevent release fence timeline from being signaled too early we will increase the commit count. This allow next sync point to be added to the appropriate point on timeline, instead of relying on frame done being called before sync/commit calls. Change-Id: I566f90b3013b59dedbe42bbb9fdf6fa37d65e779 Signed-off-by: Terence Hampson <thampson@codeaurora.org>
* | msm: mdss: Fix unprotected register read/write accessPing Li2016-03-23
| | | | | | | | | | | | | | | | Make sure the MDP clocks are turned on for register read and write access when device comes out of power collapse mode. Change-Id: Ibbfba8b33b85b247c82d2938322c09853528deba Signed-off-by: Ping Li <quicpingli@codeaurora.org>
* | msm: mdss: Add backlight notification support for PP featuresPing Li2016-03-23
| | | | | | | | | | | | | | | | Notify post-processing features whenever there is a backlight change, so that PP feature can update accordingly. Change-Id: I2317088752444478bcfd9cf4f6acfa8553e85d30 Signed-off-by: Ping Li <quicpingli@codeaurora.org>
* | msm: mdss: fix incorrect stage & un-stage when using source splitUjwal Patel2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | With source-split feature, a pipe can be staged across two layer mixers (LM) and/or two pipes can be staged on a LM same stage. Current implementation stages source split pipe into incorrect container index for right LM. Similarly while un-staging it calculates incorrect index if more than two pipes are staged on a single LM. Fix this to resolve MDP pipeline hangs. Change-Id: I89e0f5946cb330dc918641486728baea856de574 Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
* | msm: mdss: print error code when file node allocation failsDhaval Patel2016-03-23
| | | | | | | | | | | | | | | | | | Print error code when file node allocation fails within fence acquire logic. This helps to find the root cause for file node allocation failure. Change-Id: Ib6adb9f612f13cb56d8f43549722b78440f689f8 Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
* | ion: msm: remove superfluous function argumentMitchel Humpherys2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | msm_ion_client_create doesn't actually do anything with its heap_mask parameter. Remove it. Also remove the extra argument from an audio function that wraps msm_ion_client_create. The following semantic patch was used to generate this patch: @@ expression E1, E2; @@ msm_ion_client_create( - E1, E2) @@ expression E1, E2; @@ msm_audio_ion_client_create( - E1, E2) Change-Id: I403a125a1715b29a3db1f27c993abe0bc6d3fb11 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
* | msm: mdss: Initialize ad_info completion during dt probe onlyBenet Clark2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the ad_info completion structure was initialized every time ad_input was called, which reset the completion wait_queue. A completion structure should only be initialized once, in order to prevent any corruptions of the wait_queue. Instead, we initialize the completion during dt probe so that the wait_queue is only initialized once, and during ad_input, we use a safer INIT_COMPLETION for resetting complete count. Change-Id: If1fb7c9a9dec2ad1ec1f07b022bdeabe1af41b22 Signed-off-by: Benet Clark <benetc@codeaurora.org>
* | msm: mdss: Add missing BL lock around BL-related infoBenet Clark2016-03-23
| | | | | | | | | | | | | | | | The bl_updated variable requires the BL lock. Otherwise, it can be corrupted and cause backlight issues. Change-Id: I55eb4b8d525765ede4f27a404f5c3f1f0b446719 Signed-off-by: Benet Clark <benetc@codeaurora.org>
* | msm: mdss: Extend fb instance to handle other split typesKalyan Thota2016-03-23
| | | | | | | | | | | | | | | | | | Add split_mode in mfd to support other split types. 1) Mixer split 2) Ping Pong Split Change-Id: Idcaa6aaa7ad5e78608d2e18137e3d987843d7699 Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
* | mdss: display: move mdss_mdp_irq_enable out of clk_lock scopeKuogee Hsieh2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | There are potential deadlock between irq handler and mdss_mdp_irq_enable() since both can acquire mdss_lock before trying to grab local lock. Add koff_lock for kickoff related function in addition to original clk_lock which used for clock related function to reduce unnecessary lock contention. CRs-Fixed: 665524 Change-Id: Iebc5023eb9dc99f2a2709379bfac67ec275046a7 Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
* | mdss: fb: Add backward compatibility to fb memoryJeevan Shriram2016-03-23
| | | | | | | | | | | | | | | | | | | | | | In the current implementation, contiguous memory allocation during bootup is removed and related changes were made in frame buffer driver which is not backward compatible. With this change, add backward compatibility to map to physically contiguous memory when available which is allocated at bootup. Change-Id: Ib1a595f2426dda8d3e1c5e50c71c35d3f45854b6 Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>