summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2008-11-10radeon: fix fence race condition hopefullyDave Airlie
2008-11-10drm/radeon: add dpms connector functionsDave Airlie
2008-11-10radeon: avivo cursors are across the full surface.Dave Airlie
2008-11-10modesetting: set the crtc x,y after the mode base changeDave Airlie
2008-11-10drm/radeon: add uncached allocator to drm ttm code.Dave Airlie
2008-11-10radeon: fix ring tail overflow issue since alignmentDave Airlie
2008-11-10radeon: disable HDP read cache for nowDave Airlie
2008-11-10radeon: force all ring writes to 16-dword alignment.Dave Airlie
2008-11-10radeon: fixup vram visible calculation to take a/c pinned objects for nowDave Airlie
2008-11-09radeon: add more packet3 relocations handlingJerome Glisse
2008-11-09libdrm-radeon: update libdrm-radeon to match current CS relocation structuresJerome Glisse
2008-11-07intel: Restart on interrupt of bo_wait_rendering instead of complaining.Eric Anholt
2008-11-06radeon: lib radeon add bo & cs gem backendJerome Glisse
2008-11-05radeon: libdrm_radeon add handle to debug stringJerome Glisse
2008-11-05Merge branch 'modesetting-gem' of ssh://git.freedesktop.org/git/mesa/drm into...Jerome Glisse
2008-11-03radeon: make build againDave Airlie
2008-11-03radeon: fix ROP values for the paint ROPDave Airlie
2008-11-03radeon: add mtrr support for VRAM aperture.Dave Airlie
2008-11-03radeon: disable AGP for certain chips if not specified until we figure it outDave Airlie
2008-11-03radeon: disable debugging messageDave Airlie
2008-11-03radeon: commit ring after emitting the buffer discardsDave Airlie
2008-11-03radeon: add more HDMI bitsDave Airlie
2008-11-03radeon: set dma bufs bo type to a kernel typeDave Airlie
2008-11-03radeon: enable DVI-D + HDMI connectors.Dave Airlie
2008-11-03radeon: setup isync cntl properlyDave Airlie
2008-11-03radeon: add more debuggingDave Airlie
2008-11-03radeon: overhaul ring interactionsDave Airlie
2008-11-03radeon: fix race in sysfsDave Airlie
2008-11-03radeon: add proc debugging for interrupts/ringDave Airlie
2008-11-03radeon: only enable dynclks if asked forDave Airlie
2008-11-03radeon: add wait rendering APIDave Airlie
2008-11-03radeon: rs480 fixes for bus masteringDave Airlie
2008-11-03radeon: remove unused gem indirect ioctlDave Airlie
2008-11-03radeon: fix some warningsDave Airlie
2008-11-03radeon: fix free after refcountDave Airlie
2008-11-03radeon: CS2 make it all work with new relocs styleDave Airlie
2008-11-03radeon: don't copy to user the cs idsDave Airlie
2008-11-03radeon: make new CS2 command submission interface port older interface to thisDave Airlie
2008-11-03radeon/drm: fixup ref counting in on fb objsDave Airlie
2008-11-03radeon: release agp on module unloadDave Airlie
2008-11-03radeon: add r423 bits to modesettingDave Airlie
2008-11-03radeon: pull bus master enable into its own functionDave Airlie
2008-11-03radeon: fix accessible VRAM sizingDave Airlie
2008-11-03radeon: update proper chip familyDave Airlie
2008-11-03radeon: fixup scratch register interactions properlyDave Airlie
2008-11-03radeon: make writeback work againDave Airlie
2008-11-03radeon: fix some warningsDave Airlie
2008-11-03radeon: fix small typo in agp codeDave Airlie
2008-11-03radeon: workaround failure to parse some rs48x edidDave Airlie
2008-11-03radeon: don't enable dynclks on rs48xDave Airlie
id='n374' href='#n374'>374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708
/**
 * \file drm.h
 * Header for the Direct Rendering Manager
 *
 * \author Rickard E. (Rik) Faith <faith@valinux.com>
 *
 * \par Acknowledgments:
 * Dec 1999, Richard Henderson <rth@twiddle.net>, move to generic \c cmpxchg.
 */

/*
 * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
 * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
 * All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */

