From 19d2a1e87e0173009ca9a01443615e035985447b Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Wed, 27 Nov 2013 15:43:13 +0000 Subject: [PATCH] intel-2D: update layout git-svn-id: svn://kolibrios.org@4304 a494cfbc-eb01-0410-851d-a64ba20cac60 --- drivers/video/Intel-2D/{ => sna}/brw/brw.h | 0 drivers/video/Intel-2D/{ => sna}/brw/brw_eu.c | 0 drivers/video/Intel-2D/{ => sna}/brw/brw_eu.h | 0 .../Intel-2D/{ => sna}/brw/brw_eu_emit.c | 0 drivers/video/Intel-2D/{ => sna}/brw/brw_sf.c | 0 drivers/video/Intel-2D/{ => sna}/brw/brw_wm.c | 0 drivers/video/Intel-2D/{ => sna}/compiler.h | 0 .../video/Intel-2D/{ => sna}/gen3_render.c | 0 .../video/Intel-2D/{ => sna}/gen3_render.h | 0 .../video/Intel-2D/{ => sna}/gen4_render.c | 2 +- .../video/Intel-2D/{ => sna}/gen4_render.h | 0 .../video/Intel-2D/{ => sna}/gen4_source.h | 0 .../video/Intel-2D/{ => sna}/gen4_vertex.c | 0 .../video/Intel-2D/{ => sna}/gen4_vertex.h | 0 .../video/Intel-2D/{ => sna}/gen5_render.c | 0 .../video/Intel-2D/{ => sna}/gen5_render.h | 0 .../video/Intel-2D/{ => sna}/gen6_render.c | 2 +- .../video/Intel-2D/{ => sna}/gen6_render.h | 0 .../video/Intel-2D/{ => sna}/gen7_render.c | 2 +- .../video/Intel-2D/{ => sna}/gen7_render.h | 0 drivers/video/Intel-2D/{ => sna}/intel.h | 0 drivers/video/Intel-2D/{ => sna}/kgem.c | 14 +- drivers/video/Intel-2D/{ => sna}/kgem.h | 0 drivers/video/Intel-2D/{ => sna}/kgem_debug.c | 0 drivers/video/Intel-2D/{ => sna}/kgem_debug.h | 0 .../Intel-2D/{ => sna}/kgem_debug_gen3.c | 0 .../Intel-2D/{ => sna}/kgem_debug_gen4.c | 0 .../Intel-2D/{ => sna}/kgem_debug_gen5.c | 0 .../Intel-2D/{ => sna}/kgem_debug_gen6.c | 0 .../Intel-2D/{ => sna}/kgem_debug_gen7.c | 0 drivers/video/Intel-2D/{ => sna}/pciaccess.h | 0 .../Intel-2D/{ => sna}/render/exa_sf.g4b | 0 .../Intel-2D/{ => sna}/render/exa_sf.g5b | 0 .../Intel-2D/{ => sna}/render/exa_sf_mask.g4b | 0 .../Intel-2D/{ => sna}/render/exa_sf_mask.g5b | 0 .../Intel-2D/{ => sna}/render/exa_wm_ca.g4b | 0 .../Intel-2D/{ => sna}/render/exa_wm_ca.g5b | 0 .../Intel-2D/{ => sna}/render/exa_wm_ca.g6b | 0 .../{ => sna}/render/exa_wm_ca_srcalpha.g4b | 0 .../{ => sna}/render/exa_wm_ca_srcalpha.g5b | 0 .../{ => sna}/render/exa_wm_ca_srcalpha.g6b | 0 .../{ => sna}/render/exa_wm_mask_affine.g4b | 0 .../{ => sna}/render/exa_wm_mask_affine.g5b | 0 .../{ => sna}/render/exa_wm_mask_affine.g6b | 0 .../{ => sna}/render/exa_wm_mask_affine.g7b | 0 .../render/exa_wm_mask_projective.g4b | 0 .../render/exa_wm_mask_projective.g5b | 0 .../render/exa_wm_mask_projective.g6b | 0 .../render/exa_wm_mask_projective.g7b | 0 .../{ => sna}/render/exa_wm_mask_sample_a.g4b | 0 .../{ => sna}/render/exa_wm_mask_sample_a.g5b | 0 .../{ => sna}/render/exa_wm_mask_sample_a.g6b | 0 .../{ => sna}/render/exa_wm_mask_sample_a.g7b | 0 .../render/exa_wm_mask_sample_argb.g4b | 0 .../render/exa_wm_mask_sample_argb.g5b | 0 .../render/exa_wm_mask_sample_argb.g6b | 0 .../render/exa_wm_mask_sample_argb.g7b | 0 .../Intel-2D/{ => sna}/render/exa_wm_noca.g4b | 0 .../Intel-2D/{ => sna}/render/exa_wm_noca.g5b | 0 .../Intel-2D/{ => sna}/render/exa_wm_noca.g6b | 0 .../{ => sna}/render/exa_wm_src_affine.g4b | 0 .../{ => sna}/render/exa_wm_src_affine.g5b | 0 .../{ => sna}/render/exa_wm_src_affine.g6b | 0 .../{ => sna}/render/exa_wm_src_affine.g7b | 0 .../render/exa_wm_src_projective.g4b | 0 .../render/exa_wm_src_projective.g5b | 0 .../render/exa_wm_src_projective.g6b | 0 .../render/exa_wm_src_projective.g7b | 0 .../{ => sna}/render/exa_wm_src_sample_a.g4b | 0 .../{ => sna}/render/exa_wm_src_sample_a.g5b | 0 .../{ => sna}/render/exa_wm_src_sample_a.g6b | 0 .../{ => sna}/render/exa_wm_src_sample_a.g7b | 0 .../render/exa_wm_src_sample_argb.g4b | 0 .../render/exa_wm_src_sample_argb.g5b | 0 .../render/exa_wm_src_sample_argb.g6b | 0 .../render/exa_wm_src_sample_argb.g7b | 0 .../render/exa_wm_src_sample_planar.g4b | 0 .../render/exa_wm_src_sample_planar.g5b | 0 .../render/exa_wm_src_sample_planar.g6b | 0 .../render/exa_wm_src_sample_planar.g7b | 0 .../{ => sna}/render/exa_wm_write.g4b | 0 .../{ => sna}/render/exa_wm_write.g5b | 0 .../{ => sna}/render/exa_wm_write.g6b | 0 .../{ => sna}/render/exa_wm_write.g7b | 0 .../Intel-2D/{ => sna}/render/exa_wm_xy.g4b | 0 .../Intel-2D/{ => sna}/render/exa_wm_xy.g5b | 0 .../{ => sna}/render/exa_wm_yuv_rgb.g4b | 0 .../{ => sna}/render/exa_wm_yuv_rgb.g5b | 0 .../{ => sna}/render/exa_wm_yuv_rgb.g6b | 0 .../{ => sna}/render/exa_wm_yuv_rgb.g7b | 0 drivers/video/Intel-2D/{ => sna}/sna.c | 0 drivers/video/Intel-2D/{ => sna}/sna.h | 0 drivers/video/Intel-2D/{ => sna}/sna_cpu.c | 0 drivers/video/Intel-2D/{ => sna}/sna_cpuid.h | 0 drivers/video/Intel-2D/{ => sna}/sna_reg.h | 0 drivers/video/Intel-2D/{ => sna}/sna_render.h | 0 .../Intel-2D/{ => sna}/sna_render_inline.h | 0 drivers/video/Intel-2D/{ => sna}/sna_stream.c | 296 +++++++++--------- .../video/Intel-2D/{ => sna}/sna_transform.c | 0 drivers/video/Intel-2D/{ => sna}/utils.c | 0 100 files changed, 171 insertions(+), 145 deletions(-) rename drivers/video/Intel-2D/{ => sna}/brw/brw.h (100%) rename drivers/video/Intel-2D/{ => sna}/brw/brw_eu.c (100%) rename drivers/video/Intel-2D/{ => sna}/brw/brw_eu.h (100%) rename drivers/video/Intel-2D/{ => sna}/brw/brw_eu_emit.c (100%) rename drivers/video/Intel-2D/{ => sna}/brw/brw_sf.c (100%) rename drivers/video/Intel-2D/{ => sna}/brw/brw_wm.c (100%) rename drivers/video/Intel-2D/{ => sna}/compiler.h (100%) rename drivers/video/Intel-2D/{ => sna}/gen3_render.c (100%) rename drivers/video/Intel-2D/{ => sna}/gen3_render.h (100%) rename drivers/video/Intel-2D/{ => sna}/gen4_render.c (96%) rename drivers/video/Intel-2D/{ => sna}/gen4_render.h (100%) rename drivers/video/Intel-2D/{ => sna}/gen4_source.h (100%) rename drivers/video/Intel-2D/{ => sna}/gen4_vertex.c (100%) rename drivers/video/Intel-2D/{ => sna}/gen4_vertex.h (100%) rename drivers/video/Intel-2D/{ => sna}/gen5_render.c (100%) rename drivers/video/Intel-2D/{ => sna}/gen5_render.h (100%) rename drivers/video/Intel-2D/{ => sna}/gen6_render.c (96%) rename drivers/video/Intel-2D/{ => sna}/gen6_render.h (100%) rename drivers/video/Intel-2D/{ => sna}/gen7_render.c (96%) rename drivers/video/Intel-2D/{ => sna}/gen7_render.h (100%) rename drivers/video/Intel-2D/{ => sna}/intel.h (100%) rename drivers/video/Intel-2D/{ => sna}/kgem.c (95%) rename drivers/video/Intel-2D/{ => sna}/kgem.h (100%) rename drivers/video/Intel-2D/{ => sna}/kgem_debug.c (100%) rename drivers/video/Intel-2D/{ => sna}/kgem_debug.h (100%) rename drivers/video/Intel-2D/{ => sna}/kgem_debug_gen3.c (100%) rename drivers/video/Intel-2D/{ => sna}/kgem_debug_gen4.c (100%) rename drivers/video/Intel-2D/{ => sna}/kgem_debug_gen5.c (100%) rename drivers/video/Intel-2D/{ => sna}/kgem_debug_gen6.c (100%) rename drivers/video/Intel-2D/{ => sna}/kgem_debug_gen7.c (100%) rename drivers/video/Intel-2D/{ => sna}/pciaccess.h (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_sf.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_sf.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_sf_mask.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_sf_mask.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_ca.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_ca.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_ca.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_ca_srcalpha.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_ca_srcalpha.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_ca_srcalpha.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_affine.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_affine.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_affine.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_affine.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_projective.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_projective.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_projective.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_projective.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_sample_a.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_sample_a.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_sample_a.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_sample_a.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_sample_argb.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_sample_argb.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_sample_argb.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_mask_sample_argb.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_noca.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_noca.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_noca.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_affine.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_affine.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_affine.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_affine.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_projective.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_projective.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_projective.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_projective.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_a.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_a.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_a.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_a.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_argb.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_argb.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_argb.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_argb.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_planar.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_planar.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_planar.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_src_sample_planar.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_write.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_write.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_write.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_write.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_xy.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_xy.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_yuv_rgb.g4b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_yuv_rgb.g5b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_yuv_rgb.g6b (100%) rename drivers/video/Intel-2D/{ => sna}/render/exa_wm_yuv_rgb.g7b (100%) rename drivers/video/Intel-2D/{ => sna}/sna.c (100%) rename drivers/video/Intel-2D/{ => sna}/sna.h (100%) rename drivers/video/Intel-2D/{ => sna}/sna_cpu.c (100%) rename drivers/video/Intel-2D/{ => sna}/sna_cpuid.h (100%) rename drivers/video/Intel-2D/{ => sna}/sna_reg.h (100%) rename drivers/video/Intel-2D/{ => sna}/sna_render.h (100%) rename drivers/video/Intel-2D/{ => sna}/sna_render_inline.h (100%) rename drivers/video/Intel-2D/{ => sna}/sna_stream.c (89%) rename drivers/video/Intel-2D/{ => sna}/sna_transform.c (100%) rename drivers/video/Intel-2D/{ => sna}/utils.c (100%) diff --git a/drivers/video/Intel-2D/brw/brw.h b/drivers/video/Intel-2D/sna/brw/brw.h similarity index 100% rename from drivers/video/Intel-2D/brw/brw.h rename to drivers/video/Intel-2D/sna/brw/brw.h diff --git a/drivers/video/Intel-2D/brw/brw_eu.c b/drivers/video/Intel-2D/sna/brw/brw_eu.c similarity index 100% rename from drivers/video/Intel-2D/brw/brw_eu.c rename to drivers/video/Intel-2D/sna/brw/brw_eu.c diff --git a/drivers/video/Intel-2D/brw/brw_eu.h b/drivers/video/Intel-2D/sna/brw/brw_eu.h similarity index 100% rename from drivers/video/Intel-2D/brw/brw_eu.h rename to drivers/video/Intel-2D/sna/brw/brw_eu.h diff --git a/drivers/video/Intel-2D/brw/brw_eu_emit.c b/drivers/video/Intel-2D/sna/brw/brw_eu_emit.c similarity index 100% rename from drivers/video/Intel-2D/brw/brw_eu_emit.c rename to drivers/video/Intel-2D/sna/brw/brw_eu_emit.c diff --git a/drivers/video/Intel-2D/brw/brw_sf.c b/drivers/video/Intel-2D/sna/brw/brw_sf.c similarity index 100% rename from drivers/video/Intel-2D/brw/brw_sf.c rename to drivers/video/Intel-2D/sna/brw/brw_sf.c diff --git a/drivers/video/Intel-2D/brw/brw_wm.c b/drivers/video/Intel-2D/sna/brw/brw_wm.c similarity index 100% rename from drivers/video/Intel-2D/brw/brw_wm.c rename to drivers/video/Intel-2D/sna/brw/brw_wm.c diff --git a/drivers/video/Intel-2D/compiler.h b/drivers/video/Intel-2D/sna/compiler.h similarity index 100% rename from drivers/video/Intel-2D/compiler.h rename to drivers/video/Intel-2D/sna/compiler.h diff --git a/drivers/video/Intel-2D/gen3_render.c b/drivers/video/Intel-2D/sna/gen3_render.c similarity index 100% rename from drivers/video/Intel-2D/gen3_render.c rename to drivers/video/Intel-2D/sna/gen3_render.c diff --git a/drivers/video/Intel-2D/gen3_render.h b/drivers/video/Intel-2D/sna/gen3_render.h similarity index 100% rename from drivers/video/Intel-2D/gen3_render.h rename to drivers/video/Intel-2D/sna/gen3_render.h diff --git a/drivers/video/Intel-2D/gen4_render.c b/drivers/video/Intel-2D/sna/gen4_render.c similarity index 96% rename from drivers/video/Intel-2D/gen4_render.c rename to drivers/video/Intel-2D/sna/gen4_render.c index c89a71612e..e214c68121 100644 --- a/drivers/video/Intel-2D/gen4_render.c +++ b/drivers/video/Intel-2D/sna/gen4_render.c @@ -2345,7 +2345,7 @@ gen4_blit_tex(struct sna *sna, tmp->dst.bo = dst_bo; tmp->dst.width = dst->drawable.width; tmp->dst.height = dst->drawable.height; - tmp->dst.format = PICT_x8r8g8b8; + tmp->dst.format = PICT_a8r8g8b8; tmp->src.repeat = RepeatNone; diff --git a/drivers/video/Intel-2D/gen4_render.h b/drivers/video/Intel-2D/sna/gen4_render.h similarity index 100% rename from drivers/video/Intel-2D/gen4_render.h rename to drivers/video/Intel-2D/sna/gen4_render.h diff --git a/drivers/video/Intel-2D/gen4_source.h b/drivers/video/Intel-2D/sna/gen4_source.h similarity index 100% rename from drivers/video/Intel-2D/gen4_source.h rename to drivers/video/Intel-2D/sna/gen4_source.h diff --git a/drivers/video/Intel-2D/gen4_vertex.c b/drivers/video/Intel-2D/sna/gen4_vertex.c similarity index 100% rename from drivers/video/Intel-2D/gen4_vertex.c rename to drivers/video/Intel-2D/sna/gen4_vertex.c diff --git a/drivers/video/Intel-2D/gen4_vertex.h b/drivers/video/Intel-2D/sna/gen4_vertex.h similarity index 100% rename from drivers/video/Intel-2D/gen4_vertex.h rename to drivers/video/Intel-2D/sna/gen4_vertex.h diff --git a/drivers/video/Intel-2D/gen5_render.c b/drivers/video/Intel-2D/sna/gen5_render.c similarity index 100% rename from drivers/video/Intel-2D/gen5_render.c rename to drivers/video/Intel-2D/sna/gen5_render.c diff --git a/drivers/video/Intel-2D/gen5_render.h b/drivers/video/Intel-2D/sna/gen5_render.h similarity index 100% rename from drivers/video/Intel-2D/gen5_render.h rename to drivers/video/Intel-2D/sna/gen5_render.h diff --git a/drivers/video/Intel-2D/gen6_render.c b/drivers/video/Intel-2D/sna/gen6_render.c similarity index 96% rename from drivers/video/Intel-2D/gen6_render.c rename to drivers/video/Intel-2D/sna/gen6_render.c index 178b1a04b7..8818017eac 100644 --- a/drivers/video/Intel-2D/gen6_render.c +++ b/drivers/video/Intel-2D/sna/gen6_render.c @@ -3496,7 +3496,7 @@ gen6_blit_tex(struct sna *sna, tmp->dst.bo = dst_bo; tmp->dst.width = dst->drawable.width; tmp->dst.height = dst->drawable.height; - tmp->dst.format = PICT_x8r8g8b8; + tmp->dst.format = PICT_a8r8g8b8; tmp->src.repeat = SAMPLER_EXTEND_NONE; diff --git a/drivers/video/Intel-2D/gen6_render.h b/drivers/video/Intel-2D/sna/gen6_render.h similarity index 100% rename from drivers/video/Intel-2D/gen6_render.h rename to drivers/video/Intel-2D/sna/gen6_render.h diff --git a/drivers/video/Intel-2D/gen7_render.c b/drivers/video/Intel-2D/sna/gen7_render.c similarity index 96% rename from drivers/video/Intel-2D/gen7_render.c rename to drivers/video/Intel-2D/sna/gen7_render.c index cc483890b6..68a5e44f9f 100644 --- a/drivers/video/Intel-2D/gen7_render.c +++ b/drivers/video/Intel-2D/sna/gen7_render.c @@ -2249,7 +2249,7 @@ gen7_blit_tex(struct sna *sna, tmp->dst.bo = dst_bo; tmp->dst.width = dst->drawable.width; tmp->dst.height = dst->drawable.height; - tmp->dst.format = PICT_x8r8g8b8; + tmp->dst.format = PICT_a8r8g8b8; tmp->src.repeat = RepeatNone; diff --git a/drivers/video/Intel-2D/gen7_render.h b/drivers/video/Intel-2D/sna/gen7_render.h similarity index 100% rename from drivers/video/Intel-2D/gen7_render.h rename to drivers/video/Intel-2D/sna/gen7_render.h diff --git a/drivers/video/Intel-2D/intel.h b/drivers/video/Intel-2D/sna/intel.h similarity index 100% rename from drivers/video/Intel-2D/intel.h rename to drivers/video/Intel-2D/sna/intel.h diff --git a/drivers/video/Intel-2D/kgem.c b/drivers/video/Intel-2D/sna/kgem.c similarity index 95% rename from drivers/video/Intel-2D/kgem.c rename to drivers/video/Intel-2D/sna/kgem.c index 599ebe687a..71cb0d8828 100644 --- a/drivers/video/Intel-2D/kgem.c +++ b/drivers/video/Intel-2D/sna/kgem.c @@ -2655,6 +2655,16 @@ void _kgem_submit(struct kgem *kgem) execbuf.batch_len = batch_end*sizeof(uint32_t); execbuf.flags = kgem->ring | kgem->batch_flags; + if (DEBUG_DUMP) + { + int fd = open("/tmp1/1/batchbuffer.bin", O_CREAT|O_WRONLY|O_BINARY); + if (fd != -1) { + write(fd, kgem->batch, size); + close(fd); + } + else printf("SNA: failed to write batchbuffer\n"); + asm volatile("int3"); + } ret = drmIoctl(kgem->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, @@ -2676,8 +2686,8 @@ void _kgem_submit(struct kgem *kgem) ret = drmIoctl(kgem->fd, DRM_IOCTL_I915_GEM_SET_DOMAIN, &set_domain); } if (ret == -1) { -// DBG(("%s: GPU hang detected [%d]\n", -// __FUNCTION__, errno)); + DBG(("%s: GPU hang detected [%d]\n", + __FUNCTION__, errno)); kgem_throttle(kgem); kgem->wedged = true; diff --git a/drivers/video/Intel-2D/kgem.h b/drivers/video/Intel-2D/sna/kgem.h similarity index 100% rename from drivers/video/Intel-2D/kgem.h rename to drivers/video/Intel-2D/sna/kgem.h diff --git a/drivers/video/Intel-2D/kgem_debug.c b/drivers/video/Intel-2D/sna/kgem_debug.c similarity index 100% rename from drivers/video/Intel-2D/kgem_debug.c rename to drivers/video/Intel-2D/sna/kgem_debug.c diff --git a/drivers/video/Intel-2D/kgem_debug.h b/drivers/video/Intel-2D/sna/kgem_debug.h similarity index 100% rename from drivers/video/Intel-2D/kgem_debug.h rename to drivers/video/Intel-2D/sna/kgem_debug.h diff --git a/drivers/video/Intel-2D/kgem_debug_gen3.c b/drivers/video/Intel-2D/sna/kgem_debug_gen3.c similarity index 100% rename from drivers/video/Intel-2D/kgem_debug_gen3.c rename to drivers/video/Intel-2D/sna/kgem_debug_gen3.c diff --git a/drivers/video/Intel-2D/kgem_debug_gen4.c b/drivers/video/Intel-2D/sna/kgem_debug_gen4.c similarity index 100% rename from drivers/video/Intel-2D/kgem_debug_gen4.c rename to drivers/video/Intel-2D/sna/kgem_debug_gen4.c diff --git a/drivers/video/Intel-2D/kgem_debug_gen5.c b/drivers/video/Intel-2D/sna/kgem_debug_gen5.c similarity index 100% rename from drivers/video/Intel-2D/kgem_debug_gen5.c rename to drivers/video/Intel-2D/sna/kgem_debug_gen5.c diff --git a/drivers/video/Intel-2D/kgem_debug_gen6.c b/drivers/video/Intel-2D/sna/kgem_debug_gen6.c similarity index 100% rename from drivers/video/Intel-2D/kgem_debug_gen6.c rename to drivers/video/Intel-2D/sna/kgem_debug_gen6.c diff --git a/drivers/video/Intel-2D/kgem_debug_gen7.c b/drivers/video/Intel-2D/sna/kgem_debug_gen7.c similarity index 100% rename from drivers/video/Intel-2D/kgem_debug_gen7.c rename to drivers/video/Intel-2D/sna/kgem_debug_gen7.c diff --git a/drivers/video/Intel-2D/pciaccess.h b/drivers/video/Intel-2D/sna/pciaccess.h similarity index 100% rename from drivers/video/Intel-2D/pciaccess.h rename to drivers/video/Intel-2D/sna/pciaccess.h diff --git a/drivers/video/Intel-2D/render/exa_sf.g4b b/drivers/video/Intel-2D/sna/render/exa_sf.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_sf.g4b rename to drivers/video/Intel-2D/sna/render/exa_sf.g4b diff --git a/drivers/video/Intel-2D/render/exa_sf.g5b b/drivers/video/Intel-2D/sna/render/exa_sf.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_sf.g5b rename to drivers/video/Intel-2D/sna/render/exa_sf.g5b diff --git a/drivers/video/Intel-2D/render/exa_sf_mask.g4b b/drivers/video/Intel-2D/sna/render/exa_sf_mask.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_sf_mask.g4b rename to drivers/video/Intel-2D/sna/render/exa_sf_mask.g4b diff --git a/drivers/video/Intel-2D/render/exa_sf_mask.g5b b/drivers/video/Intel-2D/sna/render/exa_sf_mask.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_sf_mask.g5b rename to drivers/video/Intel-2D/sna/render/exa_sf_mask.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_ca.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_ca.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_ca.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_ca.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_ca.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_ca.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_ca.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_ca.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_ca.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_ca.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_ca.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_ca.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_ca_srcalpha.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_ca_srcalpha.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_ca_srcalpha.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_ca_srcalpha.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_ca_srcalpha.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_ca_srcalpha.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_ca_srcalpha.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_ca_srcalpha.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_ca_srcalpha.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_ca_srcalpha.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_ca_srcalpha.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_ca_srcalpha.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_affine.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_affine.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_affine.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_affine.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_affine.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_affine.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_affine.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_affine.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_affine.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_affine.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_affine.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_affine.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_affine.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_affine.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_affine.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_affine.g7b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_projective.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_projective.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_projective.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_projective.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_projective.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_projective.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_projective.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_projective.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_projective.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_projective.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_projective.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_projective.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_projective.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_projective.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_projective.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_projective.g7b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_sample_a.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_a.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_sample_a.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_a.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_sample_a.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_a.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_sample_a.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_a.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_sample_a.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_a.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_sample_a.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_a.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_sample_a.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_a.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_sample_a.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_a.g7b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_sample_argb.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_argb.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_sample_argb.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_argb.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_sample_argb.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_argb.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_sample_argb.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_argb.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_sample_argb.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_argb.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_sample_argb.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_argb.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_mask_sample_argb.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_argb.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_mask_sample_argb.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_mask_sample_argb.g7b diff --git a/drivers/video/Intel-2D/render/exa_wm_noca.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_noca.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_noca.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_noca.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_noca.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_noca.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_noca.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_noca.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_noca.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_noca.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_noca.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_noca.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_affine.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_src_affine.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_affine.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_affine.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_affine.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_src_affine.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_affine.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_affine.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_affine.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_src_affine.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_affine.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_affine.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_affine.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_src_affine.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_affine.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_affine.g7b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_projective.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_src_projective.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_projective.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_projective.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_projective.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_src_projective.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_projective.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_projective.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_projective.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_src_projective.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_projective.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_projective.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_projective.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_src_projective.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_projective.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_projective.g7b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_a.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_a.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_a.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_a.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_a.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_a.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_a.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_a.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_a.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_a.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_a.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_a.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_a.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_a.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_a.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_a.g7b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_argb.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_argb.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_argb.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_argb.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_argb.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_argb.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_argb.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_argb.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_argb.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_argb.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_argb.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_argb.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_argb.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_argb.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_argb.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_argb.g7b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_planar.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_planar.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_planar.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_planar.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_planar.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_planar.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_planar.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_planar.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_planar.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_planar.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_planar.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_planar.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_src_sample_planar.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_src_sample_planar.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_src_sample_planar.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_src_sample_planar.g7b diff --git a/drivers/video/Intel-2D/render/exa_wm_write.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_write.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_write.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_write.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_write.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_write.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_write.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_write.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_write.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_write.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_write.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_write.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_write.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_write.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_write.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_write.g7b diff --git a/drivers/video/Intel-2D/render/exa_wm_xy.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_xy.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_xy.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_xy.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_xy.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_xy.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_xy.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_xy.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_yuv_rgb.g4b b/drivers/video/Intel-2D/sna/render/exa_wm_yuv_rgb.g4b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_yuv_rgb.g4b rename to drivers/video/Intel-2D/sna/render/exa_wm_yuv_rgb.g4b diff --git a/drivers/video/Intel-2D/render/exa_wm_yuv_rgb.g5b b/drivers/video/Intel-2D/sna/render/exa_wm_yuv_rgb.g5b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_yuv_rgb.g5b rename to drivers/video/Intel-2D/sna/render/exa_wm_yuv_rgb.g5b diff --git a/drivers/video/Intel-2D/render/exa_wm_yuv_rgb.g6b b/drivers/video/Intel-2D/sna/render/exa_wm_yuv_rgb.g6b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_yuv_rgb.g6b rename to drivers/video/Intel-2D/sna/render/exa_wm_yuv_rgb.g6b diff --git a/drivers/video/Intel-2D/render/exa_wm_yuv_rgb.g7b b/drivers/video/Intel-2D/sna/render/exa_wm_yuv_rgb.g7b similarity index 100% rename from drivers/video/Intel-2D/render/exa_wm_yuv_rgb.g7b rename to drivers/video/Intel-2D/sna/render/exa_wm_yuv_rgb.g7b diff --git a/drivers/video/Intel-2D/sna.c b/drivers/video/Intel-2D/sna/sna.c similarity index 100% rename from drivers/video/Intel-2D/sna.c rename to drivers/video/Intel-2D/sna/sna.c diff --git a/drivers/video/Intel-2D/sna.h b/drivers/video/Intel-2D/sna/sna.h similarity index 100% rename from drivers/video/Intel-2D/sna.h rename to drivers/video/Intel-2D/sna/sna.h diff --git a/drivers/video/Intel-2D/sna_cpu.c b/drivers/video/Intel-2D/sna/sna_cpu.c similarity index 100% rename from drivers/video/Intel-2D/sna_cpu.c rename to drivers/video/Intel-2D/sna/sna_cpu.c diff --git a/drivers/video/Intel-2D/sna_cpuid.h b/drivers/video/Intel-2D/sna/sna_cpuid.h similarity index 100% rename from drivers/video/Intel-2D/sna_cpuid.h rename to drivers/video/Intel-2D/sna/sna_cpuid.h diff --git a/drivers/video/Intel-2D/sna_reg.h b/drivers/video/Intel-2D/sna/sna_reg.h similarity index 100% rename from drivers/video/Intel-2D/sna_reg.h rename to drivers/video/Intel-2D/sna/sna_reg.h diff --git a/drivers/video/Intel-2D/sna_render.h b/drivers/video/Intel-2D/sna/sna_render.h similarity index 100% rename from drivers/video/Intel-2D/sna_render.h rename to drivers/video/Intel-2D/sna/sna_render.h diff --git a/drivers/video/Intel-2D/sna_render_inline.h b/drivers/video/Intel-2D/sna/sna_render_inline.h similarity index 100% rename from drivers/video/Intel-2D/sna_render_inline.h rename to drivers/video/Intel-2D/sna/sna_render_inline.h diff --git a/drivers/video/Intel-2D/sna_stream.c b/drivers/video/Intel-2D/sna/sna_stream.c similarity index 89% rename from drivers/video/Intel-2D/sna_stream.c rename to drivers/video/Intel-2D/sna/sna_stream.c index 2787382a2b..4eac3ab7b6 100644 --- a/drivers/video/Intel-2D/sna_stream.c +++ b/drivers/video/Intel-2D/sna/sna_stream.c @@ -1,140 +1,156 @@ -/* - * Copyright © 2011 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Authors: - * Chris Wilson - * - */ - -#include "sna.h" -#include "sna_render.h" -#include "brw/brw.h" - -int sna_static_stream_init(struct sna_static_stream *stream) -{ - stream->used = 0; - stream->size = 64*1024; - - stream->data = malloc(stream->size); - return stream->data != NULL; -} - -static uint32_t sna_static_stream_alloc(struct sna_static_stream *stream, - uint32_t len, uint32_t align) -{ - uint32_t offset = ALIGN(stream->used, align); - uint32_t size = offset + len; - - if (size > stream->size) { - do - stream->size *= 2; - while (stream->size < size); - - stream->data = realloc(stream->data, stream->size); - } - - stream->used = size; - return offset; -} - -uint32_t sna_static_stream_add(struct sna_static_stream *stream, - const void *data, uint32_t len, uint32_t align) -{ - uint32_t offset = sna_static_stream_alloc(stream, len, align); - memcpy(stream->data + offset, data, len); - return offset; -} - -void *sna_static_stream_map(struct sna_static_stream *stream, - uint32_t len, uint32_t align) -{ - uint32_t offset = sna_static_stream_alloc(stream, len, align); - return memset(stream->data + offset, 0, len); -} - -uint32_t sna_static_stream_offsetof(struct sna_static_stream *stream, void *ptr) -{ - return (uint8_t *)ptr - stream->data; -} - -struct kgem_bo *sna_static_stream_fini(struct sna *sna, - struct sna_static_stream *stream) -{ - struct kgem_bo *bo; - - DBG(("uploaded %d bytes of static state\n", stream->used)); - - bo = kgem_create_linear(&sna->kgem, stream->used, 0); - if (bo && !kgem_bo_write(&sna->kgem, bo, stream->data, stream->used)) { - kgem_bo_destroy(&sna->kgem, bo); - return NULL; - } - - free(stream->data); - - return bo; -} - -unsigned -sna_static_stream_compile_sf(struct sna *sna, - struct sna_static_stream *stream, - bool (*compile)(struct brw_compile *)) -{ - struct brw_compile p; - - brw_compile_init(&p, sna->kgem.gen, - sna_static_stream_map(stream, - 64*sizeof(uint32_t), 64)); - - if (!compile(&p)) { - stream->used -= 64*sizeof(uint32_t); - return 0; - } - - assert(p.nr_insn*sizeof(struct brw_instruction) <= 64*sizeof(uint32_t)); - - stream->used -= 64*sizeof(uint32_t) - p.nr_insn*sizeof(struct brw_instruction); - return sna_static_stream_offsetof(stream, p.store); -} - -unsigned -sna_static_stream_compile_wm(struct sna *sna, - struct sna_static_stream *stream, - bool (*compile)(struct brw_compile *, int), - int dispatch_width) -{ - struct brw_compile p; - - brw_compile_init(&p, sna->kgem.gen, - sna_static_stream_map(stream, - 256*sizeof(uint32_t), 64)); - - if (!compile(&p, dispatch_width)) { - stream->used -= 256*sizeof(uint32_t); - return 0; - } - - assert(p.nr_insn*sizeof(struct brw_instruction) <= 256*sizeof(uint32_t)); - - stream->used -= 256*sizeof(uint32_t) - p.nr_insn*sizeof(struct brw_instruction); - return sna_static_stream_offsetof(stream, p.store); -} +/* + * Copyright © 2011 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Authors: + * Chris Wilson + * + */ + +#include "sna.h" +#include "sna_render.h" +#include "brw/brw.h" +#include + +int sna_static_stream_init(struct sna_static_stream *stream) +{ + stream->used = 0; + stream->size = 64*1024; + + stream->data = malloc(stream->size); + return stream->data != NULL; +} + +static uint32_t sna_static_stream_alloc(struct sna_static_stream *stream, + uint32_t len, uint32_t align) +{ + uint32_t offset = ALIGN(stream->used, align); + uint32_t size = offset + len; + + if (size > stream->size) { + do + stream->size *= 2; + while (stream->size < size); + + stream->data = realloc(stream->data, stream->size); + } + + stream->used = size; + return offset; +} + +uint32_t sna_static_stream_add(struct sna_static_stream *stream, + const void *data, uint32_t len, uint32_t align) +{ + uint32_t offset = sna_static_stream_alloc(stream, len, align); + memcpy(stream->data + offset, data, len); + return offset; +} + +void *sna_static_stream_map(struct sna_static_stream *stream, + uint32_t len, uint32_t align) +{ + uint32_t offset = sna_static_stream_alloc(stream, len, align); + return memset(stream->data + offset, 0, len); +} + +uint32_t sna_static_stream_offsetof(struct sna_static_stream *stream, void *ptr) +{ + return (uint8_t *)ptr - stream->data; +} + +struct kgem_bo *sna_static_stream_fini(struct sna *sna, + struct sna_static_stream *stream) +{ + struct kgem_bo *bo; + + DBG(("uploaded %d bytes of static state\n", stream->used)); + + if (DEBUG_DUMP) + { + int fd = open("/tmp1/1/static.bin", O_CREAT|O_WRONLY|O_BINARY); + if (fd != -1) { + write(fd, stream->data, stream->used); + close(fd); + } + else + { + printf("SNA: failed to write static stream\n"); + asm volatile("int3"); + } + } + + + bo = kgem_create_linear(&sna->kgem, stream->used, 0); + if (bo && !kgem_bo_write(&sna->kgem, bo, stream->data, stream->used)) { + kgem_bo_destroy(&sna->kgem, bo); + return NULL; + } + + free(stream->data); + + return bo; +} + +unsigned +sna_static_stream_compile_sf(struct sna *sna, + struct sna_static_stream *stream, + bool (*compile)(struct brw_compile *)) +{ + struct brw_compile p; + + brw_compile_init(&p, sna->kgem.gen, + sna_static_stream_map(stream, + 64*sizeof(uint32_t), 64)); + + if (!compile(&p)) { + stream->used -= 64*sizeof(uint32_t); + return 0; + } + + assert(p.nr_insn*sizeof(struct brw_instruction) <= 64*sizeof(uint32_t)); + + stream->used -= 64*sizeof(uint32_t) - p.nr_insn*sizeof(struct brw_instruction); + return sna_static_stream_offsetof(stream, p.store); +} + +unsigned +sna_static_stream_compile_wm(struct sna *sna, + struct sna_static_stream *stream, + bool (*compile)(struct brw_compile *, int), + int dispatch_width) +{ + struct brw_compile p; + + brw_compile_init(&p, sna->kgem.gen, + sna_static_stream_map(stream, + 256*sizeof(uint32_t), 64)); + + if (!compile(&p, dispatch_width)) { + stream->used -= 256*sizeof(uint32_t); + return 0; + } + + assert(p.nr_insn*sizeof(struct brw_instruction) <= 256*sizeof(uint32_t)); + + stream->used -= 256*sizeof(uint32_t) - p.nr_insn*sizeof(struct brw_instruction); + return sna_static_stream_offsetof(stream, p.store); +} diff --git a/drivers/video/Intel-2D/sna_transform.c b/drivers/video/Intel-2D/sna/sna_transform.c similarity index 100% rename from drivers/video/Intel-2D/sna_transform.c rename to drivers/video/Intel-2D/sna/sna_transform.c diff --git a/drivers/video/Intel-2D/utils.c b/drivers/video/Intel-2D/sna/utils.c similarity index 100% rename from drivers/video/Intel-2D/utils.c rename to drivers/video/Intel-2D/sna/utils.c