dev.h revision 085db961ef8c2b6d7c939fe1fda8152e40b23071
1#ifndef __DEV_H_INCLUDED__ 2#define __DEV_H_INCLUDED__ 3 4#include <stdint.h> 5#include <xf86drmMode.h> 6 7struct sp_bo; 8struct sp_dev; 9 10struct sp_plane { 11 struct sp_dev *dev; 12 drmModePlanePtr plane; 13 struct sp_bo *bo; 14 int in_use; 15 uint32_t format; 16 17 /* Property ID's */ 18 uint32_t crtc_pid; 19 uint32_t fb_pid; 20 uint32_t zpos_pid; 21 uint32_t crtc_x_pid; 22 uint32_t crtc_y_pid; 23 uint32_t crtc_w_pid; 24 uint32_t crtc_h_pid; 25 uint32_t src_x_pid; 26 uint32_t src_y_pid; 27 uint32_t src_w_pid; 28 uint32_t src_h_pid; 29}; 30 31struct sp_connector { 32 drmModeConnectorPtr conn; 33 uint32_t crtc_id_pid; 34}; 35 36struct sp_crtc { 37 drmModeCrtcPtr crtc; 38 int pipe; 39 int num_planes; 40 uint32_t mode_pid; 41}; 42 43struct sp_dev { 44 int fd; 45 46 int num_connectors; 47 struct sp_connector *connectors; 48 49 int num_encoders; 50 drmModeEncoderPtr *encoders; 51 52 int num_crtcs; 53 struct sp_crtc *crtcs; 54 55 int num_planes; 56 struct sp_plane *planes; 57}; 58 59struct sp_dev *create_sp_dev(void); 60void destroy_sp_dev(struct sp_dev *dev); 61 62#endif /* __DEV_H_INCLUDED__ */ 63