diff options
| -rw-r--r-- | drivers/gpu/drm/drm_crtc_helper.c | 13 | ||||
| -rw-r--r-- | include/drm/drm_crtc.h | 13 |
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 940c678cf012..48c90cbceb06 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
| @@ -324,19 +324,6 @@ void drm_helper_disable_unused_functions(struct drm_device *dev) | |||
| 324 | } | 324 | } |
| 325 | EXPORT_SYMBOL(drm_helper_disable_unused_functions); | 325 | EXPORT_SYMBOL(drm_helper_disable_unused_functions); |
| 326 | 326 | ||
| 327 | /** | ||
| 328 | * drm_encoder_crtc_ok - can a given crtc drive a given encoder? | ||
| 329 | * @encoder: encoder to test | ||
| 330 | * @crtc: crtc to test | ||
| 331 | * | ||
| 332 | * Return false if @encoder can't be driven by @crtc, true otherwise. | ||
| 333 | */ | ||
| 334 | static bool drm_encoder_crtc_ok(struct drm_encoder *encoder, | ||
| 335 | struct drm_crtc *crtc) | ||
| 336 | { | ||
| 337 | return !!(encoder->possible_crtcs & drm_crtc_mask(crtc)); | ||
| 338 | } | ||
| 339 | |||
| 340 | /* | 327 | /* |
| 341 | * Check the CRTC we're going to map each output to vs. its current | 328 | * Check the CRTC we're going to map each output to vs. its current |
| 342 | * CRTC. If they don't match, we have to disable the output and the CRTC | 329 | * CRTC. If they don't match, we have to disable the output and the CRTC |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 4f2e3e82f014..b3865a0e39f4 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -963,6 +963,19 @@ extern int drm_encoder_init(struct drm_device *dev, | |||
| 963 | const struct drm_encoder_funcs *funcs, | 963 | const struct drm_encoder_funcs *funcs, |
| 964 | int encoder_type); | 964 | int encoder_type); |
| 965 | 965 | ||
| 966 | /** | ||
| 967 | * drm_encoder_crtc_ok - can a given crtc drive a given encoder? | ||
| 968 | * @encoder: encoder to test | ||
| 969 | * @crtc: crtc to test | ||
| 970 | * | ||
| 971 | * Return false if @encoder can't be driven by @crtc, true otherwise. | ||
| 972 | */ | ||
| 973 | static inline bool drm_encoder_crtc_ok(struct drm_encoder *encoder, | ||
| 974 | struct drm_crtc *crtc) | ||
| 975 | { | ||
| 976 | return !!(encoder->possible_crtcs & drm_crtc_mask(crtc)); | ||
| 977 | } | ||
| 978 | |||
| 966 | extern int drm_plane_init(struct drm_device *dev, | 979 | extern int drm_plane_init(struct drm_device *dev, |
| 967 | struct drm_plane *plane, | 980 | struct drm_plane *plane, |
| 968 | unsigned long possible_crtcs, | 981 | unsigned long possible_crtcs, |
