Subversion Repositories Kolibri OS

Rev

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

Rev 5179 Rev 5271
Line 58... Line 58...
58
 *                          function should do is setting the GPU
58
 *                          function should do is setting the GPU
59
 *                          memory controller (only MC setup failure
59
 *                          memory controller (only MC setup failure
60
 *                          are considered as fatal)
60
 *                          are considered as fatal)
61
 */
61
 */
Line 62... Line 62...
62
 
62
 
63
#include 
63
#include 
64
#include 
64
#include 
65
#include 
65
#include 
66
#include 
66
#include 
67
#include 
67
#include 
-
 
68
#include 
Line 68... Line 69...
68
#include 
69
#include 
69
 
70
 
70
#include 
71
#include 
71
#include 
72
#include 
72
#include 
73
#include 
Line 73... Line 74...
73
//#include 
74
//#include 
74
#include 
-
 
Line -... Line 75...
-
 
75
#include 
75
 
76
 
Line 76... Line 77...
76
#include 
77
#include 
77
#include 
78
 
78
 
79
#include 
Line 152... Line 153...
152
#define RADEON_IB_POOL_SIZE             16
153
#define RADEON_IB_POOL_SIZE             16
153
#define RADEON_DEBUGFS_MAX_COMPONENTS	32
154
#define RADEON_DEBUGFS_MAX_COMPONENTS	32
154
#define RADEONFB_CONN_LIMIT             4
155
#define RADEONFB_CONN_LIMIT             4
155
#define RADEON_BIOS_NUM_SCRATCH		8
156
#define RADEON_BIOS_NUM_SCRATCH		8
Line 156... Line -...
156
 
-
 
157
/* fence seq are set to this number when signaled */
-
 
158
#define RADEON_FENCE_SIGNALED_SEQ		0LL
-
 
159
 
157
 
160
/* internal ring indices */
158
/* internal ring indices */
161
/* r1xx+ has gfx CP ring */
159
/* r1xx+ has gfx CP ring */
Line 162... Line 160...
162
#define RADEON_RING_TYPE_GFX_INDEX  0
160
#define RADEON_RING_TYPE_GFX_INDEX  0
Line 181... Line 179...
181
#define RADEON_NUM_RINGS			8
179
#define RADEON_NUM_RINGS			8
Line 182... Line 180...
182
 
180
 
183
/* number of hw syncs before falling back on blocking */
181
/* number of hw syncs before falling back on blocking */
Line 184... Line -...
184
#define RADEON_NUM_SYNCS			4
-
 
185
 
-
 
186
/* number of hw syncs before falling back on blocking */
-
 
187
#define RADEON_NUM_SYNCS			4
182
#define RADEON_NUM_SYNCS			4
188
 
183
 
189
/* hardcode those limit for now */
184
/* hardcode those limit for now */
190
#define RADEON_VA_IB_OFFSET			(1 << 20)
185
#define RADEON_VA_IB_OFFSET			(1 << 20)
Line 382... Line 377...
382
 
377
 
383
/*
378
/*
384
 * Fences.
379
 * Fences.
385
 */
380
 */
-
 
381
struct radeon_fence_driver {
386
struct radeon_fence_driver {
382
	struct radeon_device		*rdev;
387
	uint32_t			scratch_reg;
383
	uint32_t			scratch_reg;
388
	uint64_t			gpu_addr;
384
	uint64_t			gpu_addr;
389
	volatile uint32_t		*cpu_addr;
385
	volatile uint32_t		*cpu_addr;
390
	/* sync_seq is protected by ring emission lock */
386
	/* sync_seq is protected by ring emission lock */
391
	uint64_t			sync_seq[RADEON_NUM_RINGS];
387
	uint64_t			sync_seq[RADEON_NUM_RINGS];
392
	atomic64_t			last_seq;
388
	atomic64_t			last_seq;
-
 
389
	bool				initialized, delayed_irq;
393
	bool				initialized;
390
	struct delayed_work		lockup_work;
Line 394... Line 391...
394
};
391
};
-
 
392
 
-
 
393
struct radeon_fence {
395
 
394
	struct fence		base;
396
struct radeon_fence {
-
 
397
    struct radeon_device   *rdev;
-
 
398
    struct kref             kref;
395
 
399
	/* protected by radeon_fence.lock */
396
    struct radeon_device   *rdev;
400
	uint64_t			seq;
397
	uint64_t			seq;
-
 
398
	/* RB, DMA, etc. */
-
 
399
	unsigned			ring;
-
 
400
	bool			is_vm_update;
401
	/* RB, DMA, etc. */
401
 
Line 402... Line 402...
402
	unsigned			ring;
402
	wait_queue_t		fence_wake;
403
};
403
};
404
 
404
 
405
int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring);
405
int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring);
406
int radeon_fence_driver_init(struct radeon_device *rdev);
406
int radeon_fence_driver_init(struct radeon_device *rdev);
407
void radeon_fence_driver_fini(struct radeon_device *rdev);
407
void radeon_fence_driver_fini(struct radeon_device *rdev);
408
void radeon_fence_driver_force_completion(struct radeon_device *rdev);
408
void radeon_fence_driver_force_completion(struct radeon_device *rdev, int ring);
409
int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence **fence, int ring);
409
int radeon_fence_emit(struct radeon_device *rdev, struct radeon_fence **fence, int ring);
410
void radeon_fence_process(struct radeon_device *rdev, int ring);
410
void radeon_fence_process(struct radeon_device *rdev, int ring);
Line 479... Line 479...
479
	struct dentry			*vram;
479
	struct dentry			*vram;
480
	struct dentry			*gtt;
480
	struct dentry			*gtt;
481
#endif
481
#endif
482
};
482
};
Line -... Line 483...
-
 
483
 
-
 
484
struct radeon_bo_list {
-
 
485
	struct radeon_bo		*robj;
-
 
486
	struct ttm_validate_buffer	tv;
-
 
487
	uint64_t			gpu_offset;
-
 
488
	unsigned			prefered_domains;
-
 
489
	unsigned			allowed_domains;
-
 
490
	uint32_t			tiling_flags;
-
 
491
};
483
 
492
 
