1785b93efSDave Airlie /* 2785b93efSDave Airlie * Copyright (c) 2006-2009 Red Hat Inc. 3785b93efSDave Airlie * Copyright (c) 2006-2008 Intel Corporation 4785b93efSDave Airlie * Copyright (c) 2007 Dave Airlie <airlied@linux.ie> 5785b93efSDave Airlie * 6785b93efSDave Airlie * DRM framebuffer helper functions 7785b93efSDave Airlie * 8785b93efSDave Airlie * Permission to use, copy, modify, distribute, and sell this software and its 9785b93efSDave Airlie * documentation for any purpose is hereby granted without fee, provided that 10785b93efSDave Airlie * the above copyright notice appear in all copies and that both that copyright 11785b93efSDave Airlie * notice and this permission notice appear in supporting documentation, and 12785b93efSDave Airlie * that the name of the copyright holders not be used in advertising or 13785b93efSDave Airlie * publicity pertaining to distribution of the software without specific, 14785b93efSDave Airlie * written prior permission. The copyright holders make no representations 15785b93efSDave Airlie * about the suitability of this software for any purpose. It is provided "as 16785b93efSDave Airlie * is" without express or implied warranty. 17785b93efSDave Airlie * 18785b93efSDave Airlie * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 19785b93efSDave Airlie * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 20785b93efSDave Airlie * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 21785b93efSDave Airlie * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 22785b93efSDave Airlie * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 23785b93efSDave Airlie * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 24785b93efSDave Airlie * OF THIS SOFTWARE. 25785b93efSDave Airlie * 26785b93efSDave Airlie * Authors: 27785b93efSDave Airlie * Dave Airlie <airlied@linux.ie> 28785b93efSDave Airlie * Jesse Barnes <jesse.barnes@intel.com> 29785b93efSDave Airlie */ 30785b93efSDave Airlie #ifndef DRM_FB_HELPER_H 31785b93efSDave Airlie #define DRM_FB_HELPER_H 32785b93efSDave Airlie 334abe3520SDave Airlie struct drm_fb_helper; 344abe3520SDave Airlie 351a7aba7fSJesse Barnes #include <linux/kgdb.h> 361a7aba7fSJesse Barnes 37b0ee9e7fSDave Airlie struct drm_fb_offset { 38b0ee9e7fSDave Airlie int x, y; 39b0ee9e7fSDave Airlie }; 40b0ee9e7fSDave Airlie 41785b93efSDave Airlie struct drm_fb_helper_crtc { 42785b93efSDave Airlie struct drm_mode_set mode_set; 438be48d92SDave Airlie struct drm_display_mode *desired_mode; 44b0ee9e7fSDave Airlie int x, y; 45785b93efSDave Airlie }; 46785b93efSDave Airlie 47b7b5ee59SRob Clark /** 48b7b5ee59SRob Clark * struct drm_fb_helper_surface_size - describes fbdev size and scanout surface size 49b7b5ee59SRob Clark * @fb_width: fbdev width 50b7b5ee59SRob Clark * @fb_height: fbdev height 51b7b5ee59SRob Clark * @surface_width: scanout buffer width 52b7b5ee59SRob Clark * @surface_height: scanout buffer height 53b7b5ee59SRob Clark * @surface_bpp: scanout buffer bpp 54b7b5ee59SRob Clark * @surface_depth: scanout buffer depth 55b7b5ee59SRob Clark * 56b7b5ee59SRob Clark * Note that the scanout surface width/height may be larger than the fbdev 57b7b5ee59SRob Clark * width/height. In case of multiple displays, the scanout surface is sized 58b7b5ee59SRob Clark * according to the largest width/height (so it is large enough for all CRTCs 59b7b5ee59SRob Clark * to scanout). But the fbdev width/height is sized to the minimum width/ 60b7b5ee59SRob Clark * height of all the displays. This ensures that fbcon fits on the smallest 61b7b5ee59SRob Clark * of the attached displays. 62b7b5ee59SRob Clark * 63b7b5ee59SRob Clark * So what is passed to drm_fb_helper_fill_var() should be fb_width/fb_height, 64b7b5ee59SRob Clark * rather than the surface size. 65b7b5ee59SRob Clark */ 6638651674SDave Airlie struct drm_fb_helper_surface_size { 6738651674SDave Airlie u32 fb_width; 6838651674SDave Airlie u32 fb_height; 6938651674SDave Airlie u32 surface_width; 7038651674SDave Airlie u32 surface_height; 7138651674SDave Airlie u32 surface_bpp; 7238651674SDave Airlie u32 surface_depth; 7338651674SDave Airlie }; 7438651674SDave Airlie 75207fd329SDaniel Vetter /** 76207fd329SDaniel Vetter * struct drm_fb_helper_funcs - driver callbacks for the fbdev emulation library 777b97936fSVille Syrjälä * @gamma_set: Set the given gamma lut register on the given crtc. 787b97936fSVille Syrjälä * @gamma_get: Read the given gamma lut register on the given crtc, used to 79207fd329SDaniel Vetter * save the current lut when force-restoring the fbdev for e.g. 80207fd329SDaniel Vetter * kdbg. 817b97936fSVille Syrjälä * @fb_probe: Driver callback to allocate and initialize the fbdev info 82e227867fSMasanari Iida * structure. Furthermore it also needs to allocate the drm 83207fd329SDaniel Vetter * framebuffer used to back the fbdev. 847b97936fSVille Syrjälä * @initial_config: Setup an initial fbdev display configuration 85207fd329SDaniel Vetter * 86207fd329SDaniel Vetter * Driver callbacks used by the fbdev emulation helper library. 87207fd329SDaniel Vetter */ 884abe3520SDave Airlie struct drm_fb_helper_funcs { 894abe3520SDave Airlie void (*gamma_set)(struct drm_crtc *crtc, u16 red, u16 green, 904abe3520SDave Airlie u16 blue, int regno); 914abe3520SDave Airlie void (*gamma_get)(struct drm_crtc *crtc, u16 *red, u16 *green, 924abe3520SDave Airlie u16 *blue, int regno); 934abe3520SDave Airlie 944abe3520SDave Airlie int (*fb_probe)(struct drm_fb_helper *helper, 954abe3520SDave Airlie struct drm_fb_helper_surface_size *sizes); 9611e17a08SJesse Barnes bool (*initial_config)(struct drm_fb_helper *fb_helper, 9711e17a08SJesse Barnes struct drm_fb_helper_crtc **crtcs, 9811e17a08SJesse Barnes struct drm_display_mode **modes, 99b0ee9e7fSDave Airlie struct drm_fb_offset *offsets, 10011e17a08SJesse Barnes bool *enabled, int width, int height); 1014abe3520SDave Airlie }; 1024abe3520SDave Airlie 103d50ba256SDave Airlie struct drm_fb_helper_connector { 1040b4c0f3fSDave Airlie struct drm_connector *connector; 105d50ba256SDave Airlie }; 106d50ba256SDave Airlie 1079685cd9dSRob Clark /** 1089685cd9dSRob Clark * struct drm_fb_helper - helper to emulate fbdev on top of kms 1099685cd9dSRob Clark * @fb: Scanout framebuffer object 1109685cd9dSRob Clark * @dev: DRM device 1119685cd9dSRob Clark * @crtc_count: number of possible CRTCs 1129685cd9dSRob Clark * @crtc_info: per-CRTC helper state (mode, x/y offset, etc) 1139685cd9dSRob Clark * @connector_count: number of connected connectors 1149685cd9dSRob Clark * @connector_info_alloc_count: size of connector_info 1159685cd9dSRob Clark * @funcs: driver callbacks for fb helper 1169685cd9dSRob Clark * @fbdev: emulated fbdev device info struct 1179685cd9dSRob Clark * @pseudo_palette: fake palette of 16 colors 1189685cd9dSRob Clark * @kernel_fb_list: list_head in kernel_fb_helper_list 1199685cd9dSRob Clark * @delayed_hotplug: was there a hotplug while kms master active? 1209685cd9dSRob Clark */ 121785b93efSDave Airlie struct drm_fb_helper { 122785b93efSDave Airlie struct drm_framebuffer *fb; 123785b93efSDave Airlie struct drm_device *dev; 124785b93efSDave Airlie int crtc_count; 125785b93efSDave Airlie struct drm_fb_helper_crtc *crtc_info; 1260b4c0f3fSDave Airlie int connector_count; 12765c2a89cSDave Airlie int connector_info_alloc_count; 1280b4c0f3fSDave Airlie struct drm_fb_helper_connector **connector_info; 1293a493879SThierry Reding const struct drm_fb_helper_funcs *funcs; 13038651674SDave Airlie struct fb_info *fbdev; 13138651674SDave Airlie u32 pseudo_palette[17]; 132785b93efSDave Airlie struct list_head kernel_fb_list; 1338be48d92SDave Airlie 1344abe3520SDave Airlie /* we got a hotplug but fbdev wasn't running the console 1354abe3520SDave Airlie delay until next set_par */ 1364abe3520SDave Airlie bool delayed_hotplug; 137bbb1e524SRob Clark 138bbb1e524SRob Clark /** 139bbb1e524SRob Clark * @atomic: 140bbb1e524SRob Clark * 141bbb1e524SRob Clark * Use atomic updates for restore_fbdev_mode(), etc. This defaults to 142bbb1e524SRob Clark * true if driver has DRIVER_ATOMIC feature flag, but drivers can 143bbb1e524SRob Clark * override it to true after drm_fb_helper_init() if they support atomic 144bbb1e524SRob Clark * modeset but do not yet advertise DRIVER_ATOMIC (note that fb-helper 145bbb1e524SRob Clark * does not require ASYNC commits). 146bbb1e524SRob Clark */ 147bbb1e524SRob Clark bool atomic; 148785b93efSDave Airlie }; 149785b93efSDave Airlie 150a03fdcb1SArchit Taneja #ifdef CONFIG_DRM_FBDEV_EMULATION 15110a23102SThierry Reding void drm_fb_helper_prepare(struct drm_device *dev, struct drm_fb_helper *helper, 15210a23102SThierry Reding const struct drm_fb_helper_funcs *funcs); 1534abe3520SDave Airlie int drm_fb_helper_init(struct drm_device *dev, 1548be48d92SDave Airlie struct drm_fb_helper *helper, int crtc_count, 155eb1f8e4fSDave Airlie int max_conn); 1564abe3520SDave Airlie void drm_fb_helper_fini(struct drm_fb_helper *helper); 157785b93efSDave Airlie int drm_fb_helper_blank(int blank, struct fb_info *info); 158785b93efSDave Airlie int drm_fb_helper_pan_display(struct fb_var_screeninfo *var, 159785b93efSDave Airlie struct fb_info *info); 160785b93efSDave Airlie int drm_fb_helper_set_par(struct fb_info *info); 161785b93efSDave Airlie int drm_fb_helper_check_var(struct fb_var_screeninfo *var, 162785b93efSDave Airlie struct fb_info *info); 163785b93efSDave Airlie 164b7bdf0a8SDaniel Vetter int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper); 165b8017d6cSArchit Taneja 166b8017d6cSArchit Taneja struct fb_info *drm_fb_helper_alloc_fbi(struct drm_fb_helper *fb_helper); 167b8017d6cSArchit Taneja void drm_fb_helper_unregister_fbi(struct drm_fb_helper *fb_helper); 168b8017d6cSArchit Taneja void drm_fb_helper_release_fbi(struct drm_fb_helper *fb_helper); 16938651674SDave Airlie void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper, 170785b93efSDave Airlie uint32_t fb_width, uint32_t fb_height); 1713632ef89SDave Airlie void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch, 1723632ef89SDave Airlie uint32_t depth); 1733632ef89SDave Airlie 17447074ab7SArchit Taneja void drm_fb_helper_unlink_fbi(struct drm_fb_helper *fb_helper); 17547074ab7SArchit Taneja 176cbb1a82eSArchit Taneja ssize_t drm_fb_helper_sys_read(struct fb_info *info, char __user *buf, 177cbb1a82eSArchit Taneja size_t count, loff_t *ppos); 178cbb1a82eSArchit Taneja ssize_t drm_fb_helper_sys_write(struct fb_info *info, const char __user *buf, 179cbb1a82eSArchit Taneja size_t count, loff_t *ppos); 180cbb1a82eSArchit Taneja 181742547b7SArchit Taneja void drm_fb_helper_sys_fillrect(struct fb_info *info, 182742547b7SArchit Taneja const struct fb_fillrect *rect); 183742547b7SArchit Taneja void drm_fb_helper_sys_copyarea(struct fb_info *info, 184742547b7SArchit Taneja const struct fb_copyarea *area); 185742547b7SArchit Taneja void drm_fb_helper_sys_imageblit(struct fb_info *info, 186742547b7SArchit Taneja const struct fb_image *image); 187742547b7SArchit Taneja 188742547b7SArchit Taneja void drm_fb_helper_cfb_fillrect(struct fb_info *info, 189742547b7SArchit Taneja const struct fb_fillrect *rect); 190742547b7SArchit Taneja void drm_fb_helper_cfb_copyarea(struct fb_info *info, 191742547b7SArchit Taneja const struct fb_copyarea *area); 192742547b7SArchit Taneja void drm_fb_helper_cfb_imageblit(struct fb_info *info, 193742547b7SArchit Taneja const struct fb_image *image); 194742547b7SArchit Taneja 195fdefa58aSArchit Taneja void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state); 196fdefa58aSArchit Taneja 197068143d3SDave Airlie int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info); 198d50ba256SDave Airlie 1997394371dSChris Wilson int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper); 20001934c2aSThierry Reding int drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel); 2010b4c0f3fSDave Airlie int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper); 2021a7aba7fSJesse Barnes int drm_fb_helper_debug_enter(struct fb_info *info); 2031a7aba7fSJesse Barnes int drm_fb_helper_debug_leave(struct fb_info *info); 2042f1046f3SJesse Barnes struct drm_display_mode * 2052f1046f3SJesse Barnes drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector, 2062f1046f3SJesse Barnes int width, int height); 2072f1046f3SJesse Barnes struct drm_display_mode * 2082f1046f3SJesse Barnes drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn, 2092f1046f3SJesse Barnes int width, int height); 2108be48d92SDave Airlie 21165c2a89cSDave Airlie int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_connector *connector); 21265c2a89cSDave Airlie int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper, 21365c2a89cSDave Airlie struct drm_connector *connector); 214a03fdcb1SArchit Taneja #else 215a03fdcb1SArchit Taneja static inline void drm_fb_helper_prepare(struct drm_device *dev, 216a03fdcb1SArchit Taneja struct drm_fb_helper *helper, 217a03fdcb1SArchit Taneja const struct drm_fb_helper_funcs *funcs) 218a03fdcb1SArchit Taneja { 219a03fdcb1SArchit Taneja } 220a03fdcb1SArchit Taneja 221a03fdcb1SArchit Taneja static inline int drm_fb_helper_init(struct drm_device *dev, 222a03fdcb1SArchit Taneja struct drm_fb_helper *helper, int crtc_count, 223a03fdcb1SArchit Taneja int max_conn) 224a03fdcb1SArchit Taneja { 225a03fdcb1SArchit Taneja return 0; 226a03fdcb1SArchit Taneja } 227a03fdcb1SArchit Taneja 228a03fdcb1SArchit Taneja static inline void drm_fb_helper_fini(struct drm_fb_helper *helper) 229a03fdcb1SArchit Taneja { 230a03fdcb1SArchit Taneja } 231a03fdcb1SArchit Taneja 232a03fdcb1SArchit Taneja static inline int drm_fb_helper_blank(int blank, struct fb_info *info) 233a03fdcb1SArchit Taneja { 234a03fdcb1SArchit Taneja return 0; 235a03fdcb1SArchit Taneja } 236a03fdcb1SArchit Taneja 237a03fdcb1SArchit Taneja static inline int drm_fb_helper_pan_display(struct fb_var_screeninfo *var, 238a03fdcb1SArchit Taneja struct fb_info *info) 239a03fdcb1SArchit Taneja { 240a03fdcb1SArchit Taneja return 0; 241a03fdcb1SArchit Taneja } 242a03fdcb1SArchit Taneja 243a03fdcb1SArchit Taneja static inline int drm_fb_helper_set_par(struct fb_info *info) 244a03fdcb1SArchit Taneja { 245a03fdcb1SArchit Taneja return 0; 246a03fdcb1SArchit Taneja } 247a03fdcb1SArchit Taneja 248a03fdcb1SArchit Taneja static inline int drm_fb_helper_check_var(struct fb_var_screeninfo *var, 249a03fdcb1SArchit Taneja struct fb_info *info) 250a03fdcb1SArchit Taneja { 251a03fdcb1SArchit Taneja return 0; 252a03fdcb1SArchit Taneja } 253a03fdcb1SArchit Taneja 254b7bdf0a8SDaniel Vetter static inline int 255a03fdcb1SArchit Taneja drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper) 256a03fdcb1SArchit Taneja { 257b7bdf0a8SDaniel Vetter return 0; 258a03fdcb1SArchit Taneja } 259a03fdcb1SArchit Taneja 260a03fdcb1SArchit Taneja static inline struct fb_info * 261a03fdcb1SArchit Taneja drm_fb_helper_alloc_fbi(struct drm_fb_helper *fb_helper) 262a03fdcb1SArchit Taneja { 263a03fdcb1SArchit Taneja return NULL; 264a03fdcb1SArchit Taneja } 265a03fdcb1SArchit Taneja 266a03fdcb1SArchit Taneja static inline void drm_fb_helper_unregister_fbi(struct drm_fb_helper *fb_helper) 267a03fdcb1SArchit Taneja { 268a03fdcb1SArchit Taneja } 269a03fdcb1SArchit Taneja static inline void drm_fb_helper_release_fbi(struct drm_fb_helper *fb_helper) 270a03fdcb1SArchit Taneja { 271a03fdcb1SArchit Taneja } 272a03fdcb1SArchit Taneja 273a03fdcb1SArchit Taneja static inline void drm_fb_helper_fill_var(struct fb_info *info, 274a03fdcb1SArchit Taneja struct drm_fb_helper *fb_helper, 275a03fdcb1SArchit Taneja uint32_t fb_width, uint32_t fb_height) 276a03fdcb1SArchit Taneja { 277a03fdcb1SArchit Taneja } 278a03fdcb1SArchit Taneja 279a03fdcb1SArchit Taneja static inline void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch, 280a03fdcb1SArchit Taneja uint32_t depth) 281a03fdcb1SArchit Taneja { 282a03fdcb1SArchit Taneja } 283a03fdcb1SArchit Taneja 284a03fdcb1SArchit Taneja static inline int drm_fb_helper_setcmap(struct fb_cmap *cmap, 285a03fdcb1SArchit Taneja struct fb_info *info) 286a03fdcb1SArchit Taneja { 287a03fdcb1SArchit Taneja return 0; 288a03fdcb1SArchit Taneja } 289a03fdcb1SArchit Taneja 290a03fdcb1SArchit Taneja static inline void drm_fb_helper_unlink_fbi(struct drm_fb_helper *fb_helper) 291a03fdcb1SArchit Taneja { 292a03fdcb1SArchit Taneja } 293a03fdcb1SArchit Taneja 294a03fdcb1SArchit Taneja static inline ssize_t drm_fb_helper_sys_read(struct fb_info *info, 295a03fdcb1SArchit Taneja char __user *buf, size_t count, 296a03fdcb1SArchit Taneja loff_t *ppos) 297a03fdcb1SArchit Taneja { 298a03fdcb1SArchit Taneja return -ENODEV; 299a03fdcb1SArchit Taneja } 300a03fdcb1SArchit Taneja 301a03fdcb1SArchit Taneja static inline ssize_t drm_fb_helper_sys_write(struct fb_info *info, 302a03fdcb1SArchit Taneja const char __user *buf, 303a03fdcb1SArchit Taneja size_t count, loff_t *ppos) 304a03fdcb1SArchit Taneja { 305a03fdcb1SArchit Taneja return -ENODEV; 306a03fdcb1SArchit Taneja } 307a03fdcb1SArchit Taneja 308a03fdcb1SArchit Taneja static inline void drm_fb_helper_sys_fillrect(struct fb_info *info, 309a03fdcb1SArchit Taneja const struct fb_fillrect *rect) 310a03fdcb1SArchit Taneja { 311a03fdcb1SArchit Taneja } 312a03fdcb1SArchit Taneja 313a03fdcb1SArchit Taneja static inline void drm_fb_helper_sys_copyarea(struct fb_info *info, 314a03fdcb1SArchit Taneja const struct fb_copyarea *area) 315a03fdcb1SArchit Taneja { 316a03fdcb1SArchit Taneja } 317a03fdcb1SArchit Taneja 318a03fdcb1SArchit Taneja static inline void drm_fb_helper_sys_imageblit(struct fb_info *info, 319a03fdcb1SArchit Taneja const struct fb_image *image) 320a03fdcb1SArchit Taneja { 321a03fdcb1SArchit Taneja } 322a03fdcb1SArchit Taneja 323a03fdcb1SArchit Taneja static inline void drm_fb_helper_cfb_fillrect(struct fb_info *info, 324a03fdcb1SArchit Taneja const struct fb_fillrect *rect) 325a03fdcb1SArchit Taneja { 326a03fdcb1SArchit Taneja } 327a03fdcb1SArchit Taneja 328a03fdcb1SArchit Taneja static inline void drm_fb_helper_cfb_copyarea(struct fb_info *info, 329a03fdcb1SArchit Taneja const struct fb_copyarea *area) 330a03fdcb1SArchit Taneja { 331a03fdcb1SArchit Taneja } 332a03fdcb1SArchit Taneja 333a03fdcb1SArchit Taneja static inline void drm_fb_helper_cfb_imageblit(struct fb_info *info, 334a03fdcb1SArchit Taneja const struct fb_image *image) 335a03fdcb1SArchit Taneja { 336a03fdcb1SArchit Taneja } 337a03fdcb1SArchit Taneja 338a03fdcb1SArchit Taneja static inline void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, 339a03fdcb1SArchit Taneja int state) 340a03fdcb1SArchit Taneja { 341a03fdcb1SArchit Taneja } 342a03fdcb1SArchit Taneja 343a03fdcb1SArchit Taneja static inline int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper) 344a03fdcb1SArchit Taneja { 345a03fdcb1SArchit Taneja return 0; 346a03fdcb1SArchit Taneja } 347a03fdcb1SArchit Taneja 348a03fdcb1SArchit Taneja static inline int drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, 349a03fdcb1SArchit Taneja int bpp_sel) 350a03fdcb1SArchit Taneja { 351a03fdcb1SArchit Taneja return 0; 352a03fdcb1SArchit Taneja } 353a03fdcb1SArchit Taneja 354a03fdcb1SArchit Taneja static inline int 355a03fdcb1SArchit Taneja drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper) 356a03fdcb1SArchit Taneja { 357a03fdcb1SArchit Taneja return 0; 358a03fdcb1SArchit Taneja } 359a03fdcb1SArchit Taneja 360a03fdcb1SArchit Taneja static inline int drm_fb_helper_debug_enter(struct fb_info *info) 361a03fdcb1SArchit Taneja { 362a03fdcb1SArchit Taneja return 0; 363a03fdcb1SArchit Taneja } 364a03fdcb1SArchit Taneja 365a03fdcb1SArchit Taneja static inline int drm_fb_helper_debug_leave(struct fb_info *info) 366a03fdcb1SArchit Taneja { 367a03fdcb1SArchit Taneja return 0; 368a03fdcb1SArchit Taneja } 369a03fdcb1SArchit Taneja 370a03fdcb1SArchit Taneja static inline struct drm_display_mode * 371a03fdcb1SArchit Taneja drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector, 372a03fdcb1SArchit Taneja int width, int height) 373a03fdcb1SArchit Taneja { 374a03fdcb1SArchit Taneja return NULL; 375a03fdcb1SArchit Taneja } 376a03fdcb1SArchit Taneja 377a03fdcb1SArchit Taneja static inline struct drm_display_mode * 378a03fdcb1SArchit Taneja drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn, 379a03fdcb1SArchit Taneja int width, int height) 380a03fdcb1SArchit Taneja { 381a03fdcb1SArchit Taneja return NULL; 382a03fdcb1SArchit Taneja } 383a03fdcb1SArchit Taneja 384a03fdcb1SArchit Taneja static inline int 385a03fdcb1SArchit Taneja drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, 386a03fdcb1SArchit Taneja struct drm_connector *connector) 387a03fdcb1SArchit Taneja { 388a03fdcb1SArchit Taneja return 0; 389a03fdcb1SArchit Taneja } 390a03fdcb1SArchit Taneja 391a03fdcb1SArchit Taneja static inline int 392a03fdcb1SArchit Taneja drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper, 393a03fdcb1SArchit Taneja struct drm_connector *connector) 394a03fdcb1SArchit Taneja { 395a03fdcb1SArchit Taneja return 0; 396a03fdcb1SArchit Taneja } 397a03fdcb1SArchit Taneja #endif 398785b93efSDave Airlie #endif 399