Subversion Repositories Kolibri OS

Rev

Rev 2967 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2967 Rev 4559
Line 166... Line 166...
166
	_DRM_REGISTERS = 1,	  /**< no caching, no core dump */
166
	_DRM_REGISTERS = 1,	  /**< no caching, no core dump */
167
	_DRM_SHM = 2,		  /**< shared, cached */
167
	_DRM_SHM = 2,		  /**< shared, cached */
168
	_DRM_AGP = 3,		  /**< AGP/GART */
168
	_DRM_AGP = 3,		  /**< AGP/GART */
169
	_DRM_SCATTER_GATHER = 4,  /**< Scatter/gather memory for PCI DMA */
169
	_DRM_SCATTER_GATHER = 4,  /**< Scatter/gather memory for PCI DMA */
170
	_DRM_CONSISTENT = 5,	  /**< Consistent memory for PCI DMA */
170
	_DRM_CONSISTENT = 5,	  /**< Consistent memory for PCI DMA */
171
	_DRM_GEM = 6,		  /**< GEM object */
-
 
172
};
171
};
Line 173... Line 172...
173
 
172
 
174
/**
173
/**
175
 * Memory mapping flags.
174
 * Memory mapping flags.
Line 596... Line 595...
596
 
595
 
597
	/** Returned size of the object */
596
	/** Returned size of the object */
598
	__u64 size;
597
	__u64 size;
Line -... Line 598...
-
 
598
};
-
 
599
 
-
 
600
#define DRM_CAP_DUMB_BUFFER		0x1
-
 
601
#define DRM_CAP_VBLANK_HIGH_CRTC	0x2
-
 
602
#define DRM_CAP_DUMB_PREFERRED_DEPTH	0x3
-
 
603
#define DRM_CAP_DUMB_PREFER_SHADOW	0x4
-
 
604
#define DRM_CAP_PRIME			0x5
-
 
605
#define  DRM_PRIME_CAP_IMPORT		0x1
-
 
606
#define  DRM_PRIME_CAP_EXPORT		0x2
-
 
607
#define DRM_CAP_TIMESTAMP_MONOTONIC	0x6
599
};
608
#define DRM_CAP_ASYNC_PAGE_FLIP		0x7
600
 
609
 
601
/** DRM_IOCTL_GET_CAP ioctl argument type */
610
/** DRM_IOCTL_GET_CAP ioctl argument type */
602
struct drm_get_cap {
611
struct drm_get_cap {
603
	__u64 capability;
612
	__u64 capability;
Line -... Line 613...
-
 
613
	__u64 value;
-
 
614
};
-
 
615
 
-
 
616
/**
-
 
617
 * DRM_CLIENT_CAP_STEREO_3D
604
	__u64 value;
618
 *
-
 
619
 * if set to 1, the DRM core will expose the stereo 3D capabilities of the
-
 
620
 * monitor by advertising the supported 3D layouts in the flags of struct
Line -... Line 621...
-
 
621
 * drm_mode_modeinfo.
-
 
622
 */
-
 
623
#define DRM_CLIENT_CAP_STEREO_3D	1
-
 
624
 
605
};
625
/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
-
 
626
struct drm_set_client_cap {
-
 
627
	__u64 capability;
-
 
628
	__u64 value;
-
 
629
};
-
 
630
 
-
 
631
#define DRM_CLOEXEC O_CLOEXEC
-
 
632
struct drm_prime_handle {
-
 
633
	__u32 handle;
-
 
634
 
-
 
635
	/** Flags.. only applicable for handle->fd */
-
 
636
	__u32 flags;
-
 
637
 
-
 
638
	/** Returned dmabuf file descriptor */
-
 
639
	__s32 fd;
-
 
640
};
606
 
641
 
607
#include "drm_mode.h"
642
#include 
608
 
643
 
