diff options
| author | Dave Airlie <airlied@redhat.com> | 2016-09-28 10:28:23 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2016-09-28 10:28:23 +1000 |
| commit | 3f346d5dcb591c2a5a26653d093af710cf2e5a31 (patch) | |
| tree | 24384b63b4ba23912afa6dac409f354b097156ff /include/drm/drm_encoder.h | |
| parent | Merge tag 'drm-amdkfd-next-2016-09-19' of git://people.freedesktop.org/~gabba... (diff) | |
| parent | drm: bridge: analogix/dp: mark symbols static where possible (diff) | |
| download | linux-3f346d5dcb591c2a5a26653d093af710cf2e5a31.tar.gz linux-3f346d5dcb591c2a5a26653d093af710cf2e5a31.zip | |
Merge tag 'topic/drm-misc-2016-09-25' of git://anongit.freedesktop.org/drm-intel into drm-next
- more core cleanup patches to prep drm_file to be used for
kernel-internal contexts (David Herrmann)
- more split-up+docs for drm_crtc.c
- lots of small fixes and polish all over
* tag 'topic/drm-misc-2016-09-25' of git://anongit.freedesktop.org/drm-intel: (37 commits)
drm: bridge: analogix/dp: mark symbols static where possible
drm/bochs: mark bochs_connector_get_modes() static
drm/bridge: analogix_dp: Improve panel on time
drm/bridge: analogix_dp: Don't read EDID if panel present
drm/bridge: analogix_dp: Remove duplicated code
Revert "drm/i2c: tda998x: don't register the connector"
drm: Fix plane type uabi breakage
dma-buf/sync_file: free fences array in num_fences is 1
drm/i2c: tda998x: don't register the connector
drm: Don't swallow error codes in drm_dev_alloc()
drm: Distinguish no name from ENOMEM in set_unique()
drm: Remove dirty property from docs
drm/doc: Document color space handling
drm: Extract drm_color_mgmt.[hc]
drm/doc: Polish plane composition property docs
drm: Conslidate blending properties in drm_blend.[hc]
drm/doc: Polish for drm_plane.[hc]
drm: Extract drm_plane.[hc]
drm/tilcdc: Add atomic and crtc headers to crtc.c
drm: Fix typo in encoder docs
...
Diffstat (limited to 'include/drm/drm_encoder.h')
| -rw-r--r-- | include/drm/drm_encoder.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/drm/drm_encoder.h b/include/drm/drm_encoder.h index fce0203094f7..387e33a4d6ee 100644 --- a/include/drm/drm_encoder.h +++ b/include/drm/drm_encoder.h @@ -224,4 +224,26 @@ static inline struct drm_encoder *drm_encoder_find(struct drm_device *dev, void drm_encoder_cleanup(struct drm_encoder *encoder); +/** + * drm_for_each_encoder_mask - iterate over encoders specified by bitmask + * @encoder: the loop cursor + * @dev: the DRM device + * @encoder_mask: bitmask of encoder indices + * + * Iterate over all encoders specified by bitmask. + */ +#define drm_for_each_encoder_mask(encoder, dev, encoder_mask) \ + list_for_each_entry((encoder), &(dev)->mode_config.encoder_list, head) \ + for_each_if ((encoder_mask) & (1 << drm_encoder_index(encoder))) + +/** + * drm_for_each_encoder - iterate over all encoders + * @encoder: the loop cursor + * @dev: the DRM device + * + * Iterate over all encoders of @dev. + */ +#define drm_for_each_encoder(encoder, dev) \ + list_for_each_entry(encoder, &(dev)->mode_config.encoder_list, head) + #endif |
