29 #define to_omap_connector(x) container_of(x, struct omap_connector, base)
105 DBG(
"%s: %d", dssdev->
name, mode);
107 old_dpms = connector->
dpms;
115 switch (dssdev->
state) {
120 int ret = dssdev->
driver->enable(dssdev);
122 DBG(
"%s: failed to enable: %d",
124 dssdev->
driver->disable(dssdev);
149 if (dssdrv->
detect(dssdev)) {
158 VERB(
"%s: %d (force=%d)", omap_connector->
dssdev->name, ret, force);
163 static void omap_connector_destroy(
struct drm_connector *connector)
168 dssdev->
driver->disable(dssdev);
173 kfree(omap_connector);
180 static int omap_connector_get_modes(
struct drm_connector *connector)
214 copy_timings_omap_to_drm(mode, &timings);
226 static int omap_connector_mode_valid(
struct drm_connector *connector,
237 copy_timings_drm_to_omap(&timings, mode);
250 DBG(
"connector: mode %s: "
251 "%d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x",
252 (ret ==
MODE_OK) ?
"valid" :
"invalid",
282 DBG(
"%s: found %s", omap_connector->
dssdev->name,
288 DBG(
"%s: no encoder", omap_connector->
dssdev->name);
294 .dpms = omap_connector_dpms,
297 .destroy = omap_connector_destroy,
301 .get_modes = omap_connector_get_modes,
302 .mode_valid = omap_connector_mode_valid,
316 copy_timings_drm_to_omap(&timings, mode);
318 DBG(
"%s: set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x",
319 omap_connector->
dssdev->name,
327 dev_err(dev->dev,
"could not set timings\n");
338 int x,
int y,
int w,
int h)
343 VERB(
"%s: %d,%d, %dx%d", omap_connector->
dssdev->name, x, y, w, h);
351 struct omap_connector *omap_connector;
357 omap_connector = kzalloc(
sizeof(
struct omap_connector),
GFP_KERNEL);
358 if (!omap_connector) {
359 dev_err(dev->dev,
"could not allocate connector\n");
364 connector = &omap_connector->
base;
368 drm_connector_helper_add(connector, &omap_connector_helper_funcs);
371 if (dssdev->
caps & OMAP_DSS_DISPLAY_CAP_HPD)
387 omap_connector_destroy(connector);