<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Vitaly,</p>
<div class="moz-cite-prefix">09.12.2023 10:00, Vitaly Chikunov
пишет:<br>
</div>
<blockquote type="cite"
cite="mid:20231209070053.3m4yc65sgv4tpcyy@altlinux.org">
<pre class="moz-quote-pre" wrap="">Vasiliy,
On Wed, Dec 06, 2023 at 04:33:01PM +0300, <a class="moz-txt-link-abbreviated" href="mailto:kovalev@altlinux.org">kovalev@altlinux.org</a> wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">From: Vasiliy Kovalev <a class="moz-txt-link-rfc2396E" href="mailto:kovalev@altlinux.org"><kovalev@altlinux.org></a>
This reverts commit 5a46dc8e4a064769e916d87bf9bccae75afc7289.
Commit 50b6f2c8297793f7f3315623db78dcff85158e96 upstream.
Commit 5a46dc8e4a0647 ("drm/edid: Fix csync detailed mode parsing") fixed
EDID detailed mode sync parsing. Unfortunately, there are quite a few
displays out there that have bogus (zero) sync field that are broken by
the change. Zero means analog composite sync, which is not right for
digital displays, and the modes get rejected. Regardless, it used to
work, and it needs to continue to work. Revert the change.
Rejecting modes with analog composite sync was the part that fixed the
gitlab issue 8146 [1]. We'll need to get back to the drawing board with
that.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
1. Если этот патч отослан в апстрм[1], то зачем он здесь?</pre>
</blockquote>
<p>Изначальный патч не попал в стабильное ядро 6.1 и был добавлен
нами только в p10 сначала поверх 5.15.96-alt1, потом поверх
6.1.22-alt1 и решал критическую на то время проблему с выводом
изображения на моноблоках АТОЛ. В апстриме он просуществовал с
v6.4 до v6.4.12 и не был применен в стабильные ядра.</p>
<p>После появления регрессий на других машинах, было решено откатить
изменения и у нас, а сделать это возможно только если сами
отменим.<br>
<span style="font-family:monospace"></span></p>
<p><span style="font-family:monospace"></span></p>
<blockquote type="cite"
cite="mid:20231209070053.3m4yc65sgv4tpcyy@altlinux.org">
<pre class="moz-quote-pre" wrap=""> Видимо, стоит подождать решения апсрима и прихода через апстрим или переделки патча
если апстрим найдет проблему. У нас не ядра для тестирования изменений
перед отсылкой в апстрим, а наоборот мы получаем коммиты из апстрима
которые уже прошли весь цикл рецензирования и тестирования.
Мы принимаем все патчи из апсрима, так что без серьезных причин не стоит
их дублировать здесь. У нас нет ресурсов делать свой franken-браня ядра
конфликтующий с апстримом.
[1] <a class="moz-txt-link-freetext" href="https://lore.kernel.org/all/20231206084946.111835-2-kovalev@altlinux.org/">https://lore.kernel.org/all/20231206084946.111835-2-kovalev@altlinux.org/</a>
2. Например, точно так же патчи не шлются только или напрямую в stable,
а шлются в mainline, а оттуда перекладываются в stable.
<a class="moz-txt-link-freetext" href="https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html">https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html</a>
"There are three options to submit a change to -stable trees".
3. Например, так же происходит с Android Common Kernels
<a class="moz-txt-link-freetext" href="https://android.googlesource.com/kernel/common/">https://android.googlesource.com/kernel/common/</a>
"BEST: Make all of your changes to upstream Linux."
</pre>
</blockquote>
Спасибо за ссылки на ресурсы, ознакомлюсь.<br>
<blockquote type="cite"
cite="mid:20231209070053.3m4yc65sgv4tpcyy@altlinux.org">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
[1] <a class="moz-txt-link-freetext" href="https://gitlab.freedesktop.org/drm/intel/-/issues/8146">https://gitlab.freedesktop.org/drm/intel/-/issues/8146</a>
Closes: <a class="moz-txt-link-freetext" href="https://gitlab.freedesktop.org/drm/intel/-/issues/8789">https://gitlab.freedesktop.org/drm/intel/-/issues/8789</a>
Closes: <a class="moz-txt-link-freetext" href="https://gitlab.freedesktop.org/drm/intel/-/issues/8930">https://gitlab.freedesktop.org/drm/intel/-/issues/8930</a>
Closes: <a class="moz-txt-link-freetext" href="https://gitlab.freedesktop.org/drm/intel/-/issues/9044">https://gitlab.freedesktop.org/drm/intel/-/issues/9044</a>
Fixes: 5a46dc8e4a0647 ("drm/edid: Fix csync detailed mode parsing")
Cc: Ville Syrjälä <a class="moz-txt-link-rfc2396E" href="mailto:ville.syrjala@linux.intel.com"><ville.syrjala@linux.intel.com></a>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a>
Cc: <a class="moz-txt-link-rfc2396E" href="mailto:stable@vger.kernel.org"><stable@vger.kernel.org></a> # v6.4+
Signed-off-by: Jani Nikula <a class="moz-txt-link-rfc2396E" href="mailto:jani.nikula@intel.com"><jani.nikula@intel.com></a>
Acked-by: Ville Syrjälä <a class="moz-txt-link-rfc2396E" href="mailto:ville.syrjala@linux.intel.com"><ville.syrjala@linux.intel.com></a>
Link: <a class="moz-txt-link-freetext" href="https://patchwork.freedesktop.org/patch/msgid/20230815101907.2900768-1-jani.nikula@intel.com">https://patchwork.freedesktop.org/patch/msgid/20230815101907.2900768-1-jani.nikula@intel.com</a>
Signed-off-by: Vasiliy Kovalev <a class="moz-txt-link-rfc2396E" href="mailto:kovalev@altlinux.org"><kovalev@altlinux.org></a>
---
drivers/gpu/drm/drm_edid.c | 26 +++++++-------------------
include/drm/drm_edid.h | 12 +++---------
2 files changed, 10 insertions(+), 28 deletions(-)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index a26c6c57a627c0..5ed77e3361fd72 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3307,6 +3307,9 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
                DRM_DEBUG_KMS("stereo mode not supported\n");
                return NULL;
        }
+        if (!(pt->misc & DRM_EDID_PT_SEPARATE_SYNC)) {
+                DRM_DEBUG_KMS("composite sync not supported\n");
+        }
        /* it is incorrect if hsync/vsync width is zero */
        if (!hsync_pulse_width || !vsync_pulse_width) {
@@ -3353,25 +3356,10 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
        if (quirks & EDID_QUIRK_DETAILED_SYNC_PP) {
                mode->flags |= DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC;
        } else {
-                switch (pt->misc & DRM_EDID_PT_SYNC_MASK) {
-                case DRM_EDID_PT_ANALOG_CSYNC:
-                case DRM_EDID_PT_BIPOLAR_ANALOG_CSYNC:
-                        drm_dbg_kms(dev, "Analog composite sync!\n");
-                        mode->flags |= DRM_MODE_FLAG_CSYNC | DRM_MODE_FLAG_NCSYNC;
-                        break;
-                case DRM_EDID_PT_DIGITAL_CSYNC:
-                        drm_dbg_kms(dev, "Digital composite sync!\n");
-                        mode->flags |= DRM_MODE_FLAG_CSYNC;
-                        mode->flags |= (pt->misc & DRM_EDID_PT_HSYNC_POSITIVE) ?
-                                DRM_MODE_FLAG_PCSYNC : DRM_MODE_FLAG_NCSYNC;
-                        break;
-                case DRM_EDID_PT_DIGITAL_SEPARATE_SYNC:
-                        mode->flags |= (pt->misc & DRM_EDID_PT_HSYNC_POSITIVE) ?
-                                DRM_MODE_FLAG_PHSYNC : DRM_MODE_FLAG_NHSYNC;
-                        mode->flags |= (pt->misc & DRM_EDID_PT_VSYNC_POSITIVE) ?
-                                DRM_MODE_FLAG_PVSYNC : DRM_MODE_FLAG_NVSYNC;
-                        break;
-                }
+                mode->flags |= (pt->misc & DRM_EDID_PT_HSYNC_POSITIVE) ?
+                        DRM_MODE_FLAG_PHSYNC : DRM_MODE_FLAG_NHSYNC;
+                mode->flags |= (pt->misc & DRM_EDID_PT_VSYNC_POSITIVE) ?
+                        DRM_MODE_FLAG_PVSYNC : DRM_MODE_FLAG_NVSYNC;
        }
set_size:
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 008d2ed39822ec..1ed61e2b30a41c 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -61,15 +61,9 @@ struct std_timing {
        u8 vfreq_aspect;
} __attribute__((packed));
-#define DRM_EDID_PT_SYNC_MASK (3 << 3)
-# define DRM_EDID_PT_ANALOG_CSYNC (0 << 3)
-# define DRM_EDID_PT_BIPOLAR_ANALOG_CSYNC (1 << 3)
-# define DRM_EDID_PT_DIGITAL_CSYNC (2 << 3)
-# define DRM_EDID_PT_CSYNC_ON_RGB (1 << 1) /* analog csync only */
-# define DRM_EDID_PT_CSYNC_SERRATE (1 << 2)
-# define DRM_EDID_PT_DIGITAL_SEPARATE_SYNC (3 << 3)
-# define DRM_EDID_PT_HSYNC_POSITIVE (1 << 1) /* also digital csync */
-# define DRM_EDID_PT_VSYNC_POSITIVE (1 << 2)
+#define DRM_EDID_PT_HSYNC_POSITIVE (1 << 1)
+#define DRM_EDID_PT_VSYNC_POSITIVE (1 << 2)
+#define DRM_EDID_PT_SEPARATE_SYNC (3 << 3)
#define DRM_EDID_PT_STEREO (1 << 5)
#define DRM_EDID_PT_INTERLACED (1 << 7)
--
2.33.8
_______________________________________________
devel-kernel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:devel-kernel@lists.altlinux.org">devel-kernel@lists.altlinux.org</a>
<a class="moz-txt-link-freetext" href="https://lists.altlinux.org/mailman/listinfo/devel-kernel">https://lists.altlinux.org/mailman/listinfo/devel-kernel</a>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">_______________________________________________
devel-kernel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:devel-kernel@lists.altlinux.org">devel-kernel@lists.altlinux.org</a>
<a class="moz-txt-link-freetext" href="https://lists.altlinux.org/mailman/listinfo/devel-kernel">https://lists.altlinux.org/mailman/listinfo/devel-kernel</a></pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Regards,
Vasiliy Kovalev</pre>
</body>
</html>