[PATCH] drm: Add crtc/encoder/bridge->mode_valid() callbacks
Daniel Vetter
daniel at ffwll.ch
Mon May 15 08:14:22 UTC 2017
On Mon, May 15, 2017 at 10:10 AM, Andrzej Hajda <a.hajda at samsung.com> wrote:
> Sorry for confusing shortcut, I have just inspected call sites of both
> callbacks - drm_helper_probe_single_connector_modes, both callbacks are
> called from this function, so my idea was to move loop
> 'list_for_each_entry(mode, &connector->modes, head){ ....,
> ...->mode_valid(...); ....}' from
> drm_helper_probe_single_connector_modes to .get_modes callback. After
> looking bit more at this function I have realized that such change is
> not so obvious, and it is not really clear if the final result will be
> better :).
This would defeat the purpose of ->get_modes, which is to just grab
the modes from the sink, without filtering for source constraints,
which is done by ->mode_valid. That framework is why we have the probe
helpers, if you want to do something else you can always implement
->fill_modes (which is the uapi entry point) yourself.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the dri-devel
mailing list