Skip to contentSkip to conversation

drm/bridge: analogix-anx6345: Fix drm_dp_link helper removal

PATCH In review Torsten Duwe 3 participants 4 messages Feb 21, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/bridge: analogix-anx6345: 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.

Fixes e1cff82c1097bda2478 ("fix anx6345 compilation for v5.5")

---
https://patchwork.freedesktop.org/patch/343004/
https://lists.freedesktop.org/archives/dri-devel/2020-January/253535.html

Can someone please review this? It's equivalent to commit 3e138a63d6674a4567a018a31 which just made it into drm-tip.

drivers/gpu/drm/bridge/analogix/analogix-anx6345.c +2 -3
@@ -210,10 +210,9 @@ static int anx6345_dp_link_training(struct anx6345 *anx6345)
 	if (err)
 		return err;
 
-	dpcd[0] = drm_dp_max_link_rate(anx6345->dpcd);
-	dpcd[0] = drm_dp_link_rate_to_bw_code(dpcd[0]);
 	err = regmap_write(anx6345->map[I2C_IDX_DPTX],
-			   SP_DP_MAIN_LINK_BW_SET_REG, dpcd[0]);
+			   SP_DP_MAIN_LINK_BW_SET_REG,
+			   anx6345->dpcd[DP_MAX_LINK_RATE]);
 	if (err)
 		return err;
 
#1 lore raw

Hi Torsten

Am 21.02.20 um 15:04 schrieb Torsten Duwe:

Quoted 5 lines

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.

Fixes e1cff82c1097bda2478 ("fix anx6345 compilation for v5.5")

You have to create the fixes tag and related cc tags with 'dim fixes', available at [1]. For this patch, the output is

Fixes e1cff82c1097 ("drm/bridge: fix anx6345 compilation for v5.5")
Cc Torsten Duwe <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Torsten Duwe <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc Icenowy Zheng <[email protected]>
Cc Stephen Rothwell <[email protected]>
Quoted 1 line

You signed off with your SUSE email address, but sent the mail from lst.de. I don't know if it's strictly not allowed, but that's at least confusing to the tools.

Best regards
Thomas

[1] https://gitlab.freedesktop.org/drm/maintainer-tools/

Quoted 27 lines

---
https://patchwork.freedesktop.org/patch/343004/
https://lists.freedesktop.org/archives/dri-devel/2020-January/253535.html

Can someone please review this? It's equivalent to commit 3e138a63d6674a4567a018a31 which just made it into drm-tip.

drivers/gpu/drm/bridge/analogix/analogix-anx6345.c +2 -3
@@ -210,10 +210,9 @@ static int anx6345_dp_link_training(struct anx6345 *anx6345)
 	if (err)
 		return err;
 
-	dpcd[0] = drm_dp_max_link_rate(anx6345->dpcd);
-	dpcd[0] = drm_dp_link_rate_to_bw_code(dpcd[0]);
 	err = regmap_write(anx6345->map[I2C_IDX_DPTX],
-			   SP_DP_MAIN_LINK_BW_SET_REG, dpcd[0]);
+			   SP_DP_MAIN_LINK_BW_SET_REG,
+			   anx6345->dpcd[DP_MAX_LINK_RATE]);
 	if (err)
 		return err;
 

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 12 lines · Thomas Zimmermann

Hi Torsten

Am 21.02.20 um 15:04 schrieb Torsten Duwe:

Quoted 5 lines

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.

Fixes e1cff82c1097bda2478 ("fix anx6345 compilation for v5.5")

You have to create the fixes tag and related cc tags with 'dim fixes', available at [1]. For this patch, the output is

Quoted 9 lines
Fixes e1cff82c1097 ("drm/bridge: fix anx6345 compilation for v5.5")
Cc Torsten Duwe <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Torsten Duwe <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc Icenowy Zheng <[email protected]>
Cc Stephen Rothwell <[email protected]>

Ah, neat.

Quoted 5 lines
Quoted 1 line

You signed off with your SUSE email address, but sent the mail from lst.de. I don't know if it's strictly not allowed, but that's at least confusing to the tools.

From my understanding, it is legally correct. The work is owned by Suse, so I have to sign off as an employee, but I'm subscribed with the LST address, and I'd also like to see all replies there.

Quoted 1 line

[1] https://gitlab.freedesktop.org/drm/maintainer-tools/

I'll send an appropriate v2 once I get a review for it.

Thanks!

Torsten

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

Hi Torsten,

Quoted 25 lines · Torsten Duwe
Quoted 10 lines · Thomas Zimmermann

Am 21.02.20 um 15:04 schrieb Torsten Duwe:

Quoted 5 lines

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.

Fixes e1cff82c1097bda2478 ("fix anx6345 compilation for v5.5")

You have to create the fixes tag and related cc tags with 'dim fixes', available at [1]. For this patch, the output is

Quoted 9 lines
Fixes e1cff82c1097 ("drm/bridge: fix anx6345 compilation for v5.5")
Cc Torsten Duwe <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Torsten Duwe <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc Icenowy Zheng <[email protected]>
Cc Stephen Rothwell <[email protected]>

Ah, neat.

Quoted 2 lines
Quoted 1 line
Quoted 7 lines
Quoted 3 lines

You signed off with your SUSE email address, but sent the mail from lst.de. I don't know if it's strictly not allowed, but that's at least confusing to the tools.

From my understanding, it is legally correct. The work is owned by Suse, so I have to sign off as an employee, but I'm subscribed with the LST address, and I'd also like to see all replies there.

That's fine, but then the mail body should start with a From: line that matches the address used in Signed-off-by. git-send-email should generate that automatically.

Quoted 3 lines
Quoted 1 line

[1] https://gitlab.freedesktop.org/drm/maintainer-tools/

I'll send an appropriate v2 once I get a review for it.

Signature · 7 lines
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel