Tue Jan 24 15:47:02 2017 UTC ()
fix compilation.


(christos)
diff -r1.1 -r1.2 xsrc/external/mit/xf86-video-chips/dist/src/ct_exa.c

cvs diff -r1.1 -r1.2 xsrc/external/mit/xf86-video-chips/dist/src/ct_exa.c (expand / switch to unified diff)

--- xsrc/external/mit/xf86-video-chips/dist/src/ct_exa.c 2017/01/07 16:07:07 1.1
+++ xsrc/external/mit/xf86-video-chips/dist/src/ct_exa.c 2017/01/24 15:47:01 1.2
@@ -11,27 +11,27 @@ @@ -11,27 +11,27 @@
11 * furnished to do so, subject to the following conditions: 11 * furnished to do so, subject to the following conditions:
12 * 12 *
13 * The above copyright notice and this permission notice shall be included in 13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software. 14 * all copies or substantial portions of the Software.
15 * 15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * MICHAEL LORENZ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 * MICHAEL LORENZ BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */ 22 */
23 23
24/* $NetBSD: ct_exa.c,v 1.1 2017/01/07 16:07:07 macallan Exp $ */ 24/* $NetBSD: ct_exa.c,v 1.2 2017/01/24 15:47:01 christos Exp $ */
25 25
26#include <sys/types.h> 26#include <sys/types.h>
27 27
28#ifdef HAVE_CONFIG_H 28#ifdef HAVE_CONFIG_H
29#include "config.h" 29#include "config.h"
30#endif 30#endif
31 31
32/* All drivers should typically include these */ 32/* All drivers should typically include these */
33#include "xf86.h" 33#include "xf86.h"
34#include "xf86_OSproc.h" 34#include "xf86_OSproc.h"
35 35
36/* Everything using inb/outb, etc needs "compiler.h" */ 36/* Everything using inb/outb, etc needs "compiler.h" */
37#include "compiler.h" 37#include "compiler.h"
@@ -182,27 +182,27 @@ ctSolid( @@ -182,27 +182,27 @@ ctSolid(
182 ctSETHEIGHTWIDTHGO(y2 - y1, (x2 - x1) * cAcl->BytesPerPixel); 182 ctSETHEIGHTWIDTHGO(y2 - y1, (x2 - x1) * cAcl->BytesPerPixel);
183 LEAVE; 183 LEAVE;
184} 184}
185 185
186/* 186/*
187 * Memcpy-based UTS. 187 * Memcpy-based UTS.
188 */ 188 */
189static Bool 189static Bool
190ctUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, 190ctUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h,
191 char *src, int src_pitch) 191 char *src, int src_pitch)
192{ 192{
193 ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; 193 ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
194 CHIPSPtr cPtr = CHIPSPTR(pScrn); 194 CHIPSPtr cPtr = CHIPSPTR(pScrn);
195 char *dst = cPtr->FbBase + exaGetPixmapOffset(pDst); 195 unsigned char *dst = cPtr->FbBase + exaGetPixmapOffset(pDst);
196 int dst_pitch = exaGetPixmapPitch(pDst); 196 int dst_pitch = exaGetPixmapPitch(pDst);
197 197
198 int bpp = pDst->drawable.bitsPerPixel; 198 int bpp = pDst->drawable.bitsPerPixel;
199 int cpp = (bpp + 7) / 8; 199 int cpp = (bpp + 7) / 8;
200 int wBytes = w * cpp; 200 int wBytes = w * cpp;
201 201
202 ENTER; 202 ENTER;
203 ctBLTWAIT; 203 ctBLTWAIT;
204 dst += (x * cpp) + (y * dst_pitch); 204 dst += (x * cpp) + (y * dst_pitch);
205 205
206 while (h--) { 206 while (h--) {
207 memcpy(dst, src, wBytes); 207 memcpy(dst, src, wBytes);
208 src += src_pitch; 208 src += src_pitch;
@@ -211,27 +211,27 @@ ctUploadToScreen(PixmapPtr pDst, int x,  @@ -211,27 +211,27 @@ ctUploadToScreen(PixmapPtr pDst, int x,
211 LEAVE; 211 LEAVE;
212 return TRUE; 212 return TRUE;
213} 213}
214 214
215/* 215/*
216 * Memcpy-based DFS. 216 * Memcpy-based DFS.
217 */ 217 */
218static Bool 218static Bool
219ctDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, 219ctDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h,
220 char *dst, int dst_pitch) 220 char *dst, int dst_pitch)
221{ 221{
222 ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum]; 222 ScrnInfoPtr pScrn = xf86Screens[pSrc->drawable.pScreen->myNum];
223 CHIPSPtr cPtr = CHIPSPTR(pScrn); 223 CHIPSPtr cPtr = CHIPSPTR(pScrn);
224 char *src = cPtr->FbBase + exaGetPixmapOffset(pSrc); 224 unsigned char *src = cPtr->FbBase + exaGetPixmapOffset(pSrc);
225 int src_pitch = exaGetPixmapPitch(pSrc); 225 int src_pitch = exaGetPixmapPitch(pSrc);
226 226
227 int bpp = pSrc->drawable.bitsPerPixel; 227 int bpp = pSrc->drawable.bitsPerPixel;
228 int cpp = (bpp + 7) / 8; 228 int cpp = (bpp + 7) / 8;
229 int wBytes = w * cpp; 229 int wBytes = w * cpp;
230 230
231 ENTER; 231 ENTER;
232 ctBLTWAIT; 232 ctBLTWAIT;
233 src += (x * cpp) + (y * src_pitch); 233 src += (x * cpp) + (y * src_pitch);
234 234
235 while (h--) { 235 while (h--) {
236 memcpy(dst, src, wBytes); 236 memcpy(dst, src, wBytes);
237 src += src_pitch; 237 src += src_pitch;