Silence CLang (almost)

Fix up all the warnings about implicit enum conversions. The
container_of() macro remains defunct.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-05-28 12:51:18 +01:00
parent 6282fc9d0d
commit 562c47fc21
9 changed files with 18 additions and 14 deletions

View File

@ -126,7 +126,6 @@ static const struct gt_info ivb_gt2_info = {
static const struct gt_info byt_gt_info = {
.name = "Baytrail (gen7)",
.urb = { 128, 64, 64 },
.max_vs_threads = 36,
.max_gs_threads = 36,
.max_wm_threads = (48-1) << IVB_PS_MAX_THREADS_SHIFT,

View File

@ -810,11 +810,12 @@ cpu_cache_size__cpuid4(void)
unsigned int eax, ebx, ecx, edx;
unsigned int llc_size = 0;
int cnt = 0;
int cnt;
if (__get_cpuid_max(BASIC_CPUID, NULL) < 4)
return 0;
cnt = 0;
do {
unsigned associativity, line_partitions, line_size, sets;

View File

@ -40,12 +40,13 @@
unsigned sna_cpu_detect(void)
{
unsigned max = __get_cpuid_max(BASIC_CPUID, NULL);
unsigned int eax, ebx, ecx, edx;
unsigned eax, ebx, ecx, edx;
unsigned features = 0;
unsigned extra = 0;
if (max >= 1) {
__cpuid(1, eax, ebx, ecx, edx);
if (ecx & bit_SSE3)
features |= SSE3;
@ -80,6 +81,7 @@ unsigned sna_cpu_detect(void)
if (max >= 7) {
__cpuid_count(7, 0, eax, ebx, ecx, edx);
if ((extra & has_YMM) && (ebx & bit_AVX2))
features |= AVX2;
}

View File

@ -36,8 +36,8 @@
#include <cpuid.h>
#else
#define __get_cpuid_max(x, y) 0
#define __cpuid(level, a, b, c, d)
#define __cpuid_count(level, count, a, b, c, d)
#define __cpuid(level, a, b, c, d) a = b = c = d = 0
#define __cpuid_count(level, count, a, b, c, d) a = b = c = d = 0
#endif
#define BASIC_CPUID 0x0

View File

@ -1984,7 +1984,7 @@ get_current_msc(struct sna *sna, DrawablePtr draw, xf86CrtcPtr crtc)
uint64_t ret = -1;
VG_CLEAR(vbl);
vbl.request.type = DRM_VBLANK_RELATIVE;
vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.sequence = 0;
if (sna_wait_vblank(sna, &vbl, sna_crtc_to_pipe(crtc)) == 0)
ret = sna_crtc_record_vblank(crtc, &vbl);
@ -2410,7 +2410,7 @@ fail:
}
VG_CLEAR(vbl);
vbl.request.type = DRM_VBLANK_RELATIVE;
vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.sequence = 0;
if (sna_wait_vblank(sna, &vbl, sna_crtc_to_pipe(crtc)) == 0) {
*ust = ust64(vbl.reply.tval_sec, vbl.reply.tval_usec);
@ -2460,7 +2460,7 @@ sna_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, CARD64 target_msc
VG_CLEAR(vbl);
/* Get current count */
vbl.request.type = DRM_VBLANK_RELATIVE;
vbl.request.type = _DRM_VBLANK_RELATIVE;
vbl.request.sequence = 0;
if (sna_wait_vblank(sna, &vbl, pipe))
goto out_complete;

View File

@ -1668,7 +1668,8 @@ do_fixup:
dst = pixman_image_create_bits(channel->pict_format,
w, h, ptr, channel->bo->pitch);
else
dst = pixman_image_create_bits(picture->format, w, h, NULL, 0);
dst = pixman_image_create_bits((pixman_format_code_t)picture->format,
w, h, NULL, 0);
if (!dst) {
kgem_bo_destroy(&sna->kgem, channel->bo);
return 0;
@ -1855,7 +1856,7 @@ sna_render_picture_convert(struct sna *sna,
if (!sna_pixmap_move_to_cpu(pixmap, MOVE_READ))
return 0;
src = pixman_image_create_bits(picture->format,
src = pixman_image_create_bits((pixman_format_code_t)picture->format,
pixmap->drawable.width,
pixmap->drawable.height,
pixmap->devPrivate.ptr,

View File

@ -791,7 +791,8 @@ trap_upload(PicturePtr picture,
return true;
memset(scratch->devPrivate.ptr, 0, scratch->devKind*height);
image = pixman_image_create_bits(picture->format, width, height,
image = pixman_image_create_bits((pixman_format_code_t)picture->format,
width, height,
scratch->devPrivate.ptr,
scratch->devKind);
if (image) {

View File

@ -942,8 +942,8 @@ uxa_copy_plane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
uxa_screen_t *uxa_screen = uxa_get_screen(screen);
if (uxa_screen->info->flags & UXA_USE_GLAMOR) {
RegionPtr region = NULL;
int ok = 0;
RegionPtr region;
if (uxa_prepare_access(pDst, UXA_GLAMOR_ACCESS_RW)) {
if (uxa_prepare_access(pSrc, UXA_GLAMOR_ACCESS_RO)) {

View File

@ -926,7 +926,7 @@ uxa_acquire_source(ScreenPtr screen,
INT16 * out_x, INT16 * out_y)
{
return uxa_acquire_picture (screen, pict,
PICT_a8r8g8b8,
PIXMAN_a8r8g8b8,
x, y,
width, height,
out_x, out_y);
@ -940,7 +940,7 @@ uxa_acquire_mask(ScreenPtr screen,
INT16 * out_x, INT16 * out_y)
{
return uxa_acquire_picture (screen, pict,
PICT_a8,
PIXMAN_a8,
x, y,
width, height,
out_x, out_y);