Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (C) 2008 Maarten Maathuis.
0003  * All Rights Reserved.
0004  *
0005  * Permission is hereby granted, free of charge, to any person obtaining
0006  * a copy of this software and associated documentation files (the
0007  * "Software"), to deal in the Software without restriction, including
0008  * without limitation the rights to use, copy, modify, merge, publish,
0009  * distribute, sublicense, and/or sell copies of the Software, and to
0010  * permit persons to whom the Software is furnished to do so, subject to
0011  * the following conditions:
0012  *
0013  * The above copyright notice and this permission notice (including the
0014  * next paragraph) shall be included in all copies or substantial
0015  * portions of the Software.
0016  *
0017  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0018  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
0019  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
0020  * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
0021  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
0022  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
0023  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0024  *
0025  */
0026 
0027 #ifndef __NOUVEAU_FBCON_H__
0028 #define __NOUVEAU_FBCON_H__
0029 
0030 #include <drm/drm_fb_helper.h>
0031 
0032 #include "nouveau_display.h"
0033 
0034 struct nouveau_vma;
0035 
0036 struct nouveau_fbdev {
0037     struct drm_fb_helper helper; /* must be first */
0038     unsigned int saved_flags;
0039     struct nvif_object surf2d;
0040     struct nvif_object clip;
0041     struct nvif_object rop;
0042     struct nvif_object patt;
0043     struct nvif_object gdi;
0044     struct nvif_object blit;
0045     struct nvif_object twod;
0046     struct nouveau_vma *vma;
0047 
0048     struct mutex hotplug_lock;
0049     bool hotplug_waiting;
0050 };
0051 
0052 void nouveau_fbcon_restore(void);
0053 
0054 int nv04_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region);
0055 int nv04_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
0056 int nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image);
0057 int nv04_fbcon_accel_init(struct fb_info *info);
0058 
0059 int nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
0060 int nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region);
0061 int nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image);
0062 int nv50_fbcon_accel_init(struct fb_info *info);
0063 
0064 int nvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect);
0065 int nvc0_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region);
0066 int nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image);
0067 int nvc0_fbcon_accel_init(struct fb_info *info);
0068 
0069 void nouveau_fbcon_gpu_lockup(struct fb_info *info);
0070 
0071 int nouveau_fbcon_init(struct drm_device *dev);
0072 void nouveau_fbcon_fini(struct drm_device *dev);
0073 void nouveau_fbcon_set_suspend(struct drm_device *dev, int state);
0074 void nouveau_fbcon_accel_save_disable(struct drm_device *dev);
0075 void nouveau_fbcon_accel_restore(struct drm_device *dev);
0076 
0077 void nouveau_fbcon_output_poll_changed(struct drm_device *dev);
0078 void nouveau_fbcon_hotplug_resume(struct nouveau_fbdev *fbcon);
0079 extern int nouveau_nofbaccel;
0080 
0081 #endif /* __NV50_FBCON_H__ */
0082