#include #include "screen.h" #include "object.h" #include "fifo.h" #include "nouveau_class.h" void context_surface_2d_init(void) { printf("-- Context surface 2D, init\n"); SetSubchannel(NvSubCtxSurf2D, NvCtxSurf2D); BEGIN_RING(NvSubCtxSurf2D, NV04_CONTEXT_SURFACES_2D_DMA_NOTIFY, 1); OUT_RING (NvSyncNotify); BEGIN_RING(NvSubCtxSurf2D, NV04_CONTEXT_SURFACES_2D_DMA_IMAGE_SOURCE, 2); OUT_RING (NvDmaFB); OUT_RING (NvDmaFB); BEGIN_RING(NvSubCtxSurf2D, NV04_CONTEXT_SURFACES_2D_FORMAT, 4); OUT_RING( (screen_bpp==32) ? NV04_CONTEXT_SURFACES_2D_FORMAT_A8R8G8B8 : NV04_CONTEXT_SURFACES_2D_FORMAT_R5G6B5 ); OUT_RING ((screen_pitch<<16)|screen_pitch); OUT_RING (screen_offset); /* src */ OUT_RING (screen_offset); /* dst */ FIRE_RING(); }