* [PATCH] drm/meson: Fix driver bind when only CVBS is available
@ 2017-05-29 14:15 ` Neil Armstrong
0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2017-05-29 14:15 UTC (permalink / raw)
To: airlied, daniel.vetter
Cc: Neil Armstrong, dri-devel, linux-amlogic, linux-arm-kernel, linux-kernel
While introducing HDMI support, component matching on connectors node
were bypassed since no driver would actually bind on the DT node.
But when only a CVBS connector is present, only a single node is found
in the graph, but ignored and a NULL match table is given to the
component code.
This code permits bypassing the components framework by binding directly
the DRM driver when no components needs to be loaded.
Fixes: a41e82e6c457 ("drm/meson: Add support for components")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index 75382f5..10b227d 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
.max_register = 0x1000,
};
-static int meson_drv_bind(struct device *dev)
+static int meson_drv_bind_master(struct device *dev, bool has_components)
{
struct platform_device *pdev = to_platform_device(dev);
struct meson_drm *priv;
@@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
if (ret)
goto free_drm;
- ret = component_bind_all(drm->dev, drm);
- if (ret) {
- dev_err(drm->dev, "Couldn't bind all components\n");
- goto free_drm;
+ if (has_components) {
+ ret = component_bind_all(drm->dev, drm);
+ if (ret) {
+ dev_err(drm->dev, "Couldn't bind all components\n");
+ goto free_drm;
+ }
}
ret = meson_plane_create(priv);
@@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
return ret;
}
+static int meson_drv_bind(struct device *dev)
+{
+ return meson_drv_bind_master(dev, true);
+}
+
static void meson_drv_unbind(struct device *dev)
{
struct drm_device *drm = dev_get_drvdata(dev);
@@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
count += meson_probe_remote(pdev, &match, np, remote);
}
+ if (count && !match)
+ return meson_drv_bind_master(&pdev->dev, false);
+
/* If some endpoints were found, initialize the nodes */
if (count) {
dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] drm/meson: Fix driver bind when only CVBS is available
@ 2017-05-29 14:15 ` Neil Armstrong
0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2017-05-29 14:15 UTC (permalink / raw)
To: linux-arm-kernel
While introducing HDMI support, component matching on connectors node
were bypassed since no driver would actually bind on the DT node.
But when only a CVBS connector is present, only a single node is found
in the graph, but ignored and a NULL match table is given to the
component code.
This code permits bypassing the components framework by binding directly
the DRM driver when no components needs to be loaded.
Fixes: a41e82e6c457 ("drm/meson: Add support for components")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index 75382f5..10b227d 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
.max_register = 0x1000,
};
-static int meson_drv_bind(struct device *dev)
+static int meson_drv_bind_master(struct device *dev, bool has_components)
{
struct platform_device *pdev = to_platform_device(dev);
struct meson_drm *priv;
@@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
if (ret)
goto free_drm;
- ret = component_bind_all(drm->dev, drm);
- if (ret) {
- dev_err(drm->dev, "Couldn't bind all components\n");
- goto free_drm;
+ if (has_components) {
+ ret = component_bind_all(drm->dev, drm);
+ if (ret) {
+ dev_err(drm->dev, "Couldn't bind all components\n");
+ goto free_drm;
+ }
}
ret = meson_plane_create(priv);
@@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
return ret;
}
+static int meson_drv_bind(struct device *dev)
+{
+ return meson_drv_bind_master(dev, true);
+}
+
static void meson_drv_unbind(struct device *dev)
{
struct drm_device *drm = dev_get_drvdata(dev);
@@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
count += meson_probe_remote(pdev, &match, np, remote);
}
+ if (count && !match)
+ return meson_drv_bind_master(&pdev->dev, false);
+
/* If some endpoints were found, initialize the nodes */
if (count) {
dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] drm/meson: Fix driver bind when only CVBS is available
@ 2017-05-29 14:15 ` Neil Armstrong
0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2017-05-29 14:15 UTC (permalink / raw)
To: airlied, daniel.vetter
Cc: linux-amlogic, linux-kernel, linux-arm-kernel, dri-devel, Neil Armstrong
While introducing HDMI support, component matching on connectors node
were bypassed since no driver would actually bind on the DT node.
But when only a CVBS connector is present, only a single node is found
in the graph, but ignored and a NULL match table is given to the
component code.
This code permits bypassing the components framework by binding directly
the DRM driver when no components needs to be loaded.
Fixes: a41e82e6c457 ("drm/meson: Add support for components")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index 75382f5..10b227d 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
.max_register = 0x1000,
};
-static int meson_drv_bind(struct device *dev)
+static int meson_drv_bind_master(struct device *dev, bool has_components)
{
struct platform_device *pdev = to_platform_device(dev);
struct meson_drm *priv;
@@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
if (ret)
goto free_drm;
- ret = component_bind_all(drm->dev, drm);
- if (ret) {
- dev_err(drm->dev, "Couldn't bind all components\n");
- goto free_drm;
+ if (has_components) {
+ ret = component_bind_all(drm->dev, drm);
+ if (ret) {
+ dev_err(drm->dev, "Couldn't bind all components\n");
+ goto free_drm;
+ }
}
ret = meson_plane_create(priv);
@@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
return ret;
}
+static int meson_drv_bind(struct device *dev)
+{
+ return meson_drv_bind_master(dev, true);
+}
+
static void meson_drv_unbind(struct device *dev)
{
struct drm_device *drm = dev_get_drvdata(dev);
@@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
count += meson_probe_remote(pdev, &match, np, remote);
}
+ if (count && !match)
+ return meson_drv_bind_master(&pdev->dev, false);
+
/* If some endpoints were found, initialize the nodes */
if (count) {
dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] drm/meson: Fix driver bind when only CVBS is available
@ 2017-05-29 14:15 ` Neil Armstrong
0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2017-05-29 14:15 UTC (permalink / raw)
To: linus-amlogic
While introducing HDMI support, component matching on connectors node
were bypassed since no driver would actually bind on the DT node.
But when only a CVBS connector is present, only a single node is found
in the graph, but ignored and a NULL match table is given to the
component code.
This code permits bypassing the components framework by binding directly
the DRM driver when no components needs to be loaded.
Fixes: a41e82e6c457 ("drm/meson: Add support for components")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index 75382f5..10b227d 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
.max_register = 0x1000,
};
-static int meson_drv_bind(struct device *dev)
+static int meson_drv_bind_master(struct device *dev, bool has_components)
{
struct platform_device *pdev = to_platform_device(dev);
struct meson_drm *priv;
@@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
if (ret)
goto free_drm;
- ret = component_bind_all(drm->dev, drm);
- if (ret) {
- dev_err(drm->dev, "Couldn't bind all components\n");
- goto free_drm;
+ if (has_components) {
+ ret = component_bind_all(drm->dev, drm);
+ if (ret) {
+ dev_err(drm->dev, "Couldn't bind all components\n");
+ goto free_drm;
+ }
}
ret = meson_plane_create(priv);
@@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
return ret;
}
+static int meson_drv_bind(struct device *dev)
+{
+ return meson_drv_bind_master(dev, true);
+}
+
static void meson_drv_unbind(struct device *dev)
{
struct drm_device *drm = dev_get_drvdata(dev);
@@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
count += meson_probe_remote(pdev, &match, np, remote);
}
+ if (count && !match)
+ return meson_drv_bind_master(&pdev->dev, false);
+
/* If some endpoints were found, initialize the nodes */
if (count) {
dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
--
1.9.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/meson: Fix driver bind when only CVBS is available
2017-05-29 14:15 ` Neil Armstrong
(?)
(?)
@ 2017-06-06 8:17 ` Neil Armstrong
-1 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2017-06-06 8:17 UTC (permalink / raw)
To: airlied, daniel.vetter
Cc: dri-devel, linux-amlogic, linux-arm-kernel, linux-kernel
On 05/29/2017 04:15 PM, Neil Armstrong wrote:
> While introducing HDMI support, component matching on connectors node
> were bypassed since no driver would actually bind on the DT node.
> But when only a CVBS connector is present, only a single node is found
> in the graph, but ignored and a NULL match table is given to the
> component code.
>
> This code permits bypassing the components framework by binding directly
> the DRM driver when no components needs to be loaded.
>
> Fixes: a41e82e6c457 ("drm/meson: Add support for components")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 75382f5..10b227d 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
> .max_register = 0x1000,
> };
>
> -static int meson_drv_bind(struct device *dev)
> +static int meson_drv_bind_master(struct device *dev, bool has_components)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct meson_drm *priv;
> @@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
> if (ret)
> goto free_drm;
>
> - ret = component_bind_all(drm->dev, drm);
> - if (ret) {
> - dev_err(drm->dev, "Couldn't bind all components\n");
> - goto free_drm;
> + if (has_components) {
> + ret = component_bind_all(drm->dev, drm);
> + if (ret) {
> + dev_err(drm->dev, "Couldn't bind all components\n");
> + goto free_drm;
> + }
> }
>
> ret = meson_plane_create(priv);
> @@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
> return ret;
> }
>
> +static int meson_drv_bind(struct device *dev)
> +{
> + return meson_drv_bind_master(dev, true);
> +}
> +
> static void meson_drv_unbind(struct device *dev)
> {
> struct drm_device *drm = dev_get_drvdata(dev);
> @@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
> count += meson_probe_remote(pdev, &match, np, remote);
> }
>
> + if (count && !match)
> + return meson_drv_bind_master(&pdev->dev, false);
> +
> /* If some endpoints were found, initialize the nodes */
> if (count) {
> dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
>
Hi,
Could this patch go through the next drm-misc-fixes PR ?
Thanks,
Neil
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] drm/meson: Fix driver bind when only CVBS is available
@ 2017-06-06 8:17 ` Neil Armstrong
0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2017-06-06 8:17 UTC (permalink / raw)
To: linux-arm-kernel
On 05/29/2017 04:15 PM, Neil Armstrong wrote:
> While introducing HDMI support, component matching on connectors node
> were bypassed since no driver would actually bind on the DT node.
> But when only a CVBS connector is present, only a single node is found
> in the graph, but ignored and a NULL match table is given to the
> component code.
>
> This code permits bypassing the components framework by binding directly
> the DRM driver when no components needs to be loaded.
>
> Fixes: a41e82e6c457 ("drm/meson: Add support for components")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 75382f5..10b227d 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
> .max_register = 0x1000,
> };
>
> -static int meson_drv_bind(struct device *dev)
> +static int meson_drv_bind_master(struct device *dev, bool has_components)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct meson_drm *priv;
> @@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
> if (ret)
> goto free_drm;
>
> - ret = component_bind_all(drm->dev, drm);
> - if (ret) {
> - dev_err(drm->dev, "Couldn't bind all components\n");
> - goto free_drm;
> + if (has_components) {
> + ret = component_bind_all(drm->dev, drm);
> + if (ret) {
> + dev_err(drm->dev, "Couldn't bind all components\n");
> + goto free_drm;
> + }
> }
>
> ret = meson_plane_create(priv);
> @@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
> return ret;
> }
>
> +static int meson_drv_bind(struct device *dev)
> +{
> + return meson_drv_bind_master(dev, true);
> +}
> +
> static void meson_drv_unbind(struct device *dev)
> {
> struct drm_device *drm = dev_get_drvdata(dev);
> @@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
> count += meson_probe_remote(pdev, &match, np, remote);
> }
>
> + if (count && !match)
> + return meson_drv_bind_master(&pdev->dev, false);
> +
> /* If some endpoints were found, initialize the nodes */
> if (count) {
> dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
>
Hi,
Could this patch go through the next drm-misc-fixes PR ?
Thanks,
Neil
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/meson: Fix driver bind when only CVBS is available
@ 2017-06-06 8:17 ` Neil Armstrong
0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2017-06-06 8:17 UTC (permalink / raw)
To: airlied, daniel.vetter
Cc: linux-amlogic, linux-arm-kernel, dri-devel, linux-kernel
On 05/29/2017 04:15 PM, Neil Armstrong wrote:
> While introducing HDMI support, component matching on connectors node
> were bypassed since no driver would actually bind on the DT node.
> But when only a CVBS connector is present, only a single node is found
> in the graph, but ignored and a NULL match table is given to the
> component code.
>
> This code permits bypassing the components framework by binding directly
> the DRM driver when no components needs to be loaded.
>
> Fixes: a41e82e6c457 ("drm/meson: Add support for components")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 75382f5..10b227d 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
> .max_register = 0x1000,
> };
>
> -static int meson_drv_bind(struct device *dev)
> +static int meson_drv_bind_master(struct device *dev, bool has_components)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct meson_drm *priv;
> @@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
> if (ret)
> goto free_drm;
>
> - ret = component_bind_all(drm->dev, drm);
> - if (ret) {
> - dev_err(drm->dev, "Couldn't bind all components\n");
> - goto free_drm;
> + if (has_components) {
> + ret = component_bind_all(drm->dev, drm);
> + if (ret) {
> + dev_err(drm->dev, "Couldn't bind all components\n");
> + goto free_drm;
> + }
> }
>
> ret = meson_plane_create(priv);
> @@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
> return ret;
> }
>
> +static int meson_drv_bind(struct device *dev)
> +{
> + return meson_drv_bind_master(dev, true);
> +}
> +
> static void meson_drv_unbind(struct device *dev)
> {
> struct drm_device *drm = dev_get_drvdata(dev);
> @@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
> count += meson_probe_remote(pdev, &match, np, remote);
> }
>
> + if (count && !match)
> + return meson_drv_bind_master(&pdev->dev, false);
> +
> /* If some endpoints were found, initialize the nodes */
> if (count) {
> dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
>
Hi,
Could this patch go through the next drm-misc-fixes PR ?
Thanks,
Neil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] drm/meson: Fix driver bind when only CVBS is available
@ 2017-06-06 8:17 ` Neil Armstrong
0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2017-06-06 8:17 UTC (permalink / raw)
To: linus-amlogic
On 05/29/2017 04:15 PM, Neil Armstrong wrote:
> While introducing HDMI support, component matching on connectors node
> were bypassed since no driver would actually bind on the DT node.
> But when only a CVBS connector is present, only a single node is found
> in the graph, but ignored and a NULL match table is given to the
> component code.
>
> This code permits bypassing the components framework by binding directly
> the DRM driver when no components needs to be loaded.
>
> Fixes: a41e82e6c457 ("drm/meson: Add support for components")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 75382f5..10b227d 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
> .max_register = 0x1000,
> };
>
> -static int meson_drv_bind(struct device *dev)
> +static int meson_drv_bind_master(struct device *dev, bool has_components)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct meson_drm *priv;
> @@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
> if (ret)
> goto free_drm;
>
> - ret = component_bind_all(drm->dev, drm);
> - if (ret) {
> - dev_err(drm->dev, "Couldn't bind all components\n");
> - goto free_drm;
> + if (has_components) {
> + ret = component_bind_all(drm->dev, drm);
> + if (ret) {
> + dev_err(drm->dev, "Couldn't bind all components\n");
> + goto free_drm;
> + }
> }
>
> ret = meson_plane_create(priv);
> @@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
> return ret;
> }
>
> +static int meson_drv_bind(struct device *dev)
> +{
> + return meson_drv_bind_master(dev, true);
> +}
> +
> static void meson_drv_unbind(struct device *dev)
> {
> struct drm_device *drm = dev_get_drvdata(dev);
> @@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
> count += meson_probe_remote(pdev, &match, np, remote);
> }
>
> + if (count && !match)
> + return meson_drv_bind_master(&pdev->dev, false);
> +
> /* If some endpoints were found, initialize the nodes */
> if (count) {
> dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
>
Hi,
Could this patch go through the next drm-misc-fixes PR ?
Thanks,
Neil
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/meson: Fix driver bind when only CVBS is available
2017-05-29 14:15 ` Neil Armstrong
(?)
(?)
@ 2017-06-07 14:50 ` Sean Paul
-1 siblings, 0 replies; 12+ messages in thread
From: Sean Paul @ 2017-06-07 14:50 UTC (permalink / raw)
To: Neil Armstrong
Cc: airlied, daniel.vetter, linux-amlogic, linux-kernel,
linux-arm-kernel, dri-devel
On Mon, May 29, 2017 at 04:15:52PM +0200, Neil Armstrong wrote:
> While introducing HDMI support, component matching on connectors node
> were bypassed since no driver would actually bind on the DT node.
> But when only a CVBS connector is present, only a single node is found
> in the graph, but ignored and a NULL match table is given to the
> component code.
>
> This code permits bypassing the components framework by binding directly
> the DRM driver when no components needs to be loaded.
>
> Fixes: a41e82e6c457 ("drm/meson: Add support for components")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Hi Neil,
Thanks for your patch, I've applied to drm-misc-fixes and will include it in
this week's pull request.
Sean
> ---
> drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 75382f5..10b227d 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
> .max_register = 0x1000,
> };
>
> -static int meson_drv_bind(struct device *dev)
> +static int meson_drv_bind_master(struct device *dev, bool has_components)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct meson_drm *priv;
> @@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
> if (ret)
> goto free_drm;
>
> - ret = component_bind_all(drm->dev, drm);
> - if (ret) {
> - dev_err(drm->dev, "Couldn't bind all components\n");
> - goto free_drm;
> + if (has_components) {
> + ret = component_bind_all(drm->dev, drm);
> + if (ret) {
> + dev_err(drm->dev, "Couldn't bind all components\n");
> + goto free_drm;
> + }
> }
>
> ret = meson_plane_create(priv);
> @@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
> return ret;
> }
>
> +static int meson_drv_bind(struct device *dev)
> +{
> + return meson_drv_bind_master(dev, true);
> +}
> +
> static void meson_drv_unbind(struct device *dev)
> {
> struct drm_device *drm = dev_get_drvdata(dev);
> @@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
> count += meson_probe_remote(pdev, &match, np, remote);
> }
>
> + if (count && !match)
> + return meson_drv_bind_master(&pdev->dev, false);
> +
> /* If some endpoints were found, initialize the nodes */
> if (count) {
> dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Sean Paul, Software Engineer, Google / Chromium OS
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] drm/meson: Fix driver bind when only CVBS is available
@ 2017-06-07 14:50 ` Sean Paul
0 siblings, 0 replies; 12+ messages in thread
From: Sean Paul @ 2017-06-07 14:50 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, May 29, 2017 at 04:15:52PM +0200, Neil Armstrong wrote:
> While introducing HDMI support, component matching on connectors node
> were bypassed since no driver would actually bind on the DT node.
> But when only a CVBS connector is present, only a single node is found
> in the graph, but ignored and a NULL match table is given to the
> component code.
>
> This code permits bypassing the components framework by binding directly
> the DRM driver when no components needs to be loaded.
>
> Fixes: a41e82e6c457 ("drm/meson: Add support for components")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Hi Neil,
Thanks for your patch, I've applied to drm-misc-fixes and will include it in
this week's pull request.
Sean
> ---
> drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 75382f5..10b227d 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
> .max_register = 0x1000,
> };
>
> -static int meson_drv_bind(struct device *dev)
> +static int meson_drv_bind_master(struct device *dev, bool has_components)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct meson_drm *priv;
> @@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
> if (ret)
> goto free_drm;
>
> - ret = component_bind_all(drm->dev, drm);
> - if (ret) {
> - dev_err(drm->dev, "Couldn't bind all components\n");
> - goto free_drm;
> + if (has_components) {
> + ret = component_bind_all(drm->dev, drm);
> + if (ret) {
> + dev_err(drm->dev, "Couldn't bind all components\n");
> + goto free_drm;
> + }
> }
>
> ret = meson_plane_create(priv);
> @@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
> return ret;
> }
>
> +static int meson_drv_bind(struct device *dev)
> +{
> + return meson_drv_bind_master(dev, true);
> +}
> +
> static void meson_drv_unbind(struct device *dev)
> {
> struct drm_device *drm = dev_get_drvdata(dev);
> @@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
> count += meson_probe_remote(pdev, &match, np, remote);
> }
>
> + if (count && !match)
> + return meson_drv_bind_master(&pdev->dev, false);
> +
> /* If some endpoints were found, initialize the nodes */
> if (count) {
> dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Sean Paul, Software Engineer, Google / Chromium OS
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/meson: Fix driver bind when only CVBS is available
@ 2017-06-07 14:50 ` Sean Paul
0 siblings, 0 replies; 12+ messages in thread
From: Sean Paul @ 2017-06-07 14:50 UTC (permalink / raw)
To: Neil Armstrong
Cc: daniel.vetter, linux-kernel, dri-devel, linux-amlogic, linux-arm-kernel
On Mon, May 29, 2017 at 04:15:52PM +0200, Neil Armstrong wrote:
> While introducing HDMI support, component matching on connectors node
> were bypassed since no driver would actually bind on the DT node.
> But when only a CVBS connector is present, only a single node is found
> in the graph, but ignored and a NULL match table is given to the
> component code.
>
> This code permits bypassing the components framework by binding directly
> the DRM driver when no components needs to be loaded.
>
> Fixes: a41e82e6c457 ("drm/meson: Add support for components")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Hi Neil,
Thanks for your patch, I've applied to drm-misc-fixes and will include it in
this week's pull request.
Sean
> ---
> drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 75382f5..10b227d 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
> .max_register = 0x1000,
> };
>
> -static int meson_drv_bind(struct device *dev)
> +static int meson_drv_bind_master(struct device *dev, bool has_components)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct meson_drm *priv;
> @@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
> if (ret)
> goto free_drm;
>
> - ret = component_bind_all(drm->dev, drm);
> - if (ret) {
> - dev_err(drm->dev, "Couldn't bind all components\n");
> - goto free_drm;
> + if (has_components) {
> + ret = component_bind_all(drm->dev, drm);
> + if (ret) {
> + dev_err(drm->dev, "Couldn't bind all components\n");
> + goto free_drm;
> + }
> }
>
> ret = meson_plane_create(priv);
> @@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
> return ret;
> }
>
> +static int meson_drv_bind(struct device *dev)
> +{
> + return meson_drv_bind_master(dev, true);
> +}
> +
> static void meson_drv_unbind(struct device *dev)
> {
> struct drm_device *drm = dev_get_drvdata(dev);
> @@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
> count += meson_probe_remote(pdev, &match, np, remote);
> }
>
> + if (count && !match)
> + return meson_drv_bind_master(&pdev->dev, false);
> +
> /* If some endpoints were found, initialize the nodes */
> if (count) {
> dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] drm/meson: Fix driver bind when only CVBS is available
@ 2017-06-07 14:50 ` Sean Paul
0 siblings, 0 replies; 12+ messages in thread
From: Sean Paul @ 2017-06-07 14:50 UTC (permalink / raw)
To: linus-amlogic
On Mon, May 29, 2017 at 04:15:52PM +0200, Neil Armstrong wrote:
> While introducing HDMI support, component matching on connectors node
> were bypassed since no driver would actually bind on the DT node.
> But when only a CVBS connector is present, only a single node is found
> in the graph, but ignored and a NULL match table is given to the
> component code.
>
> This code permits bypassing the components framework by binding directly
> the DRM driver when no components needs to be loaded.
>
> Fixes: a41e82e6c457 ("drm/meson: Add support for components")
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Hi Neil,
Thanks for your patch, I've applied to drm-misc-fixes and will include it in
this week's pull request.
Sean
> ---
> drivers/gpu/drm/meson/meson_drv.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
> index 75382f5..10b227d 100644
> --- a/drivers/gpu/drm/meson/meson_drv.c
> +++ b/drivers/gpu/drm/meson/meson_drv.c
> @@ -152,7 +152,7 @@ static bool meson_vpu_has_available_connectors(struct device *dev)
> .max_register = 0x1000,
> };
>
> -static int meson_drv_bind(struct device *dev)
> +static int meson_drv_bind_master(struct device *dev, bool has_components)
> {
> struct platform_device *pdev = to_platform_device(dev);
> struct meson_drm *priv;
> @@ -233,10 +233,12 @@ static int meson_drv_bind(struct device *dev)
> if (ret)
> goto free_drm;
>
> - ret = component_bind_all(drm->dev, drm);
> - if (ret) {
> - dev_err(drm->dev, "Couldn't bind all components\n");
> - goto free_drm;
> + if (has_components) {
> + ret = component_bind_all(drm->dev, drm);
> + if (ret) {
> + dev_err(drm->dev, "Couldn't bind all components\n");
> + goto free_drm;
> + }
> }
>
> ret = meson_plane_create(priv);
> @@ -276,6 +278,11 @@ static int meson_drv_bind(struct device *dev)
> return ret;
> }
>
> +static int meson_drv_bind(struct device *dev)
> +{
> + return meson_drv_bind_master(dev, true);
> +}
> +
> static void meson_drv_unbind(struct device *dev)
> {
> struct drm_device *drm = dev_get_drvdata(dev);
> @@ -357,6 +364,9 @@ static int meson_drv_probe(struct platform_device *pdev)
> count += meson_probe_remote(pdev, &match, np, remote);
> }
>
> + if (count && !match)
> + return meson_drv_bind_master(&pdev->dev, false);
> +
> /* If some endpoints were found, initialize the nodes */
> if (count) {
> dev_info(&pdev->dev, "Queued %d outputs on vpu\n", count);
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Sean Paul, Software Engineer, Google / Chromium OS
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2017-06-07 14:51 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-29 14:15 [PATCH] drm/meson: Fix driver bind when only CVBS is available Neil Armstrong
2017-05-29 14:15 ` Neil Armstrong
2017-05-29 14:15 ` Neil Armstrong
2017-05-29 14:15 ` Neil Armstrong
2017-06-06 8:17 ` Neil Armstrong
2017-06-06 8:17 ` Neil Armstrong
2017-06-06 8:17 ` Neil Armstrong
2017-06-06 8:17 ` Neil Armstrong
2017-06-07 14:50 ` Sean Paul
2017-06-07 14:50 ` Sean Paul
2017-06-07 14:50 ` Sean Paul
2017-06-07 14:50 ` Sean Paul
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.