Radeon: fix warnings on 64bit.

This commit is contained in:
Adrien Destugues
2014-10-19 12:51:53 +00:00
parent dc234e798d
commit b10790de44
5 changed files with 51 additions and 52 deletions
@@ -12,6 +12,8 @@
#include <GraphicsDefs.h>
#include <string.h>
status_t
GET_DISPLAY_MODE(display_mode *mode)
+17 -17
View File
@@ -1066,46 +1066,46 @@ status_t Radeon_UpdateOverlay(
virtual_card *vc = ai->vc;
shared_info *si = ai->si;
int crtc_idx;
float brightness = 0.0f;
float contrast = 1.0f;
float saturation = 1.0f;
float hue = 0.0f;
int32 ref = 0;
SHOW_FLOW0( 3, "" );
int32 ref = 0;
// don't mess around with overlay of someone else
if( !vc->uses_overlay )
return B_OK;
SHOW_FLOW0( 3, "" );
// don't mess around with overlay of someone else
if ( !vc->uses_overlay )
return B_OK;
// make sure there really is an overlay
if( si->pending_overlay.on == NULL )
if ( si->pending_overlay.on == NULL )
return B_OK;
// verify that the overlay is still valid
if( (uint32)si->pending_overlay.ot != si->overlay_mgr.token )
if ((uintptr_t)si->pending_overlay.ot != si->overlay_mgr.token )
return B_BAD_VALUE;
if( vc->different_heads > 1 ) {
if ( vc->different_heads > 1 ) {
int area0, area1;
// determine on which port most of the overlay is shown
area0 = getIntersectArea( ai, &si->pending_overlay.ow, &si->crtc[0] );
area1 = getIntersectArea( ai, &si->pending_overlay.ow, &si->crtc[0] );
SHOW_FLOW( 3, "area0=%d, area1=%d", area0, area1 );
if( area0 >= area1 )
if (area0 >= area1 )
crtc_idx = 0;
else
crtc_idx = 1;
} else if( vc->independant_heads > 1 ) {
} else if ( vc->independant_heads > 1 ) {
// both ports show the same, use "swap displays" to decide
// where to show the overlay (to be improved as this flag isn't
// really designed for that)
if( vc->swap_displays )
if ( vc->swap_displays )
crtc_idx = 1;
else
crtc_idx = 0;
@@ -336,29 +336,29 @@ status_t RELEASE_OVERLAY(overlay_token ot)
// public function: show/hide overlay
status_t CONFIGURE_OVERLAY( overlay_token ot, const overlay_buffer *ob,
status_t CONFIGURE_OVERLAY( overlay_token ot, const overlay_buffer *ob,
const overlay_window *ow, const overlay_view *ov )
{
shared_info *si = ai->si;
status_t result;
SHOW_FLOW0( 4, "" );
if( (uint32)ot != si->overlay_mgr.token )
if ( (uintptr_t)ot != si->overlay_mgr.token )
return B_BAD_VALUE;
if( !si->overlay_mgr.inuse )
if ( !si->overlay_mgr.inuse )
return B_BAD_VALUE;
if( ow == NULL || ov == NULL ) {
if ( ow == NULL || ov == NULL ) {
SHOW_FLOW0( 3, "hide only" );
Radeon_HideOverlay( ai );
return B_OK;
}
if( ob == NULL )
if ( ob == NULL )
return B_ERROR;
ACQUIRE_BEN( si->engine.lock );
// store whished values
@@ -53,8 +53,8 @@ typedef struct accelerator_info {
// only mt_pci and mt_agp are filled directly, mt_nonlocal contains
// a copy of either mt_pci or mt_agp, mt_local a copy of si->local_mem
struct {
area_id area; // area of clone
char *data; // CPU address of area
area_id area; // area of clone
unsigned char *data; // CPU address of area
} mapped_memory[mt_last+1];
int accelerant_is_clone; // true, if this is a cloned accelerant