Gentoo Archives: gentoo-commits

From: "Remi Cardona (remi)" <remi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-drivers/xf86-video-i810/files: xf86-video-i810-2.2.99.903-fix-panel-resize-on-i8xx.patch
Date: Fri, 18 Apr 2008 17:28:20
Message-Id: E1JmuNm-0007iZ-8W@stork.gentoo.org
1 remi 08/04/18 17:28:18
2
3 Added:
4 xf86-video-i810-2.2.99.903-fix-panel-resize-on-i8xx.patch
5 Log:
6 x11-drivers/xf86-video-i810: Add patches to fix non-native resolution on i8xx-attached LFP displays
7 (Portage version: 2.1.5_rc4)
8
9 Revision Changes Path
10 1.1 x11-drivers/xf86-video-i810/files/xf86-video-i810-2.2.99.903-fix-panel-resize-on-i8xx.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/xf86-video-i810/files/xf86-video-i810-2.2.99.903-fix-panel-resize-on-i8xx.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/xf86-video-i810/files/xf86-video-i810-2.2.99.903-fix-panel-resize-on-i8xx.patch?rev=1.1&content-type=text/plain
14
15 Index: xf86-video-i810-2.2.99.903-fix-panel-resize-on-i8xx.patch
16 ===================================================================
17 diff --git a/src/i830.h b/src/i830.h
18 index 834e4dc..e2c39cc 100644
19 --- a/src/i830.h
20 +++ b/src/i830.h
21 @@ -857,6 +857,17 @@ static inline int i830_fb_compression_supported(I830Ptr pI830)
22
23 Bool i830_pixmap_tiled(PixmapPtr p);
24
25 +#define i830_exa_check_pitch_2d(p) do {\
26 + uint32_t pitch = intel_get_pixmap_pitch(p);\
27 + if (pitch > KB(32)) return FALSE;\
28 +} while(0)
29 +
30 +/* For pre-965 chip only, as they have 8KB limit for 3D */
31 +#define i830_exa_check_pitch_3d(p) do {\
32 + uint32_t pitch = intel_get_pixmap_pitch(p);\
33 + if (pitch > KB(8)) return FALSE;\
34 +} while(0)
35 +
36 /* Batchbuffer compatibility handling */
37 #define BEGIN_BATCH(n) BEGIN_LP_RING(n)
38 #define ENSURE_BATCH(n)
39 diff --git a/src/i830_driver.c b/src/i830_driver.c
40 index 155e7a9..41c0578 100644
41 --- a/src/i830_driver.c
42 +++ b/src/i830_driver.c
43 @@ -3108,7 +3108,7 @@ I830FreeScreen(int scrnIndex, int flags)
44 #ifdef INTEL_XVMC
45 ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
46 I830Ptr pI830 = I830PTR(pScrn);
47 - if (pI830->XvMCEnabled)
48 + if (pI830 && pI830->XvMCEnabled)
49 intel_xvmc_finish(xf86Screens[scrnIndex]);
50 #endif
51 I830FreeRec(xf86Screens[scrnIndex]);
52 diff --git a/src/i830_exa.c b/src/i830_exa.c
53 index 9b5bb93..2c807c5 100644
54 --- a/src/i830_exa.c
55 +++ b/src/i830_exa.c
56 @@ -170,6 +170,8 @@ I830EXAPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg)
57 if (pPixmap->drawable.bitsPerPixel == 24)
58 I830FALLBACK("solid 24bpp unsupported!\n");
59
60 + i830_exa_check_pitch_2d(pPixmap);
61 +
62 offset = exaGetPixmapOffset(pPixmap);
63 pitch = exaGetPixmapPitch(pPixmap);
64
65 @@ -255,6 +257,9 @@ I830EXAPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
66 if (!EXA_PM_IS_SOLID(&pSrcPixmap->drawable, planemask))
67 I830FALLBACK("planemask is not solid");
68
69 + i830_exa_check_pitch_2d(pSrcPixmap);
70 + i830_exa_check_pitch_2d(pDstPixmap);
71 +
72 pI830->pSrcPixmap = pSrcPixmap;
73
74 pI830->BR[13] = I830CopyROP[alu] << 16;
75 diff --git a/src/i830_lvds.c b/src/i830_lvds.c
76 index a5004b4..1562c21 100644
77 --- a/src/i830_lvds.c
78 +++ b/src/i830_lvds.c
79 @@ -1366,9 +1366,10 @@ i830_lvds_init(ScrnInfoPtr pScrn)
80
81 /*
82 * Default to filling the whole screen if the mode is less than the
83 - * native size, without breaking aspect ratio.
84 + * native size. (Change default to origin FULL mode, i8xx can only work
85 + * in that mode for now.)
86 */
87 - dev_priv->fitting_mode = FULL_ASPECT;
88 + dev_priv->fitting_mode = FULL;
89
90 return;
91
92 diff --git a/src/i830_render.c b/src/i830_render.c
93 index 195e9a8..3a959e8 100644
94 --- a/src/i830_render.c
95 +++ b/src/i830_render.c
96 @@ -398,6 +398,11 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture,
97 Bool is_affine_src, is_affine_mask;
98 Bool is_nearest = FALSE;
99
100 + i830_exa_check_pitch_3d(pSrc);
101 + if (pMask)
102 + i830_exa_check_pitch_3d(pMask);
103 + i830_exa_check_pitch_3d(pDst);
104 +
105 IntelEmitInvarientState(pScrn);
106 *pI830->last_3d = LAST_3D_RENDER;
107
108 diff --git a/src/i915_render.c b/src/i915_render.c
109 index 2b9ed04..4a02cf5 100644
110 --- a/src/i915_render.c
111 +++ b/src/i915_render.c
112 @@ -323,6 +323,11 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture,
113 Bool is_affine_src, is_affine_mask;
114 Bool is_nearest = FALSE;
115
116 + i830_exa_check_pitch_3d(pSrc);
117 + if (pMask)
118 + i830_exa_check_pitch_3d(pMask);
119 + i830_exa_check_pitch_3d(pDst);
120 +
121 IntelEmitInvarientState(pScrn);
122 *pI830->last_3d = LAST_3D_RENDER;
123
124
125
126
127 --
128 gentoo-commits@l.g.o mailing list