diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index af12a2fe3221..63a3fe32e584 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -113,6 +113,7 @@ enum radeon_family { | |||
113 | CHIP_RV770, | 113 | CHIP_RV770, |
114 | CHIP_RV730, | 114 | CHIP_RV730, |
115 | CHIP_RV710, | 115 | CHIP_RV710, |
116 | CHIP_RS880, | ||
116 | CHIP_LAST, | 117 | CHIP_LAST, |
117 | }; | 118 | }; |
118 | 119 | ||
@@ -490,6 +491,39 @@ struct radeon_wb { | |||
490 | uint64_t gpu_addr; | 491 | uint64_t gpu_addr; |
491 | }; | 492 | }; |
492 | 493 | ||
494 | /** | ||
495 | * struct radeon_pm - power management datas | ||
496 | * @max_bandwidth: maximum bandwidth the gpu has (MByte/s) | ||
497 | * @igp_sideport_mclk: sideport memory clock Mhz (rs690,rs740,rs780,rs880) | ||
498 | * @igp_system_mclk: system clock Mhz (rs690,rs740,rs780,rs880) | ||
499 | * @igp_ht_link_clk: ht link clock Mhz (rs690,rs740,rs780,rs880) | ||
500 | * @igp_ht_link_width: ht link width in bits (rs690,rs740,rs780,rs880) | ||
501 | * @k8_bandwidth: k8 bandwidth the gpu has (MByte/s) (IGP) | ||
502 | * @sideport_bandwidth: sideport bandwidth the gpu has (MByte/s) (IGP) | ||
503 | * @ht_bandwidth: ht bandwidth the gpu has (MByte/s) (IGP) | ||
504 | * @core_bandwidth: core GPU bandwidth the gpu has (MByte/s) (IGP) | ||
505 | * @sclk: GPU clock Mhz (core bandwith depends of this clock) | ||
506 | * @needed_bandwidth: current bandwidth needs | ||
507 | * | ||
508 | * It keeps track of various data needed to take powermanagement decision. | ||
509 | * Bandwith need is used to determine minimun clock of the GPU and memory. | ||
510 | * Equation between gpu/memory clock and available bandwidth is hw dependent | ||
511 | * (type of memory, bus size, efficiency, ...) | ||
512 | */ | ||
513 | struct radeon_pm { | ||
514 | fixed20_12 max_bandwidth; | ||
515 | fixed20_12 igp_sideport_mclk; | ||
516 | fixed20_12 igp_system_mclk; | ||
517 | fixed20_12 igp_ht_link_clk; | ||
518 | fixed20_12 igp_ht_link_width; | ||
519 | fixed20_12 k8_bandwidth; | ||
520 | fixed20_12 sideport_bandwidth; | ||
521 | fixed20_12 ht_bandwidth; | ||
522 | fixed20_12 core_bandwidth; | ||
523 | fixed20_12 sclk; | ||
524 | fixed20_12 needed_bandwidth; | ||
525 | }; | ||
526 | |||
493 | 527 | ||
494 | /* | 528 | /* |
495 | * Benchmarking | 529 | * Benchmarking |
@@ -551,19 +585,17 @@ struct radeon_asic { | |||
551 | void (*set_memory_clock)(struct radeon_device *rdev, uint32_t mem_clock); | 585 | void (*set_memory_clock)(struct radeon_device *rdev, uint32_t mem_clock); |
552 | void (*set_pcie_lanes)(struct radeon_device *rdev, int lanes); | 586 | void (*set_pcie_lanes)(struct radeon_device *rdev, int lanes); |
553 | void (*set_clock_gating)(struct radeon_device *rdev, int enable); | 587 | void (*set_clock_gating)(struct radeon_device *rdev, int enable); |
554 | |||
555 | int (*set_surface_reg)(struct radeon_device *rdev, int reg, | 588 | int (*set_surface_reg)(struct radeon_device *rdev, int reg, |
556 | uint32_t tiling_flags, uint32_t pitch, | 589 | uint32_t tiling_flags, uint32_t pitch, |
557 | uint32_t offset, uint32_t obj_size); | 590 | uint32_t offset, uint32_t obj_size); |
558 | int (*clear_surface_reg)(struct radeon_device *rdev, int reg); | 591 | int (*clear_surface_reg)(struct radeon_device *rdev, int reg); |
592 | void (*bandwidth_update)(struct radeon_device *rdev); | ||
559 | }; | 593 | }; |
560 | 594 | ||
561 | union radeon_asic_config { | 595 | union radeon_asic_config { |
562 | struct r300_asic r300; | 596 | struct r300_asic r300; |
563 | }; | 597 | }; |
564 | 598 | ||
565 | /* r100 */ | ||
566 | void r100_vram_init_sizes(struct radeon_device *rdev); | ||
567 | 599 | ||
568 | /* | 600 | /* |
569 | * IOCTL. | 601 | * IOCTL. |
@@ -646,6 +678,7 @@ struct radeon_device { | |||
646 | struct radeon_irq irq; | 678 | struct radeon_irq irq; |
647 | struct radeon_asic *asic; | 679 | struct radeon_asic *asic; |
648 | struct radeon_gem gem; | 680 | struct radeon_gem gem; |
681 | struct radeon_pm pm; | ||
649 | struct mutex cs_mutex; | 682 | struct mutex cs_mutex; |
650 | struct radeon_wb wb; | 683 | struct radeon_wb wb; |
651 | bool gpu_lockup; | 684 | bool gpu_lockup; |
@@ -829,5 +862,6 @@ static inline void radeon_ring_write(struct radeon_device *rdev, uint32_t v) | |||
829 | #define radeon_set_clock_gating(rdev, e) (rdev)->asic->set_clock_gating((rdev), (e)) | 862 | #define radeon_set_clock_gating(rdev, e) (rdev)->asic->set_clock_gating((rdev), (e)) |
830 | #define radeon_set_surface_reg(rdev, r, f, p, o, s) ((rdev)->asic->set_surface_reg((rdev), (r), (f), (p), (o), (s))) | 863 | #define radeon_set_surface_reg(rdev, r, f, p, o, s) ((rdev)->asic->set_surface_reg((rdev), (r), (f), (p), (o), (s))) |
831 | #define radeon_clear_surface_reg(rdev, r) ((rdev)->asic->clear_surface_reg((rdev), (r))) | 864 | #define radeon_clear_surface_reg(rdev, r) ((rdev)->asic->clear_surface_reg((rdev), (r))) |
865 | #define radeon_bandwidth_update(rdev) (rdev)->asic->bandwidth_update((rdev)) | ||
832 | 866 | ||
833 | #endif | 867 | #endif |