drm/msm/dp: add vcpi parameter for set_stream_info

Introduce a new parameter for set_stream_info function to pass
virtual channel id, vcpi, information from dp_mst layers to
dp_display and dp_panel modules. dp_display and dp_panel modules
need vcpi information for mst, mst-dsc and mst-hdcp use-cases.

Change-Id: Ic8c21223928e3da234a4e9f59e798a3786a037da
Signed-off-by: Govinda Rajulu Chenna <gchenna@codeaurora.org>
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
This commit is contained in:
Govinda Rajulu Chenna 2019-01-09 23:51:37 -05:00 committed by Tatenda Chipeperekwa
parent d4a43a7032
commit 32a2488454
6 changed files with 14 additions and 9 deletions

View file

@ -1397,7 +1397,7 @@ static int dp_display_prepare(struct dp_display *dp_display, void *panel)
static int dp_display_set_stream_info(struct dp_display *dp_display,
void *panel, u32 strm_id, u32 start_slot,
u32 num_slots, u32 pbn)
u32 num_slots, u32 pbn, int vcpi)
{
int rc = 0;
struct dp_panel *dp_panel;
@ -1430,7 +1430,7 @@ static int dp_display_set_stream_info(struct dp_display *dp_display,
if (panel) {
dp_panel = panel;
dp_panel->set_stream_info(dp_panel, strm_id, start_slot,
num_slots, pbn);
num_slots, pbn, vcpi);
}
mutex_unlock(&dp->session_lock);

View file

@ -106,7 +106,8 @@ struct dp_display {
int (*get_mst_caps)(struct dp_display *dp_display,
struct dp_mst_caps *mst_caps);
int (*set_stream_info)(struct dp_display *dp_display, void *panel,
u32 strm_id, u32 start_slot, u32 num_slots, u32 pbn);
u32 strm_id, u32 start_slot, u32 num_slots, u32 pbn,
int vcpi);
void (*convert_to_dp_mode)(struct dp_display *dp_display, void *panel,
const struct drm_display_mode *drm_mode,
struct dp_display_mode *dp_mode);

View file

@ -114,7 +114,7 @@ static void dp_bridge_pre_enable(struct drm_bridge *drm_bridge)
}
/* for SST force stream id, start slot and total slots to 0 */
dp->set_stream_info(dp, bridge->dp_panel, 0, 0, 0, 0);
dp->set_stream_info(dp, bridge->dp_panel, 0, 0, 0, 0, 0);
rc = dp->enable(dp, bridge->dp_panel);
if (rc) {

View file

@ -529,7 +529,8 @@ static void _dp_mst_update_timeslots(struct dp_mst_private *mst,
mst->dp_display->set_stream_info(mst->dp_display,
dp_bridge->dp_panel,
dp_bridge->id, start_slot, num_slots, pbn);
dp_bridge->id, start_slot, num_slots, pbn,
dp_bridge->vcpi);
pr_info("bridge:%d vcpi:%d start_slot:%d num_slots:%d, pbn:%d\n",
dp_bridge->id, dp_bridge->vcpi,
@ -554,7 +555,8 @@ static void _dp_mst_update_single_timeslot(struct dp_mst_private *mst,
mst->dp_display->set_stream_info(mst->dp_display,
mst_bridge->dp_panel,
mst_bridge->id, start_slot, num_slots, pbn);
mst_bridge->id, start_slot, num_slots, pbn,
mst_bridge->vcpi);
}
}

View file

@ -2305,13 +2305,14 @@ static void dp_panel_edid_deregister(struct dp_panel_private *panel)
static int dp_panel_set_stream_info(struct dp_panel *dp_panel,
enum dp_stream_id stream_id, u32 ch_start_slot,
u32 ch_tot_slots, u32 pbn)
u32 ch_tot_slots, u32 pbn, int vcpi)
{
if (!dp_panel || stream_id > DP_STREAM_MAX) {
pr_err("invalid input. stream_id: %d\n", stream_id);
return -EINVAL;
}
dp_panel->vcpi = vcpi;
dp_panel->stream_id = stream_id;
dp_panel->channel_start_slot = ch_start_slot;
dp_panel->channel_total_slots = ch_tot_slots;
@ -2376,7 +2377,7 @@ static int dp_panel_deinit_panel_info(struct dp_panel *dp_panel, u32 flags)
if (!panel->custom_edid && dp_panel->edid_ctrl->edid)
sde_free_edid((void **)&dp_panel->edid_ctrl);
dp_panel_set_stream_info(dp_panel, DP_STREAM_MAX, 0, 0, 0);
dp_panel_set_stream_info(dp_panel, DP_STREAM_MAX, 0, 0, 0, 0);
memset(&dp_panel->pinfo, 0, sizeof(dp_panel->pinfo));
memset(&hdr->hdr_meta, 0, sizeof(hdr->hdr_meta));
panel->panel_on = false;

View file

@ -110,6 +110,7 @@ struct dp_panel {
* Client sets the stream id value using set_stream_id interface.
*/
enum dp_stream_id stream_id;
int vcpi;
u32 channel_start_slot;
u32 channel_total_slots;
@ -154,7 +155,7 @@ struct dp_panel {
int (*set_stream_info)(struct dp_panel *dp_panel,
enum dp_stream_id stream_id, u32 ch_start_slot,
u32 ch_tot_slots, u32 pbn);
u32 ch_tot_slots, u32 pbn, int vcpi);
int (*read_sink_status)(struct dp_panel *dp_panel, u8 *sts, u32 size);
int (*update_edid)(struct dp_panel *dp_panel, struct edid *edid);