484
/* bo virtual address in a specific vm */
493
/* bo virtual address in a specific vm */
485
struct radeon_bo_va {
494
struct radeon_bo_va {
486
	/* protected by bo being reserved */
495
	/* protected by bo being reserved */
487
	struct list_head		bo_list;
496
	struct list_head		bo_list;
488
	uint32_t			flags;
497
	uint32_t			flags;
-
 
498
	uint64_t			addr;
489
	uint64_t			addr;
499
	struct radeon_fence		*last_pt_update;
Line 490... Line 500...
490
	unsigned			ref_count;
500
	unsigned			ref_count;
491
 
501
 
492
	/* protected by vm mutex */
502
	/* protected by vm mutex */
Line 501... Line 511...
501
struct radeon_bo {
511
struct radeon_bo {
502
	/* Protected by gem.mutex */
512
	/* Protected by gem.mutex */
503
	struct list_head		list;
513
	struct list_head		list;
504
	/* Protected by tbo.reserved */
514
	/* Protected by tbo.reserved */
505
	u32				initial_domain;
515
	u32				initial_domain;
506
	u32				placements[3];
516
	struct ttm_place		placements[4];
507
    struct ttm_placement        placement;
517
    struct ttm_placement        placement;
508
    struct ttm_buffer_object    tbo;
518
    struct ttm_buffer_object    tbo;
509
	struct ttm_bo_kmap_obj		kmap;
519
	struct ttm_bo_kmap_obj		kmap;
510
	u32				flags;
520
	u32				flags;
511
    unsigned                    pin_count;
521
    unsigned                    pin_count;
Line 520... Line 530...
520
	/* Constant after initialization */
530
	/* Constant after initialization */
521
	struct radeon_device		*rdev;
531
	struct radeon_device		*rdev;
522
	struct drm_gem_object		gem_base;
532
	struct drm_gem_object		gem_base;
Line 523... Line 533...
523
 
533
 
-
 
534
	pid_t				pid;
-
 
535
 
524
	pid_t				pid;
536
	struct radeon_mn		*mn;
525
};
537
};
Line 526... Line 538...
526
#define gem_to_radeon_bo(gobj) container_of((gobj), struct radeon_bo, gem_base)
538
#define gem_to_radeon_bo(gobj) container_of((gobj), struct radeon_bo, gem_base)
Line 602... Line 614...
602
 */
614
 */
603
struct radeon_semaphore {
615
struct radeon_semaphore {
604
	struct radeon_sa_bo		*sa_bo;
616
	struct radeon_sa_bo		*sa_bo;
605
	signed				waiters;
617
	signed				waiters;
606
	uint64_t			gpu_addr;
618
	uint64_t			gpu_addr;
607
	struct radeon_fence		*sync_to[RADEON_NUM_RINGS];
-
 
608
};
619
};
Line 609... Line 620...
609
 
620
 
610
int radeon_semaphore_create(struct radeon_device *rdev,
621
int radeon_semaphore_create(struct radeon_device *rdev,
611
			    struct radeon_semaphore **semaphore);
622
			    struct radeon_semaphore **semaphore);
612
bool radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
623
bool radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring,
613
				  struct radeon_semaphore *semaphore);
624
				  struct radeon_semaphore *semaphore);
614
bool radeon_semaphore_emit_wait(struct radeon_device *rdev, int ring,
625
bool radeon_semaphore_emit_wait(struct radeon_device *rdev, int ring,
615
				struct radeon_semaphore *semaphore);
-
 
616
void radeon_semaphore_sync_to(struct radeon_semaphore *semaphore,
-
 
617
			      struct radeon_fence *fence);
-
 
618
int radeon_semaphore_sync_rings(struct radeon_device *rdev,
-
 
619
				struct radeon_semaphore *semaphore,
-
 
620
				int waiting_ring);
626
				struct radeon_semaphore *semaphore);
621
void radeon_semaphore_free(struct radeon_device *rdev,
627
void radeon_semaphore_free(struct radeon_device *rdev,
622
			   struct radeon_semaphore **semaphore,
628
			   struct radeon_semaphore **semaphore,
Line 623... Line 629...
623
			   struct radeon_fence *fence);
629
			   struct radeon_fence *fence);
-
 
630
 
-
 
631
/*
-
 
632
 * Synchronization
-
 
633
 */
-
 
634
struct radeon_sync {
-
 
635
	struct radeon_semaphore *semaphores[RADEON_NUM_SYNCS];
-
 
636
	struct radeon_fence	*sync_to[RADEON_NUM_RINGS];
-
 
637
	struct radeon_fence	*last_vm_update;
-
 
638
};
-
 
639
 
-
 
640
void radeon_sync_create(struct radeon_sync *sync);
-
 
641
void radeon_sync_fence(struct radeon_sync *sync,
-
 
642
			      struct radeon_fence *fence);
-
 
643
int radeon_sync_resv(struct radeon_device *rdev,
-
 
644
		     struct radeon_sync *sync,
-
 
645
		     struct reservation_object *resv,
-
 
646
		     bool shared);
-
 
647
int radeon_sync_rings(struct radeon_device *rdev,
-
 
648
		      struct radeon_sync *sync,
-
 
649
				int waiting_ring);
-
 
650
void radeon_sync_free(struct radeon_device *rdev, struct radeon_sync *sync,
-
 
651
			   struct radeon_fence *fence);
624
 
652
 
625
/*
653
/*
626
 * GART structures, functions & helpers
654
 * GART structures, functions & helpers
Line 627... Line 655...
627
 */
655
 */
Line 720... Line 748...
720
	unsigned long		used[DIV_ROUND_UP(RADEON_MAX_DOORBELLS, BITS_PER_LONG)];
748
	unsigned long		used[DIV_ROUND_UP(RADEON_MAX_DOORBELLS, BITS_PER_LONG)];
721
};
749
};
Line 722... Line 750...
722
 
750
 
723
int radeon_doorbell_get(struct radeon_device *rdev, u32 *page);
751
int radeon_doorbell_get(struct radeon_device *rdev, u32 *page);
-
 
752
void radeon_doorbell_free(struct radeon_device *rdev, u32 doorbell);
-
 
753
void radeon_doorbell_get_kfd_info(struct radeon_device *rdev,
-
 
754
				  phys_addr_t *aperture_base,
-
 
755
				  size_t *aperture_size,
Line 724... Line 756...
724
void radeon_doorbell_free(struct radeon_device *rdev, u32 doorbell);
756
				  size_t *start_offset);
725
 
757
 
