linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] gpu: don't print error when adding adapter fails
@ 2016-08-09 11:30 Wolfram Sang
  2016-08-09 11:30 ` [PATCH 1/5] gpu: drm: amd: amdgpu: amdgpu_i2c: " Wolfram Sang
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-i2c, Wolfram Sang, dri-devel, freedreno, linux-arm-kernel,
	linux-arm-msm, linux-mediatek, linux-rockchip

Since v4.8-rc1, the I2C core will print detailed information when adding an I2C
adapter fails. So, drivers can skip this now.

Should go via subsystem tree, I'd think.

Wolfram Sang (5):
  gpu: drm: amd: amdgpu: amdgpu_i2c: don't print error when adding
    adapter fails
  gpu: drm: mediatek: mtk_hdmi_ddc: don't print error when adding
    adapter fails
  gpu: drm: msm: hdmi: hdmi_i2c: don't print error when adding adapter
    fails
  gpu: drm: radeon: radeon_i2c: don't print error when adding adapter
    fails
  gpu: drm: rockchip: inno_hdmi: don't print error when adding adapter
    fails

 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 4 +---
 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c | 4 +---
 drivers/gpu/drm/msm/hdmi/hdmi_i2c.c     | 5 +----
 drivers/gpu/drm/radeon/radeon_i2c.c     | 8 ++------
 drivers/gpu/drm/rockchip/inno_hdmi.c    | 1 -
 5 files changed, 5 insertions(+), 17 deletions(-)

-- 
2.8.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] gpu: drm: amd: amdgpu: amdgpu_i2c: don't print error when adding adapter fails
  2016-08-09 11:30 [PATCH 0/5] gpu: don't print error when adding adapter fails Wolfram Sang
@ 2016-08-09 11:30 ` Wolfram Sang
  2016-08-09 11:30 ` [PATCH 2/5] gpu: drm: mediatek: mtk_hdmi_ddc: " Wolfram Sang
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-i2c, Wolfram Sang, Alex Deucher, Christian König,
	David Airlie, dri-devel

The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
index 31a676376d732a..c93a92a840ead1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
@@ -186,10 +186,8 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
 			 "AMDGPU i2c hw bus %s", name);
 		i2c->adapter.algo = &amdgpu_atombios_i2c_algo;
 		ret = i2c_add_adapter(&i2c->adapter);
-		if (ret) {
-			DRM_ERROR("Failed to register hw i2c %s\n", name);
+		if (ret)
 			goto out_free;
-		}
 	} else {
 		/* set the amdgpu bit adapter */
 		snprintf(i2c->adapter.name, sizeof(i2c->adapter.name),
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] gpu: drm: mediatek: mtk_hdmi_ddc: don't print error when adding adapter fails
  2016-08-09 11:30 [PATCH 0/5] gpu: don't print error when adding adapter fails Wolfram Sang
  2016-08-09 11:30 ` [PATCH 1/5] gpu: drm: amd: amdgpu: amdgpu_i2c: " Wolfram Sang
@ 2016-08-09 11:30 ` Wolfram Sang
  2016-08-09 11:30 ` [PATCH 3/5] gpu: drm: msm: hdmi: hdmi_i2c: " Wolfram Sang
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-i2c, Wolfram Sang, David Airlie, Matthias Brugger,
	dri-devel, linux-arm-kernel, linux-mediatek

The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c b/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c
index 33c9e1bdb114b8..ca4caf924deb81 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c
@@ -310,10 +310,8 @@ static int mtk_hdmi_ddc_probe(struct platform_device *pdev)
 	ddc->adap.dev.parent = &pdev->dev;
 
 	ret = i2c_add_adapter(&ddc->adap);
