Fri Sep 2 21:24:49 2016 UTC ()
move ffb_fastfill_parms to ffb_accel_common.c so the EXA code can work
without XAA


(macallan)
diff -r1.6 -r1.7 xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_accel.c
diff -r1.3 -r1.4 xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_accel_common.c

cvs diff -r1.6 -r1.7 xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_accel.c (expand / switch to unified diff)

--- xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_accel.c 2016/08/19 19:16:01 1.6
+++ xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_accel.c 2016/09/02 21:24:49 1.7
@@ -37,34 +37,26 @@ @@ -37,34 +37,26 @@
37 37
38#include "scrnintstr.h" 38#include "scrnintstr.h"
39#include "pixmapstr.h" 39#include "pixmapstr.h"
40#include "regionstr.h" 40#include "regionstr.h"
41#include "mistruct.h" 41#include "mistruct.h"
42#include "miline.h" 42#include "miline.h"
43#include "fb.h" 43#include "fb.h"
44 44
45#ifdef HAVE_XAA_H 45#ifdef HAVE_XAA_H
46/* VISmoveImage.s */ 46/* VISmoveImage.s */
47extern void VISmoveImageRL(unsigned char *src, unsigned char *dst, long w, long h, long skind, long dkind); 47extern void VISmoveImageRL(unsigned char *src, unsigned char *dst, long w, long h, long skind, long dkind);
48extern void VISmoveImageLR(unsigned char *src, unsigned char *dst, long w, long h, long skind, long dkind); 48extern void VISmoveImageLR(unsigned char *src, unsigned char *dst, long w, long h, long skind, long dkind);
49 49
50/* Indexed by ffb resolution enum. */ 
51struct fastfill_parms ffb_fastfill_parms[] = { 
52 /* fsmall, psmall, ffh, ffw, pfh, pfw */ 
53 { 0x00c0, 0x1400, 0x04, 0x08, 0x10, 0x50 }, /* Standard: 1280 x 1024 */ 
54 { 0x0140, 0x2800, 0x04, 0x10, 0x10, 0xa0 }, /* High: 1920 x 1360 */ 
55 { 0x0080, 0x0a00, 0x02, 0x08, 0x08, 0x50 }, /* Stereo: 960 x 580 */ 
56/*XXX*/ { 0x00c0, 0x0a00, 0x04, 0x08, 0x08, 0x50 }, /* Portrait: 1280 x 2048 XXX */ 
57}; 
58 50
59void 51void
60CreatorVtChange (ScreenPtr pScreen, int enter) 52CreatorVtChange (ScreenPtr pScreen, int enter)
61{ 53{
62 ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); 54 ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
63 FFBPtr pFfb = GET_FFB_FROM_SCRN (pScrn); 55 FFBPtr pFfb = GET_FFB_FROM_SCRN (pScrn);
64 ffb_fbcPtr ffb = pFfb->regs; 56 ffb_fbcPtr ffb = pFfb->regs;
65 57
66 pFfb->rp_active = 1; 58 pFfb->rp_active = 1;
67 FFBWait(pFfb, ffb);  59 FFBWait(pFfb, ffb);
68 pFfb->fifo_cache = -1; 60 pFfb->fifo_cache = -1;
69 pFfb->fbc_cache = (FFB_FBC_WB_A | FFB_FBC_WM_COMBINED | 61 pFfb->fbc_cache = (FFB_FBC_WB_A | FFB_FBC_WM_COMBINED |
70 FFB_FBC_RB_A | FFB_FBC_SB_BOTH| FFB_FBC_XE_OFF | 62 FFB_FBC_RB_A | FFB_FBC_SB_BOTH| FFB_FBC_XE_OFF |

cvs diff -r1.3 -r1.4 xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_accel_common.c (expand / switch to unified diff)

--- xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_accel_common.c 2016/08/22 08:28:32 1.3
+++ xsrc/external/mit/xf86-video-sunffb/dist/src/ffb_accel_common.c 2016/09/02 21:24:49 1.4
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ffb_accel_common.c,v 1.3 2016/08/22 08:28:32 mrg Exp $ */ 1/* $NetBSD: ffb_accel_common.c,v 1.4 2016/09/02 21:24:49 macallan Exp $ */
2/* 2/*
3 * Copyright (C) 1998,1999,2000 Jakub Jelinek (jakub@redhat.com) 3 * Copyright (C) 1998,1999,2000 Jakub Jelinek (jakub@redhat.com)
4 * Copyright (C) 1998 Michal Rehacek (majkl@iname.com) 4 * Copyright (C) 1998 Michal Rehacek (majkl@iname.com)
5 * Copyright (C) 1999,2000 David S. Miller (davem@redhat.com) 5 * Copyright (C) 1999,2000 David S. Miller (davem@redhat.com)
6 * Copyright (C) 2015 Michael Lorenz (macallan@netbsd.org) 6 * Copyright (C) 2015 Michael Lorenz (macallan@netbsd.org)
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal 9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights 10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is 12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions: 13 * furnished to do so, subject to the following conditions:
14 * 14 *
@@ -33,26 +33,35 @@ @@ -33,26 +33,35 @@
33#endif 33#endif
34 34
35#include "ffb_fifo.h" 35#include "ffb_fifo.h"
36#include "ffb_rcache.h" 36#include "ffb_rcache.h"
37#include "ffb.h" 37#include "ffb.h"
38#include "ffb_regs.h" 38#include "ffb_regs.h"
39 39
40/* all driver need this */ 40/* all driver need this */
41#include "xf86.h" 41#include "xf86.h"
42#include "xf86_OSproc.h" 42#include "xf86_OSproc.h"
43#include "compiler.h" 43#include "compiler.h"
44#include "exa.h" 44#include "exa.h"
45 45
 46/* Indexed by ffb resolution enum. */
 47struct fastfill_parms ffb_fastfill_parms[] = {
 48 /* fsmall, psmall, ffh, ffw, pfh, pfw */
 49 { 0x00c0, 0x1400, 0x04, 0x08, 0x10, 0x50 }, /* Standard: 1280 x 1024 */
 50 { 0x0140, 0x2800, 0x04, 0x10, 0x10, 0xa0 }, /* High: 1920 x 1360 */
 51 { 0x0080, 0x0a00, 0x02, 0x08, 0x08, 0x50 }, /* Stereo: 960 x 580 */
 52/*XXX*/ { 0x00c0, 0x0a00, 0x04, 0x08, 0x08, 0x50 }, /* Portrait: 1280 x 2048 XXX */
 53};
 54
46void FFB_SetupTextureAttrs(FFBPtr pFfb) 55void FFB_SetupTextureAttrs(FFBPtr pFfb)
47{ 56{
48 ffb_fbcPtr ffb = pFfb->regs; 57 ffb_fbcPtr ffb = pFfb->regs;
49 unsigned int ppc = FFB_PPC_APE_DISABLE | FFB_PPC_CS_VAR | FFB_PPC_XS_VAR; 58 unsigned int ppc = FFB_PPC_APE_DISABLE | FFB_PPC_CS_VAR | FFB_PPC_XS_VAR;
50 unsigned int ppc_mask = FFB_PPC_APE_MASK | FFB_PPC_CS_MASK | FFB_PPC_XS_MASK; 59 unsigned int ppc_mask = FFB_PPC_APE_MASK | FFB_PPC_CS_MASK | FFB_PPC_XS_MASK;
51 unsigned int rop = FFB_ROP_NEW | (FFB_ROP_NEW << 8); 60 unsigned int rop = FFB_ROP_NEW | (FFB_ROP_NEW << 8);
52 unsigned int fbc = pFfb->fbc; 61 unsigned int fbc = pFfb->fbc;
53 unsigned int wid = pFfb->wid; 62 unsigned int wid = pFfb->wid;
54 63
55 ppc |= FFB_PPC_ABE_ENABLE; 64 ppc |= FFB_PPC_ABE_ENABLE;
56 ppc_mask |= FFB_PPC_ABE_MASK; 65 ppc_mask |= FFB_PPC_ABE_MASK;
57 66
58 if ((pFfb->ppc_cache & ppc_mask) != ppc || 67 if ((pFfb->ppc_cache & ppc_mask) != ppc ||