Changeset 96228d0 in mainline for uspace/drv/fb/amdm37x_dispc/main.c
- Timestamp:
- 2013-01-20T21:34:33Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7fa2031
- Parents:
- 9cc4b2b4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/fb/amdm37x_dispc/main.c
r9cc4b2b4 r96228d0 57 57 static int amdm37x_dispc_dev_add(ddf_dev_t *dev) 58 58 { 59 /* Visualizer part */ 59 60 ddf_fun_t *fun = ddf_fun_create(dev, fun_exposed, "dispc"); 60 61 if (!fun) { … … 63 64 } 64 65 66 visualizer_t *vis = ddf_fun_data_alloc(fun, sizeof(visualizer_t)); 67 if (!vis) { 68 ddf_log_error("Failed to allocate visualizer structure\n"); 69 ddf_fun_destroy(fun); 70 return ENOMEM; 71 } 72 73 graph_init_visualizer(vis); 74 vis->reg_svc_handle = ddf_fun_get_handle(fun); 75 76 ddf_fun_set_ops(fun, &graph_fun_ops); 65 77 /* Hw part */ 66 78 amdm37x_dispc_t *dispc = … … 72 84 } 73 85 74 int ret = amdm37x_dispc_init(dispc );86 int ret = amdm37x_dispc_init(dispc, vis); 75 87 if (ret != EOK) { 76 88 ddf_log_error("Failed to init dispc: %s\n", str_error(ret)); … … 79 91 } 80 92 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); 93 /* Report to devman */ 97 94 ret = ddf_fun_bind(fun); 98 95 if (ret != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.