linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Introduce crtc->mode_valid() callback
@ 2017-04-28 13:47 Jose Abreu
  2017-04-28 13:47 ` [PATCH v2 1/2] drm: " Jose Abreu
  2017-04-28 13:47 ` [PATCH v2 2/2] drm: arcpgu: Use " Jose Abreu
  0 siblings, 2 replies; 4+ messages in thread
From: Jose Abreu @ 2017-04-28 13:47 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-kernel, Jose Abreu, Carlos Palminha, Alexey Brodkin,
	Ville Syrjälä,
	Daniel Vetter, Dave Airlie, Andrzej Hajda

This patchset introduces a new callback for crtc, called mode_valid()
that is responsible to limit the number of probbed modes. Just like
connector->mode_valid(), this new callback is called at mode probbing
stage so that we can validate the mode.

This is specially useful because arcpgu crtc is responsible to set a
clock value in the commit() stage but unfortunatelly this clock does
not support all the needed ranges. This way we can restrict the number
of modes that are handed to userspace, so that we dont hand a mode
that will fail the commit() stage.

I guess this can also happen for other drivers so we introduce the
callback in the core.

The behaviour remains the same for crtcs that don't have the callback.
Also, for a given set of crtcs that can be bound to the connector, if
at least one can display the mode then the mode will be probbed.

For more info about why this is needed in arcpgu, please refer here [1].

[1] https://patchwork.kernel.org/patch/9694177/

Jose Abreu (2):
  drm: Introduce crtc->mode_valid() callback
  drm: arcpgu: Use crtc->mode_valid() callback

Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Andrzej Hajda <a.hajda@samsung.com>

 drivers/gpu/drm/arc/arcpgu_crtc.c        | 28 ++++++++++++++++--
 drivers/gpu/drm/drm_probe_helper.c       | 50 ++++++++++++++++++++++++++++++--
 include/drm/drm_modeset_helper_vtables.h | 26 +++++++++++++++++
 3 files changed, 99 insertions(+), 5 deletions(-)

-- 
1.9.1

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

end of thread, other threads:[~2017-05-03 22:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28 13:47 [PATCH v2 0/2] Introduce crtc->mode_valid() callback Jose Abreu
2017-04-28 13:47 ` [PATCH v2 1/2] drm: " Jose Abreu
2017-05-03 22:05   ` Manasi Navare
2017-04-28 13:47 ` [PATCH v2 2/2] drm: arcpgu: Use " Jose Abreu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).