Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a73de824 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: update hdr properties"

parents 62bacbd8 16649fc2
Loading
Loading
Loading
Loading
+14 −18
Original line number Diff line number Diff line
@@ -1325,24 +1325,17 @@ void sde_connector_commit_reset(struct drm_connector *connector, ktime_t ts)
static void sde_connector_update_hdr_props(struct drm_connector *connector)
{
	struct sde_connector *c_conn = to_sde_connector(connector);
	struct drm_msm_ext_hdr_properties hdr = {};

	hdr.hdr_supported = connector->hdr_supported;

	if (hdr.hdr_supported) {
		hdr.hdr_eotf = connector->hdr_eotf;
		hdr.hdr_metadata_type_one = connector->hdr_metadata_type_one;
		hdr.hdr_max_luminance = connector->hdr_max_luminance;
		hdr.hdr_avg_luminance = connector->hdr_avg_luminance;
		hdr.hdr_min_luminance = connector->hdr_min_luminance;

		msm_property_set_blob(&c_conn->property_info,
			      &c_conn->blob_ext_hdr,
			      &hdr,
			      sizeof(hdr),
			      CONNECTOR_PROP_EXT_HDR_INFO);
	struct drm_msm_ext_hdr_properties hdr = {
		connector->hdr_metadata_type_one,
		connector->hdr_supported,
		connector->hdr_eotf,
		connector->hdr_max_luminance,
		connector->hdr_avg_luminance,
		connector->hdr_min_luminance,
	};

	}
	msm_property_set_blob(&c_conn->property_info, &c_conn->blob_ext_hdr,
			&hdr, sizeof(hdr), CONNECTOR_PROP_EXT_HDR_INFO);
}

static enum drm_connector_status
@@ -1742,6 +1735,7 @@ static int sde_connector_get_modes(struct drm_connector *connector)
		return 0;
	}

	if (c_conn->hdr_capable)
		sde_connector_update_hdr_props(connector);

	return mode_count;
@@ -2265,6 +2259,8 @@ struct drm_connector *sde_connector_init(struct drm_device *dev,
	if (connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
		struct drm_msm_ext_hdr_properties hdr = {0};

		c_conn->hdr_capable = true;

		msm_property_install_blob(&c_conn->property_info,
				"ext_hdr_properties",
				DRM_MODE_PROP_IMMUTABLE,
+2 −0
Original line number Diff line number Diff line
@@ -378,6 +378,7 @@ struct sde_connector_evt {
 * @qsync_mode: Cached Qsync mode, 0=disabled, 1=continuous mode
 * @qsync_updated: Qsync settings were updated
 * last_cmd_tx_sts: status of the last command transfer
 * @hdr_capable: external hdr support present
 */
struct sde_connector {
	struct drm_connector base;
@@ -429,6 +430,7 @@ struct sde_connector {
	bool qsync_updated;

	bool last_cmd_tx_sts;
	bool hdr_capable;
};

/**