171d7fec4Smrg/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_cursor.c,v 1.5tsi Exp $ */
271d7fec4Smrg/*
371d7fec4Smrg * $Workfile: nsc_gx2_cursor.c $
471d7fec4Smrg * $Revision: 1.1.1.1 $
571d7fec4Smrg * $Author: mrg $
671d7fec4Smrg *
771d7fec4Smrg * File Contents: Xfree cursor implementation routines
871d7fec4Smrg *                for geode HWcursor init.setting cursor color,image etc
971d7fec4Smrg *                are done here.
1071d7fec4Smrg * Project:       Geode Xfree Frame buffer device driver.
1171d7fec4Smrg *
1271d7fec4Smrg */
1371d7fec4Smrg
1471d7fec4Smrg/*
1571d7fec4Smrg * NSC_LIC_ALTERNATIVE_PREAMBLE
1671d7fec4Smrg *
1771d7fec4Smrg * Revision 1.0
1871d7fec4Smrg *
1971d7fec4Smrg * National Semiconductor Alternative GPL-BSD License
2071d7fec4Smrg *
2171d7fec4Smrg * National Semiconductor Corporation licenses this software
2271d7fec4Smrg * ("Software"):
2371d7fec4Smrg *
2471d7fec4Smrg * National Xfree frame buffer driver
2571d7fec4Smrg *
2671d7fec4Smrg * under one of the two following licenses, depending on how the
2771d7fec4Smrg * Software is received by the Licensee.
2871d7fec4Smrg *
2971d7fec4Smrg * If this Software is received as part of the Linux Framebuffer or
3071d7fec4Smrg * other GPL licensed software, then the GPL license designated
3171d7fec4Smrg * NSC_LIC_GPL applies to this Software; in all other circumstances
3271d7fec4Smrg * then the BSD-style license designated NSC_LIC_BSD shall apply.
3371d7fec4Smrg *
3471d7fec4Smrg * END_NSC_LIC_ALTERNATIVE_PREAMBLE */
3571d7fec4Smrg
3671d7fec4Smrg/* NSC_LIC_BSD
3771d7fec4Smrg *
3871d7fec4Smrg * National Semiconductor Corporation Open Source License for
3971d7fec4Smrg *
4071d7fec4Smrg * National Xfree frame buffer driver
4171d7fec4Smrg *
4271d7fec4Smrg * (BSD License with Export Notice)
4371d7fec4Smrg *
4471d7fec4Smrg * Copyright (c) 1999-2001
4571d7fec4Smrg * National Semiconductor Corporation.
4671d7fec4Smrg * All rights reserved.
4771d7fec4Smrg *
4871d7fec4Smrg * Redistribution and use in source and binary forms, with or without
4971d7fec4Smrg * modification, are permitted provided that the following conditions
5071d7fec4Smrg * are met:
5171d7fec4Smrg *
5271d7fec4Smrg *   * Redistributions of source code must retain the above copyright
5371d7fec4Smrg *     notice, this list of conditions and the following disclaimer.
5471d7fec4Smrg *
5571d7fec4Smrg *   * Redistributions in binary form must reproduce the above
5671d7fec4Smrg *     copyright notice, this list of conditions and the following
5771d7fec4Smrg *     disclaimer in the documentation and/or other materials provided
5871d7fec4Smrg *     with the distribution.
5971d7fec4Smrg *
6071d7fec4Smrg *   * Neither the name of the National Semiconductor Corporation nor
6171d7fec4Smrg *     the names of its contributors may be used to endorse or promote
6271d7fec4Smrg *     products derived from this software without specific prior
6371d7fec4Smrg *     written permission.
6471d7fec4Smrg *
6571d7fec4Smrg * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
6671d7fec4Smrg * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
6771d7fec4Smrg * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
6871d7fec4Smrg * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
6971d7fec4Smrg * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY
7071d7fec4Smrg * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
7171d7fec4Smrg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
7271d7fec4Smrg * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
7371d7fec4Smrg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
7471d7fec4Smrg * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE,
7571d7fec4Smrg * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY
7671d7fec4Smrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
7771d7fec4Smrg * OF SUCH DAMAGE.
7871d7fec4Smrg *
7971d7fec4Smrg * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF
8071d7fec4Smrg * YOUR JURISDICTION. It is licensee's responsibility to comply with
8171d7fec4Smrg * any export regulations applicable in licensee's jurisdiction. Under
8271d7fec4Smrg * CURRENT (2001) U.S. export regulations this software
8371d7fec4Smrg * is eligible for export from the U.S. and can be downloaded by or
8471d7fec4Smrg * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed
8571d7fec4Smrg * destinations which include Cuba, Iraq, Libya, North Korea, Iran,
8671d7fec4Smrg * Syria, Sudan, Afghanistan and any other country to which the U.S.
8771d7fec4Smrg * has embargoed goods and services.
8871d7fec4Smrg *
8971d7fec4Smrg * END_NSC_LIC_BSD */
9071d7fec4Smrg
9171d7fec4Smrg/* NSC_LIC_GPL
9271d7fec4Smrg *
9371d7fec4Smrg * National Semiconductor Corporation Gnu General Public License for
9471d7fec4Smrg *
9571d7fec4Smrg * National Xfree frame buffer driver
9671d7fec4Smrg *
9771d7fec4Smrg * (GPL License with Export Notice)
9871d7fec4Smrg *
9971d7fec4Smrg * Copyright (c) 1999-2001
10071d7fec4Smrg * National Semiconductor Corporation.
10171d7fec4Smrg * All rights reserved.
10271d7fec4Smrg *
10371d7fec4Smrg * Redistribution and use in source and binary forms, with or without
10471d7fec4Smrg * modification, are permitted under the terms of the GNU General
10571d7fec4Smrg * Public License as published by the Free Software Foundation; either
10671d7fec4Smrg * version 2 of the License, or (at your option) any later version
10771d7fec4Smrg *
10871d7fec4Smrg * In addition to the terms of the GNU General Public License, neither
10971d7fec4Smrg * the name of the National Semiconductor Corporation nor the names of
11071d7fec4Smrg * its contributors may be used to endorse or promote products derived
11171d7fec4Smrg * from this software without specific prior written permission.
11271d7fec4Smrg *
11371d7fec4Smrg * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
11471d7fec4Smrg * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
11571d7fec4Smrg * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
11671d7fec4Smrg * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
11771d7fec4Smrg * NATIONAL SEMICONDUCTOR CORPORATION OR CONTRIBUTORS BE LIABLE FOR ANY
11871d7fec4Smrg * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
11971d7fec4Smrg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
12071d7fec4Smrg * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
12171d7fec4Smrg * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
12271d7fec4Smrg * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE,
12371d7fec4Smrg * INTELLECTUAL PROPERTY INFRINGEMENT, OR OTHERWISE) ARISING IN ANY WAY
12471d7fec4Smrg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
12571d7fec4Smrg * OF SUCH DAMAGE. See the GNU General Public License for more details.
12671d7fec4Smrg *
12771d7fec4Smrg * EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF
12871d7fec4Smrg * YOUR JURISDICTION. It is licensee's responsibility to comply with
12971d7fec4Smrg * any export regulations applicable in licensee's jurisdiction. Under
13071d7fec4Smrg * CURRENT (2001) U.S. export regulations this software
13171d7fec4Smrg * is eligible for export from the U.S. and can be downloaded by or
13271d7fec4Smrg * otherwise exported or reexported worldwide EXCEPT to U.S. embargoed
13371d7fec4Smrg * destinations which include Cuba, Iraq, Libya, North Korea, Iran,
13471d7fec4Smrg * Syria, Sudan, Afghanistan and any other country to which the U.S.
13571d7fec4Smrg * has embargoed goods and services.
13671d7fec4Smrg *
13771d7fec4Smrg * You should have received a copy of the GNU General Public License
13871d7fec4Smrg * along with this file; if not, write to the Free Software Foundation,
13971d7fec4Smrg * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14071d7fec4Smrg *
14171d7fec4Smrg * END_NSC_LIC_GPL */
14271d7fec4Smrg
14371d7fec4Smrg#ifdef HAVE_CONFIG_H
14471d7fec4Smrg#include "config.h"
14571d7fec4Smrg#endif
14671d7fec4Smrg
14771d7fec4Smrg#include "xf86.h"
14871d7fec4Smrg#include "xf86_OSproc.h"
14971d7fec4Smrg#include "xf86Pci.h"
15071d7fec4Smrg#include "xf86PciInfo.h"
15171d7fec4Smrg#include "nsc.h"
15271d7fec4Smrg
15371d7fec4Smrg/* Forward declarations of the functions */
15471d7fec4SmrgBool GX2HWCursorInit(ScreenPtr pScreen);
15571d7fec4Smrgstatic void GX2SetCursorColors(ScrnInfoPtr pScreenInfo, int bg, int fg);
15671d7fec4Smrgstatic void GX2SetCursorPosition(ScrnInfoPtr pScreenInfo, int x, int y);
15771d7fec4Smrgvoid GX2LoadCursorImage(ScrnInfoPtr pScreenInfo, unsigned char *src);
15871d7fec4Smrgvoid GX2HideCursor(ScrnInfoPtr pScreenInfo);
15971d7fec4Smrgvoid GX2ShowCursor(ScrnInfoPtr pScreenInfo);
16071d7fec4Smrgstatic Bool GX2UseHWCursor(ScreenPtr pScreen, CursorPtr pCurs);
16171d7fec4Smrgextern void GX2SetVideoPosition(int x, int y, int width, int height,
16271d7fec4Smrg				short src_w, short src_h, short drw_w,
16371d7fec4Smrg				short drw_h, int id, int offset,
16471d7fec4Smrg				ScrnInfoPtr pScrn);
16571d7fec4Smrg
16671d7fec4Smrg/*----------------------------------------------------------------------------
16771d7fec4Smrg * GX2HWCursorInit.
16871d7fec4Smrg *
16971d7fec4Smrg * Description	:This function sets the cursor information by probing the
17071d7fec4Smrg * hardware.
17171d7fec4Smrg *
17271d7fec4Smrg * Parameters.
17371d7fec4Smrg *     pScreen	:Screeen pointer structure.
17471d7fec4Smrg *
17571d7fec4Smrg * Returns		:TRUE on success and FALSE on Failure
17671d7fec4Smrg *
17771d7fec4Smrg * Comments		:Geode supports the hardware_cursor,no need to enable SW
17871d7fec4Smrg *                    cursor.
17971d7fec4Smrg*----------------------------------------------------------------------------
18071d7fec4Smrg*/
18171d7fec4SmrgBool
18271d7fec4SmrgGX2HWCursorInit(ScreenPtr pScreen)
18371d7fec4Smrg{
18471d7fec4Smrg   ScrnInfoPtr pScreenInfo = xf86Screens[pScreen->myNum];
18571d7fec4Smrg   GeodePtr pGeode = GEODEPTR(pScreenInfo);
18671d7fec4Smrg   xf86CursorInfoPtr infoPtr;
18771d7fec4Smrg
18871d7fec4Smrg   infoPtr = xf86CreateCursorInfoRec();
18971d7fec4Smrg   if (!infoPtr)
19071d7fec4Smrg      return FALSE;
19171d7fec4Smrg   /* the geode structure is intiallized with the cursor infoRec */
19271d7fec4Smrg   pGeode->CursorInfo = infoPtr;
19371d7fec4Smrg   infoPtr->MaxWidth = 32;
19471d7fec4Smrg   infoPtr->MaxHeight = 32;
19571d7fec4Smrg   /* seeting up the cursor flags */
19671d7fec4Smrg   infoPtr->Flags = HARDWARE_CURSOR_BIT_ORDER_MSBFIRST |
19771d7fec4Smrg	 HARDWARE_CURSOR_TRUECOLOR_AT_8BPP |
19871d7fec4Smrg	 HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED;
19971d7fec4Smrg   /* cursor info ptr is intiallized with the values obtained from
20071d7fec4Smrg    * * durnago calls
20171d7fec4Smrg    */
20271d7fec4Smrg   infoPtr->SetCursorColors = GX2SetCursorColors;
20371d7fec4Smrg   infoPtr->SetCursorPosition = GX2SetCursorPosition;
20471d7fec4Smrg   infoPtr->LoadCursorImage = GX2LoadCursorImage;
20571d7fec4Smrg   infoPtr->HideCursor = GX2HideCursor;
20671d7fec4Smrg   infoPtr->ShowCursor = GX2ShowCursor;
20771d7fec4Smrg   infoPtr->UseHWCursor = GX2UseHWCursor;
20871d7fec4Smrg   return (xf86InitCursor(pScreen, infoPtr));
20971d7fec4Smrg}
21071d7fec4Smrg
21171d7fec4Smrg/*----------------------------------------------------------------------------
21271d7fec4Smrg * GX2SetCursorColors.
21371d7fec4Smrg *
21471d7fec4Smrg * Description	:This function sets the cursor foreground and background
21571d7fec4Smrg *                    colors
21671d7fec4Smrg * Parameters:
21771d7fec4Smrg *    pScreen:	Screeen pointer structure.
21871d7fec4Smrg *    	   bg:	Specifies the color value of cursor background color.
21971d7fec4Smrg *    	   fg:	Specifies the color value of cursor foreground color.
22071d7fec4Smrg *    Returns:	none.
22171d7fec4Smrg *
22271d7fec4Smrg *   Comments:	The integer color value passed by this function is
22371d7fec4Smrg *              converted into  * RGB  value by the gfx_set_color routines.
22471d7fec4Smrg *----------------------------------------------------------------------------
22571d7fec4Smrg */
22671d7fec4Smrgstatic void
22771d7fec4SmrgGX2SetCursorColors(ScrnInfoPtr pScreenInfo, int bg, int fg)
22871d7fec4Smrg{
22971d7fec4Smrg   GFX(set_cursor_colors(bg, fg));
23071d7fec4Smrg}
23171d7fec4Smrg
23271d7fec4Smrg/*----------------------------------------------------------------------------
23371d7fec4Smrg * GX2SetCursorPosition.
23471d7fec4Smrg *
23571d7fec4Smrg * Description	:This function sets the cursor co -ordinates and enable the
23671d7fec4Smrg *               cursor.
23771d7fec4Smrg *
23871d7fec4Smrg * Parameters:
23971d7fec4Smrg *    pScreen: Screeen pointer structure.
24071d7fec4Smrg *    	    x: Specifies the x-cordinates of the cursor.
24171d7fec4Smrg *    	    y: Specifies the y co-ordinate of the cursor.
24271d7fec4Smrg *    Returns: none.
24371d7fec4Smrg *
24471d7fec4Smrg *----------------------------------------------------------------------------
24571d7fec4Smrg */
24671d7fec4Smrgstatic void
24771d7fec4SmrgGX2SetCursorPosition(ScrnInfoPtr pScreenInfo, int x, int y)
24871d7fec4Smrg{
24971d7fec4Smrg   unsigned long offset;
25071d7fec4Smrg   static int panOffset = 0;
25171d7fec4Smrg   GeodePtr pGeode = GEODEPTR(pScreenInfo);
25271d7fec4Smrg
25371d7fec4Smrg   unsigned short xhot = 0, yhot = 0;
25471d7fec4Smrg
25571d7fec4Smrg   if (x < 0) {
25671d7fec4Smrg      xhot = (unsigned short)(-x);
25771d7fec4Smrg      x = 0;
25871d7fec4Smrg   }
25971d7fec4Smrg   if (y < 0) {
26071d7fec4Smrg      yhot = (unsigned short)(-y);
26171d7fec4Smrg      y = 0;
26271d7fec4Smrg   }
26371d7fec4Smrg
26471d7fec4Smrg   GFX(set_cursor_position(pGeode->CursorStartOffset, x, y, xhot, yhot));
26571d7fec4Smrg   GFX(set_cursor_enable(1));
26671d7fec4Smrg
26771d7fec4Smrg   if ((pGeode->OverlayON) && (pGeode->Panel)) {
26871d7fec4Smrg#if defined(STB_X)
26971d7fec4Smrg      Gal_get_display_offset(&offset);
27071d7fec4Smrg#else
27171d7fec4Smrg      offset = gfx_get_display_offset();
27271d7fec4Smrg#endif
27371d7fec4Smrg      if (offset != panOffset) {
27471d7fec4Smrg	 GX2SetVideoPosition(pGeode->video_x, pGeode->video_y,
27571d7fec4Smrg			     pGeode->video_w, pGeode->video_h,
27671d7fec4Smrg			     pGeode->video_srcw, pGeode->video_srch,
27771d7fec4Smrg			     pGeode->video_dstw, pGeode->video_dsth,
27871d7fec4Smrg			     pGeode->video_id, pGeode->video_offset,
27971d7fec4Smrg			     pGeode->video_scrnptr);
28071d7fec4Smrg	 panOffset = offset;
28171d7fec4Smrg      }
28271d7fec4Smrg   }
28371d7fec4Smrg}
28471d7fec4Smrg
28571d7fec4Smrg/*----------------------------------------------------------------------------
28671d7fec4Smrg * GX2LoadCursorImage
28771d7fec4Smrg *
28871d7fec4Smrg * Description	:This function loads the 32x32 cursor pattern.The shape
28971d7fec4Smrg *               and color is set by AND and XOR masking of arrays of 32
29071d7fec4Smrg *               DWORD.
29171d7fec4Smrg * Parameters:
29271d7fec4Smrg *    pScreen: Screeen pointer structure.
29371d7fec4Smrg *    src    : Specifies cursor data.
29471d7fec4Smrg * Returns   : none
29571d7fec4Smrg *
29671d7fec4Smrg *----------------------------------------------------------------------------
29771d7fec4Smrg*/
29871d7fec4Smrgvoid
29971d7fec4SmrgGX2LoadCursorImage(ScrnInfoPtr pScreenInfo, unsigned char *src)
30071d7fec4Smrg{
30171d7fec4Smrg   int i;
30271d7fec4Smrg   unsigned long shape;
30371d7fec4Smrg   unsigned long mask;
30471d7fec4Smrg   unsigned long andMask[32] = { 0, };
30571d7fec4Smrg   unsigned long xorMask[32] = { 0, };
30671d7fec4Smrg   GeodePtr pGeode = GEODEPTR(pScreenInfo);
30771d7fec4Smrg
30871d7fec4Smrg   for (i = 0; i < 32; i++) {
30971d7fec4Smrg      if (src) {
31071d7fec4Smrg	 shape = ((unsigned long)src[i * 4] << 24) |
31171d7fec4Smrg	       ((unsigned long)src[i * 4 + 1] << 16) |
31271d7fec4Smrg	       ((unsigned long)src[i * 4 + 2] << 8) |
31371d7fec4Smrg	       ((unsigned long)src[i * 4 + 3] << 0);
31471d7fec4Smrg	 mask = ((unsigned long)src[i * 4 + 128] << 24) |
31571d7fec4Smrg	       ((unsigned long)src[i * 4 + 1 + 128] << 16) |
31671d7fec4Smrg	       ((unsigned long)src[i * 4 + 2 + 128] << 8) |
31771d7fec4Smrg	       ((unsigned long)src[i * 4 + 3 + 128] << 0);
31871d7fec4Smrg      } else {
31971d7fec4Smrg	 mask = 0x0;
32071d7fec4Smrg	 shape = 0xFFFFFFFF;
32171d7fec4Smrg      }
32271d7fec4Smrg
32371d7fec4Smrg      andMask[i] = ~(mask);
32471d7fec4Smrg      xorMask[i] = shape & mask;
32571d7fec4Smrg   }
32671d7fec4Smrg
32771d7fec4Smrg   GFX(set_cursor_shape32(pGeode->CursorStartOffset, andMask, xorMask));
32871d7fec4Smrg}
32971d7fec4Smrg
33071d7fec4Smrg/*----------------------------------------------------------------------------
33171d7fec4Smrg * GX2HideCursor.
33271d7fec4Smrg *
33371d7fec4Smrg * Description	:This function will disable the cursor.
33471d7fec4Smrg *
33571d7fec4Smrg * Parameters:
33671d7fec4Smrg *    pScreen: Handles to the Screeen pointer structure.
33771d7fec4Smrg *
33871d7fec4Smrg *    Returns: none.
33971d7fec4Smrg *
34071d7fec4Smrg *   Comments:	gfx_set_cursor enable function is hardcoded to disable
34171d7fec4Smrg *		the cursor.
34271d7fec4Smrg *----------------------------------------------------------------------------
34371d7fec4Smrg */
34471d7fec4Smrgvoid
34571d7fec4SmrgGX2HideCursor(ScrnInfoPtr pScreenInfo)
34671d7fec4Smrg{
34771d7fec4Smrg   GFX(set_cursor_enable(0));
34871d7fec4Smrg}
34971d7fec4Smrg
35071d7fec4Smrg/*----------------------------------------------------------------------------
35171d7fec4Smrg * GX2ShowCursor
35271d7fec4Smrg *
35371d7fec4Smrg * Description	:This function will enable  the cursor.
35471d7fec4Smrg *
35571d7fec4Smrg * Parameters:
35671d7fec4Smrg *	pScreen		:Handles to the Screeen pointer structure.
35771d7fec4Smrg *
35871d7fec4Smrg * Returns      :none
35971d7fec4Smrg *
36071d7fec4Smrg * Comments		:gfx_set_cursor enable function is hardcoded to enable the
36171d7fec4Smrg * 											cursor
36271d7fec4Smrg *----------------------------------------------------------------------------
36371d7fec4Smrg*/
36471d7fec4Smrgvoid
36571d7fec4SmrgGX2ShowCursor(ScrnInfoPtr pScreenInfo)
36671d7fec4Smrg{
36771d7fec4Smrg   GFX(set_cursor_enable(1));
36871d7fec4Smrg}
36971d7fec4Smrg
37071d7fec4Smrg/*----------------------------------------------------------------------------
37171d7fec4Smrg * GX2UseHwCursor.
37271d7fec4Smrg *
37371d7fec4Smrg * Description	:This function will sets the hardware cursor flag in
37471d7fec4Smrg *                 pscreen  structure.
37571d7fec4Smrg *
37671d7fec4Smrg * Parameters.
37771d7fec4Smrg *	pScreen		:Handles to the Screeen pointer structure.
37871d7fec4Smrg *
37971d7fec4Smrg * Returns		:none
38071d7fec4Smrg *
38171d7fec4Smrg * Comments		:none
38271d7fec4Smrg *
38371d7fec4Smrg *----------------------------------------------------------------------------
38471d7fec4Smrg*/
38571d7fec4Smrgstatic Bool
38671d7fec4SmrgGX2UseHWCursor(ScreenPtr pScreen, CursorPtr pCurs)
38771d7fec4Smrg{
38871d7fec4Smrg   ScrnInfoPtr pScreenInfo = XF86SCRNINFO(pScreen);
38971d7fec4Smrg
39071d7fec4Smrg   if (pScreenInfo->currentMode->Flags & V_DBLSCAN)
39171d7fec4Smrg      return FALSE;
39271d7fec4Smrg   return TRUE;
39371d7fec4Smrg}
39471d7fec4Smrg
39571d7fec4Smrg/* End of File */
396