via.accelerant: fix x86_64 build.
* untested.
This commit is contained in:
parent
d95b7ef60b
commit
0d6b5d2667
@ -70,15 +70,15 @@ uint32 OVERLAY_SUPPORTED_FEATURES(uint32 a_color_space)
|
||||
const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint16 height)
|
||||
{
|
||||
int offset = 0; /* used to determine next buffer to create */
|
||||
uint32 adress, adress2, temp32; /* used to calculate buffer adresses */
|
||||
uintptr_t adress, adress2, temp32; /* used to calculate buffer adresses */
|
||||
uint32 oldsize = 0; /* used to 'squeeze' new buffers between already existing ones */
|
||||
int cnt; /* loopcounter */
|
||||
|
||||
/* acquire the shared benaphore */
|
||||
AQUIRE_BEN(si->overlay.lock)
|
||||
|
||||
LOG(4,("Overlay: cardRAM_start = $%08x\n",(uint32)((uint8*)si->framebuffer)));
|
||||
LOG(4,("Overlay: cardRAM_start_DMA = $%08x\n",(uint32)((uint8*)si->framebuffer_pci)));
|
||||
LOG(4,("Overlay: cardRAM_start = $%p\n", (uint8*)si->framebuffer));
|
||||
LOG(4,("Overlay: cardRAM_start_DMA = $%p\n", (uint8*)si->framebuffer_pci));
|
||||
LOG(4,("Overlay: cardRAM_size = %3.3fMb\n",(si->ps.memory_size / (1024.0 * 1024.0))));
|
||||
|
||||
/* find first empty slot (room for another buffer?) */
|
||||
@ -173,7 +173,7 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
* Driver setup is as follows:
|
||||
* card base: - hardware cursor bitmap (if used),
|
||||
* directly above - screen memory for both heads */
|
||||
adress2 = (((uint32)((uint8*)si->fbc.frame_buffer)) + /* cursor already included here */
|
||||
adress2 = (((uintptr_t)((uint8*)si->fbc.frame_buffer)) + /* cursor already included here */
|
||||
(si->fbc.bytes_per_row * si->dm.virtual_height)); /* size in bytes of screen(s) */
|
||||
LOG(4,("Overlay: first free cardRAM virtual adress $%08x\n", adress2));
|
||||
|
||||
@ -193,7 +193,7 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
* If you switch now to settings: 1600x1200x32bit (single head) the app needs to fallback to
|
||||
* bitmap output or maybe single buffered overlay output if small bitmaps are used. */
|
||||
|
||||
adress = (((uint32)((uint8*)si->framebuffer)) + si->ps.memory_size);
|
||||
adress = (((uintptr_t)((uint8*)si->framebuffer)) + si->ps.memory_size);
|
||||
for (cnt = 0; cnt <= offset; cnt++)
|
||||
{
|
||||
adress -= si->overlay.myBufInfo[cnt].size;
|
||||
@ -204,7 +204,7 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
|
||||
/* Check if we need to modify the buffers starting adress and thus the size */
|
||||
/* calculate 'would be' cardRAM offset */
|
||||
temp32 = (adress - ((uint32)((vuint32 *)si->framebuffer)));
|
||||
temp32 = (adress - ((uintptr_t)((vuint32 *)si->framebuffer)));
|
||||
/* check if it is aligned */
|
||||
if (temp32 != (temp32 & 0xfffffff0))
|
||||
{
|
||||
@ -277,7 +277,7 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
si->overlay.myBuffer[offset].buffer = (void *) adress;
|
||||
|
||||
/* calculate physical memory adress (for dma use) */
|
||||
adress = (((uint32)((uint8*)si->framebuffer_pci)) + si->ps.memory_size);
|
||||
adress = (((uintptr_t)((uint8*)si->framebuffer_pci)) + si->ps.memory_size);
|
||||
for (cnt = 0; cnt <= offset; cnt++)
|
||||
{
|
||||
adress -= si->overlay.myBufInfo[cnt].size;
|
||||
@ -285,9 +285,9 @@ const overlay_buffer *ALLOCATE_OVERLAY_BUFFER(color_space cs, uint16 width, uint
|
||||
/* this adress is already aligned to the scaler's requirements (via the already modified sizes) */
|
||||
si->overlay.myBuffer[offset].buffer_dma = (void *) adress;
|
||||
|
||||
LOG(4,("Overlay: New buffer: addr $%08x, dma_addr $%08x, color space $%08x\n",
|
||||
(uint32)((uint8*)si->overlay.myBuffer[offset].buffer),
|
||||
(uint32)((uint8*)si->overlay.myBuffer[offset].buffer_dma), cs));
|
||||
LOG(4,("Overlay: New buffer: addr $%p, dma_addr $%p, color space $%p\n",
|
||||
(uint8*)si->overlay.myBuffer[offset].buffer,
|
||||
(uint8*)si->overlay.myBuffer[offset].buffer_dma, cs));
|
||||
LOG(4,("Overlay: New buffer's size is $%08x\n", si->overlay.myBufInfo[offset].size));
|
||||
|
||||
/* release the shared benaphore */
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
#include "acc_std.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define T_POSITIVE_SYNC (B_POSITIVE_HSYNC | B_POSITIVE_VSYNC)
|
||||
/* mode flags will be setup as status info by PROPOSEMODE! */
|
||||
#define MODE_FLAGS 0
|
||||
|
@ -16,6 +16,7 @@ eng_agp_setup(void)
|
||||
uint8 index;
|
||||
agp_info eng_ai;
|
||||
bool agp = false;
|
||||
eng_ai.interface.status = 0;
|
||||
|
||||
/* set the magic number so the via kerneldriver knows we're for real */
|
||||
nca.magic = nai.magic = VIA_PRIVATE_DATA_MAGIC;
|
||||
|
@ -351,9 +351,9 @@ static void eng_bes_calc_move_overlay(move_overlay_info *moi)
|
||||
*******************************/
|
||||
|
||||
/* calculate inputbitmap origin adress */
|
||||
moi->a1orgv = (uint32)((vuint32 *)si->overlay.ob.buffer);
|
||||
moi->a1orgv -= (uint32)((vuint32 *)si->framebuffer);
|
||||
LOG(4,("Overlay: topleft corner of input bitmap (cardRAM offset) $%08x\n", moi->a1orgv));
|
||||
moi->a1orgv = (uintptr_t)((vuint32 *)si->overlay.ob.buffer);
|
||||
moi->a1orgv -= (uintptr_t)((vuint32 *)si->framebuffer);
|
||||
LOG(4,("Overlay: topleft corner of input bitmap (cardRAM offset) $%p\n", moi->a1orgv));
|
||||
|
||||
/* Setup vertical source start: first (sub)pixel contributing to output picture. */
|
||||
/* Note:
|
||||
|
@ -254,7 +254,7 @@ static status_t cle266_km400_dac_pix_pll_find(
|
||||
{
|
||||
int m = 0, n = 0, p = 0/*, m_max*/;
|
||||
float error, error_best = 999999999;
|
||||
int best[3];
|
||||
int best[3] = {0};
|
||||
float f_vco, max_pclk;
|
||||
float req_pclk = target.timing.pixel_clock/1000.0;
|
||||
|
||||
@ -401,7 +401,7 @@ static status_t k8m800_dac_pix_pll_find(
|
||||
{
|
||||
int m = 0, n = 0, p = 0/*, m_max*/;
|
||||
float error, error_best = 999999999;
|
||||
int best[3];
|
||||
int best[3] = {0};
|
||||
float f_vco, max_pclk;
|
||||
float req_pclk = target.timing.pixel_clock/1000.0;
|
||||
|
||||
@ -550,7 +550,7 @@ status_t eng_dac_sys_pll_find(
|
||||
{
|
||||
int m = 0, n = 0, p = 0, m_max, p_max;
|
||||
float error, error_best = 999999999;
|
||||
int best[3];
|
||||
int best[3] = {0};
|
||||
float f_vco, discr_low, discr_high;
|
||||
|
||||
/* determine the max. reference-frequency postscaler setting for the
|
||||
|
@ -230,7 +230,7 @@ static status_t nv10_nv20_dac2_pix_pll_find(
|
||||
{
|
||||
int m = 0, n = 0, p = 0/*, m_max*/;
|
||||
float error, error_best = 999999999;
|
||||
int best[3];
|
||||
int best[3] = {0};
|
||||
float f_vco, max_pclk;
|
||||
float req_pclk = target.timing.pixel_clock/1000.0;
|
||||
|
||||
|
@ -39,7 +39,7 @@ status_t g100_g400max_maventv_vid_pll_find(
|
||||
{
|
||||
int m = 0, n = 0, p = 0, m_max;
|
||||
float diff, diff_smallest = 999999999;
|
||||
int best[5], h_total_mod;
|
||||
int best[5] = {0}, h_total_mod;
|
||||
float fields_sec, f_vco;
|
||||
/* We need to be exact, so work with clockperiods per field instead of with frequency.
|
||||
* Make sure however we truncate these clocks to be integers!
|
||||
|
Loading…
Reference in New Issue
Block a user