fixed overlay bitmap DMA adress, fixed overlay in 15 bit mode (NV11). nVidia hardware is broken here :-/. Anyway, it works now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11092 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -294,6 +294,11 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
|||||||
|
|
||||||
/* calculate physical memory adress (for dma use) */
|
/* calculate physical memory adress (for dma use) */
|
||||||
adress = (((uint32)((uint8*)si->framebuffer_pci)) + si->ps.memory_size);
|
adress = (((uint32)((uint8*)si->framebuffer_pci)) + 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++)
|
for (cnt = 0; cnt <= offset; cnt++)
|
||||||
{
|
{
|
||||||
adress -= si->overlay.myBufInfo[cnt].size;
|
adress -= si->overlay.myBufInfo[cnt].size;
|
||||||
|
|||||||
@@ -745,20 +745,12 @@ status_t nv_acc_init_dma()
|
|||||||
bitm_depth = 0x00000003;
|
bitm_depth = 0x00000003;
|
||||||
break;
|
break;
|
||||||
case B_RGB15_LITTLE:
|
case B_RGB15_LITTLE:
|
||||||
surf_depth = 0x00000004;
|
|
||||||
patt_depth = 0x00000001;
|
|
||||||
//fixme: needed for NV11, checkout the rest!
|
|
||||||
if (si->ps.card_arch < NV40A)
|
|
||||||
bitm_depth = 0x00000002;
|
|
||||||
else
|
|
||||||
bitm_depth = 0x00000001;
|
|
||||||
break;
|
|
||||||
case B_RGB16_LITTLE:
|
case B_RGB16_LITTLE:
|
||||||
surf_depth = 0x00000004;
|
surf_depth = 0x00000004;
|
||||||
patt_depth = 0x00000001;
|
patt_depth = 0x00000001;
|
||||||
//fixme: needed for NV11, checkout the rest!
|
//fixme: needed for NV11, checkout the rest!
|
||||||
if (si->ps.card_arch < NV40A)
|
if (si->ps.card_arch < NV40A)
|
||||||
bitm_depth = 0x00000003;
|
bitm_depth = 0x00000003; /* sets bitmap input depth to broken 32-bit.. */
|
||||||
else
|
else
|
||||||
bitm_depth = 0x00000001;
|
bitm_depth = 0x00000001;
|
||||||
break;
|
break;
|
||||||
@@ -1118,9 +1110,12 @@ status_t nv_acc_setup_rectangle_dma(uint32 color)
|
|||||||
switch(si->dm.space)
|
switch(si->dm.space)
|
||||||
{
|
{
|
||||||
case B_RGB15_LITTLE:
|
case B_RGB15_LITTLE:
|
||||||
|
/* unbelievable, isn't it? */
|
||||||
si->engine.dma.cmdbuffer[si->engine.dma.current++] =
|
si->engine.dma.cmdbuffer[si->engine.dma.current++] =
|
||||||
(((color & 0x0000f800) >> 1) | ((color & 0x000007c0) >> 1) |
|
(((color & 0x00007800) << 8) | /* (red b1-5: broken hardware) */
|
||||||
(color & 0x0000001f)); /* Color1A */
|
((color & 0x00000400) << 5) | /* (red b0: broken hardware) */
|
||||||
|
((color & 0x000003e0) << 5) | /* (green: broken hardware) */
|
||||||
|
((color & 0x0000001f) << 3)); /* Color1A */
|
||||||
break;
|
break;
|
||||||
case B_RGB16_LITTLE:
|
case B_RGB16_LITTLE:
|
||||||
si->engine.dma.cmdbuffer[si->engine.dma.current++] =
|
si->engine.dma.cmdbuffer[si->engine.dma.current++] =
|
||||||
|
|||||||
Reference in New Issue
Block a user