609
/*
644
#if 0
610
#define DRM_IOCTL_BASE			'd'
645
#define DRM_IOCTL_BASE			'd'
Line 624... Line 659...
624
#define DRM_IOCTL_MODESET_CTL           DRM_IOW(0x08, struct drm_modeset_ctl)
659
#define DRM_IOCTL_MODESET_CTL           DRM_IOW(0x08, struct drm_modeset_ctl)
625
#define DRM_IOCTL_GEM_CLOSE		DRM_IOW (0x09, struct drm_gem_close)
660
#define DRM_IOCTL_GEM_CLOSE		DRM_IOW (0x09, struct drm_gem_close)
626
#define DRM_IOCTL_GEM_FLINK		DRM_IOWR(0x0a, struct drm_gem_flink)
661
#define DRM_IOCTL_GEM_FLINK		DRM_IOWR(0x0a, struct drm_gem_flink)
627
#define DRM_IOCTL_GEM_OPEN		DRM_IOWR(0x0b, struct drm_gem_open)
662
#define DRM_IOCTL_GEM_OPEN		DRM_IOWR(0x0b, struct drm_gem_open)
628
#define DRM_IOCTL_GET_CAP		DRM_IOWR(0x0c, struct drm_get_cap)
663
#define DRM_IOCTL_GET_CAP		DRM_IOWR(0x0c, struct drm_get_cap)
-
 
664
#define DRM_IOCTL_SET_CLIENT_CAP	DRM_IOW( 0x0d, struct drm_set_client_cap)
Line 629... Line 665...
629
 
665
 
630
#define DRM_IOCTL_SET_UNIQUE		DRM_IOW( 0x10, struct drm_unique)
666
#define DRM_IOCTL_SET_UNIQUE		DRM_IOW( 0x10, struct drm_unique)
631
#define DRM_IOCTL_AUTH_MAGIC		DRM_IOW( 0x11, struct drm_auth)
667
#define DRM_IOCTL_AUTH_MAGIC		DRM_IOW( 0x11, struct drm_auth)
632
#define DRM_IOCTL_BLOCK			DRM_IOWR(0x12, struct drm_block)
668
#define DRM_IOCTL_BLOCK			DRM_IOWR(0x12, struct drm_block)
Line 659... Line 695...
659
#define DRM_IOCTL_DMA			DRM_IOWR(0x29, struct drm_dma)
695
#define DRM_IOCTL_DMA			DRM_IOWR(0x29, struct drm_dma)
660
#define DRM_IOCTL_LOCK			DRM_IOW( 0x2a, struct drm_lock)
696
#define DRM_IOCTL_LOCK			DRM_IOW( 0x2a, struct drm_lock)
661
#define DRM_IOCTL_UNLOCK		DRM_IOW( 0x2b, struct drm_lock)
697
#define DRM_IOCTL_UNLOCK		DRM_IOW( 0x2b, struct drm_lock)
662
#define DRM_IOCTL_FINISH		DRM_IOW( 0x2c, struct drm_lock)
698
#define DRM_IOCTL_FINISH		DRM_IOW( 0x2c, struct drm_lock)
Line -... Line 699...
-
 
699
 
663
 
700
#define DRM_IOCTL_PRIME_HANDLE_TO_FD    DRM_IOWR(0x2d, struct drm_prime_handle)
Line 664... Line 701...
664
#define DRM_IOCTL_GEM_PRIME_OPEN        DRM_IOWR(0x2e, struct drm_gem_open)
701
#define DRM_IOCTL_PRIME_FD_TO_HANDLE    DRM_IOWR(0x2e, struct drm_prime_handle)
665
 
702
 
666
#define DRM_IOCTL_AGP_ACQUIRE		DRM_IO(  0x30)
703
#define DRM_IOCTL_AGP_ACQUIRE		DRM_IO(  0x30)
667
#define DRM_IOCTL_AGP_RELEASE		DRM_IO(  0x31)
704
#define DRM_IOCTL_AGP_RELEASE		DRM_IO(  0x31)
Line 685... Line 722...
685
#define DRM_IOCTL_MODE_CURSOR		DRM_IOWR(0xA3, struct drm_mode_cursor)
722
#define DRM_IOCTL_MODE_CURSOR		DRM_IOWR(0xA3, struct drm_mode_cursor)
686
#define DRM_IOCTL_MODE_GETGAMMA		DRM_IOWR(0xA4, struct drm_mode_crtc_lut)
723
#define DRM_IOCTL_MODE_GETGAMMA		DRM_IOWR(0xA4, struct drm_mode_crtc_lut)
687
#define DRM_IOCTL_MODE_SETGAMMA		DRM_IOWR(0xA5, struct drm_mode_crtc_lut)
724
#define DRM_IOCTL_MODE_SETGAMMA		DRM_IOWR(0xA5, struct drm_mode_crtc_lut)
688
#define DRM_IOCTL_MODE_GETENCODER	DRM_IOWR(0xA6, struct drm_mode_get_encoder)
725
#define DRM_IOCTL_MODE_GETENCODER	DRM_IOWR(0xA6, struct drm_mode_get_encoder)
689
#define DRM_IOCTL_MODE_GETCONNECTOR	DRM_IOWR(0xA7, struct drm_mode_get_connector)
726
#define DRM_IOCTL_MODE_GETCONNECTOR	DRM_IOWR(0xA7, struct drm_mode_get_connector)
690
#define DRM_IOCTL_MODE_ATTACHMODE	DRM_IOWR(0xA8, struct drm_mode_mode_cmd)
727
#define DRM_IOCTL_MODE_ATTACHMODE	DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) */
691
#define DRM_IOCTL_MODE_DETACHMODE	DRM_IOWR(0xA9, struct drm_mode_mode_cmd)
728
#define DRM_IOCTL_MODE_DETACHMODE	DRM_IOWR(0xA9, struct drm_mode_mode_cmd) /* deprecated (never worked) */
Line 692... Line 729...
692
 
