diff options
-rw-r--r-- | main.c | 14 | ||||
-rw-r--r-- | screen.c | 6 | ||||
-rw-r--r-- | tcl_init.c | 2 |
3 files changed, 11 insertions, 11 deletions
@@ -24,7 +24,7 @@ int main(int argc, char **argv) { unsigned int rankine_class = 0; - if (screen_open(2960, 1050, 32)!=0) { + if (screen_open(1680, 1050, 32)!=0) { return -1; } printf("opened drm device\n"); @@ -63,30 +63,26 @@ int main(int argc, char **argv) } printf("created objects\n"); -#if 0 - /*screen_offset = 0; */ - context_surface_2d_init(); image_pattern_init(); clip_rectangle_init(); raster_op_init(); imageblit_init(); - /*imageblit_copy(viewport_x,viewport_y, + imageblit_copy(viewport_x,viewport_y, viewport_x+(viewport_w>>2),viewport_y+(viewport_h>>2), viewport_w>>2, viewport_h>>2 - );*/ + ); /* mandatory, or we get PFIFO_CACHE_ERROR */ tcl_init(); - /*tcl_clear();*/ + tcl_clear(); /*tcl_triangle_fixed();*/ /* does not work */ /*tcl_triangle_vtxattr();*/ - tcl_triangle_tx0(); + /*tcl_triangle_tx0();*/ printf("coincoin\n"); -#endif object_list_close(); fifo_close(); @@ -50,7 +50,11 @@ int screen_open(int width, int height, int bpp) screen_width = width; screen_height = height; screen_bpp = bpp; - screen_offset = 0; /* Can we get front buffer offset in vram? */ + /* NOTE: find vt console fb in dmesg log: +[ 9.435846] [drm] nouveau 0000:01:00.0: allocated 1680x1050 fb: 0x49000, bo ffff88007c0e8600 + */ + screen_offset = 0x49000; + screen_pitch = screen_width*(screen_bpp/8); if ((screen_pitch & 255)!=0) { screen_pitch = (screen_pitch | 255)+1; /* Align on 256 bytes boundary */ @@ -387,7 +387,7 @@ beef0351 NV30TCL.DMA_QUERY = NV01_MEMORY_LOCAL_BANKED OUT_RING (chan, 0); } - tcl_fp_color(); + /*tcl_fp_color();*/ /*BEGIN_RING(NvSub3D, 0x1dac, 1); OUT_RING(0); |