All of lore.kernel.org
 help / color / mirror / Atom feed
* Probing modes and validating them
@ 2017-04-21 12:59 Jose Abreu
  2017-04-21 13:29 ` Jose Abreu
  0 siblings, 1 reply; 4+ messages in thread
From: Jose Abreu @ 2017-04-21 12:59 UTC (permalink / raw)
  To: dri-devel@lists.freedesktop.org; +Cc: Alexey Brodkin

Hi All,


Is there any callback available, at the crtc level, that can
validate the probed modes before making them available for
userspace? I mean: I know that there is connector->mode_valid(),
but I couldn't find any equivalent crtc->mode_valid(). I found
mode_fixup() but this is called after giving the mode to
userspace, which is not what I need.

For reference here is the situation I'm facing:

ARCPGU is a DRM driver that uses ADV7511 as connector/bridge. The
PGU encodes raw video into a stream that ADV can understands and
in order to do this it needs a pixel clock. Currently this pixel
clock value is fixed, so technically arcpgu driver supports only
one video mode. There is a patch currently on discussion that
adds more supported frequencies for arcpgu, but there are still
some frequencies that will not be supported. This is NOT a
limitation in ADV7511, so it doesn't make sense to limit the
available modes in adv, we could instead limit the modes in the
crtc level (i.e. the pgu).

In order to know if a mode can be displayed or not it is as
simple as call clk_round_rate() and check if the returned
frequency is the same. But in order to do this I need some sort
of callback that is called at the crtc level and before
delivering modes to userspace.

I believe this would be a good addition to arcpgu because this
way we wouldn't "fool" userspace by delivering modes that will
fail in atomic check. The user may still specify manually a mode,
this will still fail in atomic check, but the difference is that
this mode will not be in the probed list.


Best regards,

Jose Miguel Abreu

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-02  8:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-21 12:59 Probing modes and validating them Jose Abreu
2017-04-21 13:29 ` Jose Abreu
2017-04-22 10:13   ` Ville Syrjälä
2017-05-02  8:36   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.