1 1.3 riastrad /* $NetBSD: nouveau_fbcon.h,v 1.4 2021/12/18 23:45:32 riastradh Exp $ */ 2 1.3 riastrad 3 1.1 riastrad /* 4 1.1 riastrad * Copyright (C) 2008 Maarten Maathuis. 5 1.1 riastrad * All Rights Reserved. 6 1.1 riastrad * 7 1.1 riastrad * Permission is hereby granted, free of charge, to any person obtaining 8 1.1 riastrad * a copy of this software and associated documentation files (the 9 1.1 riastrad * "Software"), to deal in the Software without restriction, including 10 1.1 riastrad * without limitation the rights to use, copy, modify, merge, publish, 11 1.1 riastrad * distribute, sublicense, and/or sell copies of the Software, and to 12 1.1 riastrad * permit persons to whom the Software is furnished to do so, subject to 13 1.1 riastrad * the following conditions: 14 1.1 riastrad * 15 1.1 riastrad * The above copyright notice and this permission notice (including the 16 1.1 riastrad * next paragraph) shall be included in all copies or substantial 17 1.1 riastrad * portions of the Software. 18 1.1 riastrad * 19 1.1 riastrad * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 1.1 riastrad * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 1.1 riastrad * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 1.1 riastrad * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE 23 1.1 riastrad * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 1.1 riastrad * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 1.1 riastrad * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 1.1 riastrad * 27 1.1 riastrad */ 28 1.1 riastrad 29 1.1 riastrad #ifndef __NOUVEAU_FBCON_H__ 30 1.1 riastrad #define __NOUVEAU_FBCON_H__ 31 1.1 riastrad 32 1.1 riastrad #include <drm/drm_fb_helper.h> 33 1.1 riastrad 34 1.1 riastrad #include "nouveau_display.h" 35 1.1 riastrad 36 1.1 riastrad struct nouveau_fbdev { 37 1.4 riastrad struct drm_fb_helper helper; /* must be first */ 38 1.1 riastrad unsigned int saved_flags; 39 1.3 riastrad struct nvif_object surf2d; 40 1.3 riastrad struct nvif_object clip; 41 1.3 riastrad struct nvif_object rop; 42 1.3 riastrad struct nvif_object patt; 43 1.3 riastrad struct nvif_object gdi; 44 1.3 riastrad struct nvif_object blit; 45 1.3 riastrad struct nvif_object twod; 46 1.4 riastrad 47 1.4 riastrad struct mutex hotplug_lock; 48 1.4 riastrad bool hotplug_waiting; 49 1.1 riastrad }; 50 1.1 riastrad 51 1.1 riastrad void nouveau_fbcon_restore(void); 52 1.1 riastrad 53 1.2 riastrad #ifndef __NetBSD__ 54 1.1 riastrad int nv04_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); 55 1.1 riastrad int nv04_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); 56 1.1 riastrad int nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); 57 1.1 riastrad int nv04_fbcon_accel_init(struct fb_info *info); 58 1.1 riastrad 59 1.1 riastrad int nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); 60 1.1 riastrad int nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); 61 1.1 riastrad int nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); 62 1.1 riastrad int nv50_fbcon_accel_init(struct fb_info *info); 63 1.1 riastrad 64 1.1 riastrad int nvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect); 65 1.1 riastrad int nvc0_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region); 66 1.1 riastrad int nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image); 67 1.1 riastrad int nvc0_fbcon_accel_init(struct fb_info *info); 68 1.1 riastrad 69 1.1 riastrad void nouveau_fbcon_gpu_lockup(struct fb_info *info); 70 1.2 riastrad #endif 71 1.1 riastrad 72 1.1 riastrad int nouveau_fbcon_init(struct drm_device *dev); 73 1.1 riastrad void nouveau_fbcon_fini(struct drm_device *dev); 74 1.1 riastrad void nouveau_fbcon_set_suspend(struct drm_device *dev, int state); 75 1.3 riastrad void nouveau_fbcon_accel_save_disable(struct drm_device *dev); 76 1.3 riastrad void nouveau_fbcon_accel_restore(struct drm_device *dev); 77 1.1 riastrad 78 1.1 riastrad void nouveau_fbcon_output_poll_changed(struct drm_device *dev); 79 1.4 riastrad void nouveau_fbcon_hotplug_resume(struct nouveau_fbdev *fbcon); 80 1.3 riastrad extern int nouveau_nofbaccel; 81 1.3 riastrad 82 1.1 riastrad #endif /* __NV50_FBCON_H__ */ 83 1.1 riastrad 84