diff options
Diffstat (limited to 'kms/kms_shared.h')
-rw-r--r-- | kms/kms_shared.h | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/kms/kms_shared.h b/kms/kms_shared.h index b72d75d..2dbb655 100644 --- a/kms/kms_shared.h +++ b/kms/kms_shared.h @@ -3,9 +3,16 @@ #include <stdint.h> #include <stdbool.h> +#include <drm_mode.h> -#define GSR_KMS_PROTOCOL_VERSION 1 -#define GSR_KMS_MAX_PLANES 32 +#define GSR_KMS_PROTOCOL_VERSION 4 + +#define GSR_KMS_MAX_ITEMS 8 +#define GSR_KMS_MAX_DMA_BUFS 4 + +typedef struct gsr_kms_response_dma_buf gsr_kms_response_dma_buf; +typedef struct gsr_kms_response_item gsr_kms_response_item; +typedef struct gsr_kms_response gsr_kms_response; typedef enum { KMS_REQUEST_TYPE_REPLACE_CONNECTION, @@ -26,29 +33,35 @@ typedef struct { int new_connection_fd; } gsr_kms_request; -typedef struct { +struct gsr_kms_response_dma_buf { int fd; - uint32_t width; - uint32_t height; uint32_t pitch; uint32_t offset; +}; + +struct gsr_kms_response_item { + gsr_kms_response_dma_buf dma_buf[GSR_KMS_MAX_DMA_BUFS]; + int num_dma_bufs; + uint32_t width; + uint32_t height; uint32_t pixel_format; uint64_t modifier; uint32_t connector_id; /* 0 if unknown */ - bool is_combined_plane; bool is_cursor; + bool has_hdr_metadata; int x; int y; int src_w; int src_h; -} gsr_kms_response_fd; + struct hdr_output_metadata hdr_metadata; +}; -typedef struct { +struct gsr_kms_response { uint32_t version; /* GSR_KMS_PROTOCOL_VERSION */ int result; /* gsr_kms_result */ char err_msg[128]; - gsr_kms_response_fd fds[GSR_KMS_MAX_PLANES]; - int num_fds; -} gsr_kms_response; + gsr_kms_response_item items[GSR_KMS_MAX_ITEMS]; + int num_items; +}; #endif /* #define GSR_KMS_SHARED_H */ |