[PATCH] drm: Add crtc/encoder/bridge->mode_valid() callbacks

Andrzej Hajda a.hajda at samsung.com
Tue May 16 13:15:18 UTC 2017


On 15.05.2017 11:33, Daniel Vetter wrote:
> From: Jose Abreu <Jose.Abreu at synopsys.com>
>
> This adds a new callback to crtc, encoder and bridge helper functions
> called mode_valid(). This callback shall be implemented if the
> corresponding component has some sort of restriction in the modes
> that can be displayed. A NULL callback implicates that the component
> can display all the modes.
>
> We also change the documentation so that the new and old callbacks
> are correctly documented.
>
> Only the callbacks were implemented to simplify review process,
> following patches will make use of them.
>
> Changes in v2 from Daniel:
> - Update the warning about how modes aren't filtered in atomic_check -
>   the heleprs help out a lot more now.
> - Consistenly roll out that warning, crtc/encoder's atomic_check
>   missed it.
> - Sprinkle more links all over the place, so it's easier to see where
>   this stuff is used and how the differen hooks are related.
> - Note that ->mode_valid is optional everywhere.
> - Explain why the connector's mode_valid is special and does _not_ get
>   called in atomic_check.
>
> v3: Document what can and cannot be checked in mode_valid a bit better
> (Andrjez). Answer: Only allowed to look at the mode, nothing else.
>
> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Jose Abreu <joabreu at synopsys.com>
> Cc: Jose Abreu <joabreu at synopsys.com>
> Cc: Carlos Palminha <palminha at synopsys.com>
> Cc: Alexey Brodkin <abrodkin at synopsys.com>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Cc: Dave Airlie <airlied at linux.ie>
> Cc: Andrzej Hajda <a.hajda at samsung.com>
> Cc: Archit Taneja <architt at codeaurora.org>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch> (v2)
Reviewed-by: Andrzej Hajda <a.hajda at samsung.com>

 --
Regards
Andrzej


More information about the dri-devel mailing list