726
/*
758
/*
727
 * IRQS.
759
 * IRQS.
Line 799... Line 831...
799
};
831
};
Line 800... Line 832...
800
 
832
 
801
int radeon_irq_kms_init(struct radeon_device *rdev);
833
int radeon_irq_kms_init(struct radeon_device *rdev);
802
void radeon_irq_kms_fini(struct radeon_device *rdev);
834
void radeon_irq_kms_fini(struct radeon_device *rdev);
-
 
835
void radeon_irq_kms_sw_irq_get(struct radeon_device *rdev, int ring);
803
void radeon_irq_kms_sw_irq_get(struct radeon_device *rdev, int ring);
836
bool radeon_irq_kms_sw_irq_get_delayed(struct radeon_device *rdev, int ring);
804
void radeon_irq_kms_sw_irq_put(struct radeon_device *rdev, int ring);
837
void radeon_irq_kms_sw_irq_put(struct radeon_device *rdev, int ring);
805
void radeon_irq_kms_pflip_irq_get(struct radeon_device *rdev, int crtc);
838
void radeon_irq_kms_pflip_irq_get(struct radeon_device *rdev, int crtc);
806
void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc);
839
void radeon_irq_kms_pflip_irq_put(struct radeon_device *rdev, int crtc);
807
void radeon_irq_kms_enable_afmt(struct radeon_device *rdev, int block);
840
void radeon_irq_kms_enable_afmt(struct radeon_device *rdev, int block);
Line 820... Line 853...
820
	uint32_t		*ptr;
853
	uint32_t		*ptr;
821
	int				ring;
854
	int				ring;
822
	struct radeon_fence	*fence;
855
	struct radeon_fence	*fence;
823
	struct radeon_vm		*vm;
856
	struct radeon_vm		*vm;
824
	bool			is_const_ib;
857
	bool			is_const_ib;
825
	struct radeon_semaphore		*semaphore;
858
	struct radeon_sync		sync;
826
};
859
};
Line 827... Line 860...
827
 
860
 
828
struct radeon_ring {
861
struct radeon_ring {
829
	struct radeon_bo	*ring_obj;
862
	struct radeon_bo	*ring_obj;
Line 897... Line 930...
897
struct radeon_vm_pt {
930
struct radeon_vm_pt {
898
	struct radeon_bo		*bo;
931
	struct radeon_bo		*bo;
899
	uint64_t			addr;
932
	uint64_t			addr;
900
};
933
};
Line -... Line 934...
-
 
934
 
-
 
935
struct radeon_vm_id {
-
 
936
	unsigned		id;
-
 
937
	uint64_t		pd_gpu_addr;
-
 
938
	/* last flushed PD/PT update */
-
 
939
	struct radeon_fence	*flushed_updates;
-
 
940
	/* last use of vmid */
-
 
941
	struct radeon_fence	*last_id_use;
-
 
942
};
901
 
943
 
-
 
