11.4Sriastrad/* $NetBSD: drm_crtc_helper.h,v 1.5 2021/12/18 23:45:45 riastradh Exp $ */ 21.4Sriastrad 31.1Sriastrad/* 41.1Sriastrad * Copyright © 2006 Keith Packard 51.1Sriastrad * Copyright © 2007-2008 Dave Airlie 61.1Sriastrad * Copyright © 2007-2008 Intel Corporation 71.1Sriastrad * Jesse Barnes <jesse.barnes@intel.com> 81.1Sriastrad * 91.1Sriastrad * Permission is hereby granted, free of charge, to any person obtaining a 101.1Sriastrad * copy of this software and associated documentation files (the "Software"), 111.1Sriastrad * to deal in the Software without restriction, including without limitation 121.1Sriastrad * the rights to use, copy, modify, merge, publish, distribute, sublicense, 131.1Sriastrad * and/or sell copies of the Software, and to permit persons to whom the 141.1Sriastrad * Software is furnished to do so, subject to the following conditions: 151.1Sriastrad * 161.1Sriastrad * The above copyright notice and this permission notice shall be included in 171.1Sriastrad * all copies or substantial portions of the Software. 181.1Sriastrad * 191.1Sriastrad * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 201.1Sriastrad * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 211.1Sriastrad * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 221.1Sriastrad * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 231.1Sriastrad * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 241.1Sriastrad * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 251.1Sriastrad * OTHER DEALINGS IN THE SOFTWARE. 261.1Sriastrad */ 271.1Sriastrad 281.1Sriastrad/* 291.1Sriastrad * The DRM mode setting helper functions are common code for drivers to use if 301.1Sriastrad * they wish. Drivers are not forced to use this code in their 311.1Sriastrad * implementations but it would be useful if they code they do use at least 321.1Sriastrad * provides a consistent interface and operation to userspace 331.1Sriastrad */ 341.1Sriastrad 351.1Sriastrad#ifndef __DRM_CRTC_HELPER_H__ 361.1Sriastrad#define __DRM_CRTC_HELPER_H__ 371.1Sriastrad 381.1Sriastrad#include <linux/spinlock.h> 391.1Sriastrad#include <linux/types.h> 401.1Sriastrad#include <linux/idr.h> 411.1Sriastrad 421.1Sriastrad#include <linux/fb.h> 431.1Sriastrad 441.4Sriastrad#include <drm/drm_crtc.h> 451.5Sriastrad#include <drm/drm_modeset_helper_vtables.h> 461.5Sriastrad#include <drm/drm_modeset_helper.h> 471.4Sriastrad 481.5Sriastradvoid drm_helper_disable_unused_functions(struct drm_device *dev); 491.5Sriastradint drm_crtc_helper_set_config(struct drm_mode_set *set, 501.5Sriastrad struct drm_modeset_acquire_ctx *ctx); 511.5Sriastradbool drm_crtc_helper_set_mode(struct drm_crtc *crtc, 521.5Sriastrad struct drm_display_mode *mode, 531.5Sriastrad int x, int y, 541.5Sriastrad struct drm_framebuffer *old_fb); 551.5Sriastradbool drm_helper_crtc_in_use(struct drm_crtc *crtc); 561.5Sriastradbool drm_helper_encoder_in_use(struct drm_encoder *encoder); 571.1Sriastrad 581.5Sriastradint drm_helper_connector_dpms(struct drm_connector *connector, int mode); 591.1Sriastrad 601.5Sriastradvoid drm_helper_resume_force_mode(struct drm_device *dev); 611.5Sriastradint drm_helper_force_disable_all(struct drm_device *dev); 621.1Sriastrad 631.1Sriastrad#endif 64