aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/dsi/dsi_manager.c
diff options
context:
space:
mode:
authorHai Li <hali@codeaurora.org>2015-06-10 13:18:17 -0400
committerRob Clark <robdclark@gmail.com>2015-08-15 18:27:11 -0400
commit13351cd17791694f2dcc96dc920e58b090b18c31 (patch)
treea6afd9972e16db3b8db4c0073097dd3bf0795354 /drivers/gpu/drm/msm/dsi/dsi_manager.c
parentc6a57a50ad562a2e6fc6ac3218b710caea73a58b (diff)
drm/msm/dsi: Update source PLL selection in DSI PHY
The source PLL to be used by each DSI PHY should be decided by DSI manager based on dual DSI information, while the register programming to select PLL is different from one type of PHY to another. This change adds the H/W difference to PHY configuration and updates the interface between DSI manager and PHY. With this change, PLL selection can be supported on different targets. Signed-off-by: Hai Li <hali@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi_manager.c')
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi_manager.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 87ac6612b6f8..cfa632fc1cbe 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -14,6 +14,18 @@
14#include "msm_kms.h" 14#include "msm_kms.h"
15#include "dsi.h" 15#include "dsi.h"
16 16
17#define DSI_CLOCK_MASTER DSI_0
18#define DSI_CLOCK_SLAVE DSI_1
19
20#define DSI_LEFT DSI_0
21#define DSI_RIGHT DSI_1
22
23/* According to the current drm framework sequence, take the encoder of
24 * DSI_1 as master encoder
25 */
26#define DSI_ENCODER_MASTER DSI_1
27#define DSI_ENCODER_SLAVE DSI_0
28
17struct msm_dsi_manager { 29struct msm_dsi_manager {
18 struct msm_dsi *dsi[DSI_MAX]; 30 struct msm_dsi *dsi[DSI_MAX];
19 31
@@ -598,9 +610,10 @@ int msm_dsi_manager_phy_enable(int id,
598{ 610{
599 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id); 611 struct msm_dsi *msm_dsi = dsi_mgr_get_dsi(id);
600 struct msm_dsi_phy *phy = msm_dsi->phy; 612 struct msm_dsi_phy *phy = msm_dsi->phy;
613 int src_pll_id = IS_DUAL_PANEL() ? DSI_CLOCK_MASTER : id;
601 int ret; 614 int ret;
602 615
603 ret = msm_dsi_phy_enable(phy, IS_DUAL_PANEL(), bit_rate, esc_rate); 616 ret = msm_dsi_phy_enable(phy, src_pll_id, bit_rate, esc_rate);
604 if (ret) 617 if (ret)
605 return ret; 618 return ret;
606 619