944
struct radeon_vm {
-
 
945
	struct mutex		mutex;
902
struct radeon_vm {
946
 
-
 
947
	struct rb_root			va;
-
 
948
 
903
	struct rb_root			va;
949
	/* protecting invalidated and freed */
Line 904... Line 950...
904
	unsigned			id;
950
	spinlock_t		status_lock;
905
 
951
 
Line 906... Line 952...
906
	/* BOs moved, but not yet updated in the PT */
952
	/* BOs moved, but not yet updated in the PT */
907
	struct list_head		invalidated;
953
	struct list_head		invalidated;
Line 908... Line 954...
908
 
954
 
909
	/* BOs freed, but not yet updated in the PT */
955
	/* BOs freed, but not yet updated in the PT */
910
	struct list_head		freed;
-
 
911
 
956
	struct list_head		freed;
Line 912... Line 957...
912
	/* contains the page directory */
957
 
913
	struct radeon_bo		*page_directory;
958
	/* contains the page directory */
Line 914... Line 959...
914
	uint64_t			pd_gpu_addr;
959
	struct radeon_bo		*page_directory;
Line 915... Line -...
915
	unsigned			max_pde_used;
-
 
916
 
960
	unsigned			max_pde_used;
917
	/* array of page tables, one for each page directory entry */
-
 
918
	struct radeon_vm_pt		*page_tables;
-
 
919
 
-
 
920
	struct radeon_bo_va		*ib_bo_va;
-
 
921
 
961
 
922
	struct mutex			mutex;
962
	/* array of page tables, one for each page directory entry */
Line 923... Line 963...
923
	/* last fence for cs using this vm */
963
	struct radeon_vm_pt		*page_tables;
924
	struct radeon_fence		*fence;
964
 
925
	/* last flush or NULL if we still need to flush */
965
	struct radeon_bo_va		*ib_bo_va;
Line 1031... Line 1071...
1031
void cayman_dma_fini(struct radeon_device *rdev);
1071
void cayman_dma_fini(struct radeon_device *rdev);
Line 1032... Line 1072...
1032
 
1072
 
1033
/*
1073
/*
1034
 * CS.
1074
 * CS.
1035
 */
-
 
1036
struct radeon_cs_reloc {
-
 
1037
	struct drm_gem_object		*gobj;
-
 
1038
	struct radeon_bo		*robj;
-
 
1039
	struct ttm_validate_buffer	tv;
-
 
1040
	uint64_t			gpu_offset;
-
 
1041
	unsigned			prefered_domains;
-
 
1042
	unsigned			allowed_domains;
-
 
1043
	uint32_t			tiling_flags;
-
 
1044
    uint32_t                handle;
-
 
1045
};
-
 
1046
 
1075
 */
1047
struct radeon_cs_chunk {
-
 
1048
	uint32_t		chunk_id;
1076
struct radeon_cs_chunk {
1049
	uint32_t		length_dw;
1077
	uint32_t		length_dw;
1050
	uint32_t		*kdata;
1078
	uint32_t		*kdata;
1051
	void __user *user_ptr;
1079
	void __user *user_ptr;
Line 1061... Line 1089...
1061
	uint64_t		*chunks_array;
1089
	uint64_t		*chunks_array;
1062
	/* IB */
1090
	/* IB */
1063
	unsigned		idx;
1091
	unsigned		idx;
1064
	/* relocations */
1092
	/* relocations */
1065
	unsigned		nrelocs;
1093
	unsigned		nrelocs;
1066
	struct radeon_cs_reloc	*relocs;
1094
	struct radeon_bo_list	*relocs;
1067
	struct radeon_cs_reloc	**relocs_ptr;
-
 
1068
	struct radeon_cs_reloc	*vm_bos;
1095
	struct radeon_bo_list	*vm_bos;
1069
	struct list_head	validated;
1096
	struct list_head	validated;
1070
	unsigned		dma_reloc_idx;
1097
	unsigned		dma_reloc_idx;
1071
	/* indices of various chunks */
1098
	/* indices of various chunks */
1072
	int			chunk_ib_idx;
1099
	struct radeon_cs_chunk  *chunk_ib;
1073
	int			chunk_relocs_idx;
1100
	struct radeon_cs_chunk  *chunk_relocs;
1074
	int			chunk_flags_idx;
1101
	struct radeon_cs_chunk  *chunk_flags;
1075
	int			chunk_const_ib_idx;
1102
	struct radeon_cs_chunk  *chunk_const_ib;
1076
	struct radeon_ib	ib;
1103
	struct radeon_ib	ib;
1077
	struct radeon_ib	const_ib;
1104
	struct radeon_ib	const_ib;
1078
	void			*track;
1105
	void			*track;
1079
	unsigned		family;
1106
	unsigned		family;
1080
	int parser_error;
1107
	int parser_error;
Line 1084... Line 1111...
1084
	struct ww_acquire_ctx	ticket;
1111
	struct ww_acquire_ctx	ticket;
1085
};
1112
};
Line 1086... Line 1113...
1086
 
1113
 
1087
static inline u32 radeon_get_ib_value(struct radeon_cs_parser *p, int idx)
1114
static inline u32 radeon_get_ib_value(struct radeon_cs_parser *p, int idx)
1088
{
1115
{
Line 1089... Line 1116...
1089
	struct radeon_cs_chunk *ibc = &p->chunks[p->chunk_ib_idx];
1116
	struct radeon_cs_chunk *ibc = p->chunk_ib;
1090
 
1117
 
1091
	if (ibc->kdata)
1118
	if (ibc->kdata)
1092
		return ibc->kdata[idx];
1119
		return ibc->kdata[idx];
Line 1496... Line 1523...
1496
	u16 pwm_med;
1523
	u16 pwm_med;
1497
	u16 pwm_high;
1524
	u16 pwm_high;
1498
	u8 t_hyst;
1525
	u8 t_hyst;
1499
	u32 cycle_delay;
1526
	u32 cycle_delay;
1500
	u16 t_max;
1527
	u16 t_max;
-
 
1528
	u8 control_mode;
-
 
1529
	u16 default_max_fan_pwm;
-
 
1530
	u16 default_fan_output_sensitivity;
-
 
1531
	u16 fan_output_sensitivity;
1501
	bool ucode_fan_control;
1532
	bool ucode_fan_control;
1502
};
1533
};
Line 1503... Line 1534...
1503
 
1534
 
1504
enum radeon_pcie_gen {
1535
enum radeon_pcie_gen {
Line 1629... Line 1660...
1629
	int                     profile_index;
1660
	int                     profile_index;
1630
	struct radeon_pm_profile profiles[PM_PROFILE_MAX];
1661
	struct radeon_pm_profile profiles[PM_PROFILE_MAX];
1631
	/* internal thermal controller on rv6xx+ */
1662
	/* internal thermal controller on rv6xx+ */
1632
	enum radeon_int_thermal_type int_thermal_type;
1663
	enum radeon_int_thermal_type int_thermal_type;
1633
	struct device	        *int_hwmon_dev;
1664
	struct device	        *int_hwmon_dev;
-
 
1665
	/* fan control parameters */
-
 
1666
	bool                    no_fan;
-
 
1667
	u8                      fan_pulses_per_revolution;
-
 
1668
	u8                      fan_min_rpm;
-
 
1669
	u8                      fan_max_rpm;
1634
	/* dpm */
1670
	/* dpm */
1635
	bool                    dpm_enabled;
1671
	bool                    dpm_enabled;
1636
	struct radeon_dpm       dpm;
1672
	struct radeon_dpm       dpm;
1637
};
1673
};
Line 1663... Line 1699...
1663
int radeon_uvd_resume(struct radeon_device *rdev);
1699
int radeon_uvd_resume(struct radeon_device *rdev);
1664
int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring,
1700
int radeon_uvd_get_create_msg(struct radeon_device *rdev, int ring,
1665
			      uint32_t handle, struct radeon_fence **fence);
1701
			      uint32_t handle, struct radeon_fence **fence);
1666
int radeon_uvd_get_destroy_msg(struct radeon_device *rdev, int ring,
1702
int radeon_uvd_get_destroy_msg(struct radeon_device *rdev, int ring,
1667
			       uint32_t handle, struct radeon_fence **fence);
1703
			       uint32_t handle, struct radeon_fence **fence);
1668
void radeon_uvd_force_into_uvd_segment(struct radeon_bo *rbo);
1704
void radeon_uvd_force_into_uvd_segment(struct radeon_bo *rbo,
-
 
1705
				       uint32_t allowed_domains);
1669
void radeon_uvd_free_handles(struct radeon_device *rdev,
1706
void radeon_uvd_free_handles(struct radeon_device *rdev,
1670
			     struct drm_file *filp);
1707
			     struct drm_file *filp);
1671
int radeon_uvd_cs_parse(struct radeon_cs_parser *parser);
1708
int radeon_uvd_cs_parse(struct radeon_cs_parser *parser);
1672
void radeon_uvd_note_usage(struct radeon_device *rdev);
1709
void radeon_uvd_note_usage(struct radeon_device *rdev);
1673
int radeon_uvd_calc_upll_dividers(struct radeon_device *rdev,
1710
int radeon_uvd_calc_upll_dividers(struct radeon_device *rdev,
Line 1752... Line 1789...
1752
void radeon_test_ring_sync(struct radeon_device *rdev,
1789
void radeon_test_ring_sync(struct radeon_device *rdev,
1753
			   struct radeon_ring *cpA,
1790
			   struct radeon_ring *cpA,
1754
			   struct radeon_ring *cpB);
1791
			   struct radeon_ring *cpB);
1755
void radeon_test_syncing(struct radeon_device *rdev);
1792
void radeon_test_syncing(struct radeon_device *rdev);
Line -... Line 1793...
-
 
1793
 
-
 
1794
/*
-
 
1795
 * MMU Notifier
-
 
1796
 */
-
 
1797
int radeon_mn_register(struct radeon_bo *bo, unsigned long addr);
Line 1756... Line 1798...
1756
 
1798
void radeon_mn_unregister(struct radeon_bo *bo);
1757
 
1799
 
1758
/*
1800
/*
1759
 * Debugfs
1801
 * Debugfs
Line 1785... Line 1827...
1785
	void (*ib_execute)(struct radeon_device *rdev, struct radeon_ib *ib);
1827
	void (*ib_execute)(struct radeon_device *rdev, struct radeon_ib *ib);
1786
	void (*emit_fence)(struct radeon_device *rdev, struct radeon_fence *fence);
1828
	void (*emit_fence)(struct radeon_device *rdev, struct radeon_fence *fence);
1787
	void (*hdp_flush)(struct radeon_device *rdev, struct radeon_ring *ring);
1829
	void (*hdp_flush)(struct radeon_device *rdev, struct radeon_ring *ring);
1788
	bool (*emit_semaphore)(struct radeon_device *rdev, struct radeon_ring *cp,
1830
	bool (*emit_semaphore)(struct radeon_device *rdev, struct radeon_ring *cp,
1789
			       struct radeon_semaphore *semaphore, bool emit_wait);
1831
			       struct radeon_semaphore *semaphore, bool emit_wait);
1790
	void (*vm_flush)(struct radeon_device *rdev, int ridx, struct radeon_vm *vm);
1832
	void (*vm_flush)(struct radeon_device *rdev, struct radeon_ring *ring,
-
 
1833
			 unsigned vm_id, uint64_t pd_addr);
Line 1791... Line 1834...
1791
 
1834
 
1792
	/* testing functions */
1835
	/* testing functions */
1793
	int (*ring_test)(struct radeon_device *rdev, struct radeon_ring *cp);
1836
	int (*ring_test)(struct radeon_device *rdev, struct radeon_ring *cp);
1794
	int (*ib_test)(struct radeon_device *rdev, struct radeon_ring *cp);
1837
	int (*ib_test)(struct radeon_device *rdev, struct radeon_ring *cp);
Line 1866... Line 1909...
1866
		void (*hdmi_enable)(struct drm_encoder *encoder, bool enable);
1909
		void (*hdmi_enable)(struct drm_encoder *encoder, bool enable);
1867
		void (*hdmi_setmode)(struct drm_encoder *encoder, struct drm_display_mode *mode);
1910
		void (*hdmi_setmode)(struct drm_encoder *encoder, struct drm_display_mode *mode);
1868
	} display;
1911
	} display;
1869
	/* copy functions for bo handling */
1912
	/* copy functions for bo handling */
1870
	struct {
1913
	struct {
1871
		int (*blit)(struct radeon_device *rdev,
1914
		struct radeon_fence *(*blit)(struct radeon_device *rdev,
1872
			 uint64_t src_offset,
1915
			 uint64_t src_offset,
1873
			 uint64_t dst_offset,
1916
			 uint64_t dst_offset,
1874
			 unsigned num_gpu_pages,
1917
			 unsigned num_gpu_pages,
1875
			    struct radeon_fence **fence);
1918
					     struct reservation_object *resv);
1876
		u32 blit_ring_index;
1919
		u32 blit_ring_index;
1877
		int (*dma)(struct radeon_device *rdev,
1920
		struct radeon_fence *(*dma)(struct radeon_device *rdev,
1878
			uint64_t src_offset,
1921
			uint64_t src_offset,
1879
			uint64_t dst_offset,
1922
			uint64_t dst_offset,
1880
			unsigned num_gpu_pages,
1923
			unsigned num_gpu_pages,
1881
			   struct radeon_fence **fence);
1924
					    struct reservation_object *resv);
1882
		u32 dma_ring_index;
1925
		u32 dma_ring_index;
1883
		/* method used for bo copy */
1926
		/* method used for bo copy */
1884
	int (*copy)(struct radeon_device *rdev,
1927
		struct radeon_fence *(*copy)(struct radeon_device *rdev,
1885
		    uint64_t src_offset,
1928
		    uint64_t src_offset,
1886
		    uint64_t dst_offset,
1929
		    uint64_t dst_offset,
1887
		    unsigned num_gpu_pages,
1930
		    unsigned num_gpu_pages,
1888
			    struct radeon_fence **fence);
1931
					     struct reservation_object *resv);
1889
		/* ring used for bo copies */
1932
		/* ring used for bo copies */
1890
		u32 copy_ring_index;
1933
		u32 copy_ring_index;
1891
	} copy;
1934
	} copy;
1892
	/* surfaces */
1935
	/* surfaces */
1893
	struct {
1936
	struct {
Line 2289... Line 2332...
2289
    struct radeon_scratch       scratch;
2332
    struct radeon_scratch       scratch;
2290
	struct radeon_doorbell		doorbell;
2333
	struct radeon_doorbell		doorbell;
2291
    struct radeon_mman          mman;
2334
    struct radeon_mman          mman;
2292
	struct radeon_fence_driver	fence_drv[RADEON_NUM_RINGS];
2335
	struct radeon_fence_driver	fence_drv[RADEON_NUM_RINGS];
2293
	wait_queue_head_t		fence_queue;
2336
	wait_queue_head_t		fence_queue;
-
 
2337
	unsigned			fence_context;
2294
	struct mutex			ring_lock;
2338
	struct mutex			ring_lock;
2295
	struct radeon_ring		ring[RADEON_NUM_RINGS];
2339
	struct radeon_ring		ring[RADEON_NUM_RINGS];
2296
	bool				ib_pool_ready;
2340
	bool				ib_pool_ready;
2297
	struct radeon_sa_manager	ring_tmp_bo;
2341
	struct radeon_sa_manager	ring_tmp_bo;
2298
    struct radeon_irq       irq;
2342
    struct radeon_irq       irq;
Line 2307... Line 2351...
2307
    bool                shutdown;
2351
    bool                shutdown;
2308
    bool                suspend;
2352
    bool                suspend;
2309
	bool				need_dma32;
2353
	bool				need_dma32;
2310
	bool				accel_working;
2354
	bool				accel_working;
2311
	bool				fastfb_working; /* IGP feature*/
2355
	bool				fastfb_working; /* IGP feature*/
2312
	bool				needs_reset;
2356
	bool				needs_reset, in_reset;
2313
	struct radeon_surface_reg surface_regs[RADEON_GEM_MAX_SURFACES];
2357
	struct radeon_surface_reg surface_regs[RADEON_GEM_MAX_SURFACES];
2314
	const struct firmware *me_fw;	/* all family ME firmware */
2358
	const struct firmware *me_fw;	/* all family ME firmware */
2315
	const struct firmware *pfp_fw;	/* r6/700 PFP firmware */
2359
	const struct firmware *pfp_fw;	/* r6/700 PFP firmware */
2316
	const struct firmware *rlc_fw;	/* r6/700 RLC firmware */
2360
	const struct firmware *rlc_fw;	/* r6/700 RLC firmware */
2317
	const struct firmware *mc_fw;	/* NI MC firmware */
2361
	const struct firmware *mc_fw;	/* NI MC firmware */
Line 2328... Line 2372...
2328
	struct r600_ih ih; /* r6/700 interrupt ring */
2372
	struct r600_ih ih; /* r6/700 interrupt ring */
2329
	struct radeon_rlc rlc;
2373
	struct radeon_rlc rlc;
2330
	struct radeon_mec mec;
2374
	struct radeon_mec mec;
2331
	struct work_struct hotplug_work;
2375
	struct work_struct hotplug_work;
2332
	struct work_struct audio_work;
2376
	struct work_struct audio_work;
2333
	struct work_struct reset_work;
-
 
2334
	int num_crtc; /* number of crtcs */
2377
	int num_crtc; /* number of crtcs */
2335
	struct mutex dc_hw_i2c_mutex; /* display controller hw i2c mutex */
2378
	struct mutex dc_hw_i2c_mutex; /* display controller hw i2c mutex */
2336
	bool has_uvd;
2379
	bool has_uvd;
2337
	struct r600_audio audio; /* audio stuff */
2380
	struct r600_audio audio; /* audio stuff */
2338
	/* only one userspace can use Hyperz features or CMASK at a time */
2381
	/* only one userspace can use Hyperz features or CMASK at a time */
Line 2353... Line 2396...
2353
	/* ACPI interface */
2396
	/* ACPI interface */
2354
	struct radeon_atif		atif;
2397
	struct radeon_atif		atif;
2355
	struct radeon_atcs		atcs;
2398
	struct radeon_atcs		atcs;
2356
	/* srbm instance registers */
2399
	/* srbm instance registers */
2357
	struct mutex			srbm_mutex;
2400
	struct mutex			srbm_mutex;
-
 
2401
	/* GRBM index mutex. Protects concurrents access to GRBM index */
-
 
2402
	struct mutex			grbm_idx_mutex;
2358
	/* clock, powergating flags */
2403
	/* clock, powergating flags */
2359
	u32 cg_flags;
2404
	u32 cg_flags;
2360
	u32 pg_flags;
2405
	u32 pg_flags;
Line 2361... Line 2406...
2361
 
2406
 
Line 2364... Line 2409...
2364
	u32 px_quirk_flags;
2409
	u32 px_quirk_flags;
Line 2365... Line 2410...
2365
 
2410
 
2366
	/* tracking pinned memory */
2411
	/* tracking pinned memory */
2367
	u64 vram_pin_size;
2412
	u64 vram_pin_size;
-
 
2413
	u64 gart_pin_size;
2368
	u64 gart_pin_size;
2414
	struct mutex	mn_lock;
Line 2369... Line 2415...
2369
};
2415
};
2370
 
2416
 
2371
bool radeon_is_px(struct drm_device *dev);
2417
bool radeon_is_px(struct drm_device *dev);
Line 2419... Line 2465...
2419
void cik_mm_wdoorbell(struct radeon_device *rdev, u32 index, u32 v);
2465
void cik_mm_wdoorbell(struct radeon_device *rdev, u32 index, u32 v);
Line 2420... Line 2466...
2420
 
2466
 
2421
/*
2467
/*
2422
 * Cast helper
2468
 * Cast helper
-
 
2469
 */
-
 
2470
extern const struct fence_ops radeon_fence_ops;
-
 
2471
 
-
 
2472
static inline struct radeon_fence *to_radeon_fence(struct fence *f)
2423
 */
2473
{
-
 
2474
	struct radeon_fence *__f = container_of(f, struct radeon_fence, base);
-
 
2475
 
-
 
2476
	if (__f->base.ops == &radeon_fence_ops)
-
 
2477
		return __f;
-
 
2478
 
-
 
2479
	return NULL;
Line 2424... Line 2480...
2424
#define to_radeon_fence(p) ((struct radeon_fence *)(p))
2480
}
2425
 
2481
 
2426
/*
2482
/*
2427
 * Registers read & write functions.
2483
 * Registers read & write functions.
Line 2739... Line 2795...
2739
 
2795
 
2740
 
2796
 
2741
/*
2797
/*
-
 
2798
 * RING helpers.
-
 
2799
 */
-
 
2800
 
-
 
2801
/**
-
 
2802
 * radeon_ring_write - write a value to the ring
2742
 * RING helpers.
2803
 *
-
 
2804
 * @ring: radeon_ring structure holding ring information
-
 
2805
 * @v: dword (dw) value to write
-
 
2806
 *
2743
 */
2807
 * Write a value to the requested ring buffer (all asics).
2744
#if DRM_DEBUG_CODE == 0
2808
 */
-
 
2809
static inline void radeon_ring_write(struct radeon_ring *ring, uint32_t v)
-
 
2810
{
-
 
2811
	if (ring->count_dw <= 0)
2745
static inline void radeon_ring_write(struct radeon_ring *ring, uint32_t v)
2812
		DRM_ERROR("radeon: writing more dwords to the ring than expected!\n");
2746
{
2813
 
2747
	ring->ring[ring->wptr++] = v;
2814
	ring->ring[ring->wptr++] = v;
2748
	ring->wptr &= ring->ptr_mask;
2815
	ring->wptr &= ring->ptr_mask;
2749
	ring->count_dw--;
2816
	ring->count_dw--;
2750
	ring->ring_free_dw--;
-
 
2751
}
-
 
2752
#else
-
 
2753
/* With debugging this is just too big to inline */
-
 
Line 2754... Line 2817...
2754
void radeon_ring_write(struct radeon_ring *ring, uint32_t v);
2817
	ring->ring_free_dw--;
2755
#endif
2818
}
2756
 
2819
 
2757
/*
2820
/*
Line 2776... Line 2839...
2776
#define radeon_ring_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ring_test((rdev), (cp))
2839
#define radeon_ring_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ring_test((rdev), (cp))
2777
#define radeon_ib_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ib_test((rdev), (cp))
2840
#define radeon_ib_test(rdev, r, cp) (rdev)->asic->ring[(r)]->ib_test((rdev), (cp))
2778
#define radeon_ring_ib_execute(rdev, r, ib) (rdev)->asic->ring[(r)]->ib_execute((rdev), (ib))
2841
#define radeon_ring_ib_execute(rdev, r, ib) (rdev)->asic->ring[(r)]->ib_execute((rdev), (ib))
2779
#define radeon_ring_ib_parse(rdev, r, ib) (rdev)->asic->ring[(r)]->ib_parse((rdev), (ib))
2842
#define radeon_ring_ib_parse(rdev, r, ib) (rdev)->asic->ring[(r)]->ib_parse((rdev), (ib))
2780
#define radeon_ring_is_lockup(rdev, r, cp) (rdev)->asic->ring[(r)]->is_lockup((rdev), (cp))
2843
#define radeon_ring_is_lockup(rdev, r, cp) (rdev)->asic->ring[(r)]->is_lockup((rdev), (cp))
2781
#define radeon_ring_vm_flush(rdev, r, vm) (rdev)->asic->ring[(r)]->vm_flush((rdev), (r), (vm))
2844
#define radeon_ring_vm_flush(rdev, r, vm_id, pd_addr) (rdev)->asic->ring[(r)->idx]->vm_flush((rdev), (r), (vm_id), (pd_addr))
2782
#define radeon_ring_get_rptr(rdev, r) (rdev)->asic->ring[(r)->idx]->get_rptr((rdev), (r))
2845
#define radeon_ring_get_rptr(rdev, r) (rdev)->asic->ring[(r)->idx]->get_rptr((rdev), (r))
2783
#define radeon_ring_get_wptr(rdev, r) (rdev)->asic->ring[(r)->idx]->get_wptr((rdev), (r))
2846
#define radeon_ring_get_wptr(rdev, r) (rdev)->asic->ring[(r)->idx]->get_wptr((rdev), (r))
2784
#define radeon_ring_set_wptr(rdev, r) (rdev)->asic->ring[(r)->idx]->set_wptr((rdev), (r))
2847
#define radeon_ring_set_wptr(rdev, r) (rdev)->asic->ring[(r)->idx]->set_wptr((rdev), (r))
2785
#define radeon_irq_set(rdev) (rdev)->asic->irq.set((rdev))
2848
#define radeon_irq_set(rdev) (rdev)->asic->irq.set((rdev))
2786
#define radeon_irq_process(rdev) (rdev)->asic->irq.process((rdev))
2849
#define radeon_irq_process(rdev) (rdev)->asic->irq.process((rdev))
Line 2789... Line 2852...
2789
#define radeon_get_backlight_level(rdev, e) (rdev)->asic->display.get_backlight_level((e))
2852
#define radeon_get_backlight_level(rdev, e) (rdev)->asic->display.get_backlight_level((e))
2790
#define radeon_hdmi_enable(rdev, e, b) (rdev)->asic->display.hdmi_enable((e), (b))
2853
#define radeon_hdmi_enable(rdev, e, b) (rdev)->asic->display.hdmi_enable((e), (b))
2791
#define radeon_hdmi_setmode(rdev, e, m) (rdev)->asic->display.hdmi_setmode((e), (m))
2854
#define radeon_hdmi_setmode(rdev, e, m) (rdev)->asic->display.hdmi_setmode((e), (m))
2792
#define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)]->emit_fence((rdev), (fence))
2855
#define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)]->emit_fence((rdev), (fence))
2793
#define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)]->emit_semaphore((rdev), (cp), (semaphore), (emit_wait))
2856
#define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)]->emit_semaphore((rdev), (cp), (semaphore), (emit_wait))
2794
#define radeon_copy_blit(rdev, s, d, np, f) (rdev)->asic->copy.blit((rdev), (s), (d), (np), (f))
2857
#define radeon_copy_blit(rdev, s, d, np, resv) (rdev)->asic->copy.blit((rdev), (s), (d), (np), (resv))
2795
#define radeon_copy_dma(rdev, s, d, np, f) (rdev)->asic->copy.dma((rdev), (s), (d), (np), (f))
2858
#define radeon_copy_dma(rdev, s, d, np, resv) (rdev)->asic->copy.dma((rdev), (s), (d), (np), (resv))
2796
#define radeon_copy(rdev, s, d, np, f) (rdev)->asic->copy.copy((rdev), (s), (d), (np), (f))
2859
#define radeon_copy(rdev, s, d, np, resv) (rdev)->asic->copy.copy((rdev), (s), (d), (np), (resv))
2797
#define radeon_copy_blit_ring_index(rdev) (rdev)->asic->copy.blit_ring_index
2860
#define radeon_copy_blit_ring_index(rdev) (rdev)->asic->copy.blit_ring_index
2798
#define radeon_copy_dma_ring_index(rdev) (rdev)->asic->copy.dma_ring_index
2861
#define radeon_copy_dma_ring_index(rdev) (rdev)->asic->copy.dma_ring_index
2799
#define radeon_copy_ring_index(rdev) (rdev)->asic->copy.copy_ring_index
2862
#define radeon_copy_ring_index(rdev) (rdev)->asic->copy.copy_ring_index
2800
#define radeon_get_engine_clock(rdev) (rdev)->asic->pm.get_engine_clock((rdev))
2863
#define radeon_get_engine_clock(rdev) (rdev)->asic->pm.get_engine_clock((rdev))
2801
#define radeon_set_engine_clock(rdev, e) (rdev)->asic->pm.set_engine_clock((rdev), (e))
2864
#define radeon_set_engine_clock(rdev, e) (rdev)->asic->pm.set_engine_clock((rdev), (e))
Line 2865... Line 2928...
2865
extern int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data);
2928
extern int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data);
2866
extern void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable);
2929
extern void radeon_legacy_set_clock_gating(struct radeon_device *rdev, int enable);
2867
extern void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable);
2930
extern void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable);
2868
extern void radeon_ttm_placement_from_domain(struct radeon_bo *rbo, u32 domain);
2931
extern void radeon_ttm_placement_from_domain(struct radeon_bo *rbo, u32 domain);
2869
extern bool radeon_ttm_bo_is_radeon_bo(struct ttm_buffer_object *bo);
2932
extern bool radeon_ttm_bo_is_radeon_bo(struct ttm_buffer_object *bo);
-
 
2933
extern int radeon_ttm_tt_set_userptr(struct ttm_tt *ttm, uint64_t addr,
-
 
2934
				     uint32_t flags);
-
 
2935
extern bool radeon_ttm_tt_has_userptr(struct ttm_tt *ttm);
-
 
2936
extern bool radeon_ttm_tt_is_readonly(struct ttm_tt *ttm);
2870
extern void radeon_vram_location(struct radeon_device *rdev, struct radeon_mc *mc, u64 base);
2937
extern void radeon_vram_location(struct radeon_device *rdev, struct radeon_mc *mc, u64 base);
2871
extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
2938
extern void radeon_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc);
2872
extern int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon);
2939
extern int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon);
2873
extern int radeon_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon);
2940
extern int radeon_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon);
2874
extern void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size);
2941
extern void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size);
Line 2881... Line 2948...
2881
 */
2948
 */
2882
int radeon_vm_manager_init(struct radeon_device *rdev);
2949
int radeon_vm_manager_init(struct radeon_device *rdev);
2883
void radeon_vm_manager_fini(struct radeon_device *rdev);
2950
void radeon_vm_manager_fini(struct radeon_device *rdev);
2884
int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm);
2951
int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm);
2885
void radeon_vm_fini(struct radeon_device *rdev, struct radeon_vm *vm);
2952
void radeon_vm_fini(struct radeon_device *rdev, struct radeon_vm *vm);
2886
struct radeon_cs_reloc *radeon_vm_get_bos(struct radeon_device *rdev,
2953
struct radeon_bo_list *radeon_vm_get_bos(struct radeon_device *rdev,
2887
					  struct radeon_vm *vm,
2954
					  struct radeon_vm *vm,
2888
                                          struct list_head *head);
2955
                                          struct list_head *head);
