Merge branch 'master' into drm-gem
This commit is contained in:
commit
65877d32bb
14
acinclude.m4
14
acinclude.m4
|
|
@ -8,8 +8,7 @@ dnl To use dolt, invoke the DOLT macro immediately after the libtool macros.
|
|||
dnl Optionally, copy this file into acinclude.m4, to avoid the need to have it
|
||||
dnl installed when running autoconf on your project.
|
||||
dnl
|
||||
dnl git snapshot: 198a3026b347b9220a2f2e2ae23a3049c35af262
|
||||
|
||||
dnl git snapshot: d91f2b4e9041538400e2703a2a6fbeecdb8ee27d
|
||||
AC_DEFUN([DOLT], [
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
# dolt, a replacement for libtool
|
||||
|
|
@ -27,11 +26,13 @@ if test x$GCC != xyes; then
|
|||
fi
|
||||
case $host in
|
||||
i?86-*-linux*|x86_64-*-linux*|powerpc-*-linux*) ;;
|
||||
amd64-*-freebsd*|i386-*-freebsd*|ia64-*-freebsd*) ;;
|
||||
amd64-*-freebsd*|i?86-*-freebsd*|ia64-*-freebsd*) ;;
|
||||
*) dolt_supported=no ;;
|
||||
esac
|
||||
if test x$dolt_supported = xno ; then
|
||||
AC_MSG_RESULT([no, falling back to libtool])
|
||||
LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
|
||||
LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
|
||||
else
|
||||
AC_MSG_RESULT([yes, replacing libtool])
|
||||
|
||||
|
|
@ -65,9 +66,10 @@ dnl Write out shared compilation code.
|
|||
cat <<'__DOLTCOMPILE__EOF__' >>doltcompile
|
||||
libobjdir="${obj%$objbase}.libs"
|
||||
if test ! -d "$libobjdir" ; then
|
||||
mkdir -p "$libobjdir"
|
||||
mkdir_out="$(mkdir "$libobjdir" 2>&1)"
|
||||
mkdir_ret=$?
|
||||
if test "$mkdir_ret" -ne 0 && test ! -d "$libobjdir" ; then
|
||||
echo "$mkdir_out" 1>&2
|
||||
exit $mkdir_ret
|
||||
fi
|
||||
fi
|
||||
|
|
@ -130,9 +132,9 @@ __DOLTCOMPILE__EOF__
|
|||
dnl Done writing out doltcompile; substitute it for libtool compilation.
|
||||
chmod +x doltcompile
|
||||
LTCOMPILE='$(top_builddir)/doltcompile $(COMPILE)'
|
||||
AC_SUBST(LTCOMPILE)
|
||||
LTCXXCOMPILE='$(top_builddir)/doltcompile $(CXXCOMPILE)'
|
||||
AC_SUBST(LTCXXCOMPILE)
|
||||
fi
|
||||
AC_SUBST(LTCOMPILE)
|
||||
AC_SUBST(LTCXXCOMPILE)
|
||||
# end dolt
|
||||
])
|
||||
|
|
|
|||
15
configure.ac
15
configure.ac
|
|
@ -44,6 +44,9 @@ AM_PROG_CC_C_O
|
|||
AC_CHECK_PROG(gen4asm, [intel-gen4asm], yes, no)
|
||||
AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
|
||||
|
||||
AC_CHECK_HEADERS(sys/mman.h)
|
||||
AC_CHECK_FUNCS(mprotect)
|
||||
|
||||
AH_TOP([#include "xorg-server.h"])
|
||||
|
||||
AC_ARG_WITH(xorg-module-dir,
|
||||
|
|
@ -171,6 +174,18 @@ fi
|
|||
|
||||
AC_SUBST([XMODES_CFLAGS])
|
||||
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
|
||||
|
||||
AC_CHECK_DECL(xf86RotateFreeShadow,
|
||||
[AC_DEFINE(HAVE_FREE_SHADOW, 1, [have new FreeShadow API])],
|
||||
[],
|
||||
[#include <xorg-server.h>
|
||||
#include <windowstr.h>
|
||||
#include <xf86Crtc.h>])
|
||||
|
||||
CPPFLAGS="$SAVE_CPPFLAGS"
|
||||
|
||||
dnl Use lots of warning flags with GCC
|
||||
|
||||
WARN_CFLAGS=""
|
||||
|
|
|
|||
|
|
@ -71,8 +71,6 @@ INTEL_XVMC_SRCS = \
|
|||
intel_drv_la_SOURCES = \
|
||||
brw_defines.h \
|
||||
brw_structs.h \
|
||||
sf_prog.h \
|
||||
wm_prog.h \
|
||||
common.h \
|
||||
i2c_vid.h \
|
||||
i810_accel.c \
|
||||
|
|
|
|||
|
|
@ -103,23 +103,39 @@ define(`mask_w_1', `src_w_1')
|
|||
|
||||
/* sample src to these registers */
|
||||
define(`src_sample_base', `g14')
|
||||
|
||||
define(`src_sample_r', `g14')
|
||||
define(`src_sample_r_01', `g14')
|
||||
define(`src_sample_r_23', `g15')
|
||||
|
||||
define(`src_sample_g', `g16')
|
||||
define(`src_sample_g_01', `g16')
|
||||
define(`src_sample_g_23', `g17')
|
||||
|
||||
define(`src_sample_b', `g18')
|
||||
define(`src_sample_b_01', `g18')
|
||||
define(`src_sample_b_23', `g19')
|
||||
|
||||
define(`src_sample_a', `g20')
|
||||
define(`src_sample_a_01', `g20')
|
||||
define(`src_sample_a_23', `g21')
|
||||
|
||||
/* sample mask to these registers */
|
||||
define(`mask_sample_base', `g22')
|
||||
|
||||
define(`mask_sample_r', `g22')
|
||||
define(`mask_sample_r_01', `g22')
|
||||
define(`mask_sample_r_23', `g23')
|
||||
|
||||
define(`mask_sample_g', `g24')
|
||||
define(`mask_sample_g_01', `g24')
|
||||
define(`mask_sample_g_23', `g25')
|
||||
|
||||
define(`mask_sample_b', `g26')
|
||||
define(`mask_sample_b_01', `g26')
|
||||
define(`mask_sample_b_23', `g27')
|
||||
|
||||
define(`mask_sample_a', `g28')
|
||||
define(`mask_sample_a_01', `g28')
|
||||
define(`mask_sample_a_23', `g29')
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ mul (16) temp_y<1>F dst_y<8,8,1>F dw_dy { compr align1 };
|
|||
add (16) temp_x<1>F temp_x<8,8,1>F temp_y<8,8,1>F { compr align1 };
|
||||
add (16) temp_x<1>F temp_x<8,8,1>F wo { compr align1 };
|
||||
send (8) 0 w_0<1>F temp_x_0<8,8,1>F math inv mlen 1 rlen 1 { align1 };
|
||||
send (8) 0 w_1<1>F temp_x_1<8,8,1>F math inv mlen 1 rlen 1 { align1 };
|
||||
send (8) 0 w_1<1>F temp_x_1<8,8,1>F math inv mlen 1 rlen 1 { sechalf align1 };
|
||||
|
||||
/********** Compute u *************/
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ mov (1) g0.8<1>UD 0x0000e000UD { align1 mask_disable };
|
|||
|
||||
/* sample Y */
|
||||
send (16) src_msg_ind /* msg reg index */
|
||||
src_sample_g_01<1>UW /* readback */
|
||||
src_sample_g<1>UW /* readback */
|
||||
g0<8,8,1>UW /* copy to msg start reg*/
|
||||
sampler (1,0,F) /* sampler message description, (binding_table,sampler_index,datatype)
|
||||
/* here(src->dst) we should use src_sampler and src_surface */
|
||||
|
|
@ -50,17 +50,16 @@ send (16) src_msg_ind /* msg reg index */
|
|||
|
||||
/* sample U (Cr) */
|
||||
send (16) src_msg_ind /* msg reg index */
|
||||
src_sample_r_01<1>UW /* readback */
|
||||
src_sample_r<1>UW /* readback */
|
||||
g0<8,8,1>UW /* copy to msg start reg*/
|
||||
sampler (2,1,F) /* sampler message description, (binding_table,sampler_index,datatype)
|
||||
sampler (3,2,F) /* sampler message description, (binding_table,sampler_index,datatype)
|
||||
/* here(src->dst) we should use src_sampler and src_surface */
|
||||
mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */
|
||||
|
||||
/* sample V (Cb) */
|
||||
send (16) src_msg_ind /* msg reg index */
|
||||
src_sample_b_01<1>UW /* readback */
|
||||
src_sample_b<1>UW /* readback */
|
||||
g0<8,8,1>UW /* copy to msg start reg*/
|
||||
sampler (3,2,F) /* sampler message description, (binding_table,sampler_index,datatype)
|
||||
sampler (5,4,F) /* sampler message description, (binding_table,sampler_index,datatype)
|
||||
/* here(src->dst) we should use src_sampler and src_surface */
|
||||
mlen 5 rlen 2 { align1 }; /* required message len 5, readback len 8 */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ 0x00000201, 0x20080061, 0x00000000, 0x0000e000 },
|
||||
{ 0x01800031, 0x22001d29, 0x008d0000, 0x02520001 },
|
||||
{ 0x01800031, 0x21c01d29, 0x008d0000, 0x02520102 },
|
||||
{ 0x01800031, 0x22401d29, 0x008d0000, 0x02520203 },
|
||||
{ 0x01800031, 0x21c01d29, 0x008d0000, 0x02520203 },
|
||||
{ 0x01800031, 0x22401d29, 0x008d0000, 0x02520405 },
|
||||
|
|
|
|||
|
|
@ -40,13 +40,13 @@ mov (8) data_port_g_01<1>F src_sample_g_01<8,8,1>F { align1 };
|
|||
mov (8) data_port_b_01<1>F src_sample_b_01<8,8,1>F { align1 };
|
||||
mov (8) data_port_a_01<1>F src_sample_a_01<8,8,1>F { align1 };
|
||||
|
||||
mov (8) data_port_r_23<1>F src_sample_r_23<8,8,1>F { align1 };
|
||||
mov (8) data_port_g_23<1>F src_sample_g_23<8,8,1>F { align1 };
|
||||
mov (8) data_port_b_23<1>F src_sample_b_23<8,8,1>F { align1 };
|
||||
mov (8) data_port_a_23<1>F src_sample_a_23<8,8,1>F { align1 };
|
||||
mov (8) data_port_r_23<1>F src_sample_r_23<8,8,1>F { sechalf align1 };
|
||||
mov (8) data_port_g_23<1>F src_sample_g_23<8,8,1>F { sechalf align1 };
|
||||
mov (8) data_port_b_23<1>F src_sample_b_23<8,8,1>F { sechalf align1 };
|
||||
mov (8) data_port_a_23<1>F src_sample_a_23<8,8,1>F { sechalf align1 };
|
||||
|
||||
/* m0, m1 are all direct passed by PS thread payload */
|
||||
mov (8) data_port_msg_1<1>UD g1<8,8,1>UD { align1 };
|
||||
mov (8) data_port_msg_1<1>UD g1<8,8,1>UD { mask_disable align1 };
|
||||
|
||||
/* write */
|
||||
send (16)
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
{ 0x00600001, 0x206003be, 0x008d0200, 0x00000000 },
|
||||
{ 0x00600001, 0x208003be, 0x008d0240, 0x00000000 },
|
||||
{ 0x00600001, 0x20a003be, 0x008d0280, 0x00000000 },
|
||||
{ 0x00600001, 0x20c003be, 0x008d01e0, 0x00000000 },
|
||||
{ 0x00600001, 0x20e003be, 0x008d0220, 0x00000000 },
|
||||
{ 0x00600001, 0x210003be, 0x008d0260, 0x00000000 },
|
||||
{ 0x00600001, 0x212003be, 0x008d02a0, 0x00000000 },
|
||||
{ 0x00600001, 0x20200022, 0x008d0020, 0x00000000 },
|
||||
{ 0x00601001, 0x20c003be, 0x008d01e0, 0x00000000 },
|
||||
{ 0x00601001, 0x20e003be, 0x008d0220, 0x00000000 },
|
||||
{ 0x00601001, 0x210003be, 0x008d0260, 0x00000000 },
|
||||
{ 0x00601001, 0x212003be, 0x008d02a0, 0x00000000 },
|
||||
{ 0x00600201, 0x20200022, 0x008d0020, 0x00000000 },
|
||||
{ 0x00800031, 0x24001d28, 0x008d0000, 0x85a04800 },
|
||||
{ 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
|
||||
{ 0x0000007e, 0x00000000, 0x00000000, 0x00000000 },
|
||||
|
|
|
|||
|
|
@ -30,27 +30,27 @@ include(`exa_wm.g4i')
|
|||
|
||||
define(`YCbCr_base', `src_sample_base')
|
||||
|
||||
define(`Cr', `src_sample_r_01')
|
||||
define(`Cr', `src_sample_r')
|
||||
define(`Cr_01', `src_sample_r_01')
|
||||
define(`Cr_23', `src_sample_r_23')
|
||||
|
||||
define(`Y', `src_sample_g_01')
|
||||
define(`Y', `src_sample_g')
|
||||
define(`Y_01', `src_sample_g_01')
|
||||
define(`Y_23', `src_sample_g_23')
|
||||
|
||||
define(`Cb', `src_sample_b_01')
|
||||
define(`Cb', `src_sample_b')
|
||||
define(`Cb_01', `src_sample_b_01')
|
||||
define(`Cb_23', `src_sample_b_23')
|
||||
|
||||
define(`Crn', `mask_sample_r_01')
|
||||
define(`Crn', `mask_sample_r')
|
||||
define(`Crn_01', `mask_sample_r_01')
|
||||
define(`Crn_23', `mask_sample_r_23')
|
||||
|
||||
define(`Yn', `mask_sample_g_01')
|
||||
define(`Yn', `mask_sample_g')
|
||||
define(`Yn_01', `mask_sample_g_01')
|
||||
define(`Yn_23', `mask_sample_g_23')
|
||||
|
||||
define(`Cbn', `mask_sample_b_01')
|
||||
define(`Cbn', `mask_sample_b')
|
||||
define(`Cbn_01', `mask_sample_b_01')
|
||||
define(`Cbn_23', `mask_sample_b_23')
|
||||
|
||||
|
|
@ -58,14 +58,6 @@ define(`Cbn_23', `mask_sample_b_23')
|
|||
* R = Clamp ( 1.164(Y-16/255) + 1.596(Cr-128/255), 0, 1)
|
||||
* G = Clamp ( 1.164(Y-16/255) - 0.813(Cr-128/255) - 0.392(Cb-128/255), 0, 1)
|
||||
* B = Clamp ( 1.164(Y-16/255) + 2.017(Cb-128/255), 0, 1)
|
||||
*
|
||||
* Y is g14, g15.
|
||||
* Cr is g12, g13.
|
||||
* Cb is g16, g17.
|
||||
*
|
||||
* R is g2, g6.
|
||||
* G is g3, g7.
|
||||
* B is g4, g8.
|
||||
*/
|
||||
|
||||
/* Normalize Y, Cb and Cr:
|
||||
|
|
@ -84,31 +76,23 @@ add (16) Cbn<1>F Cb<8,8,1>F -0.501961F { compr align1 };
|
|||
/*
|
||||
* R = Y + Cr * 1.596
|
||||
*/
|
||||
mul (8) null Crn_01<8,8,1>F 1.596F { align1 };
|
||||
mac.sat (8) src_sample_r_01<1>F Yn_01<8,8,1>F 1F { align1 };
|
||||
mul (8) null Crn_23<8,8,1>F 1.596F { align1 };
|
||||
mac.sat (8) src_sample_r_23<1>F Yn_23<8,8,1>F 1F { align1 };
|
||||
mov (16) acc0<1>F Yn<8,8,1>F { compr align1 };
|
||||
mac.sat(16) src_sample_r<1>F Crn<8,8,1>F 1.596F { compr align1 };
|
||||
|
||||
/*
|
||||
* G = Crn * -0.813 + Cbn * -0.392 + Y
|
||||
*/
|
||||
mul (8) null Crn_01<8,8,1>F -0.813F { align1 };
|
||||
mac (8) null Cbn_01<8,8,1>F -0.392F { align1 };
|
||||
mac.sat (8) src_sample_g_01<1>F Yn_01<8,8,1>F 1F { align1 };
|
||||
mul (8) null Crn_23<8,8,1>F -0.813F { align1 };
|
||||
mac (8) null Cbn_23<8,8,1>F -0.392F { align1 };
|
||||
mac.sat (8) src_sample_g_23<1>F Yn_23<8,8,1>F 1F { align1 };
|
||||
mov (16) acc0<1>F Yn<8,8,1>F { compr align1 };
|
||||
mac (16) acc0<1>F Crn<8,8,1>F -0.813F { compr align1 };
|
||||
mac.sat(16) src_sample_g<1>F Cbn<8,8,1>F -0.392F { compr align1 };
|
||||
|
||||
/*
|
||||
* B = Cbn * 2.017 + Y
|
||||
*/
|
||||
mul (8) null Cbn_01<8,8,1>F 2.017F { align1 };
|
||||
mac.sat (8) src_sample_b_01<1>F Yn_01<8,8,1>F 1F { align1 };
|
||||
mul (8) null Cbn_23<8,8,1>F 2.017F { align1 };
|
||||
mac.sat (8) src_sample_b_23<1>F Yn_23<8,8,1>F 1F { align1 };
|
||||
mov (16) acc0<1>F Yn<8,8,1>F { compr align1 };
|
||||
mac.sat(16) src_sample_b<1>F Cbn<8,8,1>F 2.017F { compr align1 };
|
||||
|
||||
/*
|
||||
* A = 1.0
|
||||
*/
|
||||
mov (8) src_sample_a_01<1>F 1.0F { align1 };
|
||||
mov (8) src_sample_a_23<1>F 1.0F { align1 };
|
||||
mov (16) src_sample_a<1>F 1.0F { compr align1 };
|
||||
|
|
|
|||
|
|
@ -2,19 +2,11 @@
|
|||
{ 0x00802041, 0x23007fbd, 0x008d0300, 0x3f94fdf4 },
|
||||
{ 0x00802040, 0x22c07fbd, 0x008d01c0, 0xbf008084 },
|
||||
{ 0x00802040, 0x23407fbd, 0x008d0240, 0xbf008084 },
|
||||
{ 0x00600041, 0x20007fbc, 0x008d02c0, 0x3fcc49ba },
|
||||
{ 0x80600048, 0x21c07fbd, 0x008d0300, 0x3f800000 },
|
||||
{ 0x00600041, 0x20007fbc, 0x008d02e0, 0x3fcc49ba },
|
||||
{ 0x80600048, 0x21e07fbd, 0x008d0320, 0x3f800000 },
|
||||
{ 0x00600041, 0x20007fbc, 0x008d02c0, 0xbf5020c5 },
|
||||
{ 0x00600048, 0x20007fbc, 0x008d0340, 0xbec8b439 },
|
||||
{ 0x80600048, 0x22007fbd, 0x008d0300, 0x3f800000 },
|
||||
{ 0x00600041, 0x20007fbc, 0x008d02e0, 0xbf5020c5 },
|
||||
{ 0x00600048, 0x20007fbc, 0x008d0360, 0xbec8b439 },
|
||||
{ 0x80600048, 0x22207fbd, 0x008d0320, 0x3f800000 },
|
||||
{ 0x00600041, 0x20007fbc, 0x008d0340, 0x40011687 },
|
||||
{ 0x80600048, 0x22407fbd, 0x008d0300, 0x3f800000 },
|
||||
{ 0x00600041, 0x20007fbc, 0x008d0360, 0x40011687 },
|
||||
{ 0x80600048, 0x22607fbd, 0x008d0320, 0x3f800000 },
|
||||
{ 0x00600001, 0x228003fd, 0x00000000, 0x3f800000 },
|
||||
{ 0x00600001, 0x22a003fd, 0x00000000, 0x3f800000 },
|
||||
{ 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 },
|
||||
{ 0x80802048, 0x21c07fbd, 0x008d02c0, 0x3fcc49ba },
|
||||
{ 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 },
|
||||
{ 0x00802048, 0x24007fbc, 0x008d02c0, 0xbf5020c5 },
|
||||
{ 0x80802048, 0x22007fbd, 0x008d0340, 0xbec8b439 },
|
||||
{ 0x00802001, 0x240003bc, 0x008d0300, 0x00000000 },
|
||||
{ 0x80802048, 0x22407fbd, 0x008d0340, 0x40011687 },
|
||||
{ 0x00802001, 0x228003fd, 0x00000000, 0x3f800000 },
|
||||
|
|
|
|||
|
|
@ -831,7 +831,6 @@ Bool i915_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMask,
|
|||
unsigned int gen4_render_state_size(ScrnInfoPtr pScrn);
|
||||
void gen4_render_state_init(ScrnInfoPtr pScrn);
|
||||
void gen4_render_state_cleanup(ScrnInfoPtr pScrn);
|
||||
void gen4_render_state_reset(ScrnInfoPtr pScrn);
|
||||
Bool i965_check_composite(int op, PicturePtr pSrc, PicturePtr pMask,
|
||||
PicturePtr pDst);
|
||||
Bool i965_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMask,
|
||||
|
|
|
|||
|
|
@ -205,9 +205,6 @@ I830Sync(ScrnInfoPtr pScrn)
|
|||
|
||||
pI830->LpRing->space = pI830->LpRing->mem->size - 8;
|
||||
pI830->nextColorExpandBuf = 0;
|
||||
|
||||
if (IS_I965G(pI830))
|
||||
gen4_render_state_reset(pScrn);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
559
src/i830_debug.c
559
src/i830_debug.c
|
|
@ -927,13 +927,544 @@ void i830DumpRegs (ScrnInfoPtr pScrn)
|
|||
|
||||
#ifndef REG_DUMPER
|
||||
|
||||
#define NUM_RING_DUMP 64
|
||||
static char *mi_cmds[0x40] = {
|
||||
"MI_NOOP", /* 00 */
|
||||
"Reserved 01",
|
||||
"MI_USER_INTERRUPT",
|
||||
"MI_WAIT_FOR_EVENT",
|
||||
|
||||
"MI_FLUSH", /* 04 */
|
||||
"MI_ARB_CHECK",
|
||||
NULL,
|
||||
"MI_REPORT_HEAD",
|
||||
|
||||
static void
|
||||
i830_dump_ring(ScrnInfoPtr pScrn)
|
||||
NULL, /* 08 */
|
||||
NULL,
|
||||
"MI_BATCH_BUFFER_END",
|
||||
NULL,
|
||||
|
||||
NULL, /* 0c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 10 */
|
||||
"MI_OVERLAY_FLIP",
|
||||
"MI_LOAD_SCAN_LINES_INCL",
|
||||
"MI_LOAD_SCAN_LINES_EXCL",
|
||||
|
||||
"MI_DISPLAY_BUFFER_INFO", /* 14 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
"MI_SET_CONTEXT", /* 18 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 1c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
"MI_STORE_DATA_IMM", /* 20 */
|
||||
"MI_STORE_DATA_INDEX",
|
||||
"MI_LOAD_REGISTER_IMM",
|
||||
NULL,
|
||||
|
||||
"MI_STORE_REGISTER_MEM", /* 24 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 28 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 2c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 30 */
|
||||
"MI_BATCH_BUFFER_START",
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 34 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 38 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 3c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static char *_2d_cmds[0x80] = {
|
||||
NULL, /* 00 */
|
||||
"XY_SETUP_BLT",
|
||||
NULL,
|
||||
"XY_SETUP_CLIP_BLT",
|
||||
|
||||
NULL, /* 04 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 08 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 0c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 10 */
|
||||
"XY_SETUP_MONO_PATTERN_SL_BLT",
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 14 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 18 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 1c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 20 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
"XY_PIXEL_BLT", /* 24 */
|
||||
"XY_SCANLINE_BLT",
|
||||
"XY_TEXT_BLT",
|
||||
NULL,
|
||||
|
||||
NULL, /* 28 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 2c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 30 */
|
||||
"XY_TEXT_IMMEDIATE_BLT",
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 34 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 38 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 3c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
"COLOR_BLT", /* 40 */
|
||||
NULL,
|
||||
NULL,
|
||||
"SRC_COPY_BLT",
|
||||
|
||||
NULL, /* 44 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 48 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 4c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
"XY_COLOR_BLT", /* 50 */
|
||||
"XY_PAT_BLT",
|
||||
"XY_MONO_PAT_BLT",
|
||||
"XY_SRC_COPY_BLT",
|
||||
|
||||
"XY_MONO_SRC_COPY_BLT", /* 54 */
|
||||
"XY_FULL_BLT",
|
||||
"XY_FULL_MONO_SRC_BLT",
|
||||
"XY_FULL_MONO_PATTERN_BLT",
|
||||
|
||||
"XY_FULL_MONO_PATTERN_MONO_SRC_BLT", /* 58 */
|
||||
"XY_MONO_PAT_FIXED_BLT",
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 5c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 60 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 64 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 68 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 6c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 70 */
|
||||
"XY_MONO_SRC_COPY_IMMEDIATE_BLT",
|
||||
"XY_PAT_BLT_IMMEDIATE",
|
||||
"XY_SRC_COPY_CHROMA_BLT",
|
||||
|
||||
"XY_FULL_IMMEDIATE_PATTERN_BLT", /* 74 */
|
||||
"XY_FULL_MONO_SRC_IMMEDIATE_PATTERN_BLT",
|
||||
"XY_PAT_CHROMA_BLT",
|
||||
"XY_PAT_CHROMA_BLT_IMMEDIATE",
|
||||
|
||||
NULL, /* 78 */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL, /* 7c */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
};
|
||||
|
||||
#define _3D_ONE_WORD 1
|
||||
|
||||
static struct {
|
||||
char *name;
|
||||
int flags;
|
||||
} _3d_cmds[0x4][0x8][0x100] = {
|
||||
{ /* Pipeline Type 00 (Common) */
|
||||
{ /* Opcode 0 */
|
||||
{ "URB_FENCE", 0 }, /* 00 */
|
||||
{ "CS_URB_STATE", 0 },
|
||||
{ "CONSTANT_BUFFER", 0 },
|
||||
{ "STATE_PREFETCH", 0 },
|
||||
},
|
||||
{ /* Opcode 1 */
|
||||
{ NULL, 0 }, /* 00 */
|
||||
{ "STATE_BASE_ADDRESS", 0 },
|
||||
{ "STATE_SIP", 0 },
|
||||
{ NULL, 0 },
|
||||
|
||||
{ "PIPELINE_SELECT", _3D_ONE_WORD }, /* 04 */
|
||||
},
|
||||
},
|
||||
{ /* Pipeline Type 01 (Single DW) */
|
||||
{ /* Opcode 0 */
|
||||
},
|
||||
{ /* Opcode 1 */
|
||||
{ NULL, 0 }, /* 00 */
|
||||
{ NULL, 0 },
|
||||
{ NULL, 0 },
|
||||
{ NULL, 0 },
|
||||
|
||||
{ "PIPELINE_SELECT", 0 }, /* 04 */
|
||||
{ NULL, 0 },
|
||||
{ NULL, 0 },
|
||||
{ NULL, 0 },
|
||||
},
|
||||
},
|
||||
{ /* Pipeline Type 02 (Media) */
|
||||
{ /* Opcode 0 */
|
||||
{ "MEDIA_STATE_POINTERS", 0 }, /* 00 */
|
||||
},
|
||||
{ /* Opcode 1 */
|
||||
{ "MEDIA_OBJECT", 0 }, /* 00 */
|
||||
{ "MEDIA_OBJECT_EX", 0 },
|
||||
{ "MEDIA_OBJECT_PTR", 0 },
|
||||
},
|
||||
},
|
||||
{ /* Pipeline Type 03 (3D) */
|
||||
{ /* Opcode 0 */
|
||||
{ "3DSTATE_PIPELINED_POINTERS", 0 }, /* 00 */
|
||||
{ "3DSTATE_BINDING_TABLE_POINTERS", 0 },
|
||||
{ NULL, 0 },
|
||||
{ NULL, 0 },
|
||||
|
||||
{ NULL, 0 }, /* 04 */
|
||||
{ "3DSTATE_URB", 0 },
|
||||
{ NULL, 0 },
|
||||
{ NULL, 0 },
|
||||
|
||||
{ "3DSTATE_VERTEX_BUFFERS", 0 }, /* 08 */
|
||||
{ "3DSTATE_VERTEX_ELEMENTS", 0 },
|
||||
{ "3DSTATE_INDEX_BUFFER", 0 },
|
||||
{ "3DSTATE_VF_STATISTICS", _3D_ONE_WORD },
|
||||
|
||||
{ NULL, 0 }, /* 0c */
|
||||
{ "3DSTATE_VIEWPORT_STATE_POINTERS", 0 },
|
||||
},
|
||||
{ /* Opcode 1 */
|
||||
{ "3DSTATE_DRAWING_RECTANGLE", 0 }, /* 00 */
|
||||
{ "3DSTATE_CONSTANT_COLOR", 0 },
|
||||
{ "3DSTATE_SAMPLER_PALETTE_LOAD0", 0 },
|
||||
{ NULL, 0 },
|
||||
|
||||
{ "3DSTATE_CHROMA_KEY", 0 }, /* 04 */
|
||||
{ "3DSTATE_DEPTH_BUFFER", 0 },
|
||||
{ "3DSTATE_POLY_STIPPLE_OFFSET", 0 },
|
||||
{ "3DSTATE_POLY_STIPPLE_PATTERN", 0 },
|
||||
|
||||
{ "3DSTATE_LINE_STIPPLE", 0 }, /* 08 */
|
||||
{ "3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP", 0 },
|
||||
},
|
||||
{ /* Opcode 2 */
|
||||
{ "PIPE_CONTROL", 0 }, /* 00 */
|
||||
},
|
||||
{ /* Opcode 3 */
|
||||
{ "3DPRIMITIVE", 0 }, /* 00 */
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static int
|
||||
i830_valid_command (uint32_t cmd)
|
||||
{
|
||||
uint32_t type = (cmd >> 29) & 0x7;
|
||||
uint32_t pipeline_type;
|
||||
uint32_t opcode;
|
||||
uint32_t subopcode;
|
||||
uint32_t count;
|
||||
|
||||
switch (type) {
|
||||
case 0: /* Memory Interface */
|
||||
opcode = (cmd >> 23) & 0x3f;
|
||||
if (opcode < 0x10)
|
||||
count = 1;
|
||||
else
|
||||
count = (cmd & 0x3f) + 2;
|
||||
if (opcode == 0x00 && cmd != 0x00000000)
|
||||
return -1;
|
||||
if (!mi_cmds[opcode])
|
||||
return -1;
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2: /* 2D */
|
||||
count = (cmd & 0x1f) + 2;
|
||||
opcode = (cmd >> 22) & 0x7f;
|
||||
if (!_2d_cmds[opcode])
|
||||
return -1;
|
||||
break;
|
||||
case 3: /* 3D */
|
||||
pipeline_type = (cmd >> 27) & 0x3;
|
||||
opcode = (cmd >> 24) & 0x7;
|
||||
subopcode = (cmd >> 16) & 0xff;
|
||||
if (_3d_cmds[pipeline_type][opcode][subopcode].flags & _3D_ONE_WORD)
|
||||
count = 1;
|
||||
else
|
||||
count = (cmd & 0xff) + 2;
|
||||
if (pipeline_type <= 3)
|
||||
return count;
|
||||
if (!_3d_cmds[pipeline_type][opcode][subopcode].name)
|
||||
return -1;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
static int
|
||||
i830_dump_cmd (uint32_t cmd, int count)
|
||||
{
|
||||
uint32_t type = (cmd >> 29) & 0x7;
|
||||
uint32_t pipeline_type;
|
||||
uint32_t opcode;
|
||||
uint32_t subopcode;
|
||||
int ret = 1;
|
||||
|
||||
ErrorF ("\t");
|
||||
switch (type) {
|
||||
case 0: /* Memory Interface */
|
||||
opcode = (cmd >> 23) & 0x3f;
|
||||
if (mi_cmds[opcode])
|
||||
ErrorF ("%-40.40s %d\n", mi_cmds[opcode], count);
|
||||
else
|
||||
ErrorF ("Memory Interface Reserved\n");
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2: /* 2D */
|
||||
opcode = (cmd >> 22) & 0x7f;
|
||||
if (_2d_cmds[opcode])
|
||||
ErrorF ("%-40.40s %d\n", _2d_cmds[opcode], count);
|
||||
else
|
||||
ErrorF ("2D Reserved\n");
|
||||
break;
|
||||
case 3: /* 3D */
|
||||
pipeline_type = (cmd >> 27) & 0x3;
|
||||
opcode = (cmd >> 24) & 0x7;
|
||||
subopcode = (cmd >> 16) & 0xff;
|
||||
if (_3d_cmds[pipeline_type][opcode][subopcode].name) {
|
||||
ErrorF ("%-40.40s %d\n",
|
||||
_3d_cmds[pipeline_type][opcode][subopcode].name,
|
||||
count);
|
||||
} else {
|
||||
ErrorF ("3D/Media Reserved (pipe %d op %d sub %d)\n", pipeline_type, opcode, subopcode);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ErrorF ("Reserved\n");
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
i830_valid_chain (ScrnInfoPtr pScrn, unsigned int ring, unsigned int end)
|
||||
{
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
unsigned int head, tail, ring, mask;
|
||||
unsigned int head, tail, mask;
|
||||
volatile unsigned char *virt;
|
||||
uint32_t data;
|
||||
int count;
|
||||
volatile uint32_t *ptr;
|
||||
|
||||
head = (INREG (LP_RING + RING_HEAD)) & I830_HEAD_MASK;
|
||||
tail = INREG (LP_RING + RING_TAIL) & I830_TAIL_MASK;
|
||||
mask = pI830->LpRing->tail_mask;
|
||||
|
||||
virt = pI830->LpRing->virtual_start;
|
||||
ErrorF ("Ring at virtual %p head 0x%x tail 0x%x count %d\n",
|
||||
virt, head, tail, (((tail + mask + 1) - head) & mask) >> 2);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
ptr = (volatile uint32_t *) (virt + ring);
|
||||
data = *ptr;
|
||||
count = i830_valid_command (data);
|
||||
if (count < 0)
|
||||
return 0;
|
||||
while (count > 0 && ring != end)
|
||||
{
|
||||
ring = (ring + 4) & mask;
|
||||
count--;
|
||||
}
|
||||
if (ring == end) {
|
||||
if (count == 0)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
i830_dump_cmds (ScrnInfoPtr pScrn,
|
||||
volatile unsigned char *virt,
|
||||
uint32_t start,
|
||||
uint32_t stop,
|
||||
uint32_t mask,
|
||||
uint32_t acthd)
|
||||
{
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
uint32_t ring = start;
|
||||
uint32_t cmd = start;
|
||||
uint32_t data;
|
||||
uint32_t batch_start_mask = ((0x7 << 29) |
|
||||
(0x3f << 23) |
|
||||
(0x7ff << 12) |
|
||||
(1 << 11) |
|
||||
(1 << 7) |
|
||||
(1 << 6) |
|
||||
(0x3f << 0));
|
||||
uint32_t batch_start_cmd = ((0x0 << 29) |
|
||||
(0x31 << 23) |
|
||||
(0x00 << 12) |
|
||||
(0 << 11) |
|
||||
(1 << 7) |
|
||||
(0 << 6) |
|
||||
(0 << 0));
|
||||
int count;
|
||||
volatile uint32_t *ptr;
|
||||
|
||||
while (ring != stop)
|
||||
{
|
||||
if (ring == acthd)
|
||||
ErrorF ("****");
|
||||
ErrorF ("\t%08x: %08x", ring, *(volatile unsigned int *) (virt + ring));
|
||||
if (ring == cmd)
|
||||
{
|
||||
ptr = (volatile uint32_t *) (virt + ring);
|
||||
data = *ptr;
|
||||
count = i830_valid_command (data);
|
||||
i830_dump_cmd (data, count);
|
||||
|
||||
/* check for MI_BATCH_BUFFER_END */
|
||||
if (data == (0x0a << 23))
|
||||
stop = (ring + 4) & mask;
|
||||
/* check for MI_BATCH_BUFFER_START */
|
||||
if ((data & batch_start_mask) == batch_start_cmd)
|
||||
{
|
||||
uint32_t batch = ptr[1];
|
||||
if (batch < pI830->FbMapSize) {
|
||||
ErrorF ("\t%08x: %08x\n", (ring + 4) & mask, batch);
|
||||
ErrorF ("Batch buffer at 0x%08x {\n", batch);
|
||||
i830_dump_cmds (pScrn, pI830->FbBase, batch,
|
||||
pI830->FbMapSize - batch,
|
||||
0xffffffff, acthd);
|
||||
ErrorF ("}\n");
|
||||
ring = (ring + (count - 1) * 4) & mask;
|
||||
}
|
||||
}
|
||||
cmd = (cmd + count * 4) & mask;
|
||||
} else
|
||||
ErrorF ("\n");
|
||||
ring = (ring + 4) & mask;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
i830_dump_ring(ScrnInfoPtr pScrn, uint32_t acthd)
|
||||
{
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
unsigned int head, tail, mask, cmd;
|
||||
volatile unsigned char *virt;
|
||||
|
||||
head = (INREG (LP_RING + RING_HEAD)) & I830_HEAD_MASK;
|
||||
|
|
@ -943,11 +1474,18 @@ i830_dump_ring(ScrnInfoPtr pScrn)
|
|||
virt = pI830->LpRing->virtual_start;
|
||||
ErrorF ("Ring at virtual %p head 0x%x tail 0x%x count %d\n",
|
||||
virt, head, tail, (((tail + mask + 1) - head) & mask) >> 2);
|
||||
for (ring = (head - 128) & mask; ring != ((head + 4) & mask);
|
||||
ring = (ring + 4) & mask)
|
||||
|
||||
/* walk back by instructions */
|
||||
for (cmd = (head - 256) & mask;
|
||||
cmd != (head & mask);
|
||||
cmd = (cmd + 4) & mask)
|
||||
{
|
||||
ErrorF ("\t%08x: %08x\n", ring, *(volatile unsigned int *) (virt + ring));
|
||||
if (i830_valid_chain (pScrn, cmd, (head & mask)))
|
||||
break;
|
||||
}
|
||||
|
||||
i830_dump_cmds (pScrn, virt, cmd, head, mask, acthd);
|
||||
|
||||
ErrorF ("Ring end\n");
|
||||
}
|
||||
|
||||
|
|
@ -980,13 +1518,14 @@ i830_dump_error_state(ScrnInfoPtr pScrn)
|
|||
|
||||
ErrorF("hwstam: 0x%04x ier: 0x%04x imr: 0x%04x iir: 0x%04x\n",
|
||||
INREG16(HWSTAM), INREG16(IER), INREG16(IMR), INREG16(IIR));
|
||||
i830_dump_ring (pScrn);
|
||||
i830_dump_ring (pScrn, 0);
|
||||
}
|
||||
|
||||
void
|
||||
i965_dump_error_state(ScrnInfoPtr pScrn)
|
||||
{
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
uint32_t acthd;
|
||||
|
||||
ErrorF("pgetbl_ctl: 0x%08x pgetbl_err: 0x%08x\n",
|
||||
INREG(PGETBL_CTL), INREG(PGE_ERR));
|
||||
|
|
@ -1016,8 +1555,9 @@ i965_dump_error_state(ScrnInfoPtr pScrn)
|
|||
"imr: 0x%08x iir: 0x%08x\n",
|
||||
INREG(HWSTAM), INREG(IER), INREG(IMR), INREG(IIR));
|
||||
|
||||
acthd = INREG(ACTHD);
|
||||
ErrorF("acthd: 0x%08x dma_fadd_p: 0x%08x\n",
|
||||
INREG(ACTHD), INREG(DMA_FADD_P));
|
||||
acthd, INREG(DMA_FADD_P));
|
||||
ErrorF("ecoskpd: 0x%08x excc: 0x%08x\n",
|
||||
INREG(ECOSKPD), INREG(EXCC));
|
||||
|
||||
|
|
@ -1062,6 +1602,7 @@ i965_dump_error_state(ScrnInfoPtr pScrn)
|
|||
INREG(TS_DEBUG_DATA));
|
||||
ErrorF("TD_CTL 0x%08x / 0x%08x\n",
|
||||
INREG(TD_CTL), INREG(TD_CTL2));
|
||||
i830_dump_ring (pScrn, acthd);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1718,8 +1718,10 @@ i830_crtc_clock_get(ScrnInfoPtr pScrn, xf86CrtcPtr crtc)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* XXX: Handle the 100Mhz refclk */
|
||||
i9xx_clock(96000, &clock);
|
||||
if ((dpll & PLL_REF_INPUT_MASK) == PLLB_REF_INPUT_SPREADSPECTRUMIN)
|
||||
i9xx_clock(100000, &clock);
|
||||
else
|
||||
i9xx_clock(96000, &clock);
|
||||
} else {
|
||||
Bool is_lvds = (pipe == 1) && (INREG(LVDS) & LVDS_PORT_EN);
|
||||
|
||||
|
|
|
|||
|
|
@ -197,6 +197,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "i830_debug.h"
|
||||
#include "i830_bios.h"
|
||||
#include "i830_video.h"
|
||||
#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#ifdef INTEL_XVMC
|
||||
#define _INTEL_XVMC_SERVER_
|
||||
|
|
@ -685,6 +688,13 @@ I830MapMem(ScrnInfoPtr pScrn)
|
|||
err = pci_device_map_range (device, pI830->LinearAddr, pI830->FbMapSize,
|
||||
PCI_DEV_MAP_FLAG_WRITABLE | PCI_DEV_MAP_FLAG_WRITE_COMBINE,
|
||||
(void **) &pI830->FbBase);
|
||||
if (err)
|
||||
return FALSE;
|
||||
/* KLUDGE ALERT -- rewrite the PTEs to turn off the CD and WT bits */
|
||||
#if HAVE_MPROTECT
|
||||
mprotect (pI830->FbBase, pI830->FbMapSize, PROT_NONE);
|
||||
mprotect (pI830->FbBase, pI830->FbMapSize, PROT_READ|PROT_WRITE);
|
||||
#endif
|
||||
#else
|
||||
pI830->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
|
||||
pI830->PciTag,
|
||||
|
|
@ -3112,7 +3122,7 @@ I830FreeScreen(int scrnIndex, int flags)
|
|||
#ifdef INTEL_XVMC
|
||||
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
if (pI830->XvMCEnabled)
|
||||
if (pI830 && pI830->XvMCEnabled)
|
||||
intel_xvmc_finish(xf86Screens[scrnIndex]);
|
||||
#endif
|
||||
I830FreeRec(xf86Screens[scrnIndex]);
|
||||
|
|
@ -3126,7 +3136,9 @@ I830LeaveVT(int scrnIndex, int flags)
|
|||
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
|
||||
I830Ptr pI830 = I830PTR(pScrn);
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
|
||||
#ifndef HAVE_FREE_SHADOW
|
||||
int o;
|
||||
#endif
|
||||
|
||||
DPRINTF(PFX, "Leave VT\n");
|
||||
|
||||
|
|
@ -3154,6 +3166,7 @@ I830LeaveVT(int scrnIndex, int flags)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FREE_SHADOW
|
||||
for (o = 0; o < config->num_crtc; o++) {
|
||||
xf86CrtcPtr crtc = config->crtc[o];
|
||||
|
||||
|
|
@ -3164,6 +3177,9 @@ I830LeaveVT(int scrnIndex, int flags)
|
|||
crtc->rotatedData = NULL;
|
||||
}
|
||||
}
|
||||
#else
|
||||
xf86RotateFreeShadow(pScrn);
|
||||
#endif
|
||||
|
||||
xf86_hide_cursors (pScrn);
|
||||
|
||||
|
|
|
|||
|
|
@ -1366,9 +1366,10 @@ i830_lvds_init(ScrnInfoPtr pScrn)
|
|||
|
||||
/*
|
||||
* Default to filling the whole screen if the mode is less than the
|
||||
* native size, without breaking aspect ratio.
|
||||
* native size. (Change default to origin FULL mode, i8xx can only work
|
||||
* in that mode for now.)
|
||||
*/
|
||||
dev_priv->fitting_mode = FULL_ASPECT;
|
||||
dev_priv->fitting_mode = FULL;
|
||||
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -2060,6 +2060,9 @@ i830_display_video(ScrnInfoPtr pScrn, xf86CrtcPtr crtc,
|
|||
switch (id) {
|
||||
case FOURCC_YV12:
|
||||
case FOURCC_I420:
|
||||
#ifdef INTEL_XVMC
|
||||
case FOURCC_XVMC:
|
||||
#endif
|
||||
OVERLAY_DEBUG("YUV420\n");
|
||||
#if 0
|
||||
/* set UV vertical phase to -0.25 */
|
||||
|
|
@ -2074,7 +2077,6 @@ i830_display_video(ScrnInfoPtr pScrn, xf86CrtcPtr crtc,
|
|||
break;
|
||||
case FOURCC_UYVY:
|
||||
case FOURCC_YUY2:
|
||||
default:
|
||||
OVERLAY_DEBUG("YUV422\n");
|
||||
overlay->OSTRIDE = dstPitch;
|
||||
OCMD &= ~SOURCE_FORMAT;
|
||||
|
|
@ -2315,6 +2317,9 @@ I830PutImage(ScrnInfoPtr pScrn,
|
|||
switch (destId) {
|
||||
case FOURCC_YV12:
|
||||
case FOURCC_I420:
|
||||
#ifdef INTEL_XVMC
|
||||
case FOURCC_XVMC:
|
||||
#endif
|
||||
if (pPriv->rotation & (RR_Rotate_90 | RR_Rotate_270)) {
|
||||
dstPitch = ((height / 2) + pitchAlignMask) & ~pitchAlignMask;
|
||||
size = dstPitch * width * 3;
|
||||
|
|
@ -2325,7 +2330,7 @@ I830PutImage(ScrnInfoPtr pScrn,
|
|||
break;
|
||||
case FOURCC_UYVY:
|
||||
case FOURCC_YUY2:
|
||||
default:
|
||||
|
||||
if (pPriv->rotation & (RR_Rotate_90 | RR_Rotate_270)) {
|
||||
dstPitch = ((height << 1) + pitchAlignMask) & ~pitchAlignMask;
|
||||
size = dstPitch * width;
|
||||
|
|
@ -2334,6 +2339,10 @@ I830PutImage(ScrnInfoPtr pScrn,
|
|||
size = dstPitch * height;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
dstPitch = 0;
|
||||
size = 0;
|
||||
break;
|
||||
}
|
||||
#if 0
|
||||
ErrorF("srcPitch: %d, dstPitch: %d, size: %d\n", srcPitch, dstPitch, size);
|
||||
|
|
@ -2413,11 +2422,16 @@ I830PutImage(ScrnInfoPtr pScrn,
|
|||
break;
|
||||
case FOURCC_UYVY:
|
||||
case FOURCC_YUY2:
|
||||
default:
|
||||
nlines = ((y2 + 0xffff) >> 16) - top;
|
||||
I830CopyPackedData(pScrn, pPriv, buf, srcPitch, dstPitch, top, left,
|
||||
nlines, npixels);
|
||||
break;
|
||||
#ifdef INTEL_XVMC
|
||||
case FOURCC_XVMC:
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (pDraw->type == DRAWABLE_WINDOW) {
|
||||
|
|
@ -2427,13 +2441,13 @@ I830PutImage(ScrnInfoPtr pScrn,
|
|||
}
|
||||
|
||||
#ifdef I830_USE_EXA
|
||||
if (pI830->useEXA) {
|
||||
if (pPriv->textured && pI830->useEXA) {
|
||||
/* Force the pixmap into framebuffer so we can draw to it. */
|
||||
exaMoveInPixmap(pPixmap);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!pI830->useEXA &&
|
||||
if (pPriv->textured && !pI830->useEXA &&
|
||||
(((char *)pPixmap->devPrivate.ptr < (char *)pI830->FbBase) ||
|
||||
((char *)pPixmap->devPrivate.ptr >= (char *)pI830->FbBase +
|
||||
pI830->FbMapSize))) {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -171,8 +171,8 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
|
|||
int urb_sf_start, urb_sf_size;
|
||||
int urb_cs_start, urb_cs_size;
|
||||
struct brw_surface_state *dest_surf_state;
|
||||
struct brw_surface_state *src_surf_state[3];
|
||||
struct brw_sampler_state *src_sampler_state[3];
|
||||
struct brw_surface_state *src_surf_state[6];
|
||||
struct brw_sampler_state *src_sampler_state[6];
|
||||
struct brw_vs_unit_state *vs_state;
|
||||
struct brw_sf_unit_state *sf_state;
|
||||
struct brw_wm_unit_state *wm_state;
|
||||
|
|
@ -185,7 +185,7 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
|
|||
float src_scale_x, src_scale_y;
|
||||
uint32_t *binding_table;
|
||||
Bool first_output = TRUE;
|
||||
int dest_surf_offset, src_surf_offset[3], src_sampler_offset[3], vs_offset;
|
||||
int dest_surf_offset, src_surf_offset[6], src_sampler_offset[6], vs_offset;
|
||||
int sf_offset, wm_offset, cc_offset, vb_offset, cc_viewport_offset;
|
||||
int wm_scratch_offset;
|
||||
int sf_kernel_offset, ps_kernel_offset, sip_kernel_offset;
|
||||
|
|
@ -197,10 +197,10 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
|
|||
int src_surf;
|
||||
int n_src_surf;
|
||||
uint32_t src_surf_format;
|
||||
uint32_t src_surf_base[3];
|
||||
int src_width[3];
|
||||
int src_height[3];
|
||||
int src_pitch[3];
|
||||
uint32_t src_surf_base[6];
|
||||
int src_width[6];
|
||||
int src_height[6];
|
||||
int src_pitch[6];
|
||||
int wm_binding_table_entries;
|
||||
const uint32_t *ps_kernel_static;
|
||||
int ps_kernel_static_size;
|
||||
|
|
@ -219,8 +219,11 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
|
|||
#endif
|
||||
|
||||
src_surf_base[0] = pPriv->YBuf0offset;
|
||||
src_surf_base[1] = pPriv->VBuf0offset;
|
||||
src_surf_base[2] = pPriv->UBuf0offset;
|
||||
src_surf_base[1] = pPriv->YBuf0offset;
|
||||
src_surf_base[2] = pPriv->VBuf0offset;
|
||||
src_surf_base[3] = pPriv->VBuf0offset;
|
||||
src_surf_base[4] = pPriv->UBuf0offset;
|
||||
src_surf_base[5] = pPriv->UBuf0offset;
|
||||
#if 0
|
||||
ErrorF ("base 0 0x%x base 1 0x%x base 2 0x%x\n",
|
||||
src_surf_base[0], src_surf_base[1], src_surf_base[2]);
|
||||
|
|
@ -250,13 +253,13 @@ I965DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
|
|||
src_surf_format = BRW_SURFACEFORMAT_R8_UNORM;
|
||||
ps_kernel_static = &ps_kernel_planar_static[0][0];
|
||||
ps_kernel_static_size = sizeof (ps_kernel_planar_static);
|
||||
src_width[0] = width;
|
||||
src_height[0] = height;
|
||||
src_pitch[0] = video_pitch * 2;
|
||||
src_width[1] = src_width[2] = width / 2;
|
||||
src_height[1] = src_height[2] = height / 2;
|
||||
src_pitch[1] = src_pitch[2] = video_pitch;
|
||||
n_src_surf = 3;
|
||||
src_width[1] = src_width[0] = width;
|
||||
src_width[1] = src_height[0] = height;
|
||||
src_pitch[1] = src_pitch[0] = video_pitch * 2;
|
||||
src_width[4] = src_width[5] = src_width[2] = src_width[3] = width / 2;
|
||||
src_height[4] = src_height[5] = src_height[2] = src_height[3] = height / 2;
|
||||
src_pitch[4] = src_pitch[5] = src_pitch[2] = src_pitch[3] = video_pitch;
|
||||
n_src_surf = 6;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue