backend/tdm: Remove prefix tdm from static functions 50/278150/1
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 4 Mar 2022 01:49:50 +0000 (10:49 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 18 Jul 2022 05:58:16 +0000 (14:58 +0900)
It's to avoid confusion with tdm api.
For static functions, the names chosen aren't as important.

Change-Id: I917a027f0c94c67c18d3b7823bc216eed0080b60

src/libds/backend/tdm/output.c

index bc931d7..a05d2c9 100644 (file)
@@ -7,13 +7,13 @@
 #include <tbm_surface.h>
 
 static const struct ds_output_interface tdm_output_iface;
-static bool tdm_output_init_modes(struct ds_tdm_output *output);
-static void tdm_output_destroy(struct ds_tdm_output *output);
-static void tdm_output_init_hwc(struct ds_tdm_output *output);
-static bool tdm_output_update_mode(struct ds_tdm_output *output);
-static bool tdm_output_set_pending_fb(struct ds_tdm_output *output,
+static bool output_init_modes(struct ds_tdm_output *output);
+static void output_destroy(struct ds_tdm_output *output);
+static void output_init_hwc(struct ds_tdm_output *output);
+static bool output_update_mode(struct ds_tdm_output *output);
+static bool output_set_pending_fb(struct ds_tdm_output *output,
         struct ds_buffer *ds_buffer);
-static bool tdm_output_hwc_commit(struct ds_tdm_output *output);
+static bool output_hwc_commit(struct ds_tdm_output *output);
 
 struct ds_tdm_output *
 create_tdm_output(struct ds_tdm_backend *tdm, tdm_output *tdm_output)
@@ -42,7 +42,7 @@ create_tdm_output(struct ds_tdm_backend *tdm, tdm_output *tdm_output)
     if (conn == TDM_OUTPUT_CONN_STATUS_CONNECTED) {
         output->status = DS_TDM_OUTPUT_CONNECTED;
 
-        if (!tdm_output_init_modes(output)) {
+        if (!output_init_modes(output)) {
             ds_err("Could not initialize modes of tdm output(%p)",
                     tdm_output);
             goto err_status;
@@ -53,7 +53,7 @@ create_tdm_output(struct ds_tdm_backend *tdm, tdm_output *tdm_output)
     }
 
     if (tdm_output_get_hwc(output->tdm.output, NULL) != NULL)
-        tdm_output_init_hwc(output);
+        output_init_hwc(output);
 
     ds_inf("TDM output(%p) created: hwc(%p)", output, output->tdm.hwc);
 
@@ -73,12 +73,12 @@ tdm_output_from_output(struct ds_output *ds_output)
 }
 
 static void
-tdm_output_iface_destroy(struct ds_output *ds_output)
+output_iface_destroy(struct ds_output *ds_output)
 {
     struct ds_tdm_output *output;
 
     output = tdm_output_from_output(ds_output);
-    tdm_output_destroy(output);
+    output_destroy(output);
 }
 
 void
@@ -153,7 +153,7 @@ tdm_buffer_release(struct ds_tdm_buffer *buffer)
 }
 
 static void
-tdm_output_update_front_buffer(struct ds_tdm_output *output)
+output_update_front_buffer(struct ds_tdm_output *output)
 {
     if (output->front_buffer)
         tdm_buffer_release(output->front_buffer);
@@ -162,7 +162,7 @@ tdm_output_update_front_buffer(struct ds_tdm_output *output)
 }
 
 static void
-tdm_output_attach_back_buffer(struct ds_tdm_output *output,
+output_attach_back_buffer(struct ds_tdm_output *output,
         struct ds_tdm_buffer *buffer)
 {
     if (output->back_buffer)
@@ -171,25 +171,25 @@ tdm_output_attach_back_buffer(struct ds_tdm_output *output,
 }
 
 static bool
-tdm_output_iface_commit(struct ds_output *ds_output)
+output_iface_commit(struct ds_output *ds_output)
 {
     struct ds_tdm_output *output;
 
     output = tdm_output_from_output(ds_output);
 
     if (ds_output->pending.committed & DS_OUTPUT_STATE_MODE) {
-        if (!tdm_output_update_mode(output)) {
+        if (!output_update_mode(output)) {
             ds_err("Could not update TDM mode");
             return false;
         }
     }
 
     if (ds_output->pending.committed & DS_OUTPUT_STATE_BUFFER) {
-        if (!tdm_output_set_pending_fb(output, ds_output->pending.buffer))
+        if (!output_set_pending_fb(output, ds_output->pending.buffer))
             ds_err("Could not update buffer");
     }
 
-    if (!tdm_output_hwc_commit(output)) {
+    if (!output_hwc_commit(output)) {
         ds_err("Could not commit tdm output");
         if (output->back_buffer) {
             tdm_buffer_release(output->back_buffer);
@@ -203,12 +203,12 @@ tdm_output_iface_commit(struct ds_output *ds_output)
 
 static const struct ds_output_interface tdm_output_iface =
 {
-    .destroy = tdm_output_iface_destroy,
-    .commit = tdm_output_iface_commit,
+    .destroy = output_iface_destroy,
+    .commit = output_iface_commit,
 };
 
 static void
-tdm_output_destroy(struct ds_tdm_output *output)
+output_destroy(struct ds_tdm_output *output)
 {
     struct ds_tdm_output_mode *mode, *mode_tmp;
 
@@ -227,7 +227,7 @@ tdm_output_destroy(struct ds_tdm_output *output)
 }
 
 static bool
-tdm_output_init_modes(struct ds_tdm_output *output)
+output_init_modes(struct ds_tdm_output *output)
 {
     struct ds_tdm_output_mode *mode;
     const tdm_output_mode *tdm_modes, *tdm_mode;
@@ -274,7 +274,7 @@ tdm_output_init_modes(struct ds_tdm_output *output)
 }
 
 static void
-tdm_output_init_hwc(struct ds_tdm_output *output)
+output_init_hwc(struct ds_tdm_output *output)
 {
     tdm_error err;
 
@@ -286,7 +286,7 @@ tdm_output_init_hwc(struct ds_tdm_output *output)
 }
 
 static bool
-tdm_output_update_mode(struct ds_tdm_output *output)
+output_update_mode(struct ds_tdm_output *output)
 {
     const struct ds_tdm_output_mode *mode;
     tdm_error err;
@@ -304,7 +304,7 @@ tdm_output_update_mode(struct ds_tdm_output *output)
 }
 
 static bool
-tdm_output_set_pending_fb(struct ds_tdm_output *output,
+output_set_pending_fb(struct ds_tdm_output *output,
         struct ds_buffer *ds_buffer)
 {
     struct ds_tdm_buffer *buffer;
@@ -324,26 +324,26 @@ tdm_output_set_pending_fb(struct ds_tdm_output *output,
         return false;
     }
 
-    tdm_output_attach_back_buffer(output, buffer);
+    output_attach_back_buffer(output, buffer);
 
     return true;
 }
 
 static void
-tdm_output_hwc_commit_handler(tdm_hwc *hwc, unsigned int sequence,
+output_hwc_commit_handler(tdm_hwc *hwc, unsigned int sequence,
         unsigned int tv_sec, unsigned int tv_usec, void *user_data)
 {
     struct ds_tdm_output *output;
 
     output = user_data;
 
-    tdm_output_update_front_buffer(output);
+    output_update_front_buffer(output);
 
     wl_signal_emit(&output->base.events.frame, &output->base);
 }
 
 static bool
-tdm_output_hwc_commit(struct ds_tdm_output *output)
+output_hwc_commit(struct ds_tdm_output *output)
 {
     tdm_error err;
     uint32_t num_changes;
@@ -360,7 +360,7 @@ tdm_output_hwc_commit(struct ds_tdm_output *output)
         return false;
     }
 
-    err = tdm_hwc_commit(output->tdm.hwc, 0, tdm_output_hwc_commit_handler,
+    err = tdm_hwc_commit(output->tdm.hwc, 0, output_hwc_commit_handler,
             output);
     if (err != TDM_ERROR_NONE) {
         ds_err("Could not hwc commit");