summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@nxp.com>2019-03-17 12:16:26 +0800
committerFancy Fang <chen.fang@nxp.com>2019-03-27 15:09:41 +0800
commitb58e87f04ec53f9debbe934fe9009e5f7d45f21a (patch)
tree9daaca020f8256fa2169b603fe302dbdd48282b3 /include/drm
parent9ed0a21714852909744fab9c88699286a5ece244 (diff)
MLK-21150-4 drm/bridge: sec-dsim: a general way to compute PLL PMS
A fixed PLL PMS setting for attached panel is obviously not enough for any other mipi panel which needs a different PLL output clock frequency, and besides, for the CEA-861 standard display modes, the 'pll_pms' table also can not cover all the modes requirements. So a general way is created to solve this problem which can provide an optimum solution to output a PLL bit clock to match the request frequency in a maximum degree and also satisfy the input clock and intermediate clocks limit according to the PLL specification. Signed-off-by: Fancy Fang <chen.fang@nxp.com> (cherry picked from commit a73fdd5e48fe0df47685cfc197fe66edc1e28405)
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/bridge/sec_mipi_dsim.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/drm/bridge/sec_mipi_dsim.h b/include/drm/bridge/sec_mipi_dsim.h
index 2b125b26b675..2f9233563ee6 100644
--- a/include/drm/bridge/sec_mipi_dsim.h
+++ b/include/drm/bridge/sec_mipi_dsim.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 NXP
+ * Copyright 2018-2019 NXP
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
#include <linux/bsearch.h>
struct sec_mipi_dsim_dphy_timing;
+struct sec_mipi_dsim_pll;
struct sec_mipi_dsim_plat_data {
uint32_t version;
@@ -26,11 +27,28 @@ struct sec_mipi_dsim_plat_data {
uint64_t max_data_rate;
const struct sec_mipi_dsim_dphy_timing *dphy_timing;
uint32_t num_dphy_timing;
+ const struct sec_mipi_dsim_pll *dphy_pll;
int (*dphy_timing_cmp)(const void *key, const void *elt);
enum drm_mode_status (*mode_valid)(struct drm_connector *connector,
struct drm_display_mode *mode);
};
+/* DPHY PLL structure */
+struct sec_mipi_dsim_range {
+ uint32_t min;
+ uint32_t max;
+};
+
+struct sec_mipi_dsim_pll {
+ struct sec_mipi_dsim_range p;
+ struct sec_mipi_dsim_range m;
+ struct sec_mipi_dsim_range s;
+ struct sec_mipi_dsim_range k;
+ struct sec_mipi_dsim_range fin;
+ struct sec_mipi_dsim_range fpref;
+ struct sec_mipi_dsim_range fvco;
+};
+
/* DPHY timings structure */
struct sec_mipi_dsim_dphy_timing {
uint32_t bit_clk; /* MHz */