Path: blob/master/drivers/gpu/drm/nouveau/nouveau_fb.h
15112 views
/*1* Copyright (C) 2008 Maarten Maathuis.2* All Rights Reserved.3*4* Permission is hereby granted, free of charge, to any person obtaining5* a copy of this software and associated documentation files (the6* "Software"), to deal in the Software without restriction, including7* without limitation the rights to use, copy, modify, merge, publish,8* distribute, sublicense, and/or sell copies of the Software, and to9* permit persons to whom the Software is furnished to do so, subject to10* the following conditions:11*12* The above copyright notice and this permission notice (including the13* next paragraph) shall be included in all copies or substantial14* portions of the Software.15*16* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,17* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF18* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.19* IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE20* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION21* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION22* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.23*24*/2526#ifndef __NOUVEAU_FB_H__27#define __NOUVEAU_FB_H__2829struct nouveau_framebuffer {30struct drm_framebuffer base;31struct nouveau_bo *nvbo;32u32 r_dma;33u32 r_format;34u32 r_pitch;35};3637static inline struct nouveau_framebuffer *38nouveau_framebuffer(struct drm_framebuffer *fb)39{40return container_of(fb, struct nouveau_framebuffer, base);41}4243extern const struct drm_mode_config_funcs nouveau_mode_config_funcs;4445int nouveau_framebuffer_init(struct drm_device *dev, struct nouveau_framebuffer *nouveau_fb,46struct drm_mode_fb_cmd *mode_cmd, struct nouveau_bo *nvbo);47#endif /* __NOUVEAU_FB_H__ */484950