diff options
author | Naveen Kumar S <nkumars@nvidia.com> | 2015-08-27 01:26:21 -0400 |
---|---|---|
committer | Naveen Kumar S <nkumars@nvidia.com> | 2015-08-31 07:14:41 -0400 |
commit | 2fdf2abb3ad3be5ccb7c6524a37bf15de22cde71 (patch) | |
tree | 5402fa094fd0618124a3e3e53baf8a510dc8cbf9 /drivers/video/tegra/dc/dsi.c | |
parent | b57d5756dcad0d5ac39f17351e9844b241aabde5 (diff) |
video: tegra: dsi: setup packet only when needed
Put a check to verify if ganged mode or split link has
been initialized before setting up DSI packet length
bug 1679057
Change-Id: Id79d0652f926390312cb181c8ff694390d98df3c
Signed-off-by: Naveen Kumar S <nkumars@nvidia.com>
Reviewed-on: http://git-master/r/790144
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dsi.c')
-rw-r--r-- | drivers/video/tegra/dc/dsi.c | 59 |
1 files changed, 34 insertions, 25 deletions
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index 6b20833f1..16e76cb68 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c | |||
@@ -1488,33 +1488,42 @@ static void tegra_dsi_setup_ganged_split_link_mode_pkt_length( | |||
1488 | DSI_PKT_LEN_0_1_LENGTH_1(0); | 1488 | DSI_PKT_LEN_0_1_LENGTH_1(0); |
1489 | tegra_dsi_writel(dsi, val, DSI_PKT_LEN_0_1); | 1489 | tegra_dsi_writel(dsi, val, DSI_PKT_LEN_0_1); |
1490 | 1490 | ||
1491 | switch (dsi->info.ganged_type) { | 1491 | if (dsi->info.ganged_type) { |
1492 | case TEGRA_DSI_GANGED_SYMMETRIC_LEFT_RIGHT: /* fall through */ | 1492 | switch (dsi->info.ganged_type) { |
1493 | case TEGRA_DSI_GANGED_SYMMETRIC_EVEN_ODD: /* fall through */ | 1493 | case TEGRA_DSI_GANGED_SYMMETRIC_LEFT_RIGHT: /* fall through */ |
1494 | hact_pkt_len_pix = DIV_ROUND_UP(hact_pkt_len_pix_orig, 2); | 1494 | case TEGRA_DSI_GANGED_SYMMETRIC_EVEN_ODD: /* fall through */ |
1495 | pix_per_line = DIV_ROUND_UP(pix_per_line_orig, 2); | 1495 | hact_pkt_len_pix = |
1496 | break; | 1496 | DIV_ROUND_UP(hact_pkt_len_pix_orig, 2); |
1497 | case TEGRA_DSI_GANGED_SYMMETRIC_LEFT_RIGHT_OVERLAP: | 1497 | pix_per_line = DIV_ROUND_UP(pix_per_line_orig, 2); |
1498 | hact_pkt_len_pix = DIV_ROUND_UP(hact_pkt_len_pix_orig, 2) + | 1498 | break; |
1499 | dsi->info.ganged_overlap; | 1499 | case TEGRA_DSI_GANGED_SYMMETRIC_LEFT_RIGHT_OVERLAP: |
1500 | pix_per_line = DIV_ROUND_UP(pix_per_line_orig, 2); | 1500 | hact_pkt_len_pix = |
1501 | break; | 1501 | DIV_ROUND_UP(hact_pkt_len_pix_orig, 2) + |
1502 | default: | 1502 | dsi->info.ganged_overlap; |
1503 | dev_err(&dc->ndev->dev, "dsi: invalid ganged type\n"); | 1503 | pix_per_line = DIV_ROUND_UP(pix_per_line_orig, 2); |
1504 | break; | ||
1505 | default: | ||
1506 | dev_err(&dc->ndev->dev, "dsi: invalid ganged type\n"); | ||
1507 | } | ||
1504 | } | 1508 | } |
1505 | 1509 | ||
1506 | switch (dsi->info.split_link_type) { | 1510 | if (dsi->info.split_link_type) { |
1507 | case TEGRA_DSI_SPLIT_LINK_A_B: /* fall through */ | 1511 | switch (dsi->info.split_link_type) { |
1508 | case TEGRA_DSI_SPLIT_LINK_C_D: | 1512 | case TEGRA_DSI_SPLIT_LINK_A_B: /* fall through */ |
1509 | hact_pkt_len_pix = DIV_ROUND_UP(hact_pkt_len_pix_orig, 2); | 1513 | case TEGRA_DSI_SPLIT_LINK_C_D: |
1510 | pix_per_line = DIV_ROUND_UP(pix_per_line_orig, 2); | 1514 | hact_pkt_len_pix = |
1511 | break; | 1515 | DIV_ROUND_UP(hact_pkt_len_pix_orig, 2); |
1512 | case TEGRA_DSI_SPLIT_LINK_A_B_C_D: | 1516 | pix_per_line = DIV_ROUND_UP(pix_per_line_orig, 2); |
1513 | hact_pkt_len_pix = DIV_ROUND_UP(hact_pkt_len_pix_orig, 4); | 1517 | break; |
1514 | pix_per_line = DIV_ROUND_UP(pix_per_line_orig, 4); | 1518 | case TEGRA_DSI_SPLIT_LINK_A_B_C_D: |
1515 | break; | 1519 | hact_pkt_len_pix = |
1516 | default: | 1520 | DIV_ROUND_UP(hact_pkt_len_pix_orig, 4); |
1517 | dev_err(&dc->ndev->dev, "dsi: invalid split link type\n"); | 1521 | pix_per_line = DIV_ROUND_UP(pix_per_line_orig, 4); |
1522 | break; | ||
1523 | default: | ||
1524 | dev_err(&dc->ndev->dev, | ||
1525 | "dsi: invalid split link type\n"); | ||
1526 | } | ||
1518 | } | 1527 | } |
1519 | 1528 | ||
1520 | for (i = 0; i < dsi->max_instances; i++) { | 1529 | for (i = 0; i < dsi->max_instances; i++) { |