Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329308
b: refs/heads/master
c: 451023d
h: refs/heads/master
v: v3
  • Loading branch information
Jani Nikula authored and Dave Airlie committed Aug 23, 2012
1 parent 417f5d0 commit 70b56a7
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 57 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 993dcb05e47e357ade19c41f60b39085eeba8787
refs/heads/master: 451023dc32d4542c21b52ad1692e6e01cb75b099
3 changes: 0 additions & 3 deletions trunk/drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,7 @@ struct edid *drm_get_edid(struct drm_connector *connector,
if (drm_probe_ddc(adapter))
edid = (struct edid *)drm_do_get_edid(connector, adapter);

connector->display_info.raw_edid = (char *)edid;

return edid;

}
EXPORT_SYMBOL(drm_get_edid);

Expand Down
23 changes: 13 additions & 10 deletions trunk/drivers/gpu/drm/drm_edid_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ static u8 generic_edid[GENERIC_EDIDS][128] = {
},
};

static int edid_load(struct drm_connector *connector, char *name,
char *connector_name)
static u8 *edid_load(struct drm_connector *connector, char *name,
char *connector_name)
{
const struct firmware *fw;
struct platform_device *pdev;
Expand Down Expand Up @@ -205,7 +205,6 @@ static int edid_load(struct drm_connector *connector, char *name,
edid = new_edid;
}

connector->display_info.raw_edid = edid;
DRM_INFO("Got %s EDID base block and %d extension%s from "
"\"%s\" for connector \"%s\"\n", builtin ? "built-in" :
"external", valid_extensions, valid_extensions == 1 ? "" : "s",
Expand All @@ -215,14 +214,18 @@ static int edid_load(struct drm_connector *connector, char *name,
release_firmware(fw);

out:
return err;
if (err)
return ERR_PTR(err);

return edid;
}

int drm_load_edid_firmware(struct drm_connector *connector)
{
char *connector_name = drm_get_connector_name(connector);
char *edidname = edid_firmware, *last, *colon;
int ret;
struct edid *edid;

if (*edidname == '\0')
return 0;
Expand All @@ -240,13 +243,13 @@ int drm_load_edid_firmware(struct drm_connector *connector)
if (*last == '\n')
*last = '\0';

ret = edid_load(connector, edidname, connector_name);
if (ret)
edid = (struct edid *) edid_load(connector, edidname, connector_name);
if (IS_ERR_OR_NULL(edid))
return 0;

drm_mode_connector_update_edid_property(connector,
(struct edid *) connector->display_info.raw_edid);
drm_mode_connector_update_edid_property(connector, edid);
ret = drm_add_edid_modes(connector, edid);
kfree(edid);

return drm_add_edid_modes(connector, (struct edid *)
connector->display_info.raw_edid);
return ret;
}
4 changes: 1 addition & 3 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,7 @@ static int exynos_drm_connector_get_modes(struct drm_connector *connector)

drm_mode_connector_update_edid_property(connector, edid);
count = drm_add_edid_modes(connector, edid);

kfree(connector->display_info.raw_edid);
connector->display_info.raw_edid = edid;
kfree(edid);
} else {
struct drm_display_mode *mode = drm_mode_create(connector->dev);
struct exynos_drm_panel_info *panel;
Expand Down
13 changes: 0 additions & 13 deletions trunk/drivers/gpu/drm/exynos/exynos_drm_vidi.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ static int vidi_get_edid(struct device *dev, struct drm_connector *connector,
u8 *edid, int len)
{
struct vidi_context *ctx = get_vidi_context(dev);
struct edid *raw_edid;

DRM_DEBUG_KMS("%s\n", __FILE__);

Expand All @@ -115,18 +114,6 @@ static int vidi_get_edid(struct device *dev, struct drm_connector *connector,
return -EFAULT;
}

raw_edid = kzalloc(len, GFP_KERNEL);
if (!raw_edid) {
DRM_DEBUG_KMS("failed to allocate raw_edid.\n");
return -ENOMEM;
}

memcpy(raw_edid, ctx->raw_edid, min((1 + ctx->raw_edid->extensions)
* EDID_LENGTH, len));

/* attach the edid data to connector. */
connector->display_info.raw_edid = (char *)raw_edid;

memcpy(edid, ctx->raw_edid, min((1 + ctx->raw_edid->extensions)
* EDID_LENGTH, len));

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ static enum drm_connector_status cdv_hdmi_detect(
hdmi_priv->has_hdmi_audio =
drm_detect_monitor_audio(edid);
}

psb_intel_connector->base.display_info.raw_edid = NULL;
kfree(edid);
}
return status;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/gma500/oaktrail_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ static int oaktrail_hdmi_get_modes(struct drm_connector *connector)
if (edid) {
drm_mode_connector_update_edid_property(connector, edid);
ret = drm_add_edid_modes(connector, edid);
connector->display_info.raw_edid = NULL;
}

/*
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/gpu/drm/gma500/psb_intel_sdvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,6 @@ psb_intel_sdvo_hdmi_sink_detect(struct drm_connector *connector)
}
} else
status = connector_status_disconnected;
connector->display_info.raw_edid = NULL;
kfree(edid);
}

Expand Down Expand Up @@ -1404,7 +1403,6 @@ psb_intel_sdvo_detect(struct drm_connector *connector, bool force)
ret = connector_status_disconnected;
else
ret = connector_status_connected;
connector->display_info.raw_edid = NULL;
kfree(edid);
} else
ret = connector_status_connected;
Expand Down Expand Up @@ -1453,7 +1451,6 @@ static void psb_intel_sdvo_get_ddc_modes(struct drm_connector *connector)
drm_add_edid_modes(connector, edid);
}

connector->display_info.raw_edid = NULL;
kfree(edid);
}
}
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/gpu/drm/i915/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2145,7 +2145,6 @@ intel_dp_get_edid_modes(struct drm_connector *connector, struct i2c_adapter *ada
ret = drm_add_edid_modes(connector, intel_dp->edid);
drm_edid_to_eld(connector,
intel_dp->edid);
connector->display_info.raw_edid = NULL;
return intel_dp->edid_mode_count;
}

Expand Down Expand Up @@ -2191,7 +2190,6 @@ intel_dp_detect(struct drm_connector *connector, bool force)
edid = intel_dp_get_edid(connector, &intel_dp->adapter);
if (edid) {
intel_dp->has_audio = drm_detect_monitor_audio(edid);
connector->display_info.raw_edid = NULL;
kfree(edid);
}
}
Expand Down Expand Up @@ -2256,8 +2254,6 @@ intel_dp_detect_audio(struct drm_connector *connector)
edid = intel_dp_get_edid(connector, &intel_dp->adapter);
if (edid) {
has_audio = drm_detect_monitor_audio(edid);

connector->display_info.raw_edid = NULL;
kfree(edid);
}

Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/gpu/drm/i915/intel_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,6 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
drm_detect_hdmi_monitor(edid);
intel_hdmi->has_audio = drm_detect_monitor_audio(edid);
}
connector->display_info.raw_edid = NULL;
kfree(edid);
}

Expand Down Expand Up @@ -778,8 +777,6 @@ intel_hdmi_detect_audio(struct drm_connector *connector)
if (edid) {
if (edid->input & DRM_EDID_INPUT_DIGITAL)
has_audio = drm_detect_monitor_audio(edid);

connector->display_info.raw_edid = NULL;
kfree(edid);
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/i915/intel_modes.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ int intel_ddc_get_modes(struct drm_connector *connector,
drm_mode_connector_update_edid_property(connector, edid);
ret = drm_add_edid_modes(connector, edid);
drm_edid_to_eld(connector, edid);
connector->display_info.raw_edid = NULL;
kfree(edid);
}

Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/gpu/drm/i915/intel_sdvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1345,7 +1345,6 @@ intel_sdvo_tmds_sink_detect(struct drm_connector *connector)
}
} else
status = connector_status_disconnected;
connector->display_info.raw_edid = NULL;
kfree(edid);
}

Expand Down Expand Up @@ -1419,7 +1418,6 @@ intel_sdvo_detect(struct drm_connector *connector, bool force)
else
ret = connector_status_disconnected;

connector->display_info.raw_edid = NULL;
kfree(edid);
} else
ret = connector_status_connected;
Expand Down Expand Up @@ -1465,7 +1463,6 @@ static void intel_sdvo_get_ddc_modes(struct drm_connector *connector)
drm_add_edid_modes(connector, edid);
}

connector->display_info.raw_edid = NULL;
kfree(edid);
}
}
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/gpu/drm/mgag200/mgag200_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,6 @@ static int mga_vga_get_modes(struct drm_connector *connector)
if (edid) {
drm_mode_connector_update_edid_property(connector, edid);
ret = drm_add_edid_modes(connector, edid);
connector->display_info.raw_edid = NULL;
kfree(edid);
}
return ret;
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/gpu/drm/udl/udl_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,8 @@ static int udl_get_modes(struct drm_connector *connector)

edid = (struct edid *)udl_get_edid(udl);

connector->display_info.raw_edid = (char *)edid;

drm_mode_connector_update_edid_property(connector, edid);
ret = drm_add_edid_modes(connector, edid);
connector->display_info.raw_edid = NULL;
kfree(edid);
return ret;
}
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/staging/omapdrm/omap_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,11 @@ static int omap_connector_get_modes(struct drm_connector *connector)
drm_mode_connector_update_edid_property(
connector, edid);
n = drm_add_edid_modes(connector, edid);
kfree(connector->display_info.raw_edid);
connector->display_info.raw_edid = edid;
} else {
drm_mode_connector_update_edid_property(
connector, NULL);
connector->display_info.raw_edid = NULL;
kfree(edid);
}
kfree(edid);
} else {
struct drm_display_mode *mode = drm_mode_create(dev);
struct omap_video_timings timings;
Expand Down
2 changes: 0 additions & 2 deletions trunk/include/drm/drm_crtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ struct drm_display_info {
u32 color_formats;

u8 cea_rev;

char *raw_edid; /* if any */
};

struct drm_framebuffer_funcs {
Expand Down

0 comments on commit 70b56a7

Please sign in to comment.