BTRFS: Implement BTree::Path and change _Find.
[haiku.git] / src / add-ons / accelerants / intel_810 / i810_init.cpp
blob71c2714fc4191f0107259605fa93b9a413775ab9
1 /*
2 * Copyright 2012 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * Gerald Zajac
7 */
9 /*!
10 Haiku Intel-810 video driver was adapted from the X.org intel driver which
11 has the following copyright.
13 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
14 All Rights Reserved.
18 #include "accelerant.h"
19 #include "i810_regs.h"
22 bool
23 I810_GetColorSpaceParams(int colorSpace, uint8& bitsPerPixel,
24 uint32& maxPixelClock)
26 // Get parameters for a color space which is supported by the i810 chips.
27 // Argument maxPixelClock is in KHz.
28 // Return true if the color space is supported; else return false.
30 switch (colorSpace) {
31 case B_RGB16:
32 bitsPerPixel = 16;
33 maxPixelClock = 163000;
34 break;
35 break;
36 case B_CMAP8:
37 bitsPerPixel = 8;
38 maxPixelClock = 203000;
39 break;
40 default:
41 TRACE("Unsupported color space: 0x%X\n", colorSpace);
42 return false;
45 return true;
49 status_t
50 I810_Init(void)
52 TRACE("I810_Init()\n");
54 SharedInfo& si = *gInfo.sharedInfo;
56 // Use all of video memory for the frame buffer.
58 si.maxFrameBufferSize = si.videoMemSize;
60 // Set up the array of the supported color spaces.
62 si.colorSpaces[0] = B_CMAP8;
63 si.colorSpaces[1] = B_RGB16;
64 si.colorSpaceCount = 2;
66 // Setup the mode list.
68 return CreateModeList(IsModeUsable);