diff options
author | Mengdong Lin <mengdong.lin@intel.com> | 2014-03-03 13:23:50 -0500 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2014-03-06 16:42:52 +0800 |
commit | bae8a005d21288e61a547bba94b0a32a99c36b60 (patch) | |
tree | d02d15195b2e568bfcbaf1ca4d4d9ec8b84d2dff /tools/intel_audio_dump.c | |
parent | 1803f1ebfad1e14b5d0eb8560d99efd3ddb6ef67 (diff) |
intel_audio_dump: define get_num_pipes() to get number of pipes for a device ID
It's for future code sharing because some registers define their bit fields
according to the number of pipes.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>
Diffstat (limited to 'tools/intel_audio_dump.c')
-rw-r--r-- | tools/intel_audio_dump.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/intel_audio_dump.c b/tools/intel_audio_dump.c index ffd82889..8632ad38 100644 --- a/tools/intel_audio_dump.c +++ b/tools/intel_audio_dump.c @@ -83,6 +83,20 @@ static int disp_reg_base = 0; /* base address of display registers */ #define read_aud_reg(reg) INREG(aud_reg_base + (reg)) +static int get_num_pipes(void) +{ + int num_pipes; + + if (IS_VALLEYVIEW(devid)) + num_pipes = 2; /* Valleyview is Gen 7 but only has 2 pipes */ + else if (IS_G4X(devid) || IS_GEN5(devid)) + num_pipes = 2; + else + num_pipes = 3; + + return num_pipes; +} + static const char * const pixel_clock[] = { [0] = "25.2 / 1.001 MHz", [1] = "25.2 MHz", |