From: Daniel Vetter <daniel@ffwll.ch>
To: Torsten Duwe <duwe@lst.de>
Cc: Thierry Reding <thierry.reding@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>,
Andrzej Hajda <a.hajda@samsung.com>,
Neil Armstrong <narmstrong@baylibre.com>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@siol.net>,
David Airlie <airlied@linux.ie>,
Maxime Ripard <maxime@cerno.tech>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND][PATCH] drm/bridge: analogix-anx78xx: Fix drm_dp_link helper removal
Date: Tue, 18 Feb 2020 20:12:49 +0100 [thread overview]
Message-ID: <20200218191249.GO2363188@phenom.ffwll.local> (raw)
In-Reply-To: <20200218155744.9675368BE1@verein.lst.de>
On Tue, Feb 18, 2020 at 04:57:44PM +0100, Torsten Duwe wrote:
> 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: ff1e8fb68ea06027 ("analogix-anx78xx: Avoid drm_dp_link helpers")
> Signed-off-by: Torsten Duwe <duwe@suse.de>
Since same company I'm assuming Thomas Zimmermann will take care of these
patches for you. Or you need to ping maintainers again to push these for
you.
Also if you expect to regularlay contribut drm patches, just ask for
commit rights after 5-10 patches landed.
Cheers, Daniel
> Reviewed-by: Thierry Reding <treding@nvidia.com>
> ---
> https://patchwork.freedesktop.org/patch/343003/ (dropped the review mark)
> https://lists.freedesktop.org/archives/dri-devel/2020-January/253535.html
>
> ---
> 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;
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2020-02-18 19:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 15:57 Torsten Duwe
2020-02-18 19:12 ` Daniel Vetter [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-02-18 15:47 Torsten Duwe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200218191249.GO2363188@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=a.hajda@samsung.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=duwe@lst.de \
--cc=jernej.skrabec@siol.net \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime@cerno.tech \
--cc=narmstrong@baylibre.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®