#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)
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;
}
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);
}
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
}
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);
}
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)
}
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);
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;
}
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;
}
static void
-tdm_output_init_hwc(struct ds_tdm_output *output)
+output_init_hwc(struct ds_tdm_output *output)
{
tdm_error err;
}
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;
}
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;
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;
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");