mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
ed1536e0b6
Deleted (upstreamed): generic/backport-5.15/890-v5.19-net-sfp-Add-tx-fault-workaround-for-Huawei-MA5671A-SFP-ON.patch [1] Other patches automatically rebased. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.41&id=99858114a3b2c8f5f8707d9bbd46c50f547c87c0 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
44 lines
1.6 KiB
Diff
44 lines
1.6 KiB
Diff
From 4809cf80fdd964c413045e550fb137a18dc98ba2 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
Date: Tue, 12 Jan 2021 15:55:07 +0100
|
|
Subject: [PATCH] drm/vc4: hdmi: Add full range RGB helper
|
|
|
|
We're going to need to tell whether we want to run with a full or
|
|
limited range RGB output in multiple places in the code, so let's create
|
|
a helper that will return whether we need with full range or not.
|
|
|
|
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_hdmi.c | 12 ++++++++++--
|
|
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
|
@@ -108,6 +108,15 @@ static bool vc4_hdmi_mode_needs_scrambli
|
|
return (mode->clock * 1000) > HDMI_14_MAX_TMDS_CLK;
|
|
}
|
|
|
|
+static bool vc4_hdmi_is_full_range_rgb(struct vc4_hdmi *vc4_hdmi,
|
|
+ const struct drm_display_mode *mode)
|
|
+{
|
|
+ struct vc4_hdmi_encoder *vc4_encoder = &vc4_hdmi->encoder;
|
|
+
|
|
+ return !vc4_encoder->hdmi_monitor ||
|
|
+ drm_default_rgb_quant_range(mode) == HDMI_QUANTIZATION_RANGE_FULL;
|
|
+}
|
|
+
|
|
static int vc4_hdmi_debugfs_regs(struct seq_file *m, void *unused)
|
|
{
|
|
struct drm_info_node *node = (struct drm_info_node *)m->private;
|
|
@@ -1116,8 +1125,7 @@ static void vc4_hdmi_encoder_pre_crtc_en
|
|
|
|
mutex_lock(&vc4_hdmi->mutex);
|
|
|
|
- if (vc4_encoder->hdmi_monitor &&
|
|
- drm_default_rgb_quant_range(mode) == HDMI_QUANTIZATION_RANGE_LIMITED) {
|
|
+ if (!vc4_hdmi_is_full_range_rgb(vc4_hdmi, mode)) {
|
|
if (vc4_hdmi->variant->csc_setup)
|
|
vc4_hdmi->variant->csc_setup(vc4_hdmi, true);
|
|
|