Subversion Repositories Kolibri OS

Rev

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

Rev 4279 Rev 4292
Line 738... Line 738...
738
	/* hooks that are for PCI */
738
	/* hooks that are for PCI */
739
	int (*agp_init)(struct drm_device *dev);
739
	int (*agp_init)(struct drm_device *dev);
740
	void (*agp_destroy)(struct drm_device *dev);
740
	void (*agp_destroy)(struct drm_device *dev);
Line 741... Line 741...
741
 
741
 
-
 
742
};
-
 
743
#endif
-
 
744
 
Line 742... Line 745...
742
};
745
#define DRM_IRQ_ARGS            int irq, void *arg
743
 
746
 
744
/**
747
/**
745
 * DRM driver structure. This structure represent the common code for
748
 * DRM driver structure. This structure represent the common code for
746
 * a family of cards. There will one drm_device for each card present
749
 * a family of cards. There will one drm_device for each card present
747
 * in this family
750
 * in this family
748
 */
751
 */
749
struct drm_driver {
-
 
750
	int (*load) (struct drm_device *, unsigned long flags);
752
struct drm_driver {
751
	int (*firstopen) (struct drm_device *);
-
 
752
	int (*open) (struct drm_device *, struct drm_file *);
-
 
753
	void (*preclose) (struct drm_device *, struct drm_file *file_priv);
-
 
754
	void (*postclose) (struct drm_device *, struct drm_file *);
-
 
755
	void (*lastclose) (struct drm_device *);
-
 
756
	int (*unload) (struct drm_device *);
-
 
757
	int (*suspend) (struct drm_device *, pm_message_t state);
-
 
758
	int (*resume) (struct drm_device *);
-
 
759
	int (*dma_ioctl) (struct drm_device *dev, void *data, struct drm_file *file_priv);
-
 
Line 760... Line 753...
760
	int (*dma_quiescent) (struct drm_device *);
753
	int (*load) (struct drm_device *, unsigned long flags);
761
	int (*context_dtor) (struct drm_device *dev, int context);
754
	int (*open) (struct drm_device *, struct drm_file *);
762
 
755
 
763
	/**
756
	/**
Line 802... Line 795...
802
	 * Disable vblank interrupts for @crtc.  If the device doesn't have
795
	 * Disable vblank interrupts for @crtc.  If the device doesn't have
803
	 * a hardware vblank counter, this routine should be a no-op, since
796
	 * a hardware vblank counter, this routine should be a no-op, since
804
	 * interrupts will have to stay on to keep the count accurate.
797
	 * interrupts will have to stay on to keep the count accurate.
805
	 */
798
	 */
806
	void (*disable_vblank) (struct drm_device *dev, int crtc);
799
	void (*disable_vblank) (struct drm_device *dev, int crtc);
807
 
-
 
808
	/**
-
 
809
	 * Called by \c drm_device_is_agp.  Typically used to determine if a
-
 
810
	 * card is really attached to AGP or not.
-
 
811
	 *
-
 
812
	 * \param dev  DRM device handle
-
 
813
	 *
-
 
814
	 * \returns
-
 
815
	 * One of three values is returned depending on whether or not the
-
 
816
	 * card is absolutely \b not AGP (return of 0), absolutely \b is AGP
-
 
817
	 * (return of 1), or may or may not be AGP (return of 2).
-
 
818
	 */
-
 
819
	int (*device_is_agp) (struct drm_device *dev);
-
 
820
 
-
 
821
	/**
800
	/**
822
	 * Called by vblank timestamping code.
801
	 * Called by vblank timestamping code.
823
	 *
802
	 *
824
	 * Return the current display scanout position from a crtc.
803
	 * Return the current display scanout position from a crtc.
825
	 *
804
	 *
Line 885... Line 864...
885
	irqreturn_t(*irq_handler) (DRM_IRQ_ARGS);
864
	irqreturn_t(*irq_handler) (DRM_IRQ_ARGS);
886
	void (*irq_preinstall) (struct drm_device *dev);
865
	void (*irq_preinstall) (struct drm_device *dev);
887
	int (*irq_postinstall) (struct drm_device *dev);
866
	int (*irq_postinstall) (struct drm_device *dev);
888
	void (*irq_uninstall) (struct drm_device *dev);
867
	void (*irq_uninstall) (struct drm_device *dev);
Line 889... Line -...
889
 
-
 
890
	/* Master routines */
-
 
891
	int (*master_create)(struct drm_device *dev, struct drm_master *master);
-
 
892
	void (*master_destroy)(struct drm_device *dev, struct drm_master *master);
-
 
893
	/**
-
 
894
	 * master_set is called whenever the minor master is set.
-
 
895
	 * master_drop is called whenever the minor master is dropped.
-
 
896
	 */
-
 
897
 
-
 
898
	int (*master_set)(struct drm_device *dev, struct drm_file *file_priv,
-
 
899
			  bool from_open);
-
 
900
	void (*master_drop)(struct drm_device *dev, struct drm_file *file_priv,
-
 
901
			    bool from_release);
-
 
902
 
-
 
903
	int (*debugfs_init)(struct drm_minor *minor);
-
 
904
	void (*debugfs_cleanup)(struct drm_minor *minor);
-
 
905
 
868
 
906
	/**
869
	/**
907
	 * Driver-specific constructor for drm_gem_objects, to set up
870
	 * Driver-specific constructor for drm_gem_objects, to set up
908
	 * obj->driver_private.
871
	 * obj->driver_private.
909
	 *
872
	 *
910
	 * Returns 0 on success.
873
	 * Returns 0 on success.
911
	 */
874
	 */
912
	int (*gem_init_object) (struct drm_gem_object *obj);
875
	int (*gem_init_object) (struct drm_gem_object *obj);
913
	void (*gem_free_object) (struct drm_gem_object *obj);
876
	void (*gem_free_object) (struct drm_gem_object *obj);
914
	int (*gem_open_object) (struct drm_gem_object *, struct drm_file *);
877
	int (*gem_open_object) (struct drm_gem_object *, struct drm_file *);
915
	void (*gem_close_object) (struct drm_gem_object *, struct drm_file *);
-
 
916
 
-
 
917
	/* prime: */
-
 
918
	/* export handle -> fd (see drm_gem_prime_handle_to_fd() helper) */
-
 
919
	int (*prime_handle_to_fd)(struct drm_device *dev, struct drm_file *file_priv,
-
 
920
				uint32_t handle, uint32_t flags, int *prime_fd);
-
 
921
	/* import fd -> handle (see drm_gem_prime_fd_to_handle() helper) */
-
 
922
	int (*prime_fd_to_handle)(struct drm_device *dev, struct drm_file *file_priv,
-
 
923
				int prime_fd, uint32_t *handle);
-
 
924
	/* export GEM -> dmabuf */
-
 
925
	struct dma_buf * (*gem_prime_export)(struct drm_device *dev,
-
 
926
				struct drm_gem_object *obj, int flags);
-
 
927
	/* import dmabuf -> GEM */
-
 
928
	struct drm_gem_object * (*gem_prime_import)(struct drm_device *dev,
-
 
929
				struct dma_buf *dma_buf);
-
 
930
 
-
 
931
	/* vga arb irq handler */
-
 
932
	void (*vgaarb_irq)(struct drm_device *dev, bool state);
-
 
933
 
-
 
934
	/* dumb alloc support */
-
 
935
	int (*dumb_create)(struct drm_file *file_priv,
-
 
936
			   struct drm_device *dev,
-
 
937
			   struct drm_mode_create_dumb *args);
-
 
938
	int (*dumb_map_offset)(struct drm_file *file_priv,
-
 
939
			       struct drm_device *dev, uint32_t handle,
-
 
940
			       uint64_t *offset);
-
 
941
	int (*dumb_destroy)(struct drm_file *file_priv,
-
 
942
			    struct drm_device *dev,
-
 
943
			    uint32_t handle);
-
 
944
 
-
 
945
	/* Driver private ops for this object */
-
 
946
	const struct vm_operations_struct *gem_vm_ops;
-
 
947
 
-
 
948
	int major;
-
 
949
	int minor;
-
 
950
	int patchlevel;
-
 
951
	char *name;
-
 
952
	char *desc;
-
 
953
	char *date;
-
 
954
 
-
 
955
	u32 driver_features;
-
 
956
	int dev_priv_size;
-
 
957
	const struct drm_ioctl_desc *ioctls;
-
 
958
	int num_ioctls;
-
 
959
	const struct file_operations *fops;
-
 
960
	union {
-
 
961
		struct pci_driver *pci;
-
 
962
		struct platform_device *platform_device;
-
 
963
		struct usb_driver *usb;
-
 
964
	} kdriver;
-
 
965
	struct drm_bus *bus;
-
 
966
 
-
 
967
	/* List of devices hanging off this driver */
-
 
968
	struct list_head device_list;
-
 
969
};
-
 
970
 
-
 
971
#endif
-
 
972
 
-
 
973
#define DRM_IRQ_ARGS            int irq, void *arg
-
 
974
 
-
 
975
struct drm_driver {
-
 
976
	int (*load) (struct drm_device *, unsigned long flags);
-
 
977
	int (*open) (struct drm_device *, struct drm_file *);
-
 
978
 
-
 
979
    irqreturn_t (*irq_handler) (DRM_IRQ_ARGS);
-
 
980
    void (*irq_preinstall) (struct drm_device *dev);
-
 
981
    int (*irq_postinstall) (struct drm_device *dev);
-
 
982
 
-
 
983
	int (*gem_init_object) (struct drm_gem_object *obj);
-
 
984
	void (*gem_free_object) (struct drm_gem_object *obj);
-
 
985
	int (*gem_open_object) (struct drm_gem_object *, struct drm_file *);
-
 
986
	void (*gem_close_object) (struct drm_gem_object *, struct drm_file *);
878
	void (*gem_close_object) (struct drm_gem_object *, struct drm_file *);
987
	u32 driver_features;
879
	u32 driver_features;
Line 988... Line -...
988
};
-
 
989
 
880
};
990
 
881
 
991
#define DRM_MINOR_UNASSIGNED 0
882
#define DRM_MINOR_UNASSIGNED 0
992
#define DRM_MINOR_LEGACY 1
883
#define DRM_MINOR_LEGACY 1