ia64/xen-unstable

view Config.mk @ 17036:7b0c0ab0566b

ioemu: Dynamic VNC colour depth.

The qemu vnc server changes its internal colour depth based on the
client request. This way just one colour conversion is done: the one
in vga_template.h, from the guest colour depth and the vnc server
internal colour depth.

This patch is meant to remove this colour conversion to improve
performances. It accomplishes the goal making the qemu internal colour
depth always the same as the guest colour depth.
The basic idea is that the vnc client is the one that should do the
colour conversion, if necessary. In general it should accept the pixel
format suggested by the server during the initial negotiation. This
behaviour can be set in most vnc clients (vncviewer included).

If the guest changes colour depth, the qemu vnc server changes colour
depth too and notifies the client. The problem is that the vnc
protocol doesn't provide a message from the server to the client to
ask for a colour depth change. So what I am doing is either:

1) quietly starting to do the conversion on vnc server (not gaining
any performance here);

2) closing the vnc connection with the client, so the client can
reconnect and choose the new pixel format.

By default I am doing 1), however the second choice can be enabled
passing the -vnc-switch-bpp command line option.
In order to do the colour conversion on the vnc server I had to
improve the colour conversion code already in place because it only
supported conversions from 32 bpp. The patch adds colour conversion
code that support conversions from any resolution to any resolution.

A last note: to get most out of this patch it is best to set Windows
to 16 bit colour depth, because the 24 bit mode is 24 bit depth and 24
bpp, meaning no alpha channel. The vnc protocol doesn't support 24
bpp, only 32 bpp, so this conversion is unavoidable.

From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Feb 11 14:55:33 2008 +0000 (2008-02-11)
parents 0faf620bc749
children a905c582a406
line source
1 # -*- mode: Makefile; -*-
3 # A debug build of Xen and tools?
4 debug ?= n
6 XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
7 -e s/ppc/powerpc/ -e s/i86pc/x86_32/ \
8 -e s/amd64/x86_64/)
9 XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
10 XEN_OS ?= $(shell uname -s)
12 ifeq ($(XEN_TARGET_ARCH),x86_32)
13 XEN_TARGET_X86_PAE ?= y
14 endif
16 CONFIG_$(XEN_OS) := y
18 SHELL ?= /bin/sh
20 # Tools to run on system hosting the build
21 HOSTCC = gcc
22 HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
23 HOSTCFLAGS += -fno-strict-aliasing
25 DISTDIR ?= $(XEN_ROOT)/dist
26 DESTDIR ?= /
28 include $(XEN_ROOT)/config/$(XEN_OS).mk
29 include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
31 ifneq ($(EXTRA_PREFIX),)
32 EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
33 EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
34 endif
36 # cc-option: Check if compiler supports first option, else fall back to second.
37 # Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
38 cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \
39 /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
41 # cc-ver: Check compiler is at least specified version. Return boolean 'y'/'n'.
42 # Usage: ifeq ($(call cc-ver,$(CC),0x030400),y)
43 cc-ver = $(shell if [ $$((`$(1) -dumpversion | awk -F. \
44 '{ printf "0x%02x%02x%02x", $$1, $$2, $$3}'`)) -ge $$(($(2))) ]; \
45 then echo y; else echo n; fi ;)
47 # cc-ver-check: Check compiler is at least specified version, else fail.
48 # Usage: $(call cc-ver-check,CC,0x030400,"Require at least gcc-3.4")
49 cc-ver-check = $(eval $(call cc-ver-check-closure,$(1),$(2),$(3)))
50 define cc-ver-check-closure
51 ifeq ($$(call cc-ver,$$($(1)),$(2)),n)
52 override $(1) = echo "*** FATAL BUILD ERROR: "$(3) >&2; exit 1;
53 cc-option := n
54 endif
55 endef
57 ifeq ($(debug),y)
58 CFLAGS += -g
59 endif
61 CFLAGS += -fno-strict-aliasing
63 CFLAGS += -std=gnu99
65 CFLAGS += -Wall -Wstrict-prototypes
67 # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
68 # result of any casted expression causes a warning.
69 CFLAGS += -Wno-unused-value
71 HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
72 CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
74 LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
75 CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
77 # Enable XSM security module. Enabling XSM requires selection of an
78 # XSM security module (FLASK_ENABLE or ACM_SECURITY).
79 XSM_ENABLE ?= n
80 FLASK_ENABLE ?= n
81 ACM_SECURITY ?= n
83 # Optional components
84 XENSTAT_XENTOP ?= y
85 VTPM_TOOLS ?= n
86 LIBXENAPI_BINDINGS ?= n
87 PYTHON_TOOLS ?= y
88 CONFIG_MINITERM ?= n
89 CONFIG_LOMOUNT ?= n
91 -include $(XEN_ROOT)/.config