-	if (ret < 0) {
-		dev_err(dev, "failed to add bus to i2c core\n");
+	if (ret < 0)
 		goto err_clk_disable;
-	}
 
 	platform_set_drvdata(pdev, ddc);
 
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] gpu: drm: msm: hdmi: hdmi_i2c: don't print error when adding adapter fails
  2016-08-09 11:30 [PATCH 0/5] gpu: don't print error when adding adapter fails Wolfram Sang
  2016-08-09 11:30 ` [PATCH 1/5] gpu: drm: amd: amdgpu: amdgpu_i2c: " Wolfram Sang
  2016-08-09 11:30 ` [PATCH 2/5] gpu: drm: mediatek: mtk_hdmi_ddc: " Wolfram Sang
@ 2016-08-09 11:30 ` Wolfram Sang
  2016-08-09 11:30 ` [PATCH 4/5] gpu: drm: radeon: radeon_i2c: " Wolfram Sang
  2016-08-09 11:30 ` [PATCH 5/5] gpu: drm: rockchip: inno_hdmi: " Wolfram Sang
  4 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-i2c, Wolfram Sang, Rob Clark, David Airlie, linux-arm-msm,
	dri-devel, freedreno

The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/gpu/drm/msm/hdmi/hdmi_i2c.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c b/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c
index de9007e72f4e85..73e20219d431a7 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c
@@ -243,7 +243,6 @@ void msm_hdmi_i2c_destroy(struct i2c_adapter *i2c)
 
 struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi)
 {
-	struct drm_device *dev = hdmi->dev;
 	struct hdmi_i2c_adapter *hdmi_i2c;
 	struct i2c_adapter *i2c = NULL;
 	int ret;
@@ -267,10 +266,8 @@ struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi)
 	i2c->algo = &msm_hdmi_i2c_algorithm;
 
 	ret = i2c_add_adapter(i2c);
-	if (ret) {
-		dev_err(dev->dev, "failed to register hdmi i2c: %d\n", ret);
+	if (ret)
 		goto fail;
-	}
 
 	return i2c;
 
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] gpu: drm: radeon: radeon_i2c: don't print error when adding adapter fails
  2016-08-09 11:30 [PATCH 0/5] gpu: don't print error when adding adapter fails Wolfram Sang
                   ` (2 preceding siblings ...)
  2016-08-09 11:30 ` [PATCH 3/5] gpu: drm: msm: hdmi: hdmi_i2c: " Wolfram Sang
@ 2016-08-09 11:30 ` Wolfram Sang
  2016-08-10 18:10   ` Alex Deucher
  2016-08-09 11:30 ` [PATCH 5/5] gpu: drm: rockchip: inno_hdmi: " Wolfram Sang
  4 siblings, 1 reply; 7+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-i2c, Wolfram Sang, Alex Deucher, Christian König,
	David Airlie, dri-devel

The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/gpu/drm/radeon/radeon_i2c.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c
index 9590bcd321c09a..021aa005623f80 100644
--- a/drivers/gpu/drm/radeon/radeon_i2c.c
+++ b/drivers/gpu/drm/radeon/radeon_i2c.c
@@ -938,10 +938,8 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
 			 "Radeon i2c hw bus %s", name);
 		i2c->adapter.algo = &radeon_i2c_algo;
 		ret = i2c_add_adapter(&i2c->adapter);
-		if (ret) {
-			DRM_ERROR("Failed to register hw i2c %s\n", name);
+		if (ret)
 			goto out_free;
-		}
 	} else if (rec->hw_capable &&
 		   radeon_hw_i2c &&
 		   ASIC_IS_DCE3(rdev)) {
@@ -950,10 +948,8 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
 			 "Radeon i2c hw bus %s", name);
 		i2c->adapter.algo = &radeon_atom_i2c_algo;
 		ret = i2c_add_adapter(&i2c->adapter);
