summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c14
-rw-r--r--screen.c6
-rw-r--r--tcl_init.c2
3 files changed, 11 insertions, 11 deletions
diff --git a/main.c b/main.c
index 691fa5b..b024bb1 100644
--- a/main.c
+++ b/main.c
@@ -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();
diff --git a/screen.c b/screen.c
index 71dfde8..036c409 100644
--- a/screen.c
+++ b/screen.c
@@ -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 */
diff --git a/tcl_init.c b/tcl_init.c
index 94bd8b0..0713e44 100644
--- a/tcl_init.c
+++ b/tcl_init.c
@@ -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);