drm/mst: Add support for QUERY_STREAM_ENCRYPTION_STATUS MST sideband message
Used to query whether an MST stream is encrypted or not. Cc: Lyude Paul <lyude@redhat.com> Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200218220242.107265-14-sean@poorly.run #v4 Link: https://patchwork.freedesktop.org/patch/msgid/20200305201236.152307-15-sean@poorly.run #v5 Link: https://patchwork.freedesktop.org/patch/msgid/20200429195502.39919-15-sean@poorly.run #v6 Link: https://patchwork.freedesktop.org/patch/msgid/20200623155907.22961-16-sean@poorly.run #v7 Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-16-sean@poorly.run #v8 Changes in v4: -Added to the set Changes in v5: -None Changes in v6: -Use FIELD_PREP to generate request buffer bitfields (Lyude) -Add mst selftest and dump/decode_sideband_req for QSES (Lyude) Changes in v7: -None Changes in v8: -Reverse the parsing on the hdcp_*x_device_present bits and leave breadcrumb in case this is incorrect (Anshuman) Changes in v8.5: -s/DRM_DEBUG_KMS/drm_dbg_kms/ (Lyude) Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Acked-by: Daniel Vetter <daniel@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20200819143133.46232-1-sean@poorly.run
This commit is contained in:
@@ -313,6 +313,34 @@ struct drm_dp_remote_i2c_write_ack_reply {
|
||||
u8 port_number;
|
||||
};
|
||||
|
||||
struct drm_dp_query_stream_enc_status_ack_reply {
|
||||
/* Bit[23:16]- Stream Id */
|
||||
u8 stream_id;
|
||||
|
||||
/* Bit[15]- Signed */
|
||||
bool reply_signed;
|
||||
|
||||
/* Bit[10:8]- Stream Output Sink Type */
|
||||
bool unauthorizable_device_present;
|
||||
bool legacy_device_present;
|
||||
bool query_capable_device_present;
|
||||
|
||||
/* Bit[12:11]- Stream Output CP Type */
|
||||
bool hdcp_1x_device_present;
|
||||
bool hdcp_2x_device_present;
|
||||
|
||||
/* Bit[4]- Stream Authentication */
|
||||
bool auth_completed;
|
||||
|
||||
/* Bit[3]- Stream Encryption */
|
||||
bool encryption_enabled;
|
||||
|
||||
/* Bit[2]- Stream Repeater Function Present */
|
||||
bool repeater_present;
|
||||
|
||||
/* Bit[1:0]- Stream State */
|
||||
u8 state;
|
||||
};
|
||||
|
||||
#define DRM_DP_MAX_SDP_STREAMS 16
|
||||
struct drm_dp_allocate_payload {
|
||||
@@ -374,6 +402,15 @@ struct drm_dp_remote_i2c_write {
|
||||
u8 *bytes;
|
||||
};
|
||||
|
||||
struct drm_dp_query_stream_enc_status {
|
||||
u8 stream_id;
|
||||
u8 client_id[7]; /* 56-bit nonce */
|
||||
u8 stream_event;
|
||||
bool valid_stream_event;
|
||||
u8 stream_behavior;
|
||||
u8 valid_stream_behavior;
|
||||
};
|
||||
|
||||
/* this covers ENUM_RESOURCES, POWER_DOWN_PHY, POWER_UP_PHY */
|
||||
struct drm_dp_port_number_req {
|
||||
u8 port_number;
|
||||
@@ -422,6 +459,8 @@ struct drm_dp_sideband_msg_req_body {
|
||||
|
||||
struct drm_dp_remote_i2c_read i2c_read;
|
||||
struct drm_dp_remote_i2c_write i2c_write;
|
||||
|
||||
struct drm_dp_query_stream_enc_status enc_status;
|
||||
} u;
|
||||
};
|
||||
|
||||
@@ -444,6 +483,8 @@ struct drm_dp_sideband_msg_reply_body {
|
||||
struct drm_dp_remote_i2c_read_ack_reply remote_i2c_read_ack;
|
||||
struct drm_dp_remote_i2c_read_nak_reply remote_i2c_read_nack;
|
||||
struct drm_dp_remote_i2c_write_ack_reply remote_i2c_write_ack;
|
||||
|
||||
struct drm_dp_query_stream_enc_status_ack_reply enc_status;
|
||||
} u;
|
||||
};
|
||||
|
||||
@@ -808,6 +849,9 @@ drm_dp_atomic_release_vcpi_slots(struct drm_atomic_state *state,
|
||||
struct drm_dp_mst_port *port);
|
||||
int drm_dp_send_power_updown_phy(struct drm_dp_mst_topology_mgr *mgr,
|
||||
struct drm_dp_mst_port *port, bool power_up);
|
||||
int drm_dp_send_query_stream_enc_status(struct drm_dp_mst_topology_mgr *mgr,
|
||||
struct drm_dp_mst_port *port,
|
||||
struct drm_dp_query_stream_enc_status_ack_reply *status);
|
||||
int __must_check drm_dp_mst_atomic_check(struct drm_atomic_state *state);
|
||||
|
||||
void drm_dp_mst_get_port_malloc(struct drm_dp_mst_port *port);
|
||||
|
Reference in New Issue
Block a user