Merge "drm/msm: add HDCP_VERSION property for connector"

This commit is contained in:
Linux Build Service Account 2017-09-26 21:49:51 -07:00 committed by Gerrit - the friendly Code Review server
commit 07c0eb6c3b
6 changed files with 39 additions and 1 deletions

View file

@ -2153,6 +2153,8 @@ int sde_hdmi_get_property(struct drm_connector *connector,
mutex_lock(&hdmi_display->display_lock);
if (property_index == CONNECTOR_PROP_PLL_ENABLE)
*value = hdmi_display->pll_update_enable ? 1 : 0;
if (property_index == CONNECTOR_PROP_HDCP_VERSION)
*value = hdmi_display->sink_hdcp_ver;
mutex_unlock(&hdmi_display->display_lock);
return rc;

View file

@ -108,14 +108,34 @@ enum hdmi_tx_feature_type {
* @mode: Current display mode.
* @connected: If HDMI display is connected.
* @is_tpg_enabled: TPG state.
* @hdmi_tx_version: HDMI TX version
* @hdmi_tx_major_version: HDMI TX major version
* @max_pclk_khz: Max pixel clock supported
* @hdcp1_use_sw_keys: If HDCP1 engine uses SW keys
* @hdcp14_present: If the sink supports HDCP 1.4
* @hdcp22_present: If the sink supports HDCP 2.2
* @hdcp_status: Current HDCP status
* @sink_hdcp_ver: HDCP version of the sink
* @enc_lvl: Current encryption level
* @curr_hdr_state: Current HDR state of the HDMI connector
* @auth_state: Current authentication state of HDCP
* @sink_hdcp22_support: If the sink supports HDCP 2.2
* @src_hdcp22_support: If the source supports HDCP 2.2
* @hdcp_data: Call back data registered by the client with HDCP lib
* @hdcp_feat_data: Handle to HDCP feature data
* @hdcp_ops: Function ops registered by the client with the HDCP lib
* @ddc_ctrl: Handle to HDMI DDC Controller
* @hpd_work: HPD work structure.
* @codec_ready: If audio codec is ready.
* @client_notify_pending: If there is client notification pending.
* @irq_domain: IRQ domain structure.
* @notifier: CEC notifider to convey physical address information.
* @pll_update_enable: if it's allowed to update HDMI PLL ppm.
* @dc_enable: If deep color is enabled. Only DC_30 so far.
* @dc_feature_supported: If deep color feature is supported.
* @notifier: CEC notifider to convey physical address information.
* @bt2020_colorimetry: If BT2020 colorimetry is supported by sink
* @hdcp_cb_work: Callback function for HDCP
* @io: Handle to IO base addresses for HDMI
* @root: Debug fs root entry.
*/
struct sde_hdmi {
@ -146,6 +166,7 @@ struct sde_hdmi {
u32 hdcp14_present;
u32 hdcp22_present;
u8 hdcp_status;
u8 sink_hdcp_ver;
u32 enc_lvl;
u8 curr_hdr_state;
bool auth_state;

View file

@ -511,6 +511,11 @@ static void sde_hdmi_update_hdcp_info(struct drm_connector *connector)
}
}
if (display->sink_hdcp22_support)
display->sink_hdcp_ver = SDE_HDMI_HDCP_22;
else
display->sink_hdcp_ver = SDE_HDMI_HDCP_14;
/* update internal data about hdcp */
display->hdcp_data = fd;
display->hdcp_ops = ops;
@ -543,6 +548,7 @@ static void _sde_hdmi_bridge_disable(struct drm_bridge *bridge)
mutex_lock(&display->display_lock);
display->pll_update_enable = false;
display->sink_hdcp_ver = SDE_HDMI_HDCP_NONE;
mutex_unlock(&display->display_lock);
}

View file

@ -105,6 +105,10 @@
#define SDE_HDMI_USE_EXTENDED_COLORIMETRY 0x3
#define SDE_HDMI_BT2020_COLORIMETRY 0x6
#define SDE_HDMI_HDCP_22 0x22
#define SDE_HDMI_HDCP_14 0x14
#define SDE_HDMI_HDCP_NONE 0x0
/*
* Bits 1:0 in HDMI_HW_DDC_CTRL that dictate how the HDCP 2.2 RxStatus will be
* read by the hardware

View file

@ -158,6 +158,7 @@ enum msm_mdp_conn_property {
CONNECTOR_PROP_DST_H,
CONNECTOR_PROP_PLL_DELTA,
CONNECTOR_PROP_PLL_ENABLE,
CONNECTOR_PROP_HDCP_VERSION,
/* enum/bitmask properties */
CONNECTOR_PROP_TOPOLOGY_NAME,

View file

@ -933,6 +933,10 @@ struct drm_connector *sde_connector_init(struct drm_device *dev,
"PLL_ENABLE", 0x0, 0, 1, 0,
CONNECTOR_PROP_PLL_ENABLE);
msm_property_install_volatile_range(&c_conn->property_info,
"HDCP_VERSION", 0x0, 0, U8_MAX, 0,
CONNECTOR_PROP_HDCP_VERSION);
/* enum/bitmask properties */
msm_property_install_enum(&c_conn->property_info, "topology_name",
DRM_MODE_PROP_IMMUTABLE, 0, e_topology_name,