stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] drm/bridge: analogix-anx78xx: Fix drm_dp_link helper removal" failed to apply to 5.5-stable tree
@ 2020-04-15 11:30 gregkh
  2020-04-16  1:58 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2020-04-15 11:30 UTC (permalink / raw)
  To: duwe, Laurent.pinchart, a.hajda, daniel.vetter, jernej.skrabec,
	jonas, narmstrong, stable, treding, tzimmermann
  Cc: stable


The patch below does not apply to the 5.5-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 3e138a63d6674a4567a018a31e467567c40b14d5 Mon Sep 17 00:00:00 2001
From: Torsten Duwe <duwe@lst.de>
Date: Tue, 18 Feb 2020 16:57:44 +0100
Subject: [PATCH] drm/bridge: analogix-anx78xx: Fix drm_dp_link helper removal

drm_dp_link_rate_to_bw_code and ...bw_code_to_link_rate simply divide by
and multiply with 27000, respectively. Avoid an overflow in the u8 dpcd[0]
and the multiply+divide alltogether.

Signed-off-by: Torsten Duwe <duwe@lst.de>
Fixes: ff1e8fb68ea0 ("drm/bridge: analogix-anx78xx: Avoid drm_dp_link helpers")
Cc: Thierry Reding <treding@nvidia.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Jonas Karlman <jonas@kwiboo.se>
Cc: Jernej Skrabec <jernej.skrabec@siol.net>
Cc: <stable@vger.kernel.org> # v5.5+
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20200218155744.9675368BE1@verein.lst.de

diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
index 41867be03751..864423f59d66 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
@@ -722,10 +722,9 @@ static int anx78xx_dp_link_training(struct anx78xx *anx78xx)
 	if (err)
 		return err;
 
-	dpcd[0] = drm_dp_max_link_rate(anx78xx->dpcd);
-	dpcd[0] = drm_dp_link_rate_to_bw_code(dpcd[0]);
 	err = regmap_write(anx78xx->map[I2C_IDX_TX_P0],
-			   SP_DP_MAIN_LINK_BW_SET_REG, dpcd[0]);
+			   SP_DP_MAIN_LINK_BW_SET_REG,
+			   anx78xx->dpcd[DP_MAX_LINK_RATE]);
 	if (err)
 		return err;
 


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

* Re: FAILED: patch "[PATCH] drm/bridge: analogix-anx78xx: Fix drm_dp_link helper removal" failed to apply to 5.5-stable tree
  2020-04-15 11:30 FAILED: patch "[PATCH] drm/bridge: analogix-anx78xx: Fix drm_dp_link helper removal" failed to apply to 5.5-stable tree gregkh
@ 2020-04-16  1:58 ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2020-04-16  1:58 UTC (permalink / raw)
  To: gregkh
  Cc: duwe, Laurent.pinchart, a.hajda, daniel.vetter, jernej.skrabec,
	jonas, narmstrong, stable, treding, tzimmermann

On Wed, Apr 15, 2020 at 01:30:33PM +0200, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 5.5-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 3e138a63d6674a4567a018a31e467567c40b14d5 Mon Sep 17 00:00:00 2001
>From: Torsten Duwe <duwe@lst.de>
>Date: Tue, 18 Feb 2020 16:57:44 +0100
>Subject: [PATCH] drm/bridge: analogix-anx78xx: Fix drm_dp_link helper removal
>
>drm_dp_link_rate_to_bw_code and ...bw_code_to_link_rate simply divide by
>and multiply with 27000, respectively. Avoid an overflow in the u8 dpcd[0]
>and the multiply+divide alltogether.
>
>Signed-off-by: Torsten Duwe <duwe@lst.de>
>Fixes: ff1e8fb68ea0 ("drm/bridge: analogix-anx78xx: Avoid drm_dp_link helpers")
>Cc: Thierry Reding <treding@nvidia.com>
>Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>Cc: Andrzej Hajda <a.hajda@samsung.com>
>Cc: Neil Armstrong <narmstrong@baylibre.com>
>Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
>Cc: Jonas Karlman <jonas@kwiboo.se>
>Cc: Jernej Skrabec <jernej.skrabec@siol.net>
>Cc: <stable@vger.kernel.org> # v5.5+
>Reviewed-by: Thierry Reding <treding@nvidia.com>
>Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>Link: https://patchwork.freedesktop.org/patch/msgid/20200218155744.9675368BE1@verein.lst.de

Different filename in 5.4, fixed and queued up.

-- 
Thanks,
Sasha

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

end of thread, other threads:[~2020-04-16  1:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-15 11:30 FAILED: patch "[PATCH] drm/bridge: analogix-anx78xx: Fix drm_dp_link helper removal" failed to apply to 5.5-stable tree gregkh
2020-04-16  1:58 ` Sasha Levin

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).