1个回答
展开全部
#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/fb.h>
#include "xorg-server.h"
#include "xf86.h"
#include "xf86cmap.h"
#include <xf86drm.h>
#include "xf86xv.h"
#include "xf86Crtc.h"
#include "micmap.h"
#include "mali_def.h"
#include "mali_fbdev.h"
#include "mali_exa.h"
#include "mali_dri.h"
#include "mali_lcd.h"
#include "compat-api.h"
#define MALI_VERSION 4000
#define MALI_NAME "MALI"
#define MALI_DRIVER_NAME "mali"
#define PAGE_MASK (~(getpagesize() - 1))
static const OptionInfoRec *MaliAvailableOptions(int chipid, int busid);
static void MaliIdentify(int flags);
static Bool MaliProbe(DriverPtr drv, int flags);
static Bool MaliPreInit(ScrnInfoPtr pScrn, int flags);
static Bool MaliScreenInit(SCREEN_INIT_ARGS_DECL);
static Bool MaliCloseScreen(CLOSE_SCREEN_ARGS_DECL);
static Bool MaliHWSwitchMode(SWITCH_MODE_ARGS_DECL);
static void MaliHWAdjustFrame(ADJUST_FRAME_ARGS_DECL);
static Bool MaliHWEnterVT(VT_FUNC_ARGS_DECL);
static void MaliHWLeaveVT(VT_FUNC_ARGS_DECL);
static ModeStatus MaliHWValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags);
static int pix24bpp = 0;
static int malihwPrivateIndex = -1;
static int global_drm_fd = -1;
_X_EXPORT DriverRec MALI =
{
MALI_VERSION,
MALI_DRIVER_NAME,
MaliIdentify,
MaliProbe,
MaliAvailableOptions,
NULL,
0,
NULL,
NULL,
NULL,
};
/* Supported "chipsets" */
static SymTabRec MaliChipsets[] =
{
{ 0, "mali" },
{ -1, NULL }
};
/* Supported options */
typedef enum
{
OPTION_DRI2,
OPTION_DRI2_PAGE_FLIP,
OPTION_DRI2_WAIT_VSYNC,
OPTION_UMP_CACHED,
OPTION_UMP_LOCK,
} FBDevOpts;
static const OptionInfoRec MaliOptions[] =
{
{ OPTION_DRI2, "DRI2", OPTV_BOOLEAN, {0}, TRUE },
{ OPTION_DRI2_PAGE_FLIP, "DRI2_PAGE_FLIP", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_DRI2_WAIT_VSYNC, "DRI2_WAIT_VSYNC", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_UMP_CACHED, "UMP_CACHED", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_UMP_LOCK, "UMP_LOCK", OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
#ifdef XFree86LOADER
#ifndef PACKAGE_VERSION_MAJOR
#define PACKAGE_VERSION_MAJOR 0
#endif
#ifndef PACKAGE_VERSION_MINOR
#define PACKAGE_VERSION_MINOR 1
#endif
#ifndef PACKAGE_VERSION_PATCHLEVEL
#define PACKAGE_VERSION_PATCHLEVEL 1
#endif
MODULESETUPPROTO(MaliSetup);
static XF86ModuleVersionInfo MaliVersRec =
{
"mali",
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
XORG_VERSION_CURRENT,
PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
ABI_CLASS_VIDEODRV,
ABI_VIDEODRV_VERSION,
NULL,
{0, 0, 0, 0}
};
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/fb.h>
#include "xorg-server.h"
#include "xf86.h"
#include "xf86cmap.h"
#include <xf86drm.h>
#include "xf86xv.h"
#include "xf86Crtc.h"
#include "micmap.h"
#include "mali_def.h"
#include "mali_fbdev.h"
#include "mali_exa.h"
#include "mali_dri.h"
#include "mali_lcd.h"
#include "compat-api.h"
#define MALI_VERSION 4000
#define MALI_NAME "MALI"
#define MALI_DRIVER_NAME "mali"
#define PAGE_MASK (~(getpagesize() - 1))
static const OptionInfoRec *MaliAvailableOptions(int chipid, int busid);
static void MaliIdentify(int flags);
static Bool MaliProbe(DriverPtr drv, int flags);
static Bool MaliPreInit(ScrnInfoPtr pScrn, int flags);
static Bool MaliScreenInit(SCREEN_INIT_ARGS_DECL);
static Bool MaliCloseScreen(CLOSE_SCREEN_ARGS_DECL);
static Bool MaliHWSwitchMode(SWITCH_MODE_ARGS_DECL);
static void MaliHWAdjustFrame(ADJUST_FRAME_ARGS_DECL);
static Bool MaliHWEnterVT(VT_FUNC_ARGS_DECL);
static void MaliHWLeaveVT(VT_FUNC_ARGS_DECL);
static ModeStatus MaliHWValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags);
static int pix24bpp = 0;
static int malihwPrivateIndex = -1;
static int global_drm_fd = -1;
_X_EXPORT DriverRec MALI =
{
MALI_VERSION,
MALI_DRIVER_NAME,
MaliIdentify,
MaliProbe,
MaliAvailableOptions,
NULL,
0,
NULL,
NULL,
NULL,
};
/* Supported "chipsets" */
static SymTabRec MaliChipsets[] =
{
{ 0, "mali" },
{ -1, NULL }
};
/* Supported options */
typedef enum
{
OPTION_DRI2,
OPTION_DRI2_PAGE_FLIP,
OPTION_DRI2_WAIT_VSYNC,
OPTION_UMP_CACHED,
OPTION_UMP_LOCK,
} FBDevOpts;
static const OptionInfoRec MaliOptions[] =
{
{ OPTION_DRI2, "DRI2", OPTV_BOOLEAN, {0}, TRUE },
{ OPTION_DRI2_PAGE_FLIP, "DRI2_PAGE_FLIP", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_DRI2_WAIT_VSYNC, "DRI2_WAIT_VSYNC", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_UMP_CACHED, "UMP_CACHED", OPTV_BOOLEAN, {0}, FALSE },
{ OPTION_UMP_LOCK, "UMP_LOCK", OPTV_BOOLEAN, {0}, FALSE },
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
#ifdef XFree86LOADER
#ifndef PACKAGE_VERSION_MAJOR
#define PACKAGE_VERSION_MAJOR 0
#endif
#ifndef PACKAGE_VERSION_MINOR
#define PACKAGE_VERSION_MINOR 1
#endif
#ifndef PACKAGE_VERSION_PATCHLEVEL
#define PACKAGE_VERSION_PATCHLEVEL 1
#endif
MODULESETUPPROTO(MaliSetup);
static XF86ModuleVersionInfo MaliVersRec =
{
"mali",
MODULEVENDORSTRING,
MODINFOSTRING1,
MODINFOSTRING2,
XORG_VERSION_CURRENT,
PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
ABI_CLASS_VIDEODRV,
ABI_VIDEODRV_VERSION,
NULL,
{0, 0, 0, 0}
};
追问
有没有注释啊亲....
追答
亲,我也在研究啊
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询