mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
edid: display id support (for 5k+), bugfixes.
virtio-gpu: iommu fix, device split. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoDKM/7k6F6eZAf59TLbY7tPocTgFAmCZMyQACgkQTLbY7tPo cThXcQ//RnVazAQjvHHw+IEwmoNuz2y6ips68JwRBcYwk6JXzjorG/Lur+qf4hAr GJlhTOMH6jf2fkb+f69PgRbKnS0eO69OFLlZvgCYhi7rKwIVIZI3cuMScpEDBhu5 yxVGgjWF8x8WfQOOugC5lEZ8GDOkXub4HTzPxd3kVb821KlojPr/HJH/DrzDaoTT h4l/Xko94vgTQhT788KRE97TjsejkpsfdWJUfa3/mlj+9zyU/TYtV2XxsQW5fWxJ D+BbgyuJ80B6EX8yHHCTQkL4ZsgHwuZdGpMS8ybqpkZlUaHUZcf01a0T9/Piobmr XgSvbO862VLIijJrD8EbQEaFgjSoivbpdUK5ed+cKyMuRd2nmMvZjEGHNd6/GVL5 XRmpxYZY8SLHNjUwQWO4UwaNFkMPJnpDNbHJ5uk0ZnlXAhNfNogJWo/ULJhktIbc J6hMaYJiDGEiCnZU5TmvX+JEiq6DtE+Af362DrOt+PbF/0Ujf9injA8fvos0qFEA rSa2+oNqlV+pEIEnY6P7RBKa5nYgRcp4TxvyELjY6m8mbavH3UM1+yLJ3p0Lr15i rspQXgCENcXr/XGJ/DoshFTBNTLM60s99BtXx107Qju0Jrhl2XwiJIdBcrVt6Bu+ gLxQ6gfNxnCbKE6wDm3BQiWRC5pNCCVsal0OUDQBUzBCWwwvtU4= =l8i5 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/vga-20210510-pull-request' into staging edid: display id support (for 5k+), bugfixes. virtio-gpu: iommu fix, device split. # gpg: Signature made Mon 10 May 2021 14:20:36 BST # gpg: using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/vga-20210510-pull-request: (25 commits) virtio-gpu: add virtio-vga-gl modules: add have_vga virtio-gpu: add virtio-gpu-gl-pci virtio-gpu: move fields to struct VirtIOGPUGL virtio-gpu: drop use_virgl_renderer virtio-gpu: move virtio-gpu-gl-device to separate module virtio-gpu: drop VIRGL() macro virtio-gpu: move update_cursor_data virtio-gpu: move virgl process_cmd virtio-gpu: move virgl gl_flushed virtio-gpu: move virgl handle_ctrl virtio-gpu: use class function for ctrl queue handlers virtio-gpu: move virgl reset virtio-gpu: move virgl realize + properties virtio-gpu: add virtio-gpu-gl-device virtio-gpu: rename virgl source file. virtio-gpu: handle partial maps properly edid: add support for DisplayID extension (5k resolution) edid: allow arbitrary-length checksums edid: move timing generation into a separate function ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
a5ccdccc97
15 changed files with 572 additions and 230 deletions
|
@ -11,6 +11,7 @@ typedef struct qemu_edid_info {
|
|||
uint32_t prefy;
|
||||
uint32_t maxx;
|
||||
uint32_t maxy;
|
||||
uint32_t refresh_rate;
|
||||
} qemu_edid_info;
|
||||
|
||||
void qemu_edid_generate(uint8_t *edid, size_t size,
|
||||
|
@ -21,10 +22,11 @@ void qemu_edid_region_io(MemoryRegion *region, Object *owner,
|
|||
|
||||
uint32_t qemu_edid_dpi_to_mm(uint32_t dpi, uint32_t res);
|
||||
|
||||
#define DEFINE_EDID_PROPERTIES(_state, _edid_info) \
|
||||
DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0), \
|
||||
DEFINE_PROP_UINT32("yres", _state, _edid_info.prefy, 0), \
|
||||
DEFINE_PROP_UINT32("xmax", _state, _edid_info.maxx, 0), \
|
||||
DEFINE_PROP_UINT32("ymax", _state, _edid_info.maxy, 0)
|
||||
#define DEFINE_EDID_PROPERTIES(_state, _edid_info) \
|
||||
DEFINE_PROP_UINT32("xres", _state, _edid_info.prefx, 0), \
|
||||
DEFINE_PROP_UINT32("yres", _state, _edid_info.prefy, 0), \
|
||||
DEFINE_PROP_UINT32("xmax", _state, _edid_info.maxx, 0), \
|
||||
DEFINE_PROP_UINT32("ymax", _state, _edid_info.maxy, 0), \
|
||||
DEFINE_PROP_UINT32("refresh_rate", _state, _edid_info.refresh_rate, 0)
|
||||
|
||||
#endif /* EDID_H */
|
||||
|
|
|
@ -11,6 +11,12 @@
|
|||
|
||||
#include "exec/hwaddr.h"
|
||||
|
||||
/*
|
||||
* modules can reference this symbol to avoid being loaded
|
||||
* into system emulators without vga support
|
||||
*/
|
||||
extern bool have_vga;
|
||||
|
||||
enum vga_retrace_method {
|
||||
VGA_RETRACE_DUMB,
|
||||
VGA_RETRACE_PRECISE
|
||||
|
|
|
@ -29,7 +29,10 @@ OBJECT_DECLARE_TYPE(VirtIOGPUBase, VirtIOGPUBaseClass,
|
|||
VIRTIO_GPU_BASE)
|
||||
|
||||
#define TYPE_VIRTIO_GPU "virtio-gpu-device"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(VirtIOGPU, VIRTIO_GPU)
|
||||
OBJECT_DECLARE_TYPE(VirtIOGPU, VirtIOGPUClass, VIRTIO_GPU)
|
||||
|
||||
#define TYPE_VIRTIO_GPU_GL "virtio-gpu-gl-device"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(VirtIOGPUGL, VIRTIO_GPU_GL)
|
||||
|
||||
#define TYPE_VHOST_USER_GPU "vhost-user-gpu"
|
||||
OBJECT_DECLARE_SIMPLE_TYPE(VhostUserGPU, VHOST_USER_GPU)
|
||||
|
@ -108,7 +111,6 @@ struct VirtIOGPUBase {
|
|||
struct virtio_gpu_config virtio_config;
|
||||
const GraphicHwOps *hw_ops;
|
||||
|
||||
bool use_virgl_renderer;
|
||||
int renderer_blocked;
|
||||
int enable;
|
||||
|
||||
|
@ -149,8 +151,6 @@ struct VirtIOGPU {
|
|||
uint64_t hostmem;
|
||||
|
||||
bool processing_cmdq;
|
||||
bool renderer_inited;
|
||||
bool renderer_reset;
|
||||
QEMUTimer *fence_poll;
|
||||
QEMUTimer *print_stats;
|
||||
|
||||
|
@ -163,6 +163,23 @@ struct VirtIOGPU {
|
|||
} stats;
|
||||
};
|
||||
|
||||
struct VirtIOGPUClass {
|
||||
VirtIOGPUBaseClass parent;
|
||||
|
||||
void (*handle_ctrl)(VirtIODevice *vdev, VirtQueue *vq);
|
||||
void (*process_cmd)(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd);
|
||||
void (*update_cursor_data)(VirtIOGPU *g,
|
||||
struct virtio_gpu_scanout *s,
|
||||
uint32_t resource_id);
|
||||
};
|
||||
|
||||
struct VirtIOGPUGL {
|
||||
struct VirtIOGPU parent_obj;
|
||||
|
||||
bool renderer_inited;
|
||||
bool renderer_reset;
|
||||
};
|
||||
|
||||
struct VhostUserGPU {
|
||||
VirtIOGPUBase parent_obj;
|
||||
|
||||
|
@ -209,10 +226,17 @@ void virtio_gpu_get_edid(VirtIOGPU *g,
|
|||
int virtio_gpu_create_mapping_iov(VirtIOGPU *g,
|
||||
struct virtio_gpu_resource_attach_backing *ab,
|
||||
struct virtio_gpu_ctrl_command *cmd,
|
||||
uint64_t **addr, struct iovec **iov);
|
||||
uint64_t **addr, struct iovec **iov,
|
||||
uint32_t *niov);
|
||||
void virtio_gpu_cleanup_mapping_iov(VirtIOGPU *g,
|
||||
struct iovec *iov, uint32_t count);
|
||||
void virtio_gpu_process_cmdq(VirtIOGPU *g);
|
||||
void virtio_gpu_device_realize(DeviceState *qdev, Error **errp);
|
||||
void virtio_gpu_reset(VirtIODevice *vdev);
|
||||
void virtio_gpu_simple_process_cmd(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd);
|
||||
void virtio_gpu_update_cursor_data(VirtIOGPU *g,
|
||||
struct virtio_gpu_scanout *s,
|
||||
uint32_t resource_id);
|
||||
|
||||
/* virtio-gpu-3d.c */
|
||||
void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue