aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-11-23 20:33:29 -0500
committerDave Airlie <airlied@redhat.com>2017-11-23 20:33:29 -0500
commitc209101fc1c91a318422733a3721ff6a9ff7899f (patch)
treebc00b2251b9b031db4cf9e72220f56ae72757e58
parent0576178f5012f30c5be12905f5628bb597bc91c6 (diff)
parent9271c0ca573e02a360b636ecd8cb408852f4e9f6 (diff)
Merge tag 'drm-misc-fixes-2017-11-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
4.15 merge window fixes 1 * tag 'drm-misc-fixes-2017-11-20' of git://anongit.freedesktop.org/drm/drm-misc: drm/edid: Don't send non-zero YQ in AVI infoframe for HDMI 1.x sinks drm/vc4: Account for interrupts in flight
-rw-r--r--drivers/gpu/drm/drm_edid.c12
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c3
-rw-r--r--drivers/gpu/drm/vc4/vc4_hdmi.c3
-rw-r--r--drivers/gpu/drm/vc4/vc4_irq.c6
-rw-r--r--include/drm/drm_edid.h3
5 files changed, 22 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 2e8fb51282ef..5dfe14763871 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -4831,7 +4831,8 @@ void
4831drm_hdmi_avi_infoframe_quant_range(struct hdmi_avi_infoframe *frame, 4831drm_hdmi_avi_infoframe_quant_range(struct hdmi_avi_infoframe *frame,
4832 const struct drm_display_mode *mode, 4832 const struct drm_display_mode *mode,
4833 enum hdmi_quantization_range rgb_quant_range, 4833 enum hdmi_quantization_range rgb_quant_range,
4834 bool rgb_quant_range_selectable) 4834 bool rgb_quant_range_selectable,
4835 bool is_hdmi2_sink)
4835{ 4836{
4836 /* 4837 /*
4837 * CEA-861: 4838 * CEA-861:
@@ -4855,8 +4856,15 @@ drm_hdmi_avi_infoframe_quant_range(struct hdmi_avi_infoframe *frame,
4855 * YQ-field to match the RGB Quantization Range being transmitted 4856 * YQ-field to match the RGB Quantization Range being transmitted
4856 * (e.g., when Limited Range RGB, set YQ=0 or when Full Range RGB, 4857 * (e.g., when Limited Range RGB, set YQ=0 or when Full Range RGB,
4857 * set YQ=1) and the Sink shall ignore the YQ-field." 4858 * set YQ=1) and the Sink shall ignore the YQ-field."
4859 *
4860 * Unfortunate certain sinks (eg. VIZ Model 67/E261VA) get confused
4861 * by non-zero YQ when receiving RGB. There doesn't seem to be any
4862 * good way to tell which version of CEA-861 the sink supports, so
4863 * we limit non-zero YQ to HDMI 2.0 sinks only as HDMI 2.0 is based
4864 * on on CEA-861-F.
4858 */ 4865 */
4859 if (rgb_quant_range == HDMI_QUANTIZATION_RANGE_LIMITED) 4866 if (!is_hdmi2_sink ||
4867 rgb_quant_range == HDMI_QUANTIZATION_RANGE_LIMITED)
4860 frame->ycc_quantization_range = 4868 frame->ycc_quantization_range =
4861 HDMI_YCC_QUANTIZATION_RANGE_LIMITED; 4869 HDMI_YCC_QUANTIZATION_RANGE_LIMITED;
4862 else 4870 else
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 5132dc814788..4dea833f9d1b 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -487,7 +487,8 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
487 crtc_state->limited_color_range ? 487 crtc_state->limited_color_range ?
488 HDMI_QUANTIZATION_RANGE_LIMITED : 488 HDMI_QUANTIZATION_RANGE_LIMITED :
489 HDMI_QUANTIZATION_RANGE_FULL, 489 HDMI_QUANTIZATION_RANGE_FULL,
490 intel_hdmi->rgb_quant_range_selectable); 490 intel_hdmi->rgb_quant_range_selectable,
491 is_hdmi2_sink);
491 492
492 /* TODO: handle pixel repetition for YCBCR420 outputs */ 493 /* TODO: handle pixel repetition for YCBCR420 outputs */
493 intel_write_infoframe(encoder, crtc_state, &frame); 494 intel_write_infoframe(encoder, crtc_state, &frame);
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index fa37a1c07cf6..0b2088264039 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -424,7 +424,8 @@ static void vc4_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
424 vc4_encoder->limited_rgb_range ? 424 vc4_encoder->limited_rgb_range ?
425 HDMI_QUANTIZATION_RANGE_LIMITED : 425 HDMI_QUANTIZATION_RANGE_LIMITED :
426 HDMI_QUANTIZATION_RANGE_FULL, 426 HDMI_QUANTIZATION_RANGE_FULL,
427 vc4_encoder->rgb_range_selectable); 427 vc4_encoder->rgb_range_selectable,
428 false);
428 429
429 vc4_hdmi_write_infoframe(encoder, &frame); 430 vc4_hdmi_write_infoframe(encoder, &frame);
430} 431}
diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c
index 7d7af3a93d94..61b2e5377993 100644
--- a/drivers/gpu/drm/vc4/vc4_irq.c
+++ b/drivers/gpu/drm/vc4/vc4_irq.c
@@ -208,6 +208,9 @@ vc4_irq_postinstall(struct drm_device *dev)
208{ 208{
209 struct vc4_dev *vc4 = to_vc4_dev(dev); 209 struct vc4_dev *vc4 = to_vc4_dev(dev);
210 210
211 /* Undo the effects of a previous vc4_irq_uninstall. */
212 enable_irq(dev->irq);
213
211 /* Enable both the render done and out of memory interrupts. */ 214 /* Enable both the render done and out of memory interrupts. */
212 V3D_WRITE(V3D_INTENA, V3D_DRIVER_IRQS); 215 V3D_WRITE(V3D_INTENA, V3D_DRIVER_IRQS);
213 216
@@ -225,6 +228,9 @@ vc4_irq_uninstall(struct drm_device *dev)
225 /* Clear any pending interrupts we might have left. */ 228 /* Clear any pending interrupts we might have left. */
226 V3D_WRITE(V3D_INTCTL, V3D_DRIVER_IRQS); 229 V3D_WRITE(V3D_INTCTL, V3D_DRIVER_IRQS);
227 230
231 /* Finish any interrupt handler still in flight. */
232 disable_irq(dev->irq);
233
228 cancel_work_sync(&vc4->overflow_mem_work); 234 cancel_work_sync(&vc4->overflow_mem_work);
229} 235}
230 236
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 6f35909b8add..2ec41d032e56 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -362,7 +362,8 @@ void
362drm_hdmi_avi_infoframe_quant_range(struct hdmi_avi_infoframe *frame, 362drm_hdmi_avi_infoframe_quant_range(struct hdmi_avi_infoframe *frame,
363 const struct drm_display_mode *mode, 363 const struct drm_display_mode *mode,
364 enum hdmi_quantization_range rgb_quant_range, 364 enum hdmi_quantization_range rgb_quant_range,
365 bool rgb_quant_range_selectable); 365 bool rgb_quant_range_selectable,
366 bool is_hdmi2_sink);
366 367
367/** 368/**
368 * drm_eld_mnl - Get ELD monitor name length in bytes. 369 * drm_eld_mnl - Get ELD monitor name length in bytes.