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

Commit b6e39e59 authored by Narender Ankam's avatar Narender Ankam Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/dp: parse yuv-support dt property



Parse "qcom,yuv-support" dt property.
Support YUV formats for any EDID mode only if
"qcom,yuv-support" is set.

Change-Id: I18163b30dd9e22d1d0a3eb156724b9267db51b82
Signed-off-by: default avatarNarender Ankam <nankam@codeaurora.org>
Signed-off-by: default avatarChirag Khurana <ckhurana@codeaurora.org>
parent de426247
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ DP Controller: Required properties:
					within DP AUX, while the remaining entries indicate the
					programmable values.
- qcom,max-pclk-frequency-khz:	An integer specifying the max. pixel clock in KHz supported by Display Port.
- qcom,yuv-support:		A boolean specifying if any YUV formats are supported by Display Port.
- qcom,dp-usbpd-detection:	Phandle for the PMI regulator node for USB PHY PD detection.
- qcom,<type>-supply-entries:		A node that lists the elements of the supply used by the a particular "type" of DSI module. The module "types"
					can be "core", "ctrl", and "phy". Within the same type,
+1 −0
Original line number Diff line number Diff line
@@ -522,6 +522,7 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp)
	dp->panel->handle_sink_request(dp->panel);

	dp->dp_display.max_pclk_khz = dp->parser->max_pclk_khz;
	dp->dp_display.yuv_support = dp->parser->yuv_support;
notify:
	dp_display_send_hpd_notification(dp, true);

+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ struct dp_display {
	struct drm_connector *connector;
	bool is_connected;
	u32 max_pclk_khz;
	bool yuv_support;

	int (*enable)(struct dp_display *dp_display);
	int (*post_enable)(struct dp_display *dp_display);
+5 −0
Original line number Diff line number Diff line
@@ -671,6 +671,11 @@ enum drm_mode_status dp_connector_mode_valid(struct drm_connector *connector,

	mode->vrefresh = drm_mode_vrefresh(mode);

	if (!dp_disp->yuv_support) {
		mode->flags &= ~DRM_MODE_FLAG_SUPPORTS_YUV420;
		mode->flags &= ~DRM_MODE_FLAG_SUPPORTS_YUV422;
	}

	if ((mode->flags & SDE_DRM_MODE_FLAG_FMT_MASK) ==
			DRM_MODE_FLAG_SUPPORTS_YUV420) {
		rate_ratio = YUV420_24BPP_TMDS_CHAR_RATE_RATIO;
+4 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -157,6 +157,9 @@ static int dp_parser_misc(struct dp_parser *parser)
	if (rc)
		parser->max_pclk_khz = DP_MAX_PIXEL_CLK_KHZ;

	parser->yuv_support = of_property_read_bool(of_node,
			"qcom,yuv-support");

	return 0;
}

Loading