/*1* Copyright © 2006 Keith Packard2* Copyright © 2007-2008 Dave Airlie3* Copyright © 2007-2008 Intel Corporation4* Jesse Barnes <[email protected]>5*6* Permission is hereby granted, free of charge, to any person obtaining a7* copy of this software and associated documentation files (the "Software"),8* to deal in the Software without restriction, including without limitation9* the rights to use, copy, modify, merge, publish, distribute, sublicense,10* and/or sell copies of the Software, and to permit persons to whom the11* Software is furnished to do so, subject to the following conditions:12*13* The above copyright notice and this permission notice shall be included in14* all copies or substantial portions of the Software.15*16* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR17* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,18* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL19* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR20* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,21* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR22* OTHER DEALINGS IN THE SOFTWARE.23*/2425/*26* The DRM mode setting helper functions are common code for drivers to use if27* they wish. Drivers are not forced to use this code in their28* implementations but it would be useful if they code they do use at least29* provides a consistent interface and operation to userspace30*/3132#ifndef __DRM_CRTC_HELPER_H__33#define __DRM_CRTC_HELPER_H__3435#include <linux/types.h>3637struct drm_atomic_state;38struct drm_connector;39struct drm_crtc;40struct drm_device;41struct drm_display_mode;42struct drm_encoder;43struct drm_framebuffer;44struct drm_mode_set;45struct drm_modeset_acquire_ctx;4647void drm_helper_disable_unused_functions(struct drm_device *dev);48int drm_crtc_helper_set_config(struct drm_mode_set *set,49struct drm_modeset_acquire_ctx *ctx);50bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,51struct drm_display_mode *mode,52int x, int y,53struct drm_framebuffer *old_fb);54int drm_crtc_helper_atomic_check(struct drm_crtc *crtc,55struct drm_atomic_state *state);56bool drm_helper_crtc_in_use(struct drm_crtc *crtc);57bool drm_helper_encoder_in_use(struct drm_encoder *encoder);5859int drm_helper_connector_dpms(struct drm_connector *connector, int mode);6061void drm_helper_resume_force_mode(struct drm_device *dev);62int drm_helper_force_disable_all(struct drm_device *dev);6364#endif656667