summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2024-04-16 16:22:23 +0300
committerJani Nikula <jani.nikula@intel.com>2024-04-22 21:44:31 +0300
commit8431f29d2f1deac06e120a1c5d9afb5d72def319 (patch)
tree0543bca67175e6f2bc2c46c7afb802dfc2327476
parentf1e4db073f98f887122a10ef3c66a19e75516b48 (diff)
drm/gud: switch to struct drm_edid
Prefer struct drm_edid based functions over struct edid. Reviewed-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/c519a9b9d3c3c9a413de33b99b97a1120f774f2d.1713273659.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r--drivers/gpu/drm/gud/gud_connector.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/gud/gud_connector.c b/drivers/gpu/drm/gud/gud_connector.c
index 034e78360d4f..0f07d77c5d52 100644
--- a/drivers/gpu/drm/gud/gud_connector.c
+++ b/drivers/gpu/drm/gud/gud_connector.c
@@ -221,7 +221,7 @@ static int gud_connector_get_modes(struct drm_connector *connector)
struct gud_display_mode_req *reqmodes = NULL;
struct gud_connector_get_edid_ctx edid_ctx;
unsigned int i, num_modes = 0;
- struct edid *edid = NULL;
+ const struct drm_edid *drm_edid = NULL;
int idx, ret;
if (!drm_dev_enter(connector->dev, &idx))
@@ -238,13 +238,13 @@ static int gud_connector_get_modes(struct drm_connector *connector)
gud_conn_err(connector, "Invalid EDID size", ret);
} else if (ret > 0) {
edid_ctx.len = ret;
- edid = drm_do_get_edid(connector, gud_connector_get_edid_block, &edid_ctx);
+ drm_edid = drm_edid_read_custom(connector, gud_connector_get_edid_block, &edid_ctx);
}
kfree(edid_ctx.buf);
- drm_connector_update_edid_property(connector, edid);
+ drm_edid_connector_update(connector, drm_edid);
- if (edid && edid_ctx.edid_override)
+ if (drm_edid && edid_ctx.edid_override)
goto out;
reqmodes = kmalloc_array(GUD_CONNECTOR_MAX_NUM_MODES, sizeof(*reqmodes), GFP_KERNEL);
@@ -276,10 +276,10 @@ static int gud_connector_get_modes(struct drm_connector *connector)
}
out:
if (!num_modes)
- num_modes = drm_add_edid_modes(connector, edid);
+ num_modes = drm_edid_connector_add_modes(connector);
kfree(reqmodes);
- kfree(edid);
+ drm_edid_free(drm_edid);
drm_dev_exit(idx);
return num_modes;