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

« back to all changes in this revision

Viewing changes to hw/display/exynos4210_fimd.c

  • 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:
292
292
    hwaddr fb_len;       /* Framebuffer length */
293
293
};
294
294
 
 
295
#define TYPE_EXYNOS4210_FIMD "exynos4210.fimd"
 
296
#define EXYNOS4210_FIMD(obj) \
 
297
    OBJECT_CHECK(Exynos4210fimdState, (obj), TYPE_EXYNOS4210_FIMD)
 
298
 
295
299
typedef struct {
296
 
    SysBusDevice busdev;
 
300
    SysBusDevice parent_obj;
 
301
 
297
302
    MemoryRegion iomem;
298
303
    QemuConsole *console;
299
304
    qemu_irq irq[3];
1108
1113
 * VIDOSDA, VIDOSDB, VIDWADDx and SHADOWCON registers */
1109
1114
static void fimd_update_memory_section(Exynos4210fimdState *s, unsigned win)
1110
1115
{
 
1116
    SysBusDevice *sbd = SYS_BUS_DEVICE(s);
1111
1117
    Exynos4210fimdWindow *w = &s->window[win];
1112
1118
    hwaddr fb_start_addr, fb_mapped_len;
1113
1119
 
1126
1132
    /* Total number of bytes of virtual screen used by current window */
1127
1133
    w->fb_len = fb_mapped_len = (w->virtpage_width + w->virtpage_offsize) *
1128
1134
            (w->rightbot_y - w->lefttop_y + 1);
1129
 
    w->mem_section = memory_region_find(sysbus_address_space(&s->busdev),
1130
 
            fb_start_addr, w->fb_len);
 
1135
 
 
1136
    /* TODO: add .exit and unref the region there.  Not needed yet since sysbus
 
1137
     * does not support hot-unplug.
 
1138
     */
 
1139
    memory_region_unref(w->mem_section.mr);
 
1140
    w->mem_section = memory_region_find(sysbus_address_space(sbd),
 
1141
                                        fb_start_addr, w->fb_len);
1131
1142
    assert(w->mem_section.mr);
1132
1143
    assert(w->mem_section.offset_within_address_space == fb_start_addr);
1133
1144
    DPRINT_TRACE("Window %u framebuffer changed: address=0x%08x, len=0x%x\n",
1134
1145
            win, fb_start_addr, w->fb_len);
1135
1146
 
1136
 
    if (w->mem_section.size != w->fb_len ||
 
1147
    if (int128_get64(w->mem_section.size) != w->fb_len ||
1137
1148
            !memory_region_is_ram(w->mem_section.mr)) {
1138
1149
        DPRINT_ERROR("Failed to find window %u framebuffer region\n", win);
1139
1150
        goto error_return;
1154
1165
    return;
1155
1166
 
1156
1167
error_return:
 
1168
    memory_region_unref(w->mem_section.mr);
1157
1169
    w->mem_section.mr = NULL;
1158
 
    w->mem_section.size = 0;
 
1170
    w->mem_section.size = int128_zero();
1159
1171
    w->host_fb_addr = NULL;
1160
1172
    w->fb_len = 0;
1161
1173
}
1322
1334
 
1323
1335
static void exynos4210_fimd_reset(DeviceState *d)
1324
1336
{
1325
 
    Exynos4210fimdState *s = DO_UPCAST(Exynos4210fimdState, busdev.qdev, d);
 
1337
    Exynos4210fimdState *s = EXYNOS4210_FIMD(d);
1326
1338
    unsigned w;
1327
1339
 
1328
1340
    DPRINT_TRACE("Display controller reset\n");
1894
1906
 
1895
1907
static int exynos4210_fimd_init(SysBusDevice *dev)
1896
1908
{
1897
 
    Exynos4210fimdState *s = FROM_SYSBUS(Exynos4210fimdState, dev);
 
1909
    Exynos4210fimdState *s = EXYNOS4210_FIMD(dev);
1898
1910
 
1899
1911
    s->ifb = NULL;
1900
1912
 
1902
1914
    sysbus_init_irq(dev, &s->irq[1]);
1903
1915
    sysbus_init_irq(dev, &s->irq[2]);
1904
1916
 
1905
 
    memory_region_init_io(&s->iomem, &exynos4210_fimd_mmio_ops, s,
 
1917
    memory_region_init_io(&s->iomem, OBJECT(s), &exynos4210_fimd_mmio_ops, s,
1906
1918
            "exynos4210.fimd", FIMD_REGS_SIZE);
1907
1919
    sysbus_init_mmio(dev, &s->iomem);
1908
1920
    s->console = graphic_console_init(DEVICE(dev), &exynos4210_fimd_ops, s);
1921
1933
}
1922
1934
 
1923
1935
static const TypeInfo exynos4210_fimd_info = {
1924
 
    .name = "exynos4210.fimd",
 
1936
    .name = TYPE_EXYNOS4210_FIMD,
1925
1937
    .parent = TYPE_SYS_BUS_DEVICE,
1926
1938
    .instance_size = sizeof(Exynos4210fimdState),
1927
1939
    .class_init = exynos4210_fimd_class_init,