Merge "disp: msm: dp: use base connector properties for mst connectors"
此提交包含在:
@@ -702,3 +702,34 @@ int dp_connector_update_pps(struct drm_connector *connector,
|
||||
dp_disp = display;
|
||||
return dp_disp->update_pps(dp_disp, connector, pps_cmd);
|
||||
}
|
||||
|
||||
int dp_connector_install_properties(void *display, struct drm_connector *conn)
|
||||
{
|
||||
struct dp_display *dp_display = display;
|
||||
struct drm_connector *base_conn;
|
||||
int rc;
|
||||
|
||||
if (!display || !conn) {
|
||||
DP_ERR("invalid params\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
base_conn = dp_display->base_connector;
|
||||
|
||||
/*
|
||||
* Create the property on the base connector during probe time and then
|
||||
* attach the same property onto new connector objects created for MST
|
||||
*/
|
||||
if (!base_conn->colorspace_property) {
|
||||
/* This is the base connector. create the drm property */
|
||||
rc = drm_mode_create_dp_colorspace_property(base_conn);
|
||||
if (rc)
|
||||
return rc;
|
||||
} else {
|
||||
conn->colorspace_property = base_conn->colorspace_property;
|
||||
}
|
||||
|
||||
drm_object_attach_property(&conn->base, conn->colorspace_property, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -158,6 +158,14 @@ void convert_to_drm_mode(const struct dp_display_mode *dp_mode,
|
||||
int dp_connector_update_pps(struct drm_connector *connector,
|
||||
char *pps_cmd, void *display);
|
||||
|
||||
/**
|
||||
* dp_connector_install_properties - install drm properties
|
||||
* @display: Pointer to private display structure
|
||||
* @conn: Pointer to connector
|
||||
*/
|
||||
int dp_connector_install_properties(void *display,
|
||||
struct drm_connector *conn);
|
||||
|
||||
#else
|
||||
static inline int dp_connector_config_hdr(struct drm_connector *connector,
|
||||
void *display, struct sde_connector_state *c_state)
|
||||
@@ -239,6 +247,12 @@ static inline void convert_to_drm_mode(const struct dp_display_mode *dp_mode,
|
||||
struct drm_display_mode *drm_mode)
|
||||
{
|
||||
}
|
||||
|
||||
static int dp_connector_install_properties(void *display,
|
||||
struct drm_connector *conn)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_DRM_MSM_DP */
|
||||
|
||||
#endif /* _DP_DRM_H_ */
|
||||
|
@@ -1747,6 +1747,7 @@ dp_mst_add_connector(struct drm_dp_mst_topology_mgr *mgr,
|
||||
.config_hdr = dp_mst_connector_config_hdr,
|
||||
.pre_destroy = dp_mst_connector_pre_destroy,
|
||||
.update_pps = dp_connector_update_pps,
|
||||
.install_properties = dp_connector_install_properties,
|
||||
};
|
||||
struct dp_mst_private *dp_mst;
|
||||
struct drm_device *dev;
|
||||
|
@@ -2725,10 +2725,8 @@ static int _sde_connector_install_properties(struct drm_device *dev,
|
||||
sizeof(hdr),
|
||||
CONNECTOR_PROP_EXT_HDR_INFO);
|
||||
|
||||
/* create and attach colorspace property for DP */
|
||||
if (!drm_mode_create_dp_colorspace_property(connector))
|
||||
drm_object_attach_property(&connector->base,
|
||||
connector->colorspace_property, 0);
|
||||
if (c_conn->ops.install_properties)
|
||||
c_conn->ops.install_properties(display, connector);
|
||||
}
|
||||
|
||||
msm_property_install_volatile_range(&c_conn->property_info,
|
||||
|
@@ -351,6 +351,14 @@ struct sde_connector_ops {
|
||||
*/
|
||||
int (*prepare_commit)(void *display,
|
||||
struct msm_display_conn_params *params);
|
||||
|
||||
/**
|
||||
* install_properties - install connector properties
|
||||
* @display: Pointer to private display structure
|
||||
* @conn: Pointer to drm connector structure
|
||||
* Returns: Zero on success
|
||||
*/
|
||||
int (*install_properties)(void *display, struct drm_connector *conn);
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -1655,6 +1655,7 @@ static int _sde_kms_setup_displays(struct drm_device *dev,
|
||||
.get_panel_vfp = dsi_display_get_panel_vfp,
|
||||
.get_default_lms = dsi_display_get_default_lms,
|
||||
.cmd_receive = dsi_display_cmd_receive,
|
||||
.install_properties = NULL,
|
||||
};
|
||||
static const struct sde_connector_ops wb_ops = {
|
||||
.post_init = sde_wb_connector_post_init,
|
||||
@@ -1671,6 +1672,7 @@ static int _sde_kms_setup_displays(struct drm_device *dev,
|
||||
.cont_splash_config = NULL,
|
||||
.get_panel_vfp = NULL,
|
||||
.cmd_receive = NULL,
|
||||
.install_properties = NULL,
|
||||
};
|
||||
static const struct sde_connector_ops dp_ops = {
|
||||
.post_init = dp_connector_post_init,
|
||||
@@ -1689,6 +1691,7 @@ static int _sde_kms_setup_displays(struct drm_device *dev,
|
||||
.get_panel_vfp = NULL,
|
||||
.update_pps = dp_connector_update_pps,
|
||||
.cmd_receive = NULL,
|
||||
.install_properties = dp_connector_install_properties,
|
||||
};
|
||||
struct msm_display_info info;
|
||||
struct drm_encoder *encoder;
|
||||
|
新增問題並參考
封鎖使用者