Skip to content

Commit aed7b50

Browse files
committed
drm/imx: ldb: drop custom EDID support
Bindings for the imx-ldb never allowed specifying the EDID in DT. None of the existing DT files use it. Drop it now in favour of using debugfs overrides or the drm.edid_firmware support. Reviewed-by: Philipp Zabel <[email protected]> Tested-by: Chris Healy <[email protected]> Tested-by: Philipp Zabel <[email protected]> # on imx6q-nitrogen6x Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent fe30fab commit aed7b50

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

drivers/gpu/drm/imx/ipuv3/imx-ldb.c

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ struct imx_ldb_channel {
7272
struct device_node *child;
7373
struct i2c_adapter *ddc;
7474
int chno;
75-
const struct drm_edid *drm_edid;
7675
struct drm_display_mode mode;
7776
int mode_valid;
7877
u32 bus_format;
@@ -142,14 +141,17 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector)
142141
if (num_modes > 0)
143142
return num_modes;
144143

145-
if (!imx_ldb_ch->drm_edid && imx_ldb_ch->ddc) {
146-
imx_ldb_ch->drm_edid = drm_edid_read_ddc(connector,
147-
imx_ldb_ch->ddc);
148-
drm_edid_connector_update(connector, imx_ldb_ch->drm_edid);
149-
}
144+
if (imx_ldb_ch->ddc) {
145+
const struct drm_edid *edid = drm_edid_read_ddc(connector,
146+
imx_ldb_ch->ddc);
150147

151-
if (imx_ldb_ch->drm_edid)
152-
num_modes = drm_edid_connector_add_modes(connector);
148+
if (edid) {
149+
drm_edid_connector_update(connector, edid);
150+
drm_edid_free(edid);
151+
152+
return drm_edid_connector_add_modes(connector);
153+
}
154+
}
153155

154156
if (imx_ldb_ch->mode_valid) {
155157
struct drm_display_mode *mode;
@@ -566,18 +568,10 @@ static int imx_ldb_panel_ddc(struct device *dev,
566568
}
567569

568570
if (!channel->ddc) {
569-
const void *edidp;
570-
int edid_len;
571-
572571
/* if no DDC available, fallback to hardcoded EDID */
573572
dev_dbg(dev, "no ddc available\n");
574573

575-
edidp = of_get_property(child, "edid", &edid_len);
576-
if (edidp) {
577-
channel->drm_edid = drm_edid_alloc(edidp, edid_len);
578-
if (!channel->drm_edid)
579-
return -ENOMEM;
580-
} else if (!channel->panel) {
574+
if (!channel->panel) {
581575
/* fallback to display-timings node */
582576
ret = of_get_drm_display_mode(child,
583577
&channel->mode,
@@ -744,7 +738,6 @@ static void imx_ldb_remove(struct platform_device *pdev)
744738
for (i = 0; i < 2; i++) {
745739
struct imx_ldb_channel *channel = &imx_ldb->channel[i];
746740

747-
drm_edid_free(channel->drm_edid);
748741
i2c_put_adapter(channel->ddc);
749742
}
750743

0 commit comments

Comments
 (0)