summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoram Park <boram1288.park@samsung.com>2016-02-18 10:10:24 +0900
committerBoram Park <boram1288.park@samsung.com>2016-02-18 10:10:24 +0900
commit9fdd7b96fdc84168850ee8b0cb19db5a22287dbc (patch)
tree96a5e374a08e60cb604e8b704fda26ffc5186eeb
parent0add2f7b2a05ba5b42ecadbb8638256f9ac3221c (diff)
downloadlibtdm-drm-9fdd7b96fdc84168850ee8b0cb19db5a22287dbc.tar.gz
libtdm-drm-9fdd7b96fdc84168850ee8b0cb19db5a22287dbc.tar.bz2
libtdm-drm-9fdd7b96fdc84168850ee8b0cb19db5a22287dbc.zip
seperate tdm_func_ouput, tdm_func_layer from tdm_func_diplay
Change-Id: I63e2f06b5cdd40124fe080d35cb0cdc589995c8b
-rw-r--r--src/tdm_drm.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tdm_drm.c b/src/tdm_drm.c
index a07f70f..0f26434 100644
--- a/src/tdm_drm.c
+++ b/src/tdm_drm.c
@@ -20,6 +20,10 @@ static tdm_func_display drm_func_display =
drm_display_get_fd,
drm_display_handle_events,
NULL, //display_create_pp,
+};
+
+static tdm_func_output drm_func_output =
+{
drm_output_get_capability,
drm_output_get_layers,
drm_output_set_property,
@@ -33,6 +37,10 @@ static tdm_func_display drm_func_display =
drm_output_set_mode,
drm_output_get_mode,
NULL, //output_create_capture
+};
+
+static tdm_func_layer drm_func_layer =
+{
drm_layer_get_capability,
drm_layer_set_property,
drm_layer_get_property,
@@ -196,6 +204,14 @@ tdm_drm_init(tdm_display *dpy, tdm_error *error)
if (ret != TDM_ERROR_NONE)
goto failed;
+ ret = tdm_backend_register_func_output(dpy, &drm_func_output);
+ if (ret != TDM_ERROR_NONE)
+ goto failed;
+
+ ret = tdm_backend_register_func_layer(dpy, &drm_func_layer);
+ if (ret != TDM_ERROR_NONE)
+ goto failed;
+
drm_data->dpy = dpy;
/* TODO: tdm_helper_drm_fd is external drm_fd which is opened by ecore_drm.