aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon.h
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2009-07-13 15:04:08 -0400
committerDave Airlie <airlied@redhat.com>2009-07-29 01:45:09 -0400
commitc93bb85b5cba3e3a06f2cad8e9bc5c23d3d10aac (patch)
tree3168bee69e08dcb1f0f509b03ea1693a688d34ef /drivers/gpu/drm/radeon/radeon.h
parente024e11070a0a0dc7163ce1ec2da354a638bdbed (diff)
drm/radeon/kms: fix bandwidth computation on avivo hardware
Fix bandwidth computation and crtc priority in memory controller so that crtc memory request are fullfill in time to avoid display artifact. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r--drivers/gpu/drm/radeon/radeon.h40
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 */
513struct 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
561union radeon_asic_config { 595union radeon_asic_config {
562 struct r300_asic r300; 596 struct r300_asic r300;
563}; 597};
564 598
565/* r100 */
566void 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