aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/i915_drm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/i915_drm.h')
-rw-r--r--include/drm/i915_drm.h143
1 files changed, 73 insertions, 70 deletions
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 912cd52db965..95962fa8398a 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -30,7 +30,7 @@
30/* Please note that modifications to all structs defined here are 30/* Please note that modifications to all structs defined here are
31 * subject to backwards-compatibility constraints. 31 * subject to backwards-compatibility constraints.
32 */ 32 */
33 33#include <linux/types.h>
34#include "drm.h" 34#include "drm.h"
35 35
36/* Each region is a minimum of 16k, and there are at most 255 of them. 36/* Each region is a minimum of 16k, and there are at most 255 of them.
@@ -116,15 +116,15 @@ typedef struct _drm_i915_sarea {
116 116
117 /* fill out some space for old userspace triple buffer */ 117 /* fill out some space for old userspace triple buffer */
118 drm_handle_t unused_handle; 118 drm_handle_t unused_handle;
119 uint32_t unused1, unused2, unused3; 119 __u32 unused1, unused2, unused3;
120 120
121 /* buffer object handles for static buffers. May change 121 /* buffer object handles for static buffers. May change
122 * over the lifetime of the client. 122 * over the lifetime of the client.
123 */ 123 */
124 uint32_t front_bo_handle; 124 __u32 front_bo_handle;
125 uint32_t back_bo_handle; 125 __u32 back_bo_handle;
126 uint32_t unused_bo_handle; 126 __u32 unused_bo_handle;
127 uint32_t depth_bo_handle; 127 __u32 depth_bo_handle;
128 128
129} drm_i915_sarea_t; 129} drm_i915_sarea_t;
130 130
@@ -327,7 +327,7 @@ typedef struct drm_i915_vblank_swap {
327} drm_i915_vblank_swap_t; 327} drm_i915_vblank_swap_t;
328 328
329typedef struct drm_i915_hws_addr { 329typedef struct drm_i915_hws_addr {
330 uint64_t addr; 330 __u64 addr;
331} drm_i915_hws_addr_t; 331} drm_i915_hws_addr_t;
332 332
333struct drm_i915_gem_init { 333struct drm_i915_gem_init {
@@ -335,12 +335,12 @@ struct drm_i915_gem_init {
335 * Beginning offset in the GTT to be managed by the DRM memory 335 * Beginning offset in the GTT to be managed by the DRM memory
336 * manager. 336 * manager.
337 */ 337 */
338 uint64_t gtt_start; 338 __u64 gtt_start;
339 /** 339 /**
340 * Ending offset in the GTT to be managed by the DRM memory 340 * Ending offset in the GTT to be managed by the DRM memory
341 * manager. 341 * manager.
342 */ 342 */
343 uint64_t gtt_end; 343 __u64 gtt_end;
344}; 344};
345 345
346struct drm_i915_gem_create { 346struct drm_i915_gem_create {
@@ -349,94 +349,94 @@ struct drm_i915_gem_create {
349 * 349 *
350 * The (page-aligned) allocated size for the object will be returned. 350 * The (page-aligned) allocated size for the object will be returned.
351 */ 351 */
352 uint64_t size; 352 __u64 size;
353 /** 353 /**
354 * Returned handle for the object. 354 * Returned handle for the object.
355 * 355 *
356 * Object handles are nonzero. 356 * Object handles are nonzero.
357 */ 357 */
358 uint32_t handle; 358 __u32 handle;
359 uint32_t pad; 359 __u32 pad;
360}; 360};
361 361
362struct drm_i915_gem_pread { 362struct drm_i915_gem_pread {
363 /** Handle for the object being read. */ 363 /** Handle for the object being read. */
364 uint32_t handle; 364 __u32 handle;
365 uint32_t pad; 365 __u32 pad;
366 /** Offset into the object to read from */ 366 /** Offset into the object to read from */
367 uint64_t offset; 367 __u64 offset;
368 /** Length of data to read */ 368 /** Length of data to read */
369 uint64_t size; 369 __u64 size;
370 /** 370 /**
371 * Pointer to write the data into. 371 * Pointer to write the data into.
372 * 372 *
373 * This is a fixed-size type for 32/64 compatibility. 373 * This is a fixed-size type for 32/64 compatibility.
374 */ 374 */
375 uint64_t data_ptr; 375 __u64 data_ptr;
376}; 376};
377 377
378struct drm_i915_gem_pwrite { 378struct drm_i915_gem_pwrite {
379 /** Handle for the object being written to. */ 379 /** Handle for the object being written to. */
380 uint32_t handle; 380 __u32 handle;
381 uint32_t pad; 381 __u32 pad;
382 /** Offset into the object to write to */ 382 /** Offset into the object to write to */
383 uint64_t offset; 383 __u64 offset;
384 /** Length of data to write */ 384 /** Length of data to write */
385 uint64_t size; 385 __u64 size;
386 /** 386 /**
387 * Pointer to read the data from. 387 * Pointer to read the data from.
388 * 388 *
389 * This is a fixed-size type for 32/64 compatibility. 389 * This is a fixed-size type for 32/64 compatibility.
390 */ 390 */
391 uint64_t data_ptr; 391 __u64 data_ptr;
392}; 392};
393 393
394struct drm_i915_gem_mmap { 394struct drm_i915_gem_mmap {
395 /** Handle for the object being mapped. */ 395 /** Handle for the object being mapped. */
396 uint32_t handle; 396 __u32 handle;
397 uint32_t pad; 397 __u32 pad;
398 /** Offset in the object to map. */ 398 /** Offset in the object to map. */
399 uint64_t offset; 399 __u64 offset;
400 /** 400 /**
401 * Length of data to map. 401 * Length of data to map.
402 * 402 *
403 * The value will be page-aligned. 403 * The value will be page-aligned.
404 */ 404 */
405 uint64_t size; 405 __u64 size;
406 /** 406 /**
407 * Returned pointer the data was mapped at. 407 * Returned pointer the data was mapped at.
408 * 408 *
409 * This is a fixed-size type for 32/64 compatibility. 409 * This is a fixed-size type for 32/64 compatibility.
410 */ 410 */
411 uint64_t addr_ptr; 411 __u64 addr_ptr;
412}; 412};
413 413
414struct drm_i915_gem_mmap_gtt { 414struct drm_i915_gem_mmap_gtt {
415 /** Handle for the object being mapped. */ 415 /** Handle for the object being mapped. */
416 uint32_t handle; 416 __u32 handle;
417 uint32_t pad; 417 __u32 pad;
418 /** 418 /**
419 * Fake offset to use for subsequent mmap call 419 * Fake offset to use for subsequent mmap call
420 * 420 *
421 * This is a fixed-size type for 32/64 compatibility. 421 * This is a fixed-size type for 32/64 compatibility.
422 */ 422 */
423 uint64_t offset; 423 __u64 offset;
424}; 424};
425 425
426struct drm_i915_gem_set_domain { 426struct drm_i915_gem_set_domain {
427 /** Handle for the object */ 427 /** Handle for the object */
428 uint32_t handle; 428 __u32 handle;
429 429
430 /** New read domains */ 430 /** New read domains */
431 uint32_t read_domains; 431 __u32 read_domains;
432 432
433 /** New write domain */ 433 /** New write domain */
434 uint32_t write_domain; 434 __u32 write_domain;
435}; 435};
436 436
437struct drm_i915_gem_sw_finish { 437struct drm_i915_gem_sw_finish {
438 /** Handle for the object */ 438 /** Handle for the object */
439 uint32_t handle; 439 __u32 handle;
440}; 440};
441 441
442struct drm_i915_gem_relocation_entry { 442struct drm_i915_gem_relocation_entry {
@@ -448,16 +448,16 @@ struct drm_i915_gem_relocation_entry {
448 * a relocation list for state buffers and not re-write it per 448 * a relocation list for state buffers and not re-write it per
449 * exec using the buffer. 449 * exec using the buffer.
450 */ 450 */
451 uint32_t target_handle; 451 __u32 target_handle;
452 452
453 /** 453 /**
454 * Value to be added to the offset of the target buffer to make up 454 * Value to be added to the offset of the target buffer to make up
455 * the relocation entry. 455 * the relocation entry.
456 */ 456 */
457 uint32_t delta; 457 __u32 delta;
458 458
459 /** Offset in the buffer the relocation entry will be written into */ 459 /** Offset in the buffer the relocation entry will be written into */
460 uint64_t offset; 460 __u64 offset;
461 461
462 /** 462 /**
463 * Offset value of the target buffer that the relocation entry was last 463 * Offset value of the target buffer that the relocation entry was last
@@ -467,12 +467,12 @@ struct drm_i915_gem_relocation_entry {
467 * and writing the relocation. This value is written back out by 467 * and writing the relocation. This value is written back out by
468 * the execbuffer ioctl when the relocation is written. 468 * the execbuffer ioctl when the relocation is written.
469 */ 469 */
470 uint64_t presumed_offset; 470 __u64 presumed_offset;
471 471
472 /** 472 /**
473 * Target memory domains read by this operation. 473 * Target memory domains read by this operation.
474 */ 474 */
475 uint32_t read_domains; 475 __u32 read_domains;
476 476
477 /** 477 /**
478 * Target memory domains written by this operation. 478 * Target memory domains written by this operation.
@@ -481,7 +481,7 @@ struct drm_i915_gem_relocation_entry {
481 * execbuffer operation, so that where there are conflicts, 481 * execbuffer operation, so that where there are conflicts,
482 * the application will get -EINVAL back. 482 * the application will get -EINVAL back.
483 */ 483 */
484 uint32_t write_domain; 484 __u32 write_domain;
485}; 485};
486 486
487/** @{ 487/** @{
@@ -512,24 +512,24 @@ struct drm_i915_gem_exec_object {
512 * User's handle for a buffer to be bound into the GTT for this 512 * User's handle for a buffer to be bound into the GTT for this
513 * operation. 513 * operation.
514 */ 514 */
515 uint32_t handle; 515 __u32 handle;
516 516
517 /** Number of relocations to be performed on this buffer */ 517 /** Number of relocations to be performed on this buffer */
518 uint32_t relocation_count; 518 __u32 relocation_count;
519 /** 519 /**
520 * Pointer to array of struct drm_i915_gem_relocation_entry containing 520 * Pointer to array of struct drm_i915_gem_relocation_entry containing
521 * the relocations to be performed in this buffer. 521 * the relocations to be performed in this buffer.
522 */ 522 */
523 uint64_t relocs_ptr; 523 __u64 relocs_ptr;
524 524
525 /** Required alignment in graphics aperture */ 525 /** Required alignment in graphics aperture */
526 uint64_t alignment; 526 __u64 alignment;
527 527
528 /** 528 /**
529 * Returned value of the updated offset of the object, for future 529 * Returned value of the updated offset of the object, for future
530 * presumed_offset writes. 530 * presumed_offset writes.
531 */ 531 */
532 uint64_t offset; 532 __u64 offset;
533}; 533};
534 534
535struct drm_i915_gem_execbuffer { 535struct drm_i915_gem_execbuffer {
@@ -543,44 +543,44 @@ struct drm_i915_gem_execbuffer {
543 * a buffer is performing refer to buffers that have already appeared 543 * a buffer is performing refer to buffers that have already appeared
544 * in the validate list. 544 * in the validate list.
545 */ 545 */
546 uint64_t buffers_ptr; 546 __u64 buffers_ptr;
547 uint32_t buffer_count; 547 __u32 buffer_count;
548 548
549 /** Offset in the batchbuffer to start execution from. */ 549 /** Offset in the batchbuffer to start execution from. */
550 uint32_t batch_start_offset; 550 __u32 batch_start_offset;
551 /** Bytes used in batchbuffer from batch_start_offset */ 551 /** Bytes used in batchbuffer from batch_start_offset */
552 uint32_t batch_len; 552 __u32 batch_len;
553 uint32_t DR1; 553 __u32 DR1;
554 uint32_t DR4; 554 __u32 DR4;
555 uint32_t num_cliprects; 555 __u32 num_cliprects;
556 /** This is a struct drm_clip_rect *cliprects */ 556 /** This is a struct drm_clip_rect *cliprects */
557 uint64_t cliprects_ptr; 557 __u64 cliprects_ptr;
558}; 558};
559 559
560struct drm_i915_gem_pin { 560struct drm_i915_gem_pin {
561 /** Handle of the buffer to be pinned. */ 561 /** Handle of the buffer to be pinned. */
562 uint32_t handle; 562 __u32 handle;
563 uint32_t pad; 563 __u32 pad;
564 564
565 /** alignment required within the aperture */ 565 /** alignment required within the aperture */
566 uint64_t alignment; 566 __u64 alignment;
567 567
568 /** Returned GTT offset of the buffer. */ 568 /** Returned GTT offset of the buffer. */
569 uint64_t offset; 569 __u64 offset;
570}; 570};
571 571
572struct drm_i915_gem_unpin { 572struct drm_i915_gem_unpin {
573 /** Handle of the buffer to be unpinned. */ 573 /** Handle of the buffer to be unpinned. */
574 uint32_t handle; 574 __u32 handle;
575 uint32_t pad; 575 __u32 pad;
576}; 576};
577 577
578struct drm_i915_gem_busy { 578struct drm_i915_gem_busy {
579 /** Handle of the buffer to check for busy */ 579 /** Handle of the buffer to check for busy */
580 uint32_t handle; 580 __u32 handle;
581 581
582 /** Return busy status (1 if busy, 0 if idle) */ 582 /** Return busy status (1 if busy, 0 if idle) */
583 uint32_t busy; 583 __u32 busy;
584}; 584};
585 585
586#define I915_TILING_NONE 0 586#define I915_TILING_NONE 0
@@ -594,10 +594,13 @@ struct drm_i915_gem_busy {
594#define I915_BIT_6_SWIZZLE_9_10_11 4 594#define I915_BIT_6_SWIZZLE_9_10_11 4
595/* Not seen by userland */ 595/* Not seen by userland */
596#define I915_BIT_6_SWIZZLE_UNKNOWN 5 596#define I915_BIT_6_SWIZZLE_UNKNOWN 5
597/* Seen by userland. */
598#define I915_BIT_6_SWIZZLE_9_17 6
599#define I915_BIT_6_SWIZZLE_9_10_17 7
597 600
598struct drm_i915_gem_set_tiling { 601struct drm_i915_gem_set_tiling {
599 /** Handle of the buffer to have its tiling state updated */ 602 /** Handle of the buffer to have its tiling state updated */
600 uint32_t handle; 603 __u32 handle;
601 604
602 /** 605 /**
603 * Tiling mode for the object (I915_TILING_NONE, I915_TILING_X, 606 * Tiling mode for the object (I915_TILING_NONE, I915_TILING_X,
@@ -611,47 +614,47 @@ struct drm_i915_gem_set_tiling {
611 * 614 *
612 * Buffer contents become undefined when changing tiling_mode. 615 * Buffer contents become undefined when changing tiling_mode.
613 */ 616 */
614 uint32_t tiling_mode; 617 __u32 tiling_mode;
615 618
616 /** 619 /**
617 * Stride in bytes for the object when in I915_TILING_X or 620 * Stride in bytes for the object when in I915_TILING_X or
618 * I915_TILING_Y. 621 * I915_TILING_Y.
619 */ 622 */
620 uint32_t stride; 623 __u32 stride;
621 624
622 /** 625 /**
623 * Returned address bit 6 swizzling required for CPU access through 626 * Returned address bit 6 swizzling required for CPU access through
624 * mmap mapping. 627 * mmap mapping.
625 */ 628 */
626 uint32_t swizzle_mode; 629 __u32 swizzle_mode;
627}; 630};
628 631
629struct drm_i915_gem_get_tiling { 632struct drm_i915_gem_get_tiling {
630 /** Handle of the buffer to get tiling state for. */ 633 /** Handle of the buffer to get tiling state for. */
631 uint32_t handle; 634 __u32 handle;
632 635
633 /** 636 /**
634 * Current tiling mode for the object (I915_TILING_NONE, I915_TILING_X, 637 * Current tiling mode for the object (I915_TILING_NONE, I915_TILING_X,
635 * I915_TILING_Y). 638 * I915_TILING_Y).
636 */ 639 */
637 uint32_t tiling_mode; 640 __u32 tiling_mode;
638 641
639 /** 642 /**
640 * Returned address bit 6 swizzling required for CPU access through 643 * Returned address bit 6 swizzling required for CPU access through
641 * mmap mapping. 644 * mmap mapping.
642 */ 645 */
643 uint32_t swizzle_mode; 646 __u32 swizzle_mode;
644}; 647};
645 648
646struct drm_i915_gem_get_aperture { 649struct drm_i915_gem_get_aperture {
647 /** Total size of the aperture used by i915_gem_execbuffer, in bytes */ 650 /** Total size of the aperture used by i915_gem_execbuffer, in bytes */
648 uint64_t aper_size; 651 __u64 aper_size;
649 652
650 /** 653 /**
651 * Available space in the aperture used by i915_gem_execbuffer, in 654 * Available space in the aperture used by i915_gem_execbuffer, in
652 * bytes 655 * bytes
653 */ 656 */
654 uint64_t aper_available_size; 657 __u64 aper_available_size;
655}; 658};
656 659
657#endif /* _I915_DRM_H_ */ 660#endif /* _I915_DRM_H_ */