729
 
693
#define DRM_IOCTL_MODE_GETPROPERTY	DRM_IOWR(0xAA, struct drm_mode_get_property)
730
#define DRM_IOCTL_MODE_GETPROPERTY	DRM_IOWR(0xAA, struct drm_mode_get_property)
694
#define DRM_IOCTL_MODE_SETPROPERTY	DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
731
#define DRM_IOCTL_MODE_SETPROPERTY	DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
695
#define DRM_IOCTL_MODE_GETPROPBLOB	DRM_IOWR(0xAC, struct drm_mode_get_blob)
732
#define DRM_IOCTL_MODE_GETPROPBLOB	DRM_IOWR(0xAC, struct drm_mode_get_blob)
Line 703... Line 740...
703
#define DRM_IOCTL_MODE_MAP_DUMB    DRM_IOWR(0xB3, struct drm_mode_map_dumb)
740
#define DRM_IOCTL_MODE_MAP_DUMB    DRM_IOWR(0xB3, struct drm_mode_map_dumb)
704
#define DRM_IOCTL_MODE_DESTROY_DUMB    DRM_IOWR(0xB4, struct drm_mode_destroy_dumb)
741
#define DRM_IOCTL_MODE_DESTROY_DUMB    DRM_IOWR(0xB4, struct drm_mode_destroy_dumb)
705
#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res)
742
#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res)
706
#define DRM_IOCTL_MODE_GETPLANE	DRM_IOWR(0xB6, struct drm_mode_get_plane)
743
#define DRM_IOCTL_MODE_GETPLANE	DRM_IOWR(0xB6, struct drm_mode_get_plane)
707
#define DRM_IOCTL_MODE_SETPLANE	DRM_IOWR(0xB7, struct drm_mode_set_plane)
744
#define DRM_IOCTL_MODE_SETPLANE	DRM_IOWR(0xB7, struct drm_mode_set_plane)
708
 
-
 
-
 
745
#define DRM_IOCTL_MODE_ADDFB2		DRM_IOWR(0xB8, struct drm_mode_fb_cmd2)
-
 
746
#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES	DRM_IOWR(0xB9, struct drm_mode_obj_get_properties)
-
 
747
#define DRM_IOCTL_MODE_OBJ_SETPROPERTY	DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
-
 
748
#define DRM_IOCTL_MODE_CURSOR2		DRM_IOWR(0xBB, struct drm_mode_cursor2)
709
*/
749
#endif
Line 710... Line 750...
710
 
750
 
711
/**
751
/**
712
 * Device specific ioctls should only be in their respective headers
752
 * Device specific ioctls should only be in their respective headers
713
 * The device specific ioctl range is from 0x40 to 0x99.
753
 * The device specific ioctl range is from 0x40 to 0x99.
Line 746... Line 786...
746
	__u32 tv_usec;
786
	__u32 tv_usec;
747
	__u32 sequence;
787
	__u32 sequence;
748
	__u32 reserved;
788
	__u32 reserved;
749
};
789
};
Line 750... Line -...
750
 
-
 
751
#define DRM_CAP_DUMB_BUFFER 0x1
-
 
752
#define DRM_CAP_VBLANK_HIGH_CRTC 0x2
-
 
753
 
790
 
754
/* typedef area */
791
/* typedef area */
755
#ifndef __KERNEL__
792
#ifndef __KERNEL__
756
typedef struct drm_clip_rect drm_clip_rect_t;
793
typedef struct drm_clip_rect drm_clip_rect_t;
757
typedef struct drm_drawable_info drm_drawable_info_t;
794
typedef struct drm_drawable_info drm_drawable_info_t;