Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/i915/display i915: Fix sense ...



details:   https://anonhg.NetBSD.org/src/rev/347a27268d90
branches:  trunk
changeset: 366359:347a27268d90
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun May 22 21:18:12 2022 +0000

description:
i915: Fix sense of conditional for gmbus wait.

This enables i915 to again retrieve EDID data from displays over the
I2C DDC.

Embarrassing.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 75b591890195 -r 347a27268d90 sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c
--- a/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Sun May 22 21:16:50 2022 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/display/intel_gmbus.c Sun May 22 21:18:12 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intel_gmbus.c,v 1.6 2022/05/22 20:35:20 riastradh Exp $        */
+/*     $NetBSD: intel_gmbus.c,v 1.7 2022/05/22 21:18:12 riastradh Exp $        */
 
 /*
  * Copyright (c) 2006 Dave Airlie <airlied%linux.ie@localhost>
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intel_gmbus.c,v 1.6 2022/05/22 20:35:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intel_gmbus.c,v 1.7 2022/05/22 21:18:12 riastradh Exp $");
 
 #include <linux/export.h>
 #include <linux/i2c-algo-bit.h>
@@ -354,8 +354,8 @@
                unsigned timeout = 50*1000;
 
                ret = 0;
-               while ((gmbus2 = intel_uncore_read_fw(&dev_priv->uncore,
-                           GMBUS2)) & status) {
+               while (((gmbus2 = intel_uncore_read_fw(&dev_priv->uncore,
+                               GMBUS2)) & status) == 0) {
                        if (--timeout == 0) {
                                ret = -ETIMEDOUT;
                                break;
@@ -370,7 +370,7 @@
                    (((gmbus2 = intel_uncore_read_fw(&dev_priv->uncore,
                                GMBUS2))
                            & status)
-                       == 0));
+                       != 0));
                /*
                 * After DRM_SPIN_TIMED_WAIT_NOINTR_UNTIL, ret<0 on
                 * error (-ERESTARTSYS, interrupt), ret=0 on timeout,



Home | Main Index | Thread Index | Old Index