| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This macro allow to define magic constants without using weird
memory tweacks.
This remove some possible warning from some compiler and
make code more optimized as compiler is able to compute the
constant.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far we have used the agent to notify the guest of a request to change
the monitors configurations (heads) on the qxl device. This patch introduces
a new interrupt and new fields in the qxl rom to notify the guest about
a new request, similarly to how physical hardware notifies the driver.
We compute crc over the monitors configuration to avoid host-write from a
following update while guest-read corruption. The update protocol is:
qemu:
(2) fill QXLRom::client_monitors_config
(3) raise QXL_INTERRUPT_CLIENT_MONITORS_CONFIG
guest:
(1) clear QXL_INTERRUPT_CLIENT_MONITORS_CONFIG bit in irq status
(2) read QXLRom::client_monitors_config
(3) (verify-crc)? done : goto 2
If the interrupt mask is ~0 or 0, or does not have
QXL_INTERRUPT_CLIENT_MONITORS_CONFIG set, we also assume it doesn't support
this interrupt.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The client_present field is a byte that is set of non-zero when a
client is connected and to zero when no client is connected.
The client_capabilities[58] array contains 464 bits that indicate the
capabilities of the client. Each bit corresponds to a
SPICE_DISPLAY_CAP_* capability. In particular, if the client has
capability C, then bit (C % 8) in byte (C / 8) is set. The capability
bits only have a defined meaning when a client is connected, ie., when
client_present is non-zero. The number 58 was chosen to fill out a
cache line in QXLRom.
A new QXL_INTERRUPT_CLIENT interrupt is defined, which will be raised
whenever a client connects or disconnects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new command is intended to be used for implementing the Composite
request from the Render X extension. See
http://www.x.org/releases/current/doc/renderproto/renderproto.txt
for a description of the Render extension.
Composite has three fields: src, mask and destination, of which mask
is optional (can be NULL). There are also two pointers to
transformations, one for each of src and mask.
The command also has 32 bits of flags which indicates
- which compositing operator to use
- which filters to apply when sampling source and mask
- which repeat mode to apply when sampling source and mask
- whether the mask should be considered to have 'component alpha'
- whether the alpha channel of any of the images should be ignored.
The last one of these features is necessary because in the X protocol
an offscreen surface is simply a collection of bits with no visual
interpretation. In order for Render to use these bits, a wrapper
object is used that contains the pixel format. Since one offscreen
surface can be wrapped by multple objects, there is not a one-to-one
correspondence between pixel formats and surfaces.
In SPICE surfaces do have an associated pixel format, which means the
above feature of Render cannot be supported without adding a similar
concept to the wrapper object to the SPICE protocol. However, the most
common use for having multiple wrappers for one offscreen surface is
to interpret an alpha surface as not having an alpha channel or vice
versa.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds on device:
RAM
Header
monitors_config - pointer
QXLMonitorsConfig
count == n
max_allowed = N >= 0
QXLHead 1
...
QXLHead n
id, surface_id, x, y, width, height, flags
IO:
QXL_IO_MONITORS_CONFIG
server flushes command ring, then calls server callback for changing monitors config.
New revision to let the driver know about the new io:
QXL_REVISION_STABLE_V12=0x04,
Adds server/client capability:
SPICE_DISPLAY_CAP_MONITORS_CONFIG
Server message will be added in spice-server and spice-common.
Version is bumped to 0.12.0 to indicate new IO and structs
|
| |
|
|
|
|
|
| |
The driver will check for this revision or higher to know that the device
supports async io, the two S3 related ios, and the interrupts IO_CMD and ERROR.
|
|
|
|
|
| |
The interrupt is used to notify the guest driver it did an error in
the last io operation. It can be left unhandled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
related RHBZ: 688883
Guest initiated sleep looks like this:
Guest:
(0) stop putting new commands into the rings
(1) QXL_IO_FLUSH_SURFACES
qxl calls flush_surfaces(), spice-server flushes command rings and
renders all surfaces, thereby flushing state to device memory.
(2) QXL_IO_DESTROY_ALL_SURFACES
zap surfaces
(3) QXL_IO_FLUSH_RELEASE
push release queue head into the release ring, so the guest
will see it and can release everything.
(4) tell acpi to reset
Qemu:
(5) qxl_reset_handler
Guest:
(6) sends surface create commands
The QXL_IO_FLUSH_SURFACES is an optimization, to reduce vmexits. It is used to
flush both command rings and update all surfaces at once (equivalent to
UPDATE_AREA X NUM_ACTIVE_SURFACES)
destroy all surfaces to release resources but not destroy the guest side surfaces
get device to flush all server released resources to the release ring (could use multiple
calls to OOM - but this is not well defined, would need to loop)
After (1) there will be no memory allocated on the pci bars.
|
|
|
|
|
|
|
| |
Add async versions of the I/O commands which do not block and instead
raise the new QXL_INTERRUPT_IO_CMD when done.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
spice 0.6 uses 32bpp values unconditionally for brush and palette
colors.
spice 0.4 used to use 16 bpp or 32 bpp depending on the video mode.
The qxl parser needs to know the guest video mode depth to correctly
interpret these values in spice 0.4 compat mode. Add a flag to pass
on this informartion.
|
|
|
|
|
| |
SpicedSubMessage -> SpiceSubMessage
QXLAlphaBlnd -> QXLAlphaBlend
|
|
|
|
| |
This makes stuff keep building as before when draw.h included enum.h
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Also, this changes the SpiceImage types to be more useful
as internal types, with real typed pointers. It also
adds a SpiceChunk iovec type for easy representation of
chunked data.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Add QXLCopy and QXlBlend, also fix tyops (s/rop_decriptor/rop_descriptor/).
|
|
|
|
| |
Add QXLOpaque, also fix tyops (s/rop_decriptor/rop_descriptor/).
|
|
|
|
| |
Add QXLFill, also fix tyops (s/rop_decriptor/rop_descriptor/).
|
|
|
|
| |
Add QXLAlphaBlnd and QXLCompatAlphaBlnd types.
|
| |
|
| |
|
|
|
|
|
| |
This lets us send rgba images with all high bytes 0xff as rgb, which
is not all that uncommon.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add SET_MODE IO port back in.
Add QXLRom offset fields back in.
I/O ports, RAM and ROM layout are binary compatible now.
With these changes merged it should be possible to create *one* qxl
device which supports *both* 0.4 and unstable spice commands.
Everything the guest touches before entering native mode is binary
compatible. Old (0.4) guests drivers enter native mode via SET_MODE,
new (unstqable) guest drivers enter native mode using CREATE_PRIMARY,
so when we see spice commands from the guest come in we know
whenever we have to interpret them as 0.4 or unstable ones.
Added commends to structs which need care wrt. compatibility when
updating.
Added some QXLCompat* structs for the 0.4 struct versions.
Added a flags field to QXLCommandEx so qxl can signal whenever commands
are compat or not.
Moved QXLRom->n_surfaces to make QXLRom->flags 64bit aligned.
Add padding to QXLRom to ensure future elements are 32bit aligned.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
| |
|
|
|
|
|
|
| |
We will switch back to 0x101 when things settle down and we guarantee
backwards compatibility. For now we will keep breaking it, bumping
revision each time this happens.
|
|
|
|
| |
Signed-off-by: Izik Eidus <ieidus@redhat.com>
|
| |
|