Hi Maxime,

> +
> +static struct drm_encoder *
> +dumb_vga_best_encoder(struct drm_connector *connector)
> +{
> +     struct dumb_vga *vga = drm_connector_to_dumb_vga(connector);
> +
> +     return vga->bridge.encoder;
> +}
> +
> +static struct drm_connector_helper_funcs dumb_vga_con_helper_funcs = {
> +     .get_modes      = dumb_vga_get_modes,
> +     .best_encoder   = dumb_vga_best_encoder,
> +};
> +

We have a 1:1 relationship between connectors and encoders, and the driver
is relying on the atomic helpers: we can drop the custom ->best_encoder(),
and let the core call drm_atomic_helper_best_encoder() for us.

Meng

Reply via email to