162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Copyright © 2006 Keith Packard 362306a36Sopenharmony_ci * Copyright © 2007-2008 Dave Airlie 462306a36Sopenharmony_ci * Copyright © 2007-2008 Intel Corporation 562306a36Sopenharmony_ci * Jesse Barnes <jesse.barnes@intel.com> 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 862306a36Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 962306a36Sopenharmony_ci * to deal in the Software without restriction, including without limitation 1062306a36Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 1162306a36Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 1262306a36Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 1362306a36Sopenharmony_ci * 1462306a36Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 1562306a36Sopenharmony_ci * all copies or substantial portions of the Software. 1662306a36Sopenharmony_ci * 1762306a36Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1862306a36Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1962306a36Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 2062306a36Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 2162306a36Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2262306a36Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2362306a36Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 2462306a36Sopenharmony_ci */ 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci/* 2762306a36Sopenharmony_ci * The DRM mode setting helper functions are common code for drivers to use if 2862306a36Sopenharmony_ci * they wish. Drivers are not forced to use this code in their 2962306a36Sopenharmony_ci * implementations but it would be useful if they code they do use at least 3062306a36Sopenharmony_ci * provides a consistent interface and operation to userspace 3162306a36Sopenharmony_ci */ 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci#ifndef __DRM_CRTC_HELPER_H__ 3462306a36Sopenharmony_ci#define __DRM_CRTC_HELPER_H__ 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci#include <linux/types.h> 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_cistruct drm_atomic_state; 3962306a36Sopenharmony_cistruct drm_connector; 4062306a36Sopenharmony_cistruct drm_crtc; 4162306a36Sopenharmony_cistruct drm_device; 4262306a36Sopenharmony_cistruct drm_display_mode; 4362306a36Sopenharmony_cistruct drm_encoder; 4462306a36Sopenharmony_cistruct drm_framebuffer; 4562306a36Sopenharmony_cistruct drm_mode_set; 4662306a36Sopenharmony_cistruct drm_modeset_acquire_ctx; 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_civoid drm_helper_disable_unused_functions(struct drm_device *dev); 4962306a36Sopenharmony_ciint drm_crtc_helper_set_config(struct drm_mode_set *set, 5062306a36Sopenharmony_ci struct drm_modeset_acquire_ctx *ctx); 5162306a36Sopenharmony_cibool drm_crtc_helper_set_mode(struct drm_crtc *crtc, 5262306a36Sopenharmony_ci struct drm_display_mode *mode, 5362306a36Sopenharmony_ci int x, int y, 5462306a36Sopenharmony_ci struct drm_framebuffer *old_fb); 5562306a36Sopenharmony_ciint drm_crtc_helper_atomic_check(struct drm_crtc *crtc, 5662306a36Sopenharmony_ci struct drm_atomic_state *state); 5762306a36Sopenharmony_cibool drm_helper_crtc_in_use(struct drm_crtc *crtc); 5862306a36Sopenharmony_cibool drm_helper_encoder_in_use(struct drm_encoder *encoder); 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ciint drm_helper_connector_dpms(struct drm_connector *connector, int mode); 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_civoid drm_helper_resume_force_mode(struct drm_device *dev); 6362306a36Sopenharmony_ciint drm_helper_force_disable_all(struct drm_device *dev); 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ci#endif 66