summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/gen7_render.c1
-rw-r--r--src/sna/kgem.c3
-rw-r--r--src/sna/sna_cpu.c4
-rw-r--r--src/sna/sna_cpuid.h4
-rw-r--r--src/sna/sna_dri2.c6
-rw-r--r--src/sna/sna_render.c5
-rw-r--r--src/sna/sna_trapezoids.c3
-rw-r--r--src/uxa/uxa-accel.c2
-rw-r--r--src/uxa/uxa-render.c4
9 files changed, 18 insertions, 14 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 2e1682cb..ce137bdf 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -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,
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 24ba6f2c..5fa33ce4 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -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;
diff --git a/src/sna/sna_cpu.c b/src/sna/sna_cpu.c
index 23e6bcc0..a3434b11 100644
--- a/src/sna/sna_cpu.c
+++ b/src/sna/sna_cpu.c
@@ -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;
}
diff --git a/src/sna/sna_cpuid.h b/src/sna/sna_cpuid.h
index 5a82c893..ed28a0ae 100644
--- a/src/sna/sna_cpuid.h
+++ b/src/sna/sna_cpuid.h
@@ -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
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index ff1cf5e7..cff97372 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -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;
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index fd73b090..cbec168c 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -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,
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index 4ad61bf9..40663bb8 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -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) {
diff --git a/src/uxa/uxa-accel.c b/src/uxa/uxa-accel.c
index cb465b86..757b2761 100644
--- a/src/uxa/uxa-accel.c
+++ b/src/uxa/uxa-accel.c
@@ -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)) {
diff --git a/src/uxa/uxa-render.c b/src/uxa/uxa-render.c
index 992a008e..a138f161 100644
--- a/src/uxa/uxa-render.c
+++ b/src/uxa/uxa-render.c
@@ -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);