aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/qxl/qxl_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_drv.h')
-rw-r--r--drivers/gpu/drm/qxl/qxl_drv.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index 43d06ab28a21..aacb791464a3 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -55,11 +55,10 @@
55#define DRIVER_MINOR 1 55#define DRIVER_MINOR 1
56#define DRIVER_PATCHLEVEL 0 56#define DRIVER_PATCHLEVEL 0
57 57
58#define QXL_NUM_OUTPUTS 1
59
60#define QXL_DEBUGFS_MAX_COMPONENTS 32 58#define QXL_DEBUGFS_MAX_COMPONENTS 32
61 59
62extern int qxl_log_level; 60extern int qxl_log_level;
61extern int qxl_num_crtc;
63 62
64enum { 63enum {
65 QXL_INFO_LEVEL = 1, 64 QXL_INFO_LEVEL = 1,
@@ -139,6 +138,7 @@ struct qxl_reloc_list {
139 138
140struct qxl_crtc { 139struct qxl_crtc {
141 struct drm_crtc base; 140 struct drm_crtc base;
141 int index;
142 int cur_x; 142 int cur_x;
143 int cur_y; 143 int cur_y;
144}; 144};
@@ -156,7 +156,7 @@ struct qxl_framebuffer {
156 156
157#define to_qxl_crtc(x) container_of(x, struct qxl_crtc, base) 157#define to_qxl_crtc(x) container_of(x, struct qxl_crtc, base)
158#define drm_connector_to_qxl_output(x) container_of(x, struct qxl_output, base) 158#define drm_connector_to_qxl_output(x) container_of(x, struct qxl_output, base)
159#define drm_encoder_to_qxl_output(x) container_of(x, struct qxl_output, base) 159#define drm_encoder_to_qxl_output(x) container_of(x, struct qxl_output, enc)
160#define to_qxl_framebuffer(x) container_of(x, struct qxl_framebuffer, base) 160#define to_qxl_framebuffer(x) container_of(x, struct qxl_framebuffer, base)
161 161
162struct qxl_mman { 162struct qxl_mman {
@@ -331,6 +331,10 @@ void qxl_modeset_fini(struct qxl_device *qdev);
331int qxl_bo_init(struct qxl_device *qdev); 331int qxl_bo_init(struct qxl_device *qdev);
332void qxl_bo_fini(struct qxl_device *qdev); 332void qxl_bo_fini(struct qxl_device *qdev);
333 333
334void qxl_reinit_memslots(struct qxl_device *qdev);
335int qxl_surf_evict(struct qxl_device *qdev);
336int qxl_vram_evict(struct qxl_device *qdev);
337
334struct qxl_ring *qxl_ring_create(struct qxl_ring_header *header, 338struct qxl_ring *qxl_ring_create(struct qxl_ring_header *header,
335 int element_size, 339 int element_size,
336 int n_elements, 340 int n_elements,
@@ -338,6 +342,8 @@ struct qxl_ring *qxl_ring_create(struct qxl_ring_header *header,
338 bool set_prod_notify, 342 bool set_prod_notify,
339 wait_queue_head_t *push_event); 343 wait_queue_head_t *push_event);
340void qxl_ring_free(struct qxl_ring *ring); 344void qxl_ring_free(struct qxl_ring *ring);
345void qxl_ring_init_hdr(struct qxl_ring *ring);
346int qxl_check_idle(struct qxl_ring *ring);
341 347
342static inline void * 348static inline void *
343qxl_fb_virtual_address(struct qxl_device *qdev, unsigned long physical) 349qxl_fb_virtual_address(struct qxl_device *qdev, unsigned long physical)
@@ -365,6 +371,7 @@ void qxl_fbdev_fini(struct qxl_device *qdev);
365int qxl_get_handle_for_primary_fb(struct qxl_device *qdev, 371int qxl_get_handle_for_primary_fb(struct qxl_device *qdev,
366 struct drm_file *file_priv, 372 struct drm_file *file_priv,
367 uint32_t *handle); 373 uint32_t *handle);
374void qxl_fbdev_set_suspend(struct qxl_device *qdev, int state);
368 375
369/* qxl_display.c */ 376/* qxl_display.c */
370int 377int
@@ -374,6 +381,8 @@ qxl_framebuffer_init(struct drm_device *dev,
374 struct drm_gem_object *obj); 381 struct drm_gem_object *obj);
375void qxl_display_read_client_monitors_config(struct qxl_device *qdev); 382void qxl_display_read_client_monitors_config(struct qxl_device *qdev);
376void qxl_send_monitors_config(struct qxl_device *qdev); 383void qxl_send_monitors_config(struct qxl_device *qdev);
384int qxl_create_monitors_object(struct qxl_device *qdev);
385int qxl_destroy_monitors_object(struct qxl_device *qdev);
377 386
378/* used by qxl_debugfs only */ 387/* used by qxl_debugfs only */
379void qxl_crtc_set_from_monitors_config(struct qxl_device *qdev); 388void qxl_crtc_set_from_monitors_config(struct qxl_device *qdev);
@@ -435,7 +444,7 @@ void qxl_update_screen(struct qxl_device *qxl);
435/* qxl io operations (qxl_cmd.c) */ 444/* qxl io operations (qxl_cmd.c) */
436 445
437void qxl_io_create_primary(struct qxl_device *qdev, 446void qxl_io_create_primary(struct qxl_device *qdev,
438 unsigned width, unsigned height, unsigned offset, 447 unsigned offset,
439 struct qxl_bo *bo); 448 struct qxl_bo *bo);
440void qxl_io_destroy_primary(struct qxl_device *qdev); 449void qxl_io_destroy_primary(struct qxl_device *qdev);
441void qxl_io_memslot_add(struct qxl_device *qdev, uint8_t id); 450void qxl_io_memslot_add(struct qxl_device *qdev, uint8_t id);
@@ -528,6 +537,7 @@ irqreturn_t qxl_irq_handler(DRM_IRQ_ARGS);
528 537
529/* qxl_fb.c */ 538/* qxl_fb.c */
530int qxl_fb_init(struct qxl_device *qdev); 539int qxl_fb_init(struct qxl_device *qdev);
540bool qxl_fbdev_qobj_is_fb(struct qxl_device *qdev, struct qxl_bo *qobj);
531 541
532int qxl_debugfs_add_files(struct qxl_device *qdev, 542int qxl_debugfs_add_files(struct qxl_device *qdev,
533 struct drm_info_list *files, 543 struct drm_info_list *files,