Changeset 9cc4b2b4 in mainline
- Timestamp:
- 2013-01-20T21:06:33Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 96228d0
- Parents:
- 74db5a1
- Location:
- uspace/drv/fb/amdm37x_dispc
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/fb/amdm37x_dispc/Makefile
r74db5a1 r9cc4b2b4 45 45 SOURCES = \ 46 46 port.c \ 47 amdm37x_dispc.c \ 47 48 main.c 48 49 -
uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.h
r74db5a1 r9cc4b2b4 37 37 #define AMDM37X_DISPC_H_ 38 38 39 #include <graph.h> 40 39 41 #include "amdm37x_dispc_regs.h" 40 42 … … 44 46 } amdm37x_dispc_t; 45 47 46 static inline int amdm37x_dispc_init(amdm37x_dispc_t *instance) 47 { 48 return EOK; 49 }; 50 static inline int amdm37x_dispc_fini(amdm37x_dispc_t *instance) 51 { 52 return EOK; 53 }; 48 extern const visualizer_ops_t amdm37x_dispc_vis_ops; 49 50 int amdm37x_dispc_init(amdm37x_dispc_t *instance); 51 int amdm37x_dispc_fini(amdm37x_dispc_t *instance); 54 52 55 53 #endif 56 57 54 /** @} 58 55 */ -
uspace/drv/fb/amdm37x_dispc/main.c
r74db5a1 r9cc4b2b4 62 62 return ENOMEM; 63 63 } 64 65 /* Hw part */ 64 66 amdm37x_dispc_t *dispc = 65 ddf_ fun_data_alloc(fun, sizeof(amdm37x_dispc_t));67 ddf_dev_data_alloc(dev, sizeof(amdm37x_dispc_t)); 66 68 if (!dispc) { 67 69 ddf_log_error("Failed to allocate dispc structure\n"); … … 69 71 return ENOMEM; 70 72 } 71 ddf_fun_set_ops(fun, &graph_fun_ops); 73 72 74 int ret = amdm37x_dispc_init(dispc); 73 75 if (ret != EOK) { … … 76 78 return ret; 77 79 } 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); 78 97 ret = ddf_fun_bind(fun); 79 98 if (ret != EOK) { … … 83 102 return ret; 84 103 } 104 ddf_fun_add_to_category(fun, "visualizer"); 85 105 return EOK; 86 106 }
Note:
See TracChangeset
for help on using the changeset viewer.