/**
 * \mainpage
 *
 * The Direct Rendering Manager (DRM) is a device-independent kernel-level
 * device driver that provides support for the XFree86 Direct Rendering
 * Infrastructure (DRI).
 *
 * The DRM supports the Direct Rendering Infrastructure (DRI) in four major
 * ways:
 *     -# The DRM provides synchronized access to the graphics hardware via
 *        the use of an optimized two-tiered lock.
 *     -# The DRM enforces the DRI security policy for access to the graphics
 *        hardware by only allowing authenticated X11 clients access to
 *        restricted regions of memory.
 *     -# The DRM provides a generic DMA engine, complete with multiple
 *        queues and the ability to detect the need for an OpenGL context
 *        switch.
 *     -# The DRM is extensible via the use of small device-specific modules
 *        that rely extensively on the API exported by the DRM module.
 *
 */

#ifndef _DRM_H_
#define _DRM_H_

#ifndef __user
#define __user
#endif

#ifdef __GNUC__
# define DEPRECATED  __attribute__ ((deprecated))
#else
# define DEPRECATED
#endif

#if defined(__linux__)
#if defined(__KERNEL__)
#include <linux/config.h>
#endif
#include <asm/ioctl.h>		/* For _IO* macros */
#define DRM_IOCTL_NR(n)		_IOC_NR(n)
#define DRM_IOC_VOID		_IOC_NONE
#define DRM_IOC_READ		_IOC_READ
#define DRM_IOC_WRITE		_IOC_WRITE
#define DRM_IOC_READWRITE	_IOC_READ|_IOC_WRITE
#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
#if defined(__FreeBSD__) && defined(IN_MODULE)
/* Prevent name collision when including sys/ioccom.h */
#undef ioctl
#include <sys/ioccom.h>
#define ioctl(a,b,c)		xf86ioctl(a,b,c)
#else
#include <sys/ioccom.h>
#endif				/* __FreeBSD__ && xf86ioctl */
#define DRM_IOCTL_NR(n)		((n) & 0xff)
#define DRM_IOC_VOID		IOC_VOID
#define DRM_IOC_READ		IOC_OUT
#define DRM_IOC_WRITE		IOC_IN
#define DRM_IOC_READWRITE	IOC_INOUT
#define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
#endif

#define XFREE86_VERSION(major,minor,patch,snap) \
		((major << 16) | (minor << 8) | patch)

#ifndef CONFIG_XFREE86_VERSION
#define CONFIG_XFREE86_VERSION XFREE86_VERSION(4,1,0,0)
#endif

#if CONFIG_XFREE86_VERSION < XFREE86_VERSION(4,1,0,0)
#define DRM_PROC_DEVICES "/proc/devices"
#define DRM_PROC_MISC	 "/proc/misc"
#define DRM_PROC_DRM	 "/proc/drm"
#define DRM_DEV_DRM	 "/dev/drm"
#define DRM_DEV_MODE	 (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
#define DRM_DEV_UID	 0
#define DRM_DEV_GID	 0
#endif

#if CONFIG_XFREE86_VERSION >= XFREE86_VERSION(4,1,0,0)
#ifdef __OpenBSD__
#define DRM_MAJOR       81
#endif
#if defined(__linux__) || defined(__NetBSD__)
#define DRM_MAJOR       226
#endif
#define DRM_MAX_MINOR   255
#endif
#define DRM_NAME	"drm"	  /**< Name in kernel, /dev, and /proc */
#define DRM_MIN_ORDER	5	  /**< At least 2^5 bytes = 32 bytes */
#define DRM_MAX_ORDER	22	  /**< Up to 2^22 bytes = 4MB */
#define DRM_RAM_PERCENT 10	  /**< How much system ram can we lock? */

#define _DRM_LOCK_HELD	0x80000000U /**< Hardware lock is held */
#define _DRM_LOCK_CONT	0x40000000U /**< Hardware lock is contended */
#define _DRM_LOCK_IS_HELD(lock)	   ((lock) & _DRM_LOCK_HELD)
#define _DRM_LOCK_IS_CONT(lock)	   ((lock) & _DRM_LOCK_CONT)
#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT))

#if defined(__linux__)
typedef unsigned int drm_handle_t;
#else
typedef unsigned long drm_handle_t;	/**< To mapped regions */
#endif
typedef unsigned int drm_context_t;	/**< GLXContext handle */
typedef unsigned int drm_drawable_t;
typedef unsigned int drm_magic_t;	/**< Magic for authentication */

/**
 * Cliprect.
 *