VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/drm/vboxvideo_mode.h@ 48242

Last change on this file since 48242 was 47480, checked in by vboxsync, 12 years ago

Additions/linux/drm: synchronising local tree with repository, currently not buildable.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/** @file $Id: vboxvideo_mode.h 47480 2013-07-30 18:47:16Z vboxsync $
2 *
3 * VirtualBox Additions Linux kernel video driver
4 */
5
6/*
7 * Copyright (C) 2011 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 * --------------------------------------------------------------------
17 *
18 * This code is based on
19 * glint_mode.h
20 * with the following copyright and permission notice:
21 *
22 * Copyright 2010 Matt Turner.
23 *
24 * Permission is hereby granted, free of charge, to any person obtaining a
25 * copy of this software and associated documentation files (the "Software"),
26 * to deal in the Software without restriction, including without limitation
27 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
28 * and/or sell copies of the Software, and to permit persons to whom the
29 * Software is furnished to do so, subject to the following conditions:
30 *
31 * The above copyright notice and this permission notice shall be included in
32 * all copies or substantial portions of the Software.
33 *
34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
37 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
38 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
39 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
41 *
42 * Authors: Matt Turner
43 */
44
45#ifndef __DRM_VBOXVIDEO_MODE_H__
46#define __DRM_VBOXVIDEO_MODE_H__
47
48#include <VBox/Hardware/VBoxVideoVBE.h>
49#include "drm/drmP.h"
50#include <linux/version.h>
51
52#define VBOXVIDEO_MAX_FB_HEIGHT VBE_DISPI_MAX_YRES
53#define VBOXVIDEO_MAX_FB_WIDTH VBE_DISPI_MAX_XRES
54
55#define to_vboxvideo_crtc(x) container_of(x, struct vboxvideo_crtc, base)
56#define to_vboxvideo_encoder(x) container_of(x, struct vboxvideo_encoder, base)
57#define to_vboxvideo_framebuffer(x) container_of(x, struct vboxvideo_framebuffer, base)
58
59#define VBOXVIDEO_DPMS_CLEARED (-1)
60
61#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
62# define DRM_MODE_FB_CMD drm_mode_fb_cmd
63#else
64# define DRM_MODE_FB_CMD drm_mode_fb_cmd2
65#endif
66
67struct vboxvideo_crtc
68{
69 struct drm_crtc base;
70 int crtc_id;
71 size_t offCommandBuffer;
72 struct VBVABUFFERCONTEXT VbvaCtx;
73 int last_dpms;
74 int last_hdisplay;
75 int last_vdisplay;
76 int last_x;
77 int last_y;
78 bool enabled;
79};
80
81struct vboxvideo_mode_info
82{
83 bool mode_config_initialized;
84 struct vboxvideo_crtc *crtcs[VBOX_VIDEO_MAX_SCREENS];
85 /* pointer to fbdev info structure */
86 struct vboxvideo_fbdev *gfbdev;
87};
88
89struct vboxvideo_encoder
90{
91 struct drm_encoder base;
92 int last_dpms;
93};
94
95struct vboxvideo_connector {
96 struct drm_connector base;
97};
98
99struct vboxvideo_framebuffer {
100 struct drm_framebuffer base;
101};
102
103#endif /* __DRM_VBOXVIDEO_H__ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette