Greetings,

Here an ugly patch which recovers support of LG UltraFine 5K which was broken
since update drm to linux 6.6.12.

This Display is quite delicate if not to say unstable, and it won't start with
timeout other whan 250ms.

A function intel_pxp_get_backend_timeout_ms returns two possible value: 250 or
GSCFW_MAX_ROUND_TRIP_LATENCY_MS which is defined at the end as 40 * 50.

Before an update, this code has only 250 as timeout and it works.

Possible that intel_pxp_init doesn't initialize pxp->ctrl_gt the same way like
linux, or such regression exists on linux as well.

Anyway, my approach is hack which fixed my issue, but I haven't got any way to
test it on different hardware, so, I may introduce something.

But I happy that I can use my screen again

P.S. bug report: https://marc.info/?l=openbsd-bugs&m=170821608101004&w=2

-- 
wbr, Kirill
diff --git sys/dev/pci/drm/i915/pxp/intel_pxp.c 
sys/dev/pci/drm/i915/pxp/intel_pxp.c
index e079f5b6ee6..528405056ec 100644
--- sys/dev/pci/drm/i915/pxp/intel_pxp.c
+++ sys/dev/pci/drm/i915/pxp/intel_pxp.c
@@ -330,7 +330,8 @@ static int __pxp_global_teardown_restart(struct intel_pxp 
*pxp)
         */
        pxp_queue_termination(pxp);
 
-       timeout = intel_pxp_get_backend_timeout_ms(pxp);
+       /* LG UltraFine 5K starts only when timeout is 250 */
+       timeout = 250;
 
        if (!wait_for_completion_timeout(&pxp->termination, 
msecs_to_jiffies(timeout)))
                return -ETIMEDOUT;

Reply via email to