mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-06 08:46:46 +00:00
drm/atomic: Add drm_atomic_helper_best_encoder()
Add (struct drm_connector_helper_funcs *)->best_encoder callback helper for connectors that support exactly 1 encoder, statically determined at driver init time. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462982962-10530-6-git-send-email-noralf@tronnes.org
This commit is contained in:
parent
2827635e39
commit
9ecb549867
2 changed files with 19 additions and 0 deletions
|
@ -2482,6 +2482,23 @@ int drm_atomic_helper_connector_dpms(struct drm_connector *connector,
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(drm_atomic_helper_connector_dpms);
|
EXPORT_SYMBOL(drm_atomic_helper_connector_dpms);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* drm_atomic_helper_best_encoder - Helper for &drm_connector_helper_funcs
|
||||||
|
* ->best_encoder callback
|
||||||
|
* @connector: Connector control structure
|
||||||
|
*
|
||||||
|
* This is a &drm_connector_helper_funcs ->best_encoder callback helper for
|
||||||
|
* connectors that support exactly 1 encoder, statically determined at driver
|
||||||
|
* init time.
|
||||||
|
*/
|
||||||
|
struct drm_encoder *
|
||||||
|
drm_atomic_helper_best_encoder(struct drm_connector *connector)
|
||||||
|
{
|
||||||
|
WARN_ON(connector->encoder_ids[1]);
|
||||||
|
return drm_encoder_find(connector->dev, connector->encoder_ids[0]);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(drm_atomic_helper_best_encoder);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DOC: atomic state reset and initialization
|
* DOC: atomic state reset and initialization
|
||||||
*
|
*
|
||||||
|
|
|
@ -110,6 +110,8 @@ int drm_atomic_helper_page_flip(struct drm_crtc *crtc,
|
||||||
uint32_t flags);
|
uint32_t flags);
|
||||||
int drm_atomic_helper_connector_dpms(struct drm_connector *connector,
|
int drm_atomic_helper_connector_dpms(struct drm_connector *connector,
|
||||||
int mode);
|
int mode);
|
||||||
|
struct drm_encoder *
|
||||||
|
drm_atomic_helper_best_encoder(struct drm_connector *connector);
|
||||||
|
|
||||||
/* default implementations for state handling */
|
/* default implementations for state handling */
|
||||||
void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc);
|
void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc);
|
||||||
|
|
Loading…
Reference in a new issue