~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to .pc/linaro-patches/0047-dsi-add-transfer-done-callback.patch/include/hw/dsi.h

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * MIPI DSI interface.
 
3
 *
 
4
 * Copyright (C) 2008-2010 Nokia Corporation
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU General Public License as
 
8
 * published by the Free Software Foundation; either version 2 or
 
9
 * (at your option) any later version of the License.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License along
 
17
 * with this program; if not, write to the Free Software Foundation, Inc.,
 
18
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
19
 */
 
20
#ifndef HW_DSI_H__
 
21
#define HW_DSI_H__
 
22
#include "qdev.h"
 
23
#include "hw/display/framebuffer.h"
 
24
 
 
25
#define DSI_MAKERETURNBYTE(b) ((((b) & 0xff) << 8) | 0x21)
 
26
#define DSI_MAKERETURNWORD(w) ((((w) & 0xffff) << 8) | 0x22)
 
27
#define DSI_MAKERETURNERROR(e) ((((e) & 0xffff) << 8) | 0x02)
 
28
 
 
29
typedef struct DSIDevice DSIDevice;
 
30
typedef struct DSICommonDevice DSICommonDevice;
 
31
typedef struct DSIHost DSIHost;
 
32
 
 
33
#define TYPE_DSI_DEVICE "dsi-device"
 
34
#define DSI_DEVICE(obj) \
 
35
    OBJECT_CHECK(DSIDevice, (obj), TYPE_DSI_DEVICE)
 
36
#define DSI_DEVICE_CLASS(klass) \
 
37
    OBJECT_CLASS_CHECK(DSIDeviceClass, (klass), TYPE_DSI_DEVICE)
 
38
#define DSI_DEVICE_GET_CLASS(obj) \
 
39
    OBJECT_GET_CLASS(DSIDeviceClass, (obj), TYPE_DSI_DEVICE)
 
40
 
 
41
#define TYPE_DSI_COMMON_DEVICE "dsi-common-device"
 
42
#define DSI_COMMON_DEVICE(obj) \
 
43
    OBJECT_CHECK(DSICommonDevice, (obj), TYPE_DSI_COMMON_DEVICE)
 
44
#define DSI_COMMON_DEVICE_CLASS(klass) \
 
45
    OBJECT_CLASS_CHECK(DSICommonDeviceClass, (klass), TYPE_DSI_COMMON_DEVICE)
 
46
#define DSI_COMMON_DEVICE_GET_CLASS(obj) \
 
47
    OBJECT_GET_CLASS(DSICommonDeviceClass, (obj), TYPE_DSI_COMMON_DEVICE)
 
48
 
 
49
 
 
50
 
 
51
/* device callbacks */
 
52
typedef int (*dsi_device_initfn)(DSIDevice *dev);
 
53
typedef void (*dsi_write_cb)(DSIDevice *dev, uint32_t data, int len);
 
54
typedef uint32_t (*dsi_read_cb)(DSIDevice *dev, uint32_t data, int len);
 
55
typedef int (*dsi_blt_cb)(DSIDevice *dev, void *data, int width, int height,
 
56
                          int col_pitch, int row_pitch, int format);
 
57
 
 
58
/* common device callbacks */
 
59
typedef void (*dsi_common_write_cb)(DSICommonDevice *dev, uint32_t data,
 
60
                                    int len);
 
61
typedef uint32_t (*dsi_common_read_cb)(DSICommonDevice *dev, uint32_t data,
 
62
                                       int len);
 
63
typedef void (*dsi_common_device_resetfn)(DSICommonDevice *dev);
 
64
typedef void (*dsi_powermode_changed_cb)(DSICommonDevice *dev);
 
65
typedef void (*dsi_temode_changed_cb)(DSICommonDevice *dev);
 
66
 
 
67
/* host callbacks */
 
68
typedef void (*dsi_te_trigger_cb)(DeviceState *dev, int vc);
 
69
typedef drawfn (*dsi_get_drawfn_cb)(const DeviceState *dev, int format,
 
70
                                    int bpp);
 
71
 
 
72
typedef struct {
 
73
    DeviceClass parent_class;
 
74
    dsi_device_initfn init;
 
75
    dsi_write_cb write;
 
76
    dsi_read_cb read;
 
77
    dsi_blt_cb blt;
 
78
} DSIDeviceClass;
 
79
 
 
80
typedef struct {
 
81
    DSIDeviceClass parent_class;
 
82
    dsi_common_write_cb write;
 
83
    dsi_common_read_cb read;
 
84
    dsi_common_device_resetfn reset;
 
85
    dsi_powermode_changed_cb powermode_changed;
 
86
    dsi_temode_changed_cb temode_changed;
 
87
} DSICommonDeviceClass;
 
88
 
 
89
struct DSIDevice {
 
90
    DeviceState qdev;
 
91
 
 
92
    /* internal fields used by DSI code */
 
93
    DSIHost *host;
 
94
    uint8_t vchannel;
 
95
    uint16_t max_return_size;
 
96
};
 
97
 
 
98
struct DSICommonDevice {
 
99
    DSIDevice dsi;
 
100
    enum { bs_cmd, bs_data } bs;
 
101
    uint8_t cmd;
 
102
    uint8_t powermode;
 
103
    uint8_t addrmode;
 
104
    uint8_t bpp_dpi;
 
105
    uint8_t bpp_dbi;
 
106
    uint8_t dr;
 
107
    uint32_t sc;
 
108
    uint32_t ec;
 
109
    uint32_t cc;
 
110
    uint32_t sp;
 
111
    uint32_t ep;
 
112
    uint32_t cp;
 
113
    enum {
 
114
        te_off = -1,
 
115
        te_vsync = 0,
 
116
        te_hvsync = 1
 
117
    } te_mode;
 
118
};
 
119
 
 
120
/* host functions */
 
121
DSIHost *dsi_init_host(DeviceState *parent, const char *name,
 
122
                       dsi_te_trigger_cb te_trigger_cb,
 
123
                       dsi_get_drawfn_cb get_drawfn_cb);
 
124
uint32_t dsi_short_write(DSIHost *host, uint32_t data);
 
125
void dsi_long_write(DSIHost *host, uint32_t header, uint32_t payload,
 
126
                    uint32_t counter);
 
127
int dsi_blt(DSIHost *host, int vc, void *data, int width, int height,
 
128
            int col_pitch, int row_pitch, int format);
 
129
 
 
130
/* device -> host functions */
 
131
void dsi_te_trigger(const DSIDevice *dev);
 
132
drawfn dsi_get_drawfn(const DSIDevice *dev, int format, int bpp);
 
133
 
 
134
#define DSI_DEVICE_FROM_QDEV(dev) DO_UPCAST(DSIDevice, qdev, dev)
 
135
#define DSI_COMMON_DEVICE_FROM_QDEV(dev) DO_UPCAST(DSICommonDevice, dsi, \
 
136
                                                   DSI_DEVICE_FROM_QDEV(dev))
 
137
#define FROM_DSI_DEVICE(type, dev) DO_UPCAST(type, dsi, dev)
 
138
 
 
139
DeviceState *dsi_create_device(DSIHost *host, const char *name, int vc);
 
140
DeviceState *dsi_create_device_noinit(DSIHost *host, const char *name, int vc);
 
141
DeviceState *dsi_create_common_device(DSIHost *host, const char *name, int vc);
 
142
DeviceState *dsi_create_common_device_noinit(DSIHost *host, const char *name,
 
143
                                             int vc);
 
144
 
 
145
#endif