mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
drm/bridge: anx7625: Use common macros for DP power sequencing commands
[ Upstream commit2ba776f903] The DRM DP code has macros for the DP power sequencing commands. Use them in the anx7625 driver instead of raw numbers. Fixes:548b512e14("drm/bridge: anx7625: send DPCD command to downstream") Fixes:27f26359de("drm/bridge: anx7625: Set downstream sink into normal status") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Signed-off-by: Robert Foss <rfoss@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230710090929.1873646-1-wenst@chromium.org Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d309b170ea
commit
ba1ca2cf4d
@@ -933,8 +933,8 @@ static void anx7625_dp_start(struct anx7625_data *ctx)
|
|||||||
|
|
||||||
dev_dbg(dev, "set downstream sink into normal\n");
|
dev_dbg(dev, "set downstream sink into normal\n");
|
||||||
/* Downstream sink enter into normal mode */
|
/* Downstream sink enter into normal mode */
|
||||||
data = 1;
|
data = DP_SET_POWER_D0;
|
||||||
ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data);
|
ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, DP_SET_POWER, 1, &data);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
dev_err(dev, "IO error : set sink into normal mode fail\n");
|
dev_err(dev, "IO error : set sink into normal mode fail\n");
|
||||||
|
|
||||||
@@ -973,8 +973,8 @@ static void anx7625_dp_stop(struct anx7625_data *ctx)
|
|||||||
|
|
||||||
dev_dbg(dev, "notify downstream enter into standby\n");
|
dev_dbg(dev, "notify downstream enter into standby\n");
|
||||||
/* Downstream monitor enter into standby mode */
|
/* Downstream monitor enter into standby mode */
|
||||||
data = 2;
|
data = DP_SET_POWER_D3;
|
||||||
ret |= anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data);
|
ret |= anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, DP_SET_POWER, 1, &data);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
DRM_DEV_ERROR(dev, "IO error : mute video fail\n");
|
DRM_DEV_ERROR(dev, "IO error : mute video fail\n");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user