Path: blob/master/drivers/gpu/drm/amd/display/include/dpcd_defs.h
49819 views
/*1* Copyright 2012-15 Advanced Micro Devices, Inc.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice shall be included in11* all copies or substantial portions of the Software.12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL16* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR17* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,18* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR19* OTHER DEALINGS IN THE SOFTWARE.20*21* Authors: AMD22*23*/2425#ifndef __DAL_DPCD_DEFS_H__26#define __DAL_DPCD_DEFS_H__2728#include <drm/display/drm_dp_helper.h>29#ifndef DP_SINK_HW_REVISION_START // can remove this once the define gets into linux drm_dp_helper.h30#define DP_SINK_HW_REVISION_START 0x40931#endif32/* Panel Replay*/33#ifndef DP_PANEL_REPLAY_CAPABILITY_SUPPORT // can remove this once the define gets into linux drm_dp_helper.h34#define DP_PANEL_REPLAY_CAPABILITY_SUPPORT 0x0b035#endif /* DP_PANEL_REPLAY_CAPABILITY_SUPPORT */36#ifndef DP_PANEL_REPLAY_CAPABILITY // can remove this once the define gets into linux drm_dp_helper.h37#define DP_PANEL_REPLAY_CAPABILITY 0x0b138#endif /* DP_PANEL_REPLAY_CAPABILITY */39#ifndef DP_PANEL_REPLAY_ENABLE_AND_CONFIGURATION_1 // can remove this once the define gets into linux drm_dp_helper.h40#define DP_PANEL_REPLAY_ENABLE_AND_CONFIGURATION_1 0x1b041#endif /* DP_PANEL_REPLAY_ENABLE_AND_CONFIGURATION_1 */42#ifndef DP_PANEL_REPLAY_ENABLE // can remove this once the define gets into linux drm_dp_helper.h43#define DP_PANEL_REPLAY_ENABLE (1 << 0)44#endif /* DP_PANEL_REPLAY_ENABLE */45#ifndef DP_PANEL_REPLAY_ENABLE_AND_CONFIGURATION_2 // can remove this once the define gets into linux drm_dp_helper.h46#define DP_PANEL_REPLAY_ENABLE_AND_CONFIGURATION_2 0x1b147#endif /* DP_PANEL_REPLAY_ENABLE_AND_CONFIGURATION_2 */4849enum dpcd_revision {50DPCD_REV_10 = 0x10,51DPCD_REV_11 = 0x11,52DPCD_REV_12 = 0x12,53DPCD_REV_13 = 0x13,54DPCD_REV_14 = 0x1455};5657/* these are the types stored at DOWNSTREAMPORT_PRESENT */58enum dpcd_downstream_port_type {59DOWNSTREAM_DP = 0,60DOWNSTREAM_VGA,61DOWNSTREAM_DVI_HDMI_DP_PLUS_PLUS,/* DVI, HDMI, DP++ */62DOWNSTREAM_NONDDC /* has no EDID (TV,CV) */63};6465enum dpcd_link_test_patterns {66LINK_TEST_PATTERN_NONE = 0,67LINK_TEST_PATTERN_COLOR_RAMP,68LINK_TEST_PATTERN_VERTICAL_BARS,69LINK_TEST_PATTERN_COLOR_SQUARES70};7172enum dpcd_test_color_format {73TEST_COLOR_FORMAT_RGB = 0,74TEST_COLOR_FORMAT_YCBCR422,75TEST_COLOR_FORMAT_YCBCR44476};7778enum dpcd_test_bit_depth {79TEST_BIT_DEPTH_6 = 0,80TEST_BIT_DEPTH_8,81TEST_BIT_DEPTH_10,82TEST_BIT_DEPTH_12,83TEST_BIT_DEPTH_1684};8586/* PHY (encoder) test patterns87The order of test patterns follows DPCD register PHY_TEST_PATTERN (0x248)88*/89enum dpcd_phy_test_patterns {90PHY_TEST_PATTERN_NONE = 0,91PHY_TEST_PATTERN_D10_2,92PHY_TEST_PATTERN_SYMBOL_ERROR,93PHY_TEST_PATTERN_PRBS7,94PHY_TEST_PATTERN_80BIT_CUSTOM,/* For DP1.2 only */95PHY_TEST_PATTERN_CP2520_1,96PHY_TEST_PATTERN_CP2520_2,97PHY_TEST_PATTERN_CP2520_3, /* same as TPS4 */98PHY_TEST_PATTERN_128b_132b_TPS1 = 0x8,99PHY_TEST_PATTERN_128b_132b_TPS2 = 0x10,100PHY_TEST_PATTERN_PRBS9 = 0x18,101PHY_TEST_PATTERN_PRBS11 = 0x20,102PHY_TEST_PATTERN_PRBS15 = 0x28,103PHY_TEST_PATTERN_PRBS23 = 0x30,104PHY_TEST_PATTERN_PRBS31 = 0x38,105PHY_TEST_PATTERN_264BIT_CUSTOM = 0x40,106PHY_TEST_PATTERN_SQUARE = 0x48,107PHY_TEST_PATTERN_SQUARE_PRESHOOT_DISABLED = 0x49,108PHY_TEST_PATTERN_SQUARE_DEEMPHASIS_DISABLED = 0x4A,109PHY_TEST_PATTERN_SQUARE_PRESHOOT_DEEMPHASIS_DISABLED = 0x4B,110};111112enum dpcd_test_dyn_range {113TEST_DYN_RANGE_VESA = 0,114TEST_DYN_RANGE_CEA115};116117enum dpcd_audio_test_pattern {118AUDIO_TEST_PATTERN_OPERATOR_DEFINED = 0,/* direct HW translation */119AUDIO_TEST_PATTERN_SAWTOOTH120};121122enum dpcd_audio_sampling_rate {123AUDIO_SAMPLING_RATE_32KHZ = 0,/* direct HW translation */124AUDIO_SAMPLING_RATE_44_1KHZ,125AUDIO_SAMPLING_RATE_48KHZ,126AUDIO_SAMPLING_RATE_88_2KHZ,127AUDIO_SAMPLING_RATE_96KHZ,128AUDIO_SAMPLING_RATE_176_4KHZ,129AUDIO_SAMPLING_RATE_192KHZ130};131132enum dpcd_audio_channels {133AUDIO_CHANNELS_1 = 0,/* direct HW translation */134AUDIO_CHANNELS_2,135AUDIO_CHANNELS_3,136AUDIO_CHANNELS_4,137AUDIO_CHANNELS_5,138AUDIO_CHANNELS_6,139AUDIO_CHANNELS_7,140AUDIO_CHANNELS_8,141142AUDIO_CHANNELS_COUNT143};144145enum dpcd_audio_test_pattern_periods {146DPCD_AUDIO_TEST_PATTERN_PERIOD_NOTUSED = 0,/* direct HW translation */147DPCD_AUDIO_TEST_PATTERN_PERIOD_3,148DPCD_AUDIO_TEST_PATTERN_PERIOD_6,149DPCD_AUDIO_TEST_PATTERN_PERIOD_12,150DPCD_AUDIO_TEST_PATTERN_PERIOD_24,151DPCD_AUDIO_TEST_PATTERN_PERIOD_48,152DPCD_AUDIO_TEST_PATTERN_PERIOD_96,153DPCD_AUDIO_TEST_PATTERN_PERIOD_192,154DPCD_AUDIO_TEST_PATTERN_PERIOD_384,155DPCD_AUDIO_TEST_PATTERN_PERIOD_768,156DPCD_AUDIO_TEST_PATTERN_PERIOD_1536157};158159/* This enum is for programming DPCD TRAINING_PATTERN_SET */160enum dpcd_training_patterns {161DPCD_TRAINING_PATTERN_VIDEOIDLE = 0,/* direct HW translation! */162DPCD_TRAINING_PATTERN_1,163DPCD_TRAINING_PATTERN_2,164DPCD_TRAINING_PATTERN_3,165DPCD_TRAINING_PATTERN_4 = 7,166DPCD_128b_132b_TPS1 = 1,167DPCD_128b_132b_TPS2 = 2,168DPCD_128b_132b_TPS2_CDS = 3,169};170171/* This enum is for use with PsrSinkPsrStatus.bits.sinkSelfRefreshStatus172It defines the possible PSR states. */173enum dpcd_psr_sink_states {174PSR_SINK_STATE_INACTIVE = 0,175PSR_SINK_STATE_ACTIVE_CAPTURE_DISPLAY_ON_SOURCE_TIMING = 1,176PSR_SINK_STATE_ACTIVE_DISPLAY_FROM_SINK_RFB = 2,177PSR_SINK_STATE_ACTIVE_CAPTURE_DISPLAY_ON_SINK_TIMING = 3,178PSR_SINK_STATE_ACTIVE_CAPTURE_TIMING_RESYNC = 4,179PSR_SINK_STATE_SINK_INTERNAL_ERROR = 7,180};181182#define DP_SOURCE_SEQUENCE 0x30C183#define DP_SOURCE_TABLE_REVISION 0x310184#define DP_SOURCE_PAYLOAD_SIZE 0x311185#define DP_SOURCE_SINK_CAP 0x317186#define DP_SOURCE_BACKLIGHT_LEVEL 0x320187#define DP_SOURCE_BACKLIGHT_CURRENT_PEAK 0x326188#define DP_SOURCE_BACKLIGHT_CONTROL 0x32E189#define DP_SOURCE_BACKLIGHT_ENABLE 0x32F190#define DP_SOURCE_MINIMUM_HBLANK_SUPPORTED 0x340191#define DP_SINK_PR_REPLAY_STATUS 0x378192#define DP_SINK_PR_PIXEL_DEVIATION_PER_LINE 0x379193#define DP_SINK_PR_MAX_NUMBER_OF_DEVIATION_LINE 0x37A194#define DP_SINK_EMISSION_RATE 0x37E195196/* Remove once drm_dp_helper.h is updated upstream */197#ifndef DP_TOTAL_LTTPR_CNT198#define DP_TOTAL_LTTPR_CNT 0xF000A /* 2.1 */199#endif200201#endif /* __DAL_DPCD_DEFS_H__ */202203204