[PATCH 18/36] drm/i915: Expose margin properties on ilk+ HDMI
Ville Syrjala
ville.syrjala at linux.intel.com
Wed Dec 18 16:10:35 UTC 2019
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Add support for underscan by exposing the margin properties on
ilk+ HDMI ports. This can be useful with silly TVs that won't
let you disable overscanning.
We limit this to ilk+ only because the gmch style panel fitter
doesn't really have the flexibility we need.
v2: Split the generic pfit stuff out
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29723
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_hdmi.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c
index 0cba143f3e5a..661727c612cb 100644
--- a/drivers/gpu/drm/i915/display/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
@@ -749,6 +749,8 @@ intel_hdmi_compute_avi_infoframe(struct intel_encoder *encoder,
drm_hdmi_avi_infoframe_content_type(frame, conn_state);
+ drm_hdmi_avi_infoframe_bars(frame, conn_state);
+
/* TODO: handle pixel repetition for YCBCR420 outputs */
ret = hdmi_avi_infoframe_check(frame);
@@ -2289,13 +2291,13 @@ intel_hdmi_ycbcr420_config(struct intel_crtc_state *crtc_state,
return 0;
if (!connector->ycbcr_420_allowed) {
- DRM_ERROR("Platform doesn't support YCBCR420 output\n");
+ DRM_DEBUG_KMS("Platform doesn't support YCBCR420 output\n");
return -EINVAL;
}
crtc_state->output_format = INTEL_OUTPUT_FORMAT_YCBCR420;
- return intel_pch_panel_fitting(crtc_state, conn_state);
+ return 0;
}
static int intel_hdmi_port_clock(int clock, int bpc)
@@ -2426,6 +2428,12 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
if (ret)
return ret;
+ if (!HAS_GMCH(dev_priv)) {
+ ret = intel_pch_panel_fitting(pipe_config, conn_state);
+ if (ret)
+ return ret;
+ }
+
pipe_config->limited_color_range =
intel_hdmi_limited_color_range(pipe_config, conn_state);
@@ -2871,8 +2879,11 @@ intel_hdmi_add_properties(struct intel_hdmi *intel_hdmi, struct drm_connector *c
drm_object_attach_property(&connector->base,
connector->dev->mode_config.hdr_output_metadata_property, 0);
- if (!HAS_GMCH(dev_priv))
+ if (!HAS_GMCH(dev_priv)) {
drm_connector_attach_max_bpc_property(connector, 8, 12);
+ drm_mode_create_tv_margin_properties(&dev_priv->drm);
+ drm_connector_attach_tv_margin_properties(connector);
+ }
}
/*
--
2.23.0
More information about the Intel-gfx-trybot
mailing list