Changeset 96228d0 in mainline for uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c
- Timestamp:
- 2013-01-20T21:34:33Z (12 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/amdm37x_dispc.c
r9cc4b2b4 r96228d0 34 34 */ 35 35 36 #include <assert.h> 36 37 #include <errno.h> 37 38 38 39 #include "amdm37x_dispc.h" 39 40 40 const visualizer_ops_t amdm37x_dispc_vis_ops = { 0 }; 41 static int handle_damage(visualizer_t *vs, 42 sysarg_t x0, sysarg_t y0, sysarg_t width, sysarg_t height, 43 sysarg_t x_offset, sysarg_t y_offset) 44 { 45 return EOK; 46 } 41 47 42 int amdm37x_dispc_init(amdm37x_dispc_t *instance) 48 static const visualizer_ops_t amdm37x_dispc_vis_ops = { 49 .handle_damage = handle_damage, 50 // TODO DO we need dummy implementations of stuff like claim, yield, ... 51 }; 52 53 static void mode_init(vslmode_list_element_t *mode, 54 unsigned width, unsigned height, visual_t visual) 43 55 { 56 mode->mode.index = 0; 57 mode->mode.version = 0; 58 mode->mode.refresh_rate = 0; 59 mode->mode.screen_aspect.width = width; 60 mode->mode.screen_aspect.height = height; 61 mode->mode.screen_width = width; 62 mode->mode.screen_height = height; 63 mode->mode.cell_aspect.width = 1; 64 mode->mode.cell_aspect.height = 1; 65 mode->mode.cell_visual.pixel_visual = visual; 66 67 link_initialize(&mode->link); 68 69 } 70 71 int amdm37x_dispc_init(amdm37x_dispc_t *instance, visualizer_t *vis) 72 { 73 assert(instance); 74 assert(vis); 75 76 unsigned width = CONFIG_BFB_WIDTH; 77 unsigned height = CONFIG_BFB_HEIGHT; 78 unsigned bpp = CONFIG_BFB_BPP; 79 80 mode_init(&instance->modes[0], width, height, bpp); //TODO convert bpp to visual 81 82 /* Handle vis stuff */ 83 vis->dev_ctx = instance; 84 vis->def_mode_idx = 0; 85 list_append(&instance->modes[0].link, &vis->modes); 86 44 87 return EOK; 45 88 };
Note:
See TracChangeset
for help on using the changeset viewer.