2889
struct radeon_fence *radeon_vm_grab_id(struct radeon_device *rdev,
2956
struct radeon_fence *radeon_vm_grab_id(struct radeon_device *rdev,
2890
				       struct radeon_vm *vm, int ring);
2957
				       struct radeon_vm *vm, int ring);
2891
void radeon_vm_flush(struct radeon_device *rdev,
2958
void radeon_vm_flush(struct radeon_device *rdev,
2892
                     struct radeon_vm *vm,
2959
                     struct radeon_vm *vm,
2893
                     int ring);
2960
		     int ring, struct radeon_fence *fence);
2894
void radeon_vm_fence(struct radeon_device *rdev,
2961
void radeon_vm_fence(struct radeon_device *rdev,
2895
		     struct radeon_vm *vm,
2962
		     struct radeon_vm *vm,
2896
		     struct radeon_fence *fence);
2963
		     struct radeon_fence *fence);
2897
uint64_t radeon_vm_map_gart(struct radeon_device *rdev, uint64_t addr);
2964
uint64_t radeon_vm_map_gart(struct radeon_device *rdev, uint64_t addr);
2898
int radeon_vm_update_page_directory(struct radeon_device *rdev,
2965
int radeon_vm_update_page_directory(struct radeon_device *rdev,
Line 2922... Line 2989...
2922
void r600_audio_update_hdmi(struct work_struct *work);
2989
void r600_audio_update_hdmi(struct work_struct *work);
2923
struct r600_audio_pin *r600_audio_get_pin(struct radeon_device *rdev);
2990
struct r600_audio_pin *r600_audio_get_pin(struct radeon_device *rdev);
2924
struct r600_audio_pin *dce6_audio_get_pin(struct radeon_device *rdev);
2991
struct r600_audio_pin *dce6_audio_get_pin(struct radeon_device *rdev);
2925
void r600_audio_enable(struct radeon_device *rdev,
2992
void r600_audio_enable(struct radeon_device *rdev,
2926
		       struct r600_audio_pin *pin,
2993
		       struct r600_audio_pin *pin,
2927
		       bool enable);
2994
		       u8 enable_mask);
2928
void dce6_audio_enable(struct radeon_device *rdev,
2995
void dce6_audio_enable(struct radeon_device *rdev,
2929
		       struct r600_audio_pin *pin,
2996
		       struct r600_audio_pin *pin,
2930
		       bool enable);
2997
		       u8 enable_mask);
Line 2931... Line 2998...
2931
 
2998
 
2932
/*
2999
/*
2933
 * R600 vram scratch functions
3000
 * R600 vram scratch functions
2934
 */
3001
 */
Line 2995... Line 3062...
2995
			   unsigned idx);
3062
			   unsigned idx);
