31 #include <drm/exynos_drm.h>
36 #define to_exynos_connector(x) container_of(x, struct exynos_drm_connector,\
52 DRM_DEBUG_KMS(
"%s\n", __FILE__);
81 DRM_DEBUG_KMS(
"%s\n", __FILE__);
83 memset(timing, 0,
sizeof(*timing));
115 DRM_DEBUG_KMS(
"%s\n", __FILE__);
118 DRM_DEBUG_KMS(
"display_ops is null.\n");
136 DRM_ERROR(
"failed to allocate edid\n");
140 ret = display_ops->
get_edid(manager->
dev, connector,
143 DRM_ERROR(
"failed to get edid data.\n");
156 DRM_ERROR(
"failed to create a new display mode.\n");
167 convert_to_display_mode(mode, panel);
181 static int exynos_drm_connector_mode_valid(
struct drm_connector *connector,
191 DRM_DEBUG_KMS(
"%s\n", __FILE__);
193 convert_to_video_timing(&timing, mode);
210 DRM_DEBUG_KMS(
"%s\n", __FILE__);
215 DRM_DEBUG_KMS(
"Unknown ENCODER ID %d\n",
226 .get_modes = exynos_drm_connector_get_modes,
227 .mode_valid = exynos_drm_connector_mode_valid,
240 if (exynos_connector->
dpms == mode) {
241 DRM_DEBUG_KMS(
"desired dpms mode is same as previous one.\n");
245 if (display_ops && display_ops->
power_on)
251 static void exynos_drm_connector_dpms(
struct drm_connector *connector,
254 DRM_DEBUG_KMS(
"%s\n", __FILE__);
268 static int exynos_drm_connector_fill_modes(
struct drm_connector *connector,
302 DRM_DEBUG_KMS(
"%s\n", __FILE__);
314 static void exynos_drm_connector_destroy(
struct drm_connector *connector)
319 DRM_DEBUG_KMS(
"%s\n", __FILE__);
323 kfree(exynos_connector);
327 .dpms = exynos_drm_connector_dpms,
328 .fill_modes = exynos_drm_connector_fill_modes,
329 .detect = exynos_drm_connector_detect,
330 .destroy = exynos_drm_connector_destroy,
342 DRM_DEBUG_KMS(
"%s\n", __FILE__);
344 exynos_connector = kzalloc(
sizeof(*exynos_connector),
GFP_KERNEL);
345 if (!exynos_connector) {
346 DRM_ERROR(
"failed to allocate connector\n");
368 drm_connector_helper_add(connector, &exynos_connector_helper_funcs);
375 exynos_connector->
manager = manager;
382 DRM_ERROR(
"failed to attach a connector to a encoder\n");
386 DRM_DEBUG_KMS(
"connector has been created\n");
394 kfree(exynos_connector);