imx-drm: imx-drm-core: Export imx_drm_encoder_get_mux_id
Subsystems (2)
Fabio Estevam
reviewerPATCH v2 1/4 imx-drm: imx-drm-core: Export imx_drm_encoder_get_mux_id
From: Fabio Estevam <[email protected]>
When building imx_v6_v7_defconfig with imx-drm drivers selected as modules, we get the following build error:
ERROR: "imx_drm_encoder_get_mux_id" [drivers/staging/imx-drm/imx-ldb.ko] undefined!
Export the required function to avoid this problem.
---
Changes since v1:
- None
drivers/staging/imx-drm/imx-drm-core.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/imx-drm/imx-drm-core.c +1 -0
@@ -678,6 +678,7 @@ found:return i; } +EXPORT_SYMBOL_GPL (imx_drm_encoder_get_mux_id);/* * imx_drm_remove_encoder - remove an encoder
Signature · 1 line
1.8.1.2
Fabio Estevam
reviewerPATCH v2 2/4 imx-drm: ipu-dp: Check the return value of devm_kzalloc()
From: Fabio Estevam <[email protected]>
devm_kzalloc() may fail, so let's check its return value.
---
Changes since v1:
- None
drivers/staging/imx-drm/ipu-v3/ipu-dp.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/imx-drm/ipu-v3/ipu-dp.c +2 -0
@@ -309,6 +309,8 @@ int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base)int i; priv =devm_kzalloc (dev,sizeof (*priv),GFP_KERNEL ); +if (!priv) +return -ENOMEM ; priv->dev = dev; priv->ipu = ipu;
Signature · 1 line
1.8.1.2
Fabio Estevam
reviewerPATCH v2 3/4 imx-drm: ipu-dp: Remove unneeded braces
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
No need to have braces for a single line 'if' block
---
Changes since v1:
- None
drivers/staging/imx-drm/ipu-v3/ipu-dp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/imx-drm/ipu-v3/ipu-dp.c +1 -2
@@ -317,9 +317,8 @@ int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base) ipu->dp_priv = priv; priv->base =devm_ioremap (dev, base,PAGE_SIZE ); -if (!priv->base) { +if (!priv->base)return -ENOMEM ; - }mutex_init (&priv->mutex);
Signature · 1 line
1.8.1.2
Fabio Estevam
reviewerPATCH v2 4/4 imx-drm: ipu-dp: Introduce IPUV3_NUM_FLOWS
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
IPUv3 has a total of 3 flows (one synchronous flow and 2 asynchronous flows).
Let's add a definition for such number in order to let the code easier to understand.
---
Changes since v1:
- Merged patches 4 and 5 from previous series
- Fix the comparison logic in 'if ((flow >> 1) >= IPUV3_NUM_FLOWS)'
--- drivers/staging/imx-drm/ipu-v3/ipu-dp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/staging/imx-drm/ipu-v3/ipu-dp.c +5 -3
@@ -46,6 +46,8 @@#define DP_COM_CONF_CSC_DEF_BG (2 << 8)#define DP_COM_CONF_CSC_DEF_BOTH (1 << 8) +#define IPUV3_NUM_FLOWS 3 +struct ipu_dp_priv ;struct ipu_dp {
@@ -67,7 +69,7 @@ struct ipu_dp_priv {struct ipu_soc *ipu;struct device *dev;void __iomem *base; -struct ipu_flow flow[3 ]; +struct ipu_flow flow[IPUV3_NUM_FLOWS ];struct mutex mutex;int use_count; };
@@ -280,7 +282,7 @@ struct ipu_dp *ipu_dp_get(struct ipu_soc *ipu, unsigned int flow)struct ipu_dp_priv *priv = ipu->dp_priv;struct ipu_dp *dp; -if (flow >5 ) +if ((flow >>1 ) >=IPUV3_NUM_FLOWS )return ERR_PTR (-EINVAL );if (flow &1 )
@@ -322,7 +324,7 @@ int ipu_dp_init(struct ipu_soc *ipu, struct device *dev, unsigned long base)mutex_init (&priv->mutex); -for (i =0 ; i <3 ; i++) { +for (i =0 ; i <IPUV3_NUM_FLOWS ; i++) { priv->flow[i].foreground.foreground =1 ; priv->flow[i].base = priv->base + ipu_dp_flow_base[i]; priv->flow[i].priv = priv;
Signature · 1 line
1.8.1.2
Am Freitag, den 28.06.2013, 13:55 -0300 schrieb Fabio Estevam:
Quoted 22 lines
From: Fabio Estevam <[email protected]>
When building
imx_v6_v7_defconfigwith imx-drm drivers selected as modules, we get the following build error:ERROR: "
imx_drm_encoder_get_mux_id" [drivers/staging/imx-drm/imx-ldb.ko] undefined!Export the required function to avoid this problem.
Signed-off-by Fabio Estevam <[email protected]>---
Changes since v1:
- Nonedrivers/staging/imx-drm/imx-drm-core.c | 1 + 1 file changed, 1 insertion(+)drivers/staging/imx-drm/imx-drm-core.c +0
-0
drivers/staging/imx-drm/imx-drm-core.c found: · line 684
Quoted 7 lines
drivers/staging/imx-drm/imx-drm-core.c +1
-0@@ -678,6 +678,7 @@ found:return i; } +EXPORT_SYMBOL_GPL (imx_drm_encoder_get_mux_id);/* * imx_drm_remove_encoder - remove an encoder
All four
regards
Philipp
Sascha Hauer
maintainerQuoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
When building
imx_v6_v7_defconfigwith imx-drm drivers selected as modules, we get the following build error:ERROR: "
imx_drm_encoder_get_mux_id" [drivers/staging/imx-drm/imx-ldb.ko] undefined!Export the required function to avoid this problem.
Signed-off-by Fabio Estevam <[email protected]>
All: Acked-by: Sascha Hauer <[email protected]>
Sascha
Quoted 23 lines
---
Changes since v1:
- Nonedrivers/staging/imx-drm/imx-drm-core.c | 1 + 1 file changed, 1 insertion(+)drivers/staging/imx-drm/imx-drm-core.c +1
-0@@ -678,6 +678,7 @@ found:return i; } +EXPORT_SYMBOL_GPL (imx_drm_encoder_get_mux_id);/* * imx_drm_remove_encoder - remove an encoder Signature · 1 line
1.8.1.2
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |