All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/mediatek/dp: fix mtk_dp_aux_transfer return value
@ 2024-04-02  7:11 ` Wojciech Macek
  0 siblings, 0 replies; 5+ messages in thread
From: Wojciech Macek @ 2024-04-02  7:11 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel, David Airlie, Daniel Vetter,
	Matthias Brugger, AngeloGioacchino Del Regno, dri-devel,
	linux-mediatek, linux-kernel, linux-arm-kernel, chrome-platform
  Cc: Wojciech Macek

From: Wojciech Macek <wmacek@chromium.com>

In case there is no DP device attached to the port the
transfer function should return IO error, similar to what
other drivers do.
In case EAGAIN is returned then any read from /dev/drm_dp_aux
device ends up in an infinite loop as the upper layers
constantly repeats the transfer request.

Signed-off-by: Wojciech Macek <wmacek@chromium.com>
---
 drivers/gpu/drm/mediatek/mtk_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c
index 0ba72102636a..536366956447 100644
--- a/drivers/gpu/drm/mediatek/mtk_dp.c
+++ b/drivers/gpu/drm/mediatek/mtk_dp.c
@@ -2104,7 +2104,7 @@ static ssize_t mtk_dp_aux_transfer(struct drm_dp_aux *mtk_aux,
 
 	if (mtk_dp->bridge.type != DRM_MODE_CONNECTOR_eDP &&
 	    !mtk_dp->train_info.cable_plugged_in) {
-		ret = -EAGAIN;
+		ret = -EIO;
 		goto err;
 	}
 
-- 
2.44.0.478.gd926399ef9-goog


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

* [PATCH] drm/mediatek/dp: fix mtk_dp_aux_transfer return value
@ 2024-04-02  7:11 ` Wojciech Macek
  0 siblings, 0 replies; 5+ messages in thread
From: Wojciech Macek @ 2024-04-02  7:11 UTC (permalink / raw)
  To: Chun-Kuang Hu, Philipp Zabel, David Airlie, Daniel Vetter,
	Matthias Brugger, AngeloGioacchino Del Regno, dri-devel,
	linux-mediatek, linux-kernel, linux-arm-kernel, chrome-platform
  Cc: Wojciech Macek

From: Wojciech Macek <wmacek@chromium.com>

In case there is no DP device attached to the port the
transfer function should return IO error, similar to what
other drivers do.
In case EAGAIN is returned then any read from /dev/drm_dp_aux
device ends up in an infinite loop as the upper layers
constantly repeats the transfer request.

Signed-off-by: Wojciech Macek <wmacek@chromium.com>
---
 drivers/gpu/drm/mediatek/mtk_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c
index 0ba72102636a..536366956447 100644
--- a/drivers/gpu/drm/mediatek/mtk_dp.c
+++ b/drivers/gpu/drm/mediatek/mtk_dp.c
@@ -2104,7 +2104,7 @@ static ssize_t mtk_dp_aux_transfer(struct drm_dp_aux *mtk_aux,
 
 	if (mtk_dp->bridge.type != DRM_MODE_CONNECTOR_eDP &&
 	    !mtk_dp->train_info.cable_plugged_in) {
-		ret = -EAGAIN;
+		ret = -EIO;
 		goto err;
 	}
 
-- 
2.44.0.478.gd926399ef9-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] drm/mediatek/dp: fix mtk_dp_aux_transfer return value
  2024-04-02  7:11 ` Wojciech Macek
  (?)
@ 2024-04-17  2:49   ` CK Hu (胡俊光)
  -1 siblings, 0 replies; 5+ messages in thread
From: CK Hu (胡俊光) @ 2024-04-17  2:49 UTC (permalink / raw)
  To: wmacek, linux-mediatek, linux-kernel, chrome-platform,
	chunkuang.hu, daniel, p.zabel, dri-devel, airlied,
	linux-arm-kernel, matthias.bgg, angelogioacchino.delregno
  Cc: wmacek

Hi, Wojciech:

On Tue, 2024-04-02 at 07:11 +0000, Wojciech Macek wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  From: Wojciech Macek <wmacek@chromium.com>
> 
> In case there is no DP device attached to the port the
> transfer function should return IO error, similar to what
> other drivers do.
> In case EAGAIN is returned then any read from /dev/drm_dp_aux
> device ends up in an infinite loop as the upper layers
> constantly repeats the transfer request.

This patch looks good to me, but need fixes tag, please refer to [1] to
add fixes tag.

[1] 
https://www.kernel.org/doc/html/v6.8/process/submitting-patches.html

Regards,
CK

> 
> Signed-off-by: Wojciech Macek <wmacek@chromium.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c
> b/drivers/gpu/drm/mediatek/mtk_dp.c
> index 0ba72102636a..536366956447 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dp.c
> @@ -2104,7 +2104,7 @@ static ssize_t mtk_dp_aux_transfer(struct
> drm_dp_aux *mtk_aux,
>  
>  	if (mtk_dp->bridge.type != DRM_MODE_CONNECTOR_eDP &&
>  	    !mtk_dp->train_info.cable_plugged_in) {
> -		ret = -EAGAIN;
> +		ret = -EIO;
>  		goto err;
>  	}
>  
> -- 
> 2.44.0.478.gd926399ef9-goog
> 

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

* Re: [PATCH] drm/mediatek/dp: fix mtk_dp_aux_transfer return value
@ 2024-04-17  2:49   ` CK Hu (胡俊光)
  0 siblings, 0 replies; 5+ messages in thread
From: CK Hu (胡俊光) @ 2024-04-17  2:49 UTC (permalink / raw)
  To: wmacek, linux-mediatek, linux-kernel, chrome-platform,
	chunkuang.hu, daniel, p.zabel, dri-devel, airlied,
	linux-arm-kernel, matthias.bgg, angelogioacchino.delregno
  Cc: wmacek

[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]

Hi, Wojciech:

On Tue, 2024-04-02 at 07:11 +0000, Wojciech Macek wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  From: Wojciech Macek <wmacek@chromium.com>
> 
> In case there is no DP device attached to the port the
> transfer function should return IO error, similar to what
> other drivers do.
> In case EAGAIN is returned then any read from /dev/drm_dp_aux
> device ends up in an infinite loop as the upper layers
> constantly repeats the transfer request.

This patch looks good to me, but need fixes tag, please refer to [1] to
add fixes tag.

[1] 
https://www.kernel.org/doc/html/v6.8/process/submitting-patches.html

Regards,
CK

> 
> Signed-off-by: Wojciech Macek <wmacek@chromium.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c
> b/drivers/gpu/drm/mediatek/mtk_dp.c
> index 0ba72102636a..536366956447 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dp.c
> @@ -2104,7 +2104,7 @@ static ssize_t mtk_dp_aux_transfer(struct
> drm_dp_aux *mtk_aux,
>  
>  	if (mtk_dp->bridge.type != DRM_MODE_CONNECTOR_eDP &&
>  	    !mtk_dp->train_info.cable_plugged_in) {
> -		ret = -EAGAIN;
> +		ret = -EIO;
>  		goto err;
>  	}
>  
> -- 
> 2.44.0.478.gd926399ef9-goog
> 

[-- Attachment #2: Type: text/html, Size: 3227 bytes --]

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

* Re: [PATCH] drm/mediatek/dp: fix mtk_dp_aux_transfer return value
@ 2024-04-17  2:49   ` CK Hu (胡俊光)
  0 siblings, 0 replies; 5+ messages in thread
From: CK Hu (胡俊光) @ 2024-04-17  2:49 UTC (permalink / raw)
  To: wmacek, linux-mediatek, linux-kernel, chrome-platform,
	chunkuang.hu, daniel, p.zabel, dri-devel, airlied,
	linux-arm-kernel, matthias.bgg, angelogioacchino.delregno
  Cc: wmacek

Hi, Wojciech:

On Tue, 2024-04-02 at 07:11 +0000, Wojciech Macek wrote:
>  	 
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>  From: Wojciech Macek <wmacek@chromium.com>
> 
> In case there is no DP device attached to the port the
> transfer function should return IO error, similar to what
> other drivers do.
> In case EAGAIN is returned then any read from /dev/drm_dp_aux
> device ends up in an infinite loop as the upper layers
> constantly repeats the transfer request.

This patch looks good to me, but need fixes tag, please refer to [1] to
add fixes tag.

[1] 
https://www.kernel.org/doc/html/v6.8/process/submitting-patches.html

Regards,
CK

> 
> Signed-off-by: Wojciech Macek <wmacek@chromium.com>
> ---
>  drivers/gpu/drm/mediatek/mtk_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c
> b/drivers/gpu/drm/mediatek/mtk_dp.c
> index 0ba72102636a..536366956447 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dp.c
> @@ -2104,7 +2104,7 @@ static ssize_t mtk_dp_aux_transfer(struct
> drm_dp_aux *mtk_aux,
>  
>  	if (mtk_dp->bridge.type != DRM_MODE_CONNECTOR_eDP &&
>  	    !mtk_dp->train_info.cable_plugged_in) {
> -		ret = -EAGAIN;
> +		ret = -EIO;
>  		goto err;
>  	}
>  
> -- 
> 2.44.0.478.gd926399ef9-goog
> 
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2024-04-17  2:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02  7:11 [PATCH] drm/mediatek/dp: fix mtk_dp_aux_transfer return value Wojciech Macek
2024-04-02  7:11 ` Wojciech Macek
2024-04-17  2:49 ` CK Hu (胡俊光)
2024-04-17  2:49   ` CK Hu (胡俊光)
2024-04-17  2:49   ` CK Hu (胡俊光)

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.