Skip to contentSkip to conversation

drm: bridge: it66121: ->get_edid callback must not return err pointers

PATCH Applied Jani Nikula 3 participants 3 messages Sep 14, 2023 – Sep 15, 2023

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

PATCH 1/1 drm: bridge: it66121: ->get_edid callback must not return err pointers

The drm stack does not expect error valued pointers for EDID anywhere.

Fixes e66856508746 ("drm: bridge: it66121: Set DDC preamble only once before reading EDID")
Cc Paul Cercueil <[email protected]>
Cc Robert Foss <[email protected]>
Cc Phong LE <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Robert Foss <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Jonas Karlman <[email protected]>
Cc Jernej Skrabec <[email protected]>
Cc <[email protected]> # v6.3+

---

UNTESTED

---
 drivers/gpu/drm/bridge/ite-it66121.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/ite-it66121.c +2 -2
index 3c9b42c9d2ee..1cf3fb1f13dc 100644
@@ -884,14 +884,14 @@ static struct edid *it66121_bridge_get_edid(struct drm_bridge *bridge,
 	mutex_lock(&ctx->lock);
 	ret = it66121_preamble_ddc(ctx);
 	if (ret) {
-		edid = ERR_PTR(ret);
+		edid = NULL;
 		goto out_unlock;
 	}
 
 	ret = regmap_write(ctx->regmap, IT66121_DDC_HEADER_REG,
 			   IT66121_DDC_HEADER_EDID);
 	if (ret) {
-		edid = ERR_PTR(ret);
+		edid = NULL;
 		goto out_unlock;
 	}
 
Signature · 1 line
2.39.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 33 lines · Jani Nikula

The drm stack does not expect error valued pointers for EDID anywhere.

Fixes e66856508746 ("drm: bridge: it66121: Set DDC preamble only once before reading EDID")
Cc Paul Cercueil <[email protected]>
Cc Robert Foss <[email protected]>
Cc Phong LE <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Robert Foss <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Jonas Karlman <[email protected]>
Cc Jernej Skrabec <[email protected]>
Cc <[email protected]> # v6.3+

---

UNTESTED

---
  drivers/gpu/drm/bridge/ite-it66121.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/ite-it66121.c +1 -1
index 3c9b42c9d2ee..1cf3fb1f13dc 100644
@@ -884,14 +884,14 @@ static struct edid *it66121_bridge_get_edid(struct drm_bridge *bridge,
  	mutex_lock(&ctx->lock);
  	ret = it66121_preamble_ddc(ctx);
  	if (ret) {
-		edid = ERR_PTR(ret);
+		edid = NULL;
  		goto out_unlock;

drivers/gpu/drm/bridge/ite-it66121.c static struct edid *it66121_bridge_get_edid(struct drm_bridge *bridge, · line 897

Quoted 10 lines
drivers/gpu/drm/bridge/ite-it66121.c +1 -1
  	}
 
  	ret = regmap_write(ctx->regmap, IT66121_DDC_HEADER_REG,
  			   IT66121_DDC_HEADER_EDID);
  	if (ret) {
-		edid = ERR_PTR(ret);
+		edid = NULL;
  		goto out_unlock;
  	}
 
#2 lore raw
In reply to Jani Nikula

Hi Jani,

Le jeudi 14 septembre 2023 à 16:11 +0300, Jani Nikula a écrit :

Quoted 5 lines

The drm stack does not expect error valued pointers for EDID anywhere.

Fixes e66856508746 ("drm: bridge: it66121: Set DDC preamble only

once before reading EDID")

Quoted 11 lines
Cc Paul Cercueil <[email protected]>
Cc Robert Foss <[email protected]>
Cc Phong LE <[email protected]>
Cc Neil Armstrong <[email protected]>
Cc Andrzej Hajda <[email protected]>
Cc Robert Foss <[email protected]>
Cc Laurent Pinchart <[email protected]>
Cc Jonas Karlman <[email protected]>
Cc Jernej Skrabec <[email protected]>
Cc <[email protected]> # v6.3+

Applied to drm-misc-next, thanks.

Cheers,
-Paul

Quoted 31 lines

---

UNTESTED
---
 drivers/gpu/drm/bridge/ite-it66121.c | 4 ++--

 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/ite-it66121.c +1 -1
index 3c9b42c9d2ee..1cf3fb1f13dc 100644
@@ -884,14 +884,14 @@ static struct edid
 *it66121_bridge_get_edid(struct drm_bridge *bridge,
         mutex_lock(&ctx->lock);
         ret = it66121_preamble_ddc(ctx);
         if (ret) {
-               edid = ERR_PTR(ret);
+               edid = NULL;
                 goto out_unlock;
         }


        ret = regmap_write(ctx->regmap, IT66121_DDC_HEADER_REG, IT66121_DDC_HEADER_EDID); if (ret) {
-               edid = ERR_PTR(ret);
+               edid = NULL;
                goto out_unlock;
        }