modified overlay to stay outside DMA buffer if it exists.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11091 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4dca5362df
commit
fee251bc01
@ -1,4 +1,4 @@
|
||||
/* Written by Rudolf Cornelissen 05/2002-9/2004 */
|
||||
/* Written by Rudolf Cornelissen 05/2002-1/2005 */
|
||||
|
||||
/* Note on 'missing features' in BeOS 5.0.3 and DANO:
|
||||
* BeOS needs to define more colorspaces! It would be nice if BeOS would support the FourCC 'definitions'
|
||||
@ -205,6 +205,11 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
* bitmap output or maybe single buffered overlay output if small bitmaps are used. */
|
||||
|
||||
adress = (((uint32)((uint8*)si->framebuffer)) + si->ps.memory_size);
|
||||
/* don't touch the DMA acceleration engine command buffer if it exists */
|
||||
/* note:
|
||||
* the buffer is 32kB in size. Keep a distance of another 32kB for safety. */
|
||||
if (si->settings.dma_acc) adress -= (64 * 1024);
|
||||
|
||||
for (cnt = 0; cnt <= offset; cnt++)
|
||||
{
|
||||
adress -= si->overlay.myBufInfo[cnt].size;
|
||||
|
@ -330,6 +330,10 @@ status_t SET_DISPLAY_MODE(display_mode *mode_to_set)
|
||||
//if overlay buffers are allocated subtract buffersize from mem_high;
|
||||
//only allocate overlay buffers if 3D is not in use. (block overlay during 3D)
|
||||
si->mem_high = si->ps.memory_size - 1;
|
||||
/* don't touch the DMA acceleration engine command buffer if it exists */
|
||||
/* note:
|
||||
* the buffer is 32kB in size. Keep a distance of another 32kB for safety. */
|
||||
if (si->settings.dma_acc) si->mem_high -= (64 * 1024);
|
||||
si->mem_high -= (MAXBUFFERS * 1024 * 1024 * 2); /* see overlay.c file */
|
||||
|
||||
LOG(1,("SETMODE: booted since %f mS\n", system_time()/1000.0));
|
||||
|
@ -732,8 +732,6 @@ status_t nv_acc_init_dma()
|
||||
// nv_acc_set_ch_dma(NV_GENERAL_FIFO_CH7, si->engine.fifo.handle[7]);
|
||||
nv_acc_set_ch_dma(NV_GENERAL_FIFO_CH7, si->engine.fifo.handle[0]);
|
||||
|
||||
//fixme: overlay should stay outside the DMA buffer, also add a failsafe
|
||||
// space in between both functions as errors might hang the engine!
|
||||
/*** Set pixel width ***/
|
||||
switch(si->dm.space)
|
||||
{
|
||||
@ -1120,11 +1118,6 @@ status_t nv_acc_setup_rectangle_dma(uint32 color)
|
||||
switch(si->dm.space)
|
||||
{
|
||||
case B_RGB15_LITTLE:
|
||||
/* fixme?
|
||||
* does the color provided by the system contain the alpha channel?
|
||||
* if it has one, it's on b5...
|
||||
* (if so, and we want to use it, modify this command to use 32-bit
|
||||
* source colorspace for this mode's desktop colorspace.) */
|
||||
si->engine.dma.cmdbuffer[si->engine.dma.current++] =
|
||||
(((color & 0x0000f800) >> 1) | ((color & 0x000007c0) >> 1) |
|
||||
(color & 0x0000001f)); /* Color1A */
|
||||
|
Loading…
x
Reference in New Issue
Block a user