Changeset 9cc4b2b4 in mainline for uspace/drv/fb/amdm37x_dispc/main.c


Ignore:
Timestamp:
2013-01-20T21:06:33Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
96228d0
Parents:
74db5a1
Message:

amdm37x_dispc: Init vizualizer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/fb/amdm37x_dispc/main.c

    r74db5a1 r9cc4b2b4  
    6262                return ENOMEM;
    6363        }
     64
     65        /* Hw part */
    6466        amdm37x_dispc_t *dispc =
    65             ddf_fun_data_alloc(fun, sizeof(amdm37x_dispc_t));
     67            ddf_dev_data_alloc(dev, sizeof(amdm37x_dispc_t));
    6668        if (!dispc) {
    6769                ddf_log_error("Failed to allocate dispc structure\n");
     
    6971                return ENOMEM;
    7072        }
    71         ddf_fun_set_ops(fun, &graph_fun_ops);
     73
    7274        int ret = amdm37x_dispc_init(dispc);
    7375        if (ret != EOK) {
     
    7678                return ret;
    7779        }
     80
     81        /* Visualizer part */
     82        visualizer_t *vis = ddf_fun_data_alloc(fun, sizeof(visualizer_t));
     83        if (!vis) {
     84                ddf_log_error("Failed to allocate visualizer structure\n");
     85                ddf_fun_destroy(fun);
     86                return ENOMEM;
     87        }
     88
     89        graph_init_visualizer(vis);
     90        vis->def_mode_idx = 0; // TODO: What is this? Why is this not handled
     91                               // via init?
     92        vis->ops = amdm37x_dispc_vis_ops;
     93        vis->dev_ctx = dispc;
     94        vis->reg_svc_handle = ddf_fun_get_handle(fun);
     95
     96        ddf_fun_set_ops(fun, &graph_fun_ops);
    7897        ret = ddf_fun_bind(fun);
    7998        if (ret != EOK) {
     
    83102                return ret;
    84103        }
     104        ddf_fun_add_to_category(fun, "visualizer");
    85105        return EOK;
    86106}
Note: See TracChangeset for help on using the changeset viewer.