Skip to contentSkip to conversation

nouveau: fix acpi edid retrieval

PATCH In review Maarten Lankhorst 3 participants 3 messages Nov 8, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nouveau: fix acpi edid retrieval

Commit c0077061e7ea accidentally inverted the logic for nouveau_acpi_edid, causing it to only show a connector as connected when the edid could not be retrieved with acpi.

---

drivers/gpu/drm/nouveau/nouveau_connector.c +1 -1
index 9a6e2cb..d3595b2 100644
@@ -355,7 +355,7 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force)
 	 * valid - it's not (rh#613284)
 	 */
 	if (nv_encoder->dcb->lvdsconf.use_acpi_for_edid) {
-		if (!(nv_connector->edid = nouveau_acpi_edid(dev, connector))) {
+		if ((nv_connector->edid = nouveau_acpi_edid(dev, connector))) {
 			status = connector_status_connected;
 			goto out;
 		}
Acked-by on v1 1/1
#1 lore raw

Dear Maarten,

thanks for the patch.

Am Donnerstag, den 08.11.2012, 17:19 +0100 schrieb Maarten Lankhorst:

Quoted 1 line

Commit c0077061e7ea

Please paste the commit summary for people not having a Git tree at hand.

Quoted 10 lines

accidentally inverted the logic for nouveau_acpi_edid, causing it to only show a connector as connected when the edid could not be retrieved with acpi.

---

drivers/gpu/drm/nouveau/nouveau_connector.c +0 -0
index 9a6e2cb..d3595b2 100644

drivers/gpu/drm/nouveau/nouveau_connector.c nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) · line 358

Quoted 5 lines
drivers/gpu/drm/nouveau/nouveau_connector.c +1 -1
@@ -355,7 +355,7 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force)
 	 * valid - it's not (rh#613284)
 	 */
 	if (nv_encoder->dcb->lvdsconf.use_acpi_for_edid) {
-		if (!(nv_connector->edid = nouveau_acpi_edid(dev, connector))) {
+		if ((nv_connector->edid = nouveau_acpi_edid(dev, connector))) {

One pair of parentheses can go now?

drivers/gpu/drm/nouveau/nouveau_connector.c nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) · line 361

Quoted 3 lines
drivers/gpu/drm/nouveau/nouveau_connector.c +0 -0
 			status = connector_status_connected;
 			goto out;
 		}

Thanks,

Paul

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

Op 08-11-12 21:53, Paul Menzel schreef:

Quoted 10 lines

Dear Maarten,

thanks for the patch.

Am Donnerstag, den 08.11.2012, 17:19 +0100 schrieb Maarten Lankhorst:

Quoted 1 line

Commit c0077061e7ea

Please paste the commit summary for people not having a Git tree at hand.

The summary will go in the commit log, at which point you can simply do a search for it. :-) But yeah maybe add it for the record.

"Commit c0077061e7ea (drm/nouveau/acpi: move definitions out of nouveau_drv.h)"

Quoted 16 lines
Quoted 10 lines

accidentally inverted the logic for nouveau_acpi_edid, causing it to only show a connector as connected when the edid could not be retrieved with acpi.

---

drivers/gpu/drm/nouveau/nouveau_connector.c +0 -0
index 9a6e2cb..d3595b2 100644

drivers/gpu/drm/nouveau/nouveau_connector.c nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) · line 358

Quoted 5 lines
drivers/gpu/drm/nouveau/nouveau_connector.c +1 -1
@@ -355,7 +355,7 @@ nouveau_connector_detect_lvds(struct drm_connector *connector, bool force)
 	 * valid - it's not (rh#613284)
 	 */
 	if (nv_encoder->dcb->lvdsconf.use_acpi_for_edid) {
-		if (!(nv_connector->edid = nouveau_acpi_edid(dev, connector))) {
+		if ((nv_connector->edid = nouveau_acpi_edid(dev, connector))) {

One pair of parentheses can go now?

No, gcc will warn about it if you try, since it's an assignment not a equality operator.

Quoted 9 lines

drivers/gpu/drm/nouveau/nouveau_connector.c nouveau_connector_detect_lvds(struct drm_connector *connector, bool force) · line 361

Quoted 3 lines
drivers/gpu/drm/nouveau/nouveau_connector.c +0 -0
 			status = connector_status_connected;
 			goto out;
 		}

Thanks,

Paul