2996
bool radeon_cs_packet_next_is_pkt3_nop(struct radeon_cs_parser *p);
3063
bool radeon_cs_packet_next_is_pkt3_nop(struct radeon_cs_parser *p);
2997
void radeon_cs_dump_packet(struct radeon_cs_parser *p,
3064
void radeon_cs_dump_packet(struct radeon_cs_parser *p,
2998
			   struct radeon_cs_packet *pkt);
3065
			   struct radeon_cs_packet *pkt);
2999
int radeon_cs_packet_next_reloc(struct radeon_cs_parser *p,
3066
int radeon_cs_packet_next_reloc(struct radeon_cs_parser *p,
3000
				struct radeon_cs_reloc **cs_reloc,
3067
				struct radeon_bo_list **cs_reloc,
3001
				int nomm);
3068
				int nomm);
3002
int r600_cs_common_vline_parse(struct radeon_cs_parser *p,
3069
int r600_cs_common_vline_parse(struct radeon_cs_parser *p,
3003
			       uint32_t *vline_start_end,
3070
			       uint32_t *vline_start_end,
3004
			       uint32_t *vline_status);
3071
			       uint32_t *vline_status);
Line 3005... Line 3072...
3005
 
3072
 
Line 3006... Line 3073...
3006
#include "radeon_object.h"
3073
#include "radeon_object.h"
Line 3007... Line 3074...
3007
 
3074
 
3008
#define DRM_UDELAY(d)           udelay(d)
3075
#define PCI_DEVICE_ID_ATI_RADEON_QY     0x5159
3009
 
3076
 
3010
resource_size_t
3077
resource_size_t