disp: msm: dp: add colorspace property for MSM DP
Add the colorspace property for DP controller for MSM. Also, change the default method to send the colorimetry information to the sink from MISC bits of MSA to VSC SDP packets if the sink supports it. This helps to avoid dynamic switches between the packet types for sending the colorimetry information during BT2020 and DCI-P3 use-cases. Change-Id: I7ddf879a187b023fcf7404d64028e4d19b031119 Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
7f5f73ff41
commit
14e02e4b02
@@ -606,6 +606,19 @@ static int _sde_connector_update_bl_scale(struct sde_connector *c_conn)
|
||||
return rc;
|
||||
}
|
||||
|
||||
void sde_connector_set_colorspace(struct sde_connector *c_conn)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
if (c_conn->ops.set_colorspace)
|
||||
rc = c_conn->ops.set_colorspace(&c_conn->base,
|
||||
c_conn->display);
|
||||
|
||||
if (rc)
|
||||
SDE_ERROR_CONN(c_conn, "cannot apply new colorspace %d\n", rc);
|
||||
|
||||
}
|
||||
|
||||
void sde_connector_set_qsync_params(struct drm_connector *connector)
|
||||
{
|
||||
struct sde_connector *c_conn = to_sde_connector(connector);
|
||||
@@ -680,6 +693,12 @@ static int _sde_connector_update_dirty_properties(
|
||||
}
|
||||
}
|
||||
|
||||
/* if colorspace needs to be updated do it first */
|
||||
if (c_conn->colorspace_updated) {
|
||||
c_conn->colorspace_updated = false;
|
||||
sde_connector_set_colorspace(c_conn);
|
||||
}
|
||||
|
||||
/*
|
||||
* Special handling for postproc properties and
|
||||
* for updating backlight if any unset backlight level is present
|
||||
@@ -2134,6 +2153,7 @@ static const struct drm_connector_helper_funcs sde_connector_helper_ops = {
|
||||
.get_modes = sde_connector_get_modes,
|
||||
.mode_valid = sde_connector_mode_valid,
|
||||
.best_encoder = sde_connector_best_encoder,
|
||||
.atomic_check = sde_connector_atomic_check,
|
||||
};
|
||||
|
||||
static const struct drm_connector_helper_funcs sde_connector_helper_ops_v2 = {
|
||||
@@ -2311,6 +2331,7 @@ static int _sde_connector_install_properties(struct drm_device *dev,
|
||||
{
|
||||
struct dsi_display *dsi_display;
|
||||
int rc;
|
||||
struct drm_connector *connector;
|
||||
|
||||
msm_property_install_blob(&c_conn->property_info, "capabilities",
|
||||
DRM_MODE_PROP_IMMUTABLE, CONNECTOR_PROP_SDE_INFO);
|
||||
@@ -2323,6 +2344,8 @@ static int _sde_connector_install_properties(struct drm_device *dev,
|
||||
return rc;
|
||||
}
|
||||
|
||||
connector = &c_conn->base;
|
||||
|
||||
msm_property_install_blob(&c_conn->property_info, "mode_properties",
|
||||
DRM_MODE_PROP_IMMUTABLE, CONNECTOR_PROP_MODE_INFO);
|
||||
|
||||
@@ -2366,6 +2389,11 @@ static int _sde_connector_install_properties(struct drm_device *dev,
|
||||
&hdr,
|
||||
sizeof(hdr),
|
||||
CONNECTOR_PROP_EXT_HDR_INFO);
|
||||
|
||||
/* create and attach colorspace property for DP */
|
||||
if (!drm_mode_create_colorspace_property(connector))
|
||||
drm_object_attach_property(&connector->base,
|
||||
connector->colorspace_property, 0);
|
||||
}
|
||||
|
||||
msm_property_install_volatile_range(&c_conn->property_info,
|
||||
|
Reference in New Issue
Block a user