Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 2ba776f

Browse files
wensrobertfoss
authored andcommitted
drm/bridge: anx7625: Use common macros for DP power sequencing commands
The DRM DP code has macros for the DP power sequencing commands. Use them in the anx7625 driver instead of raw numbers. Fixes: 548b512 ("drm/bridge: anx7625: send DPCD command to downstream") Fixes: 27f2635 ("drm/bridge: anx7625: Set downstream sink into normal status") Signed-off-by: Chen-Yu Tsai <[email protected]> Reviewed-by: Nícolas F. R. A. Prado <[email protected]> Signed-off-by: Robert Foss <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 03fad56 commit 2ba776f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/bridge/analogix/anx7625.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,8 @@ static void anx7625_dp_start(struct anx7625_data *ctx)
931931

932932
dev_dbg(dev, "set downstream sink into normal\n");
933933
/* Downstream sink enter into normal mode */
934-
data = 1;
935-
ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data);
934+
data = DP_SET_POWER_D0;
935+
ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, DP_SET_POWER, 1, &data);
936936
if (ret < 0)
937937
dev_err(dev, "IO error : set sink into normal mode fail\n");
938938

@@ -971,8 +971,8 @@ static void anx7625_dp_stop(struct anx7625_data *ctx)
971971

972972
dev_dbg(dev, "notify downstream enter into standby\n");
973973
/* Downstream monitor enter into standby mode */
974-
data = 2;
975-
ret |= anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data);
974+
data = DP_SET_POWER_D3;
975+
ret |= anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, DP_SET_POWER, 1, &data);
976976
if (ret < 0)
977977
DRM_DEV_ERROR(dev, "IO error : mute video fail\n");
978978

0 commit comments

Comments
 (0)