diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-30 06:56:51 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-01-30 06:56:51 -0500 |
commit | e515b47e5646154448e46231d811919d93923da5 (patch) | |
tree | 1b10297d37170a1e00b4f2211f4296c2b0020f8d /include/drm | |
parent | c2c1d4912cd7028384d7f25d2faefefb8958f64d (diff) | |
parent | ef64cf9d06049e4e9df661f3be60b217e476bee1 (diff) |
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued
Backmerge drm-next - I need to backmerge drm-intel-fixes patches
touching the error capture code to be able to merge Ben's cleanup
patches.
Conflicts:
drivers/gpu/drm/i915/i915_gpu_error.c
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_crtc.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index e963470efd39..71727b6210ae 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -931,6 +931,19 @@ extern int drm_crtc_init(struct drm_device *dev, | |||
931 | struct drm_crtc *crtc, | 931 | struct drm_crtc *crtc, |
932 | const struct drm_crtc_funcs *funcs); | 932 | const struct drm_crtc_funcs *funcs); |
933 | extern void drm_crtc_cleanup(struct drm_crtc *crtc); | 933 | extern void drm_crtc_cleanup(struct drm_crtc *crtc); |
934 | extern unsigned int drm_crtc_index(struct drm_crtc *crtc); | ||
935 | |||
936 | /** | ||
937 | * drm_crtc_mask - find the mask of a registered CRTC | ||
938 | * @crtc: CRTC to find mask for | ||
939 | * | ||
940 | * Given a registered CRTC, return the mask bit of that CRTC for an | ||
941 | * encoder's possible_crtcs field. | ||
942 | */ | ||
943 | static inline uint32_t drm_crtc_mask(struct drm_crtc *crtc) | ||
944 | { | ||
945 | return 1 << drm_crtc_index(crtc); | ||
946 | } | ||
934 | 947 | ||
935 | extern void drm_connector_ida_init(void); | 948 | extern void drm_connector_ida_init(void); |
936 | extern void drm_connector_ida_destroy(void); | 949 | extern void drm_connector_ida_destroy(void); |
@@ -952,6 +965,19 @@ extern int drm_encoder_init(struct drm_device *dev, | |||
952 | const struct drm_encoder_funcs *funcs, | 965 | const struct drm_encoder_funcs *funcs, |
953 | int encoder_type); | 966 | int encoder_type); |
954 | 967 | ||
968 | /** | ||
969 | * drm_encoder_crtc_ok - can a given crtc drive a given encoder? | ||
970 | * @encoder: encoder to test | ||
971 | * @crtc: crtc to test | ||
972 | * | ||
973 | * Return false if @encoder can't be driven by @crtc, true otherwise. | ||
974 | */ | ||
975 | static inline bool drm_encoder_crtc_ok(struct drm_encoder *encoder, | ||
976 | struct drm_crtc *crtc) | ||
977 | { | ||
978 | return !!(encoder->possible_crtcs & drm_crtc_mask(crtc)); | ||
979 | } | ||
980 | |||
955 | extern int drm_plane_init(struct drm_device *dev, | 981 | extern int drm_plane_init(struct drm_device *dev, |
956 | struct drm_plane *plane, | 982 | struct drm_plane *plane, |
957 | unsigned long possible_crtcs, | 983 | unsigned long possible_crtcs, |