summaryrefslogtreecommitdiff
path: root/src/lx_driver.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@herrb.eu>2024-08-02 08:32:14 +0200
committerMatthieu Herrb <matthieu@herrb.eu>2024-08-02 08:32:14 +0200
commit9627fd587c9aa066d4ce6e852b26950030f9c3cd (patch)
tree50375cab018b3b62076bf4a6a674fca7613db68b /src/lx_driver.c
parent8b6ec6bb08fa9c3b19753acb436bbb8ecfae9233 (diff)
parent7047b6da264e946e77eeee4080d194c807562d68 (diff)
Merge remote-tracking branch 'origin/master' into obsdobsd
Diffstat (limited to 'src/lx_driver.c')
-rw-r--r--src/lx_driver.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/src/lx_driver.c b/src/lx_driver.c
index 0f04579..0d43096 100644
--- a/src/lx_driver.c
+++ b/src/lx_driver.c
@@ -39,9 +39,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
-#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
-#include "xf86Resources.h"
-#endif
#include "xf86i2c.h"
#include "xf86Crtc.h"
#include "xf86cmap.h"
@@ -309,7 +306,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
EntityInfoPtr pEnt;
OptionInfoRec *GeodeOptions = &LX_GeodeOptions[0];
rgb defaultWeight = { 0, 0, 0 };
- char *s;
+ const char *s;
if (pScrni->numEntities != 1)
return FALSE;
@@ -324,7 +321,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
return TRUE;
}
- pGeode = pScrni->driverPrivate = xnfcalloc(1, sizeof(GeodeRec));
+ pGeode = pScrni->driverPrivate = XNFcallocarray(1, sizeof(GeodeRec));
if (pGeode == NULL)
return FALSE;
@@ -357,7 +354,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
/* Fill in the monitor information */
pScrni->monitor = pScrni->confScreen->monitor;
- if (!xf86SetDepthBpp(pScrni, 16, 16, 16, Support24bppFb | Support32bppFb))
+ if (!xf86SetDepthBpp(pScrni, 0, 0, 0, Support24bppFb | Support32bppFb))
return FALSE;
switch (pScrni->depth) {
@@ -472,7 +469,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
pGeode->Output = OUTPUT_PANEL | OUTPUT_DCON;
}
else if (pGeode->Output & OUTPUT_PANEL) {
- char *pmode = xf86GetOptValString(GeodeOptions, LX_OPTION_PANEL_MODE);
+ const char *pmode = xf86GetOptValString(GeodeOptions, LX_OPTION_PANEL_MODE);
if (pmode != NULL)
pGeode->panelMode = LXGetManualPanelMode(pmode);
@@ -651,9 +648,8 @@ LXUnmapMem(ScrnInfoPtr pScrni)
/* These should be correctly accounted for rotation */
void
-LXAdjustFrame(ADJUST_FRAME_ARGS_DECL)
+LXAdjustFrame(ScrnInfoPtr pScrni, int x, int y)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
unsigned long offset;
@@ -665,9 +661,8 @@ LXAdjustFrame(ADJUST_FRAME_ARGS_DECL)
}
static Bool
-LXSwitchMode(SWITCH_MODE_ARGS_DECL)
+LXSwitchMode(ScrnInfoPtr pScrni, DisplayModePtr pMode)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
/* Set the new mode */
@@ -717,7 +712,7 @@ LXLeaveGraphics(ScrnInfoPtr pScrni)
}
static Bool
-LXCloseScreen(CLOSE_SCREEN_ARGS_DECL)
+LXCloseScreen(ScreenPtr pScrn)
{
ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
GeodeRec *pGeode = GEODEPTR(pScrni);
@@ -743,7 +738,7 @@ LXCloseScreen(CLOSE_SCREEN_ARGS_DECL)
pScrn->CloseScreen = pGeode->CloseScreen;
if (pScrn->CloseScreen)
- return (*pScrn->CloseScreen) (CLOSE_SCREEN_ARGS);
+ return (*pScrn->CloseScreen) (pScrn);
return TRUE;
}
@@ -839,7 +834,7 @@ LXLoadPalette(ScrnInfoPtr pScrni,
}
static Bool
-LXScreenInit(SCREEN_INIT_ARGS_DECL)
+LXScreenInit(ScreenPtr pScrn, int argc, char **argv)
{
ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn);
GeodeRec *pGeode = GEODEPTR(pScrni);
@@ -1009,22 +1004,20 @@ LXScreenInit(SCREEN_INIT_ARGS_DECL)
}
static int
-LXValidMode(VALID_MODE_ARGS_DECL)
+LXValidMode(ScrnInfoPtr pScrn, DisplayModePtr pMode, Bool Verbose, int flags)
{
return MODE_OK;
}
static Bool
-LXEnterVT(VT_FUNC_ARGS_DECL)
+LXEnterVT(ScrnInfoPtr pScrni)
{
- SCRN_INFO_PTR(arg);
return LXEnterGraphics(NULL, pScrni);
}
static void
-LXLeaveVT(VT_FUNC_ARGS_DECL)
+LXLeaveVT(ScrnInfoPtr pScrni)
{
- SCRN_INFO_PTR(arg);
GeodeRec *pGeode = GEODEPTR(pScrni);
pGeode->PrevDisplayOffset = vg_get_display_offset();