aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-08-16drm/exynos: remove mutex locking in pagefault handlerJoonyoung Shim1-5/+0
There is no reason to use mutex locking in pagefault handler. Signed-off-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove function convert_to_vm_err_msgJoonyoung Shim1-24/+10
The convert_to_vm_err_msg is called just once by exynos_drm_gem_fault, so it's simple not to use the function. Signed-off-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: stop using sgtable in page fault handlerJoonyoung Shim3-29/+19
Already struct exynos_drm_gem_buf has pages of the buffer when buffer is created, so just can use pages in page fault handler, we don't have to make sgtable of the buffer. But this needs to construct pages of the buffer that is imported from dma-buf prime. Signed-off-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove struct exynos_drm_encoder layerGustavo Padovan15-309/+259
struct exynos_drm_encoder was justing wrapping struct drm_encoder, it had only a drm_encoder member and the internal exynos_drm_encoders ops that was directly mapped to the drm_encoder helper funcs. So now exynos DRM uses struct drm_encoder directly, this removes completely the struct exynos_drm_encoder. v2: add empty .mode_fixup() and .mode_set() to DSI and DPI to avoid null pointer. Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: fold encoder setup into exynos_drm_load()Gustavo Padovan3-16/+10
As we are removing the exynos encoder move the encoder setup operation directly inside the exynos_drm_load() Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove exynos_drm_create_enc_conn()Gustavo Padovan11-69/+101
This functions was just hiding the encoder and connector creation in a way that was less clean than if we get rid of it. For example, exynos_encoder ops had .create_connector() defined only because we were handing off the encoder and connector creation to exynos_drm_create_enc_conn(). Without this function we can directly call the create_connector function internally in the code, without the need of any vtable access. It also does some refactoring in the code like creating a bind function for dpi devices. Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove exynos_encoder's .commit() opGustavo Padovan2-5/+0
.commit() is not used anymore, Exynos encoders now follow the .enable()/.disable() semantics from drm atomic core, so remove this callback. Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove extra call to exynos_dp_commit()Gustavo Padovan1-4/+3
exynos_dp_commit() was getting called twice by exynos encoder core, once inside the .enable() call and another time by .commit() itself. The remove of the second call caused the wake of a bug, the operations orders inside exynos_dp_commit was wrong and we had to move exynos_dp_start_video() to be the last operation in there. Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove extra call to hdmi_commit()Gustavo Padovan1-12/+1
hdmi_commit() was getting called twice by exynos encoder core, once inside the .enable() call and another time by .commit() itself. Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove struct exynos_drm_displayGustavo Padovan14-252/+177
This struct was just representing encoder information, it was a member of struct exynos_drm_encoder, so any code trying to access encoder data would have to go through the encoder struct, get the display struct and then get the data it want. During this patchset we also realized that the only data exynos_drm_encoder needs to store is the drm_encoder parent and the exynos_drm_encoder_ops. Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: simplify calculation of possible CRTCsGustavo Padovan1-24/+5
All CRTCs can only be LCD, HDMI or VIDI, so basically all CRTCs will be a possible CRTCs. This patch removes an extra function with switch that was only checking if the CRTC type was one of those three above. Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove unused .remove() and .check_mode() ops from displayGustavo Padovan1-5/+0
These two display_ops are not used anywhere, remove them. Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove wrappers for phy_power_{on,off}Gustavo Padovan1-15/+3
phy_power_on() and phy_power_off() already checks for NULL pointer. This patch removes the wrappers exynos_dp_phy_init() and exynos_dp_phy_exit() since the only think they were doing was a check for NULL phy. Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: split display's .dpms() into .enable() and .disable()Gustavo Padovan6-130/+65
The DRM Core doesn't have a dpms() operation anymore, everything now is enable() or disable(). Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: return return value of exynos_crtc->enable_vblankGustavo Padovan1-1/+1
Instead of blindly ignore the return value of enable_vblank return it to the upper DRM layer for error handling. Suggested-by: Joonyoung Shim <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: unify exynos_drm_plane names with drm coreGustavo Padovan6-43/+44
Rename crtc_{widht,height} to crtc_{w,h} and src_{width,height} to src_{w,h} to make it similar to the atomic state names. Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove unused fields from struct exynos_drm_planeGustavo Padovan1-18/+0
Now after the move to use drm_plane_state directly struct drm_plane_state has many unused fields, along with others that weren't used before the plane state change. Thus remove them all. Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: use drm atomic state directlyGustavo Padovan5-75/+75
For some fields the use of struct exynos_drm_plane filled with data from the plane state just creates a source of duplicated information and overhead. Here we change the crtc drivers to access the plane state directly simplifying the code by not relying on a exynos internal struct. Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: pass struct exynos_drm_plane in update/enableGustavo Padovan7-65/+40
We already have the plane pointer in before calling .update_plane() or disable_plane() so pass it directly to those calls avoiding a new conversion from zpos to struct exynos_drm_plane. v2: don't remove check for suspended in FIMD (comment by Joonyoung) Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: rename win_commit/disable to atomic-like namesGustavo Padovan7-32/+32
Rename win_commit() helper to update_plane() and win_disable() to disable_plane(). Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove duplicated check for suspendGustavo Padovan2-6/+0
The same check is placed twice in fimd/decon_update_plane(), remove one of them. Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: use KMS version of DRM vblanks functionsGustavo Padovan7-22/+20
Get rid of legacy DRM vblank function that are less clear to use. The new ones basically requires only the crtc as parameters. It also clean ups exynos_drm_crtc_finish_pageflip() parameters as a consequence. Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: pass the correct pipe numberGustavo Padovan1-1/+1
Instead of giving -1 to as arg to drm_send_vblank_event() pass the correct pipe number to it. Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: clear channels only when iommu is enabledJoonyoung Shim1-1/+2
This is simplest solution about reported problem[1]. It's no problem to clear channel only when iommu is enabled, if we consider that we cannot recognize iommu errors when iommu is disabled and it have been valid until now. But this cannot be nice solution. [1] https://lkml.org/lkml/2015/7/21/404 Reported-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove drm_iommu_attach_device_if_possibleJoonyoung Shim7-31/+10
Already drm_iommu_attach_device checks whether support iommu internally. It should clear channels always regardless iommu support. We didn't know because we can detect the problem when iommu is enabled, so we don't have to use drm_iommu_attach_device_if_possible and then we can remove drm_iommu_attach_device_if_possible and clear_channels function pointer. Signed-off-by: Joonyoung Shim <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: move order to register vidi kms driverJoonyoung Shim1-3/+3
The vidi is virtual kms driver and now it is registered earlier than actual hw kms drivers, so it will occupy crtc index 0. Some users assume the condition yet that actual hw kms driver has crtc index 0. It may or may not be matter but let's arrange register order. Signed-off-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/mixer: replace MXR_INT_EN register cache with flagAndrzej Hajda1-11/+9
Driver uses only VSYNC interrupts, so we need to cache VSYNC bit state only. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/mixer: simplify poweron flagAndrzej Hajda1-38/+14
The driver uses bool protected by mutex to track power state. The patch replaces this combo with single bit and atomic bitops. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove unnecessary checking to support iommuJoonyoung Shim7-38/+13
Already drm_iommu_attach_device and drm_iommu_detach_device check whether support iommu internally, so we don't have to call is_drm_iommu_supported before call them. Signed-off-by: Joonyoung Shim <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: remove to use ifdef CONFIG_ARM_DMA_USE_IOMMUJoonyoung Shim1-4/+0
If CONFIG_ARM_DMA_USE_IOMMU is disable, CONFIG_DRM_EXYNOS_IOMMU also is disable. When CONFIG_DRM_EXYNOS_IOMMU is disable, is_drm_iommu_supported() returns always false, so we can remove to use ifdef CONFIG_ARM_DMA_USE_IOMMU in is_drm_iommu_supported(). Signed-off-by: Joonyoung Shim <[email protected]> Tested-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: gsc: Handles the combination of rotation and flipHyungwon Hwang1-0/+16
The unique results of all the combination of rotation and flip can be represented by just 8 states. This patch handles all the combination correctly. Signed-off-by: Hyungwon Hwang <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/hdmi: remove hdmi_v14_conf structAndrzej Hajda1-318/+109
The patch removes intermediate struct for HDMIv14 register configuration, instead registry values are calculated on the fly. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/hdmi: remove hdmi_v13_conf structAndrzej Hajda1-179/+101
The patch removes intermediate struct for HDMIv13 register configuration, instead registry values are calculated on the fly. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/hdmi: remove redundant configuration fieldsAndrzej Hajda1-44/+24
The patch removes redundant fields from hdmi_conf_regs. Their values can be calculated from current_mode. This patch is the first step to remove whole hdmi_conf_regs structure. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/hdmi: add driver data pointer to private contextAndrzej Hajda1-29/+20
The patch replaces duplicated driver data fields in private context with pointer to driver data. It also simplifies driver data lookup code. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/hdmi: remove private lock codeAndrzej Hajda1-24/+3
Most of the code is called by drm core framework, so it is already synchronized. The only async function is irq routine which only calls drm framework so it does not need to be synchronized. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/hdmi: Simplify HPD gpio handlingAndrzej Hajda1-10/+3
GPIO is tested only in hdmi_detect, so there is no reason to set it in other places and to preserve its value in context. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/hdmi: remove old platform data codeAndrzej Hajda1-31/+5
s5p_hdmi_platform_data were used before device tree introduction. As HDMI driver is DT only we can drop this struct completely. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/fimc: fix runtime pm supportMarek Szyprowski1-1/+0
Once pm_runtime_set_active() gets called, the kernel assumes that given device has already enabled runtime pm and will call pm_runtime_suspend() without matching pm_runtime_resume(). In case of DRM FIMC IPP driver, this will result in calling clk_disable() without respective call to clk_enable(). This patch removes call to pm_runtime_set_active() to ensure that pm_runtime_suspend/resume calls will match. Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/mixer: always update INT_EN cacheAndrzej Hajda1-0/+5
INT_EN cache field was updated only by mixer_enable_vblank. The patch adds update also by mixer_disable_vblank function. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/mixer: correct vsync configuration sequenceAndrzej Hajda1-2/+5
Specification advises to clear vsync indicator before configuring vsync. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/mixer: fix interrupt clearingAndrzej Hajda1-5/+4
The driver used incorrect flags to clear interrupt status. The patch fixes it. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos/hdmi: fix edid memory leakAndrzej Hajda1-1/+6
edid returned by drm_get_edid should be freed. The patch fixes it. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Joonyoung Shim <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-16drm/exynos: gsc: fix wrong bitwise operation for swap detectionHyungwon Hwang1-4/+2
The bits for rotation are not used as exclusively. So GSC_IN_ROT_270 can not be used for swap detection. The definition of it is same with GSC_IN_ROT_MASK. It is enough to check GSC_IN_ROT_90 bit is set or not to check whether width / height size swapping is needed. Signed-off-by: Hyungwon Hwang <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2015-08-15drm/msm/dsi: Introduce DSI configuration moduleHai Li4-146/+177
With more platforms supported, the DSI host configuration array keeps expanding. This change moves those to a separate dsi_cfg module. Signed-off-by: Hai Li <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2015-08-15drm/msm/dsi: Make each PHY type compilation independentHai Li4-4/+33
On a certain platform, only one type of DSI PHY is used. This change allows the user to only compile the PHY type which is being used. Signed-off-by: Hai Li <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2015-08-15drm/msm/dsi: Split PHY drivers to separate filesHai Li6-758/+857
This change moves each PHY type specific code into separate files. Signed-off-by: Hai Li <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2015-08-15drm/msm/dsi: Return void from msm_dsi_phy_disable()Hai Li2-12/+6
We are not checking the return value from msm_dsi_phy_disable(). Change the return type to void. Signed-off-by: Hai Li <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2015-08-15drm/msm/dsi: Specify bitmask to set source PLLHai Li1-5/+11
The bit position to configure source PLL will change on new types of PHYs. The caller should pass down this information. Signed-off-by: Hai Li <[email protected]> Signed-off-by: Rob Clark <[email protected]>
2015-08-15drm/msm/mdp: Clear pending interrupt status before enable interruptjilai wang6-10/+23
Pending interrupt status needs to be cleared before enable the interrupt. Otherwise it's possible to get a pending interrupt instead of an incoming interrupt. Signed-off-by: Jilai Wang <[email protected]> Signed-off-by: Rob Clark <[email protected]>