lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87edlgjbvg.fsf@intel.com>
Date:   Mon, 10 Jul 2023 13:32:03 +0300
From:   Jani Nikula <jani.nikula@...ux.intel.com>
To:     Chen-Yu Tsai <wenst@...omium.org>,
        Andrzej Hajda <andrzej.hajda@...el.com>,
        Neil Armstrong <neil.armstrong@...aro.org>,
        Robert Foss <rfoss@...nel.org>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Xin Ji <xji@...logixsemi.com>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>
Cc:     NĂ­colas F. R. A. Prado 
        <nfraprado@...labora.com>, linux-kernel@...r.kernel.org,
        dri-devel@...ts.freedesktop.org, Chen-Yu Tsai <wenst@...omium.org>
Subject: Re: [PATCH RESEND] drm/bridge: anx7625: Use common macros for DP
 power sequencing commands

On Mon, 10 Jul 2023, Chen-Yu Tsai <wenst@...omium.org> wrote:
> The DRM DP code has macros for the DP power sequencing commands. Use
> them in the anx7625 driver instead of raw numbers.
>
> Fixes: 548b512e144f ("drm/bridge: anx7625: send DPCD command to downstream")
> Fixes: 27f26359de9b ("drm/bridge: anx7625: Set downstream sink into normal status")
> Signed-off-by: Chen-Yu Tsai <wenst@...omium.org>
> Reviewed-by: NĂ­colas F. R. A. Prado <nfraprado@...labora.com>
> ---
> Collected tags and rebased on v6.5-rc1.
>
>  drivers/gpu/drm/bridge/analogix/anx7625.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index 8b985efdc086..9db3784cb554 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -931,8 +931,8 @@ static void anx7625_dp_start(struct anx7625_data *ctx)
>  
>  	dev_dbg(dev, "set downstream sink into normal\n");
>  	/* Downstream sink enter into normal mode */
> -	data = 1;
> -	ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data);
> +	data = DP_SET_POWER_D0;
> +	ret = anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, DP_SET_POWER, 1, &data);

So you have code to implement the drm dp aux abstractions, why aren't
you using drm_dp_dpcd_writeb() and friends here?

BR,
Jani.


>  	if (ret < 0)
>  		dev_err(dev, "IO error : set sink into normal mode fail\n");
>  
> @@ -971,8 +971,8 @@ static void anx7625_dp_stop(struct anx7625_data *ctx)
>  
>  	dev_dbg(dev, "notify downstream enter into standby\n");
>  	/* Downstream monitor enter into standby mode */
> -	data = 2;
> -	ret |= anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, 0x000600, 1, &data);
> +	data = DP_SET_POWER_D3;
> +	ret |= anx7625_aux_trans(ctx, DP_AUX_NATIVE_WRITE, DP_SET_POWER, 1, &data);
>  	if (ret < 0)
>  		DRM_DEV_ERROR(dev, "IO error : mute video fail\n");

-- 
Jani Nikula, Intel Open Source Graphics Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