[PATCH v2 1/4] drm/dp: Add helper to set LTTPRs in transparent mode
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Wed Dec 11 18:32:51 UTC 2024
On Wed, Dec 11, 2024 at 03:42:27PM +0100, Johan Hovold wrote:
> On Wed, Dec 11, 2024 at 03:04:12PM +0200, Abel Vesa wrote:
>
> > +/**
> > + * drm_dp_lttpr_set_transparent_mode - set the LTTPR in transparent mode
> > + * @aux: DisplayPort AUX channel
> > + * @enable: Enable or disable transparent mode
> > + *
> > + * Returns 0 on success or a negative error code on failure.
> > + */
> > +int drm_dp_lttpr_set_transparent_mode(struct drm_dp_aux *aux, bool enable)
> > +{
> > + u8 val = enable ? DP_PHY_REPEATER_MODE_TRANSPARENT :
> > + DP_PHY_REPEATER_MODE_NON_TRANSPARENT;
> > + int ret = drm_dp_dpcd_writeb(aux, DP_PHY_REPEATER_MODE, val);
> > +
> > + return ret == 1 ? 0 : ret;
>
> This looks correct, but I had to go look at drm_dp_dpcd_writeb() to make
> sure it never returns 0 (for short transfers).
>
> > +}
> > +EXPORT_SYMBOL(drm_dp_lttpr_set_transparent_mode);
>
> This appears to be what the driver currently uses, but why not
> EXPORT_SYMBOL_GPL?
$ git grep EXPORT_SYMBOL drivers/gpu/drm/*.c | wc -l
962
$ git grep EXPORT_SYMBOL_GPL drivers/gpu/drm/*.c | wc -l
93
--
With best wishes
Dmitry
More information about the Freedreno
mailing list