-		if (ret) {
-			DRM_ERROR("Failed to register hw i2c %s\n", name);
+		if (ret)
 			goto out_free;
-		}
 	} else {
 		/* set the radeon bit adapter */
 		snprintf(i2c->adapter.name, sizeof(i2c->adapter.name),
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] gpu: drm: rockchip: inno_hdmi: don't print error when adding adapter fails
  2016-08-09 11:30 [PATCH 0/5] gpu: don't print error when adding adapter fails Wolfram Sang
                   ` (3 preceding siblings ...)
  2016-08-09 11:30 ` [PATCH 4/5] gpu: drm: radeon: radeon_i2c: " Wolfram Sang
@ 2016-08-09 11:30 ` Wolfram Sang
  4 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2016-08-09 11:30 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-i2c, Wolfram Sang, Mark Yao, David Airlie, Heiko Stuebner,
	dri-devel, linux-arm-kernel, linux-rockchip

The core will do this for us now.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
 drivers/gpu/drm/rockchip/inno_hdmi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c
index 006260de9dbd22..566b5634644f82 100644
--- a/drivers/gpu/drm/rockchip/inno_hdmi.c
+++ b/drivers/gpu/drm/rockchip/inno_hdmi.c
@@ -800,7 +800,6 @@ static struct i2c_adapter *inno_hdmi_i2c_adapter(struct inno_hdmi *hdmi)
 
 	ret = i2c_add_adapter(adap);
 	if (ret) {
-		dev_warn(hdmi->dev, "cannot add %s I2C adapter\n", adap->name);
 		devm_kfree(hdmi->dev, i2c);
 		return ERR_PTR(ret);
 	}
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 4/5] gpu: drm: radeon: radeon_i2c: don't print error when adding adapter fails
  2016-08-09 11:30 ` [PATCH 4/5] gpu: drm: radeon: radeon_i2c: " Wolfram Sang
@ 2016-08-10 18:10   ` Alex Deucher
  0 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2016-08-10 18:10 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: LKML, Maling list - DRI developers, Linux I2C, Alex Deucher,
	Christian König

On Tue, Aug 9, 2016 at 7:30 AM, Wolfram Sang
<wsa-dev@sang-engineering.com> wrote:
> The core will do this for us now.
>
> Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>

Applied patches 1, 5.

Thanks,

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_i2c.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c
> index 9590bcd321c09a..021aa005623f80 100644
> --- a/drivers/gpu/drm/radeon/radeon_i2c.c
> +++ b/drivers/gpu/drm/radeon/radeon_i2c.c
> @@ -938,10 +938,8 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
>                          "Radeon i2c hw bus %s", name);
>                 i2c->adapter.algo = &radeon_i2c_algo;
>                 ret = i2c_add_adapter(&i2c->adapter);
> -               if (ret) {
> -                       DRM_ERROR("Failed to register hw i2c %s\n", name);
> +               if (ret)
>                         goto out_free;
> -               }
>         } else if (rec->hw_capable &&
>                    radeon_hw_i2c &&
>                    ASIC_IS_DCE3(rdev)) {
> @@ -950,10 +948,8 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
>                          "Radeon i2c hw bus %s", name);
>                 i2c->adapter.algo = &radeon_atom_i2c_algo;
>                 ret = i2c_add_adapter(&i2c->adapter);
> -               if (ret) {
> -                       DRM_ERROR("Failed to register hw i2c %s\n", name);
> +               if (ret)
>                         goto out_free;
> -               }
>         } else {
>                 /* set the radeon bit adapter */
>                 snprintf(i2c->adapter.name, sizeof(i2c->adapter.name),
> --
> 2.8.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-08-10 18:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09 11:30 [PATCH 0/5] gpu: don't print error when adding adapter fails Wolfram Sang
2016-08-09 11:30 ` [PATCH 1/5] gpu: drm: amd: amdgpu: amdgpu_i2c: " Wolfram Sang
2016-08-09 11:30 ` [PATCH 2/5] gpu: drm: mediatek: mtk_hdmi_ddc: " Wolfram Sang
2016-08-09 11:30 ` [PATCH 3/5] gpu: drm: msm: hdmi: hdmi_i2c: " Wolfram Sang
2016-08-09 11:30 ` [PATCH 4/5] gpu: drm: radeon: radeon_i2c: " Wolfram Sang
2016-08-10 18:10   ` Alex Deucher
2016-08-09 11:30 ` [PATCH 5/5] gpu: drm: rockchip: inno_hdmi: " Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).