aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_mode.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-06-24 10:50:34 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-06-27 10:49:19 -0400
commitae5b0abbb6f7478688ac2846b82c9dcc17718daa (patch)
tree973bbd0ec1ae6f5d7e0f8e22b32eb204aadb6159 /drivers/gpu/drm/radeon/radeon_mode.h
parent2948f5e6c211eccd58b81c15a410d9f3d9cda657 (diff)
drm/radeon/kms: add atom helper functions for dpm (v3)
dpm needs access to atombios data and command tables for setup and calculation of a number of parameters. v2: endian fix v3: fix mc reg table bug Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_mode.h')
-rw-r--r--drivers/gpu/drm/radeon/radeon_mode.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 576511f46c9d..5a1c69ec6a41 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -519,6 +519,63 @@ struct atom_clock_dividers {
519 u32 flags; 519 u32 flags;
520}; 520};
521 521
522#define MEM_TYPE_GDDR5 0x50
523#define MEM_TYPE_GDDR4 0x40
524#define MEM_TYPE_GDDR3 0x30
525#define MEM_TYPE_DDR2 0x20
526#define MEM_TYPE_GDDR1 0x10
527#define MEM_TYPE_DDR3 0xb0
528#define MEM_TYPE_MASK 0xf0
529
530struct atom_memory_info {
531 u8 mem_vendor;
532 u8 mem_type;
533};
534
535#define MAX_AC_TIMING_ENTRIES 16
536
537struct atom_memory_clock_range_table
538{
539 u8 num_entries;
540 u8 rsv[3];
541 u32 mclk[MAX_AC_TIMING_ENTRIES];
542};
543
544#define VBIOS_MC_REGISTER_ARRAY_SIZE 32
545#define VBIOS_MAX_AC_TIMING_ENTRIES 20
546
547struct atom_mc_reg_entry {
548 u32 mclk_max;
549 u32 mc_data[VBIOS_MC_REGISTER_ARRAY_SIZE];
550};
551
552struct atom_mc_register_address {
553 u16 s1;
554 u8 pre_reg_data;
555};
556
557struct atom_mc_reg_table {
558 u8 last;
559 u8 num_entries;
560 struct atom_mc_reg_entry mc_reg_table_entry[VBIOS_MAX_AC_TIMING_ENTRIES];
561 struct atom_mc_register_address mc_reg_address[VBIOS_MC_REGISTER_ARRAY_SIZE];
562};
563
564#define MAX_VOLTAGE_ENTRIES 32
565
566struct atom_voltage_table_entry
567{
568 u16 value;
569 u32 smio_low;
570};
571
572struct atom_voltage_table
573{
574 u32 count;
575 u32 mask_low;
576 struct atom_voltage_table_entry entries[MAX_VOLTAGE_ENTRIES];
577};
578
522extern enum radeon_tv_std 579extern enum radeon_tv_std
523radeon_combios_get_tv_info(struct radeon_device *rdev); 580radeon_combios_get_tv_info(struct radeon_device *rdev);
524extern enum radeon_tv_std 581extern enum radeon_tv_std