[PATCH xf86-video-mga v2] Remove last remnants of old Matrox HAL

Kevin Brace kevinbrace at gmx.com
Thu Dec 6 01:39:12 UTC 2018


Apparently, commit 94bbeb132c7eda912d1b402a1a91ca7cbbf5e6a1
missed removing a few more files related to old Matrox HAL.

Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
---
 Makefile.am     |   2 +-
 README_HALLIB   | 209 ----------------------------------------------------
 src/Makefile.am |   1 -
 src/binding.h   | 222 --------------------------------------------------------
 src/client.h    |   2 -
 5 files changed, 1 insertion(+), 435 deletions(-)
 delete mode 100644 README_HALLIB
 delete mode 100644 src/binding.h

diff --git a/Makefile.am b/Makefile.am
index 6a6ef28..12762ac 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,7 +21,7 @@
 SUBDIRS = src man util
 MAINTAINERCLEANFILES = ChangeLog INSTALL
 
-EXTRA_DIST = README_HALLIB mga_PInS.txt README.md
+EXTRA_DIST = mga_PInS.txt README.md
 
 .PHONY: ChangeLog INSTALL
 
diff --git a/README_HALLIB b/README_HALLIB
deleted file mode 100644
index 432e42e..0000000
--- a/README_HALLIB
+++ /dev/null
@@ -1,209 +0,0 @@
-HAL Documentation
-
-This documentation  provides preliminary explaination of the HAL library, a
-more detailed version of this document is in the process of being written
-and will be released with future driver builds.
-
-------------------------------------------------------------
-MGAOpenLibrary
-
-Description: Link Client functions with HAL Librery
-
-Input:
-LPBOARDHANDLE pBoard: Handle to the board structure containing all the information about the board.
-
-LPBARDHANDLElpClient: Pointer to the client stucture
-
-ulClientSize: Size of the client structure
-
-Error:
-return 0 on success
-
--------------------------------------------------------------
-MGAGetHardwareInfo
-
-Description:
-
-Fills MGAWINFO structure.
-
-struct {
-ULONG UlCapsFirstOutput;
-ULONG ulCapsSecondOutput;
-ULONG ulVideoMemory;
-} FAR *LPMGAHWINFO;
-
-#define MGAHWINFOCAPS_CRTC1_DIGITAL         (1L << 1)
-#define MGAHWINFOCAPS_CRTC1_TV              (1L << 2)
-#define MGAHWINFOCAPS_CRTC2_ANALOG          (1L << 3)
-#define MGAHWINFOCAPS_CRTC2_DIGITAL         (1L << 4)
-#define MGAHWINFOCAPS_CRTC2_TV              (1L << 5)
-#define MGAHWINFOCAPS_OUTPUT_VGA            (1L << 6)
-#define MGAHWINFOCAPS_CRTC2                 (MGAHWINFOCAPS_CRTC2_ANALOG | MGAHWINFOCAPS_CRTC2_DIGITAL | MGAHWINFOCAPS_CRTC2_TV)
-#define MGAHWINFOCAPS_OUTPUT_ANALOG         (MGAHWINFOCAPS_CRTC1_ANALOG | MGAHWINFOCAPS_CRTC2_ANALOG)
-#define MGAHWINFOCAPS_OUTPUT_DIGITAL        (MGAHWINFOCAPS_CRTC1_DIGITAL | MGAHWINFOCAPS_CRTC2_DIGITAL)
-#define MGAHWINFOCAPS_OUTPUT_TV             (MGAHWINFOCAPS_CRTC1_TV | MGAHWINFOCAPS_CRTC2_TV)
-
-example:
-
-if (pMga->pMgaHwInfo->ulCapsSecondOutput & MGAHWINFOCAPS_OUTPUT_TV )
-{
-	ErrorF("TV detected\n");
-	xf86DrvMsg(pScrn->scrnIndex, X_INFO, "TV detected\n ");
-}
-if (pMga->pMgaHwInfo->ulCapsSecondOutput & MGAHWINFOCAPS_OUTPUT_DIGITAL)
-{
-        xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Digital Screen  detected\n ");
-}
-
-Inputs:
-
-LPBOARDHANDLE  pBoard: Handle to the board structure containing all the information about the board.
-
-LPMGAHWINFO pMgaHwInfo:  Handle to the board  structure containing all
-the information about the specific Board.
-
-Error:
-Returns 0 on success
-------------------------------------------------------------
-MGAValidateMode
-
-Description:
-
-Validates the mode given by client.
-
-Here are the different options for pMgaModeInfo->flOutput:
-
-MGAMODEINFO_FORCE_PITCH
-MGAMODEINFO_FORCE_DISPLAYORG
-MGAMODEINFO_SECOND_CRTC
-MGAMODEINFO_ANALOG1
-MGAMODEINFO_ANALOG2
-MGAMODEINFO_DIGITAL1
-MGAMODEINFO_DIGITAL2
-MGAMODEINFO_TV
-
-These options can be combined together to set different combinations.
-Example:
-
-/*The second crtc outputs to a digital screen*/
-pMgaModeInfo->flOutput= MGAMODEINFO_DIGITAL2 | MGAMODEINFO_SECOND_CRTC
-| MGAMODEINFO_FORCE_PITCH | MGAMODEINFO_FORCE_DISPLAYORG;
-
-- or -
-
-/*The second crtc outputs to an analog screen*/
-pMgaModeInfo-> flOutput = MGAMODEINFO_ANALOG2| MGAMODEINFO_SECOND_CRTC
-| MGAMODEINFO_FORCE_PITCH | MGAMODEINFO_FORCE_DISPLAYORG;
-
-- or -
-
-/*The second crtc outputs to a tv*/
-pMga->pMgaModeInfo->flOutput = MGAMODEINFO_TV | MGAMODEINFO_SECOND_CRTC | MGAMODEINFO_FORCE_PITCH | MGAMODEINFO_FORCE_DISPLAYORG;
-
-Inputs:
-LPBOARDHANDLE pBoard: Handle to the board structure containing all the information about the board.
-
-LPMGAMODEINFO pMgaModeInfo: Pointer to structure containing information about a specific display mode. (You need to fill the structure except the video parameters part which will be filled by the function).
-
-Error:
-Returns 0 on success
-
--------------------------------------------------------------
-MGASetMode
-
-Description:
-
-Initializes the board.
-
-Here are the different options for pMgaModeInfo->flOutput:
-
-MGAMODEINFO_FORCE_PITCH
-MGAMODEINFO_FORCE_DISPLAYORG
-MGAMODEINFO_SECOND_CRTC
-MGAMODEINFO_ANALOG1
-MGAMODEINFO_ANALOG2
-MGAMODEINFO_DIGITAL1
-MGAMODEINFO_DIGITAL2
-MGAMODEINFO_TV
-
-These options can be combined together to set different combinations.
-Example:
-
-/*The second crtc outputs to a digital screen*/
-pMgaModeInfo->flOutput= MGAMODEINFO_DIGITAL2 | MGAMODEINFO_SECOND_CRTC
-| MGAMODEINFO_FORCE_PITCH | MGAMODEINFO_FORCE_DISPLAYORG;
-
-- or -
-
-/*The second crtc outputs to an analog screen*/
-pMgaModeInfo-> flOutput = MGAMODEINFO_ANALOG2| MGAMODEINFO_SECOND_CRTC
-| MGAMODEINFO_FORCE_PITCH | MGAMODEINFO_FORCE_DISPLAYORG;
-
-- or -
-
-/*The second crtc outputs to a tv*/
-pMga->pMgaModeInfo->flOutput = MGAMODEINFO_TV | MGAMODEINFO_SECOND_CRTC | MGAMODEINFO_FORCE_PITCH | MGAMODEINFO_FORCE_DISPLAYORG;
-
-Inputs:
-LPBOARDHANDLE pBoard: Handle to the board structure containing all the information about the board.
-
-LPMGAMODEINFO pMgaModeInfo: Pointer to structure containing information about a specific display mode. (You need to fill the structure except the video parameters part which will be filled by the function).
-
-Error:
-Returns 0 on success
-
-------------------------------------------------------------
-
-MGASetVgaMode
-
-Description:
-
-Switchs the VGA mode
-
-Inputs:
-LPBOARDHANDLE pBoard: Handle to the board structure containing all the information about the board.
-
-Error:
-Returns 0 on success
-
-------------------------------------------------------------
-
-MGARestoreVgaState
-
-Description:
-
-Restores the VGA State
-
-Inputs:
-LPBOARDHANDLE pBoard: Handle to the board structure containing all the information about the board.
-
-Error:
-Returns 0 on success
-
-------------------------------------------------------------
-
-MGASaveVgaState
-
-Description:
-
-Saves the VGA state
-
-Inputs:
-LPBOARDHANDLE pBoard: Handle to the board structure containing all the information about the board.
-
-Error:
-Returns 0 on success
-
-------------------------------------------------------------
-
-MGACloseLibrary
-
-Description:
-
-Closes the library
-
-Inputs:
-LPBOARDHANDLE pBoard: Handle to the board structure containing all the information about the board.
-
-Error:
-Returns 0 on success
diff --git a/src/Makefile.am b/src/Makefile.am
index 20fbdf6..cef1c82 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,7 +30,6 @@ mga_drv_ladir = @moduledir@/drivers
 mga_drv_la_LIBADD = $(noinst_LTLIBRARIES)
 
 mga_drv_la_SOURCES = \
-         binding.h \
          client.h \
          mga_bios.c \
          mga_common.h \
diff --git a/src/binding.h b/src/binding.h
deleted file mode 100644
index 616aed7..0000000
--- a/src/binding.h
+++ /dev/null
@@ -1,222 +0,0 @@
-/**************************************************************************************
-
- @doc MGA MGA_STRUCT
-
- @module MGA Structures | Structure of The MGA Layer
- @normal Copyright © 1997, Matrox Graphics Inc.
-
- All Rights Reserved.
-
- @head3 MGA Structures | 
- @index struct | MGA_STRUCT
-
- @end
-
-***************************************************************************************/
-
-#ifndef _BINDING
-#define _BINDING
-
-#ifndef _INTERNALBINDING
-
-#define BINDING_NOERROR     0x00000000
-#define BINDING_ERROR       0x90000000
-#define FAR
-#define DECL
-
-typedef void            VOID;
-typedef void            FAR *LPVOID;
-typedef void            FAR *LPBOARDHANDLE;
-
-typedef long            LONG;
-typedef unsigned long   ULONG;
-typedef unsigned long   FLONG;
-typedef unsigned long   FAR *LPULONG;
-
-typedef char            CHAR;
-typedef unsigned char   UCHAR;
-typedef unsigned char   FAR*LPUCHAR;
-
-#endif /* _INTERNALBINDING */
-
-/***************************************************************************************************
- MGAHWINFO STRUCTURE
- ***************************************************************************************************
- @struct MGAHWINFO | Public MGA Board Information
- @field  OUT ULONG   | ulCapsFirstOutput  | Capabilities of firts output
- @flag                                     Bit 0       | Analog output supported on primary CRTC
- @flag                                     Bit 1       | Digital output supported on primary CRTC
- @flag                                     Bit 2       | TV output supported on primary CRTC
- @flag                                     Bit 3       | Analog output supported on second CRTC
- @flag                                     Bit 4       | Digital output supported on second CRTC
- @flag                                     Bit 5       | TV output supported on second CRTC
- @flag                                     Bit 6       | VGA output supported
- @field  OUT ULONG   | ulCapsSecondOutput | Capabilities of second output
- @flag                                     Bit 0       | Analog output supported on primary CRTC
- @flag                                     Bit 1       | Digital output supported on primary CRTC
- @flag                                     Bit 2       | TV output supported on primary CRTC
- @flag                                     Bit 3       | Analog output supported on second CRTC
- @flag                                     Bit 4       | Digital output supported on second CRTC
- @flag                                     Bit 5       | TV output supported on second CRTC
- @flag                                     Bit 6       | VGA output supported
- @field  OUT ULONG   | ulVideoMemory      | Total number of video memory in bytes
- @end                            
- **************************************************************************************************/
-typedef struct TAGMGAHWINFO {
-    ULONG   ulCapsFirstOutput;      
-    ULONG   ulCapsSecondOutput;      
-    ULONG   ulVideoMemory;      
-} MGAHWINFO, FAR *LPMGAHWINFO;
-
-/***************************************************************************************************
- MGAMODEINFO STRUCTURE
- ***************************************************************************************************
- @struct MGAMODEINFO | Mode Information
- @field  IN     FLONG   | flOutput         | Where we want to apply this parameters
- @flag                                     Bit 0       | Use second CRTC
- @flag                                     Bit 1       | Use primary analog output
- @flag                                     Bit 2       | Use secondary analog output
- @flag                                     Bit 3       | Use primary digital output
- @flag                                     Bit 4       | Use secondary digital output
- @flag                                     Bit 5       | Force a particular frame buffer pitch
- @flag                                     Bit 6       | Force a particular display origin
- @flag                                     Bit 7-31    | Reserved
- @field  IN     ULONG   | ulDispWidth      | Display Width in pixels
- @field  IN     ULONG   | ulDispHeight     | Display Height in pixels
- @field  IN     ULONG   | ulDeskWidth      | Desktop Width in pixels
- @field  IN     ULONG   | ulDeskHeight     | Desktop Height in pixels
- @field  IN OUT ULONG   | ulFBPitch        | Frame Buffer Pitch in pixel
- @field  IN     ULONG   | ulBpp            | Bits Per Pixels and input format
- @flag                                    lower 16 bit   |  Bits per pixel
-                                                             <nl><tab> 8, 15, 16, 24 or 32 
- @flag                                    upper 16 bit   |  Input format
-                                                         <nl><tab> 0  RGB
-                                                         <nl><tab> 1  RGBA
-                                                         <nl><tab> 2  YcbCr 4:2:0 3 Planes
-                                                         <nl><tab> 3  YcbCr 4:2:0 4 Planes
-                                                         <nl><tab> 4  YcbCr 4:2:2-UYVY
-                                                         <nl><tab> 5  YcbCr 4:2:2-YUY2
-                                                         <nl><tab> 6-10 none interleave mode
-                                                         <nl><tab> 6  NI RGBA
-                                                         <nl><tab> 7  NI YcbCr 4:2:0 3 Planes
-                                                         <nl><tab> 8  NI YcbCr 4:2:0 4 Planes
-                                                         <nl><tab> 9  NI YcbCr 4:2:2-UYVY
-                                                         <nl><tab> 10 NI YcbCr 4:2:2-YUY2
- @field IN     ULONG    | ulZoom            | Zoom factor
- @flag                                     1x (1), 2x (2) or 4x (4)|
- @field IN OUT FLONG    | flSignalMode      | Signal Mode
- @flag                                     Bit 0     | Interlace (0 : Non-interlace / 1: Interlace)
- @flag                                     Bit 1     | Overscan  (0 : No Overscan / 1 : Overscan)
- @flag                                     Bit 2     | Horizontal Sync Polarity (0 : Negative / 1 : Positive)
- @flag                                     Bit 3     | Vertical Sync Polarity (0 : Negative / 1 : Positive)
- @flag                                     Bit 4-7   | Standard TV output
-                                                       <nl><tab>000 - PAL B G H
-                                                       <nl><tab>001 - NTSC M
-                                                       <nl><tab>010..111 - Reserved
- @flag                                     Bit 8-31  | Reserved for future use
- @field IN OUT ULONG | ulRefreshRate     | Vertical Refresh Rate in Hz
- @field IN OUT ULONG | ulHorizRate       | Horizontal Refresh Rate in KHz
- @field IN OUT ULONG | ulPixClock        | Pixel Clock in kHz
- @field IN OUT ULONG | ulHFPorch         | Horizontal front porch in pixels
- @field IN OUT ULONG | ulHSync           | Horizontal Sync in pixels
- @field IN OUT ULONG | ulHBPorch         | Horizontal back porch in pixels
- @field IN OUT ULONG | ulVFPorch         | Vertical front porch in lines
- @field IN OUT ULONG | ulVSync           | Vertical Sync in lines
- @field IN OUT ULONG | ulVBPorch         | Vertical back Porch in lines
- @field IN OUT ULONG | ulDisplayOrg      | Origin of the display Offset(pixels)
- @field IN OUT ULONG | ulDstOrg          | Origin of the drawing Offset in the frame (pixels)
- @field IN OUT ULONG | ulPanXGran        | Panning in X granularity in pixel
- @field IN OUT ULONG | ulPanYGran        | Panning in Y granularity in pixel
- @field IN OUT ULONG | ulTVStandard      | TV Standard
- @field IN OUT ULONG | ulCableType       | Cable Type
- @end                            
- **************************************************************************************************/
-typedef struct TAGMAGMODEINFO {
-    FLONG   flOutput;           /* Where we want to apply this parameters                   */
-    ULONG   ulDispWidth;        /* Display Width in pixels                                  */
-    ULONG   ulDispHeight;       /* Display Height in pixels                                 */
-    ULONG   ulDeskWidth;        /* Desktop Width in pixels                                  */
-    ULONG   ulDeskHeight;       /* Desktop Height in pixels                                 */
-    ULONG   ulFBPitch;          /* Frame Buffer Pitch in pixel                              */
-    ULONG   ulBpp;              /* Bits Per Pixels / input format                           */
-    ULONG   ulZoom;             /* Zoom factor                                              */
-    FLONG   flSignalMode;       /* Signal Mode                                              */
-    ULONG   ulRefreshRate;      /* Vertical Refresh Rate in Hz                              */
-    ULONG   ulHorizRate;        /* Horizontal Refresh Rate in KHz                           */
-    ULONG   ulPixClock;         /* Pixel Clock in kHz                                       */
-    ULONG   ulHFPorch;          /* Horizontal front porch in pixels                         */
-    ULONG   ulHSync;            /* Horizontal Sync in pixels                                */
-    ULONG   ulHBPorch;          /* Horizontal back porch in pixels                          */
-    ULONG   ulVFPorch;          /* Vertical front porch in lines                            */
-    ULONG   ulVSync;            /* Vertical Sync in lines                                   */
-    ULONG   ulVBPorch;          /* Vertical back Porch in lines                             */
-    ULONG   ulDisplayOrg;       /* Origin of the display Offset(bytes)                      */
-    ULONG   ulDstOrg;           /* Origin of the drawing Offset in the frame (bytes)        */
-    ULONG   ulPanXGran;         /* Panning in X granularity in pixel                        */
-    ULONG   ulPanYGran;         /* Panning in Y granularity in pixel                        */
-    ULONG   ulTVStandard;       /* TV Standard                                              */
-    ULONG   ulCableType;        /* Cable Type                                               */
-} MGAMODEINFO, FAR *LPMGAMODEINFO;
-
-#define MGAHWINFOCAPS_CRTC1_ANALOG          1L      
-#define MGAHWINFOCAPS_CRTC1_DIGITAL         (1L << 1)     
-#define MGAHWINFOCAPS_CRTC1_TV              (1L << 2)     
-#define MGAHWINFOCAPS_CRTC2_ANALOG          (1L << 3)     
-#define MGAHWINFOCAPS_CRTC2_DIGITAL         (1L << 4)     
-#define MGAHWINFOCAPS_CRTC2_TV              (1L << 5)     
-#define MGAHWINFOCAPS_OUTPUT_VGA            (1L << 6)
-#define MGAHWINFOCAPS_CRTC2                 (MGAHWINFOCAPS_CRTC2_ANALOG | MGAHWINFOCAPS_CRTC2_DIGITAL | MGAHWINFOCAPS_CRTC2_TV)
-#define MGAHWINFOCAPS_OUTPUT_ANALOG         (MGAHWINFOCAPS_CRTC1_ANALOG | MGAHWINFOCAPS_CRTC2_ANALOG)
-#define MGAHWINFOCAPS_OUTPUT_DIGITAL        (MGAHWINFOCAPS_CRTC1_DIGITAL | MGAHWINFOCAPS_CRTC2_DIGITAL)
-#define MGAHWINFOCAPS_OUTPUT_TV             (MGAHWINFOCAPS_CRTC1_TV | MGAHWINFOCAPS_CRTC2_TV)
-
-#define MGAMODEINFO_SECOND_CRTC        1L
-#define MGAMODEINFO_ANALOG1            (1L << 1) 
-#define MGAMODEINFO_ANALOG2            (1L << 2) 
-#define MGAMODEINFO_DIGITAL1           (1L << 3) 
-#define MGAMODEINFO_DIGITAL2           (1L << 4) 
-#define MGAMODEINFO_FORCE_PITCH        (1L << 5) 
-#define MGAMODEINFO_FORCE_DISPLAYORG   (1L << 6) 
-#define MGAMODEINFO_TV                 (1L << 7)
-#define MGAMODEINFO_TESTONLY           0x80000000
-
-/* Cable Type */
-#define TV_YC_COMPOSITE                 0
-#define TV_SCART_RGB                    1
-#define TV_SCART_COMPOSITE              2
-#define TV_SCART_TYPE2                  3
-
-/* TV Standard */
-
-#define TV_PAL                          0
-#define TV_NTSC                         1
-
-#if defined(__cplusplus)
-    extern "C" {
-#endif
-
-ULONG MGACloseLibrary(LPBOARDHANDLE pBoard);
-ULONG MGAValidateMode(LPBOARDHANDLE pBoard, LPMGAMODEINFO pMgaModeInfo);
-ULONG MGAValidateVideoParameters(LPBOARDHANDLE pBoard, LPMGAMODEINFO pMgaModeInfo);
-ULONG MGASetMode(LPBOARDHANDLE pBoard, LPMGAMODEINFO pMgaModeInfo);
-ULONG MGASetTVMode(LPBOARDHANDLE pBoard, LPMGAMODEINFO pMgaModeInfo);
-ULONG MGASetVgaMode(LPBOARDHANDLE pBoard);
-ULONG MGASaveVgaState(LPBOARDHANDLE pBoard);
-ULONG MGARestoreVgaState(LPBOARDHANDLE pBoard);
-ULONG MGAInitHardware(LPBOARDHANDLE pBoard);
-ULONG MGAGetVideoParameters(LPBOARDHANDLE pBoard, LPMGAMODEINFO pMgaModeInfo, ULONG ulRefresh);
-ULONG MGAGetHardwareInfo(LPBOARDHANDLE pBoard, LPMGAHWINFO pMgaHwInfo);
-LPVOID MGAGetClientPointer(LPBOARDHANDLE pBoard);
-ULONG MGAOpenLibrary(LPBOARDHANDLE pBoard, LPVOID lpClient, ULONG ulClientSize);
-ULONG MGAGetBOARDHANDLESize(void);
-ULONG MGASetTVStandard(LPBOARDHANDLE pBoard, ULONG ulTVStandard);
-ULONG MGASetTVCableType(LPBOARDHANDLE pBoard, ULONG ulCableType);
-ULONG HALSetDisplayStart(LPBOARDHANDLE pBoard, ULONG x, ULONG y, ULONG crtc);
-
-#if defined(__cplusplus)
-    }
-#endif
-
-#endif /* _BINDING */
-
-
diff --git a/src/client.h b/src/client.h
index 59aca5d..c1b6ada 100644
--- a/src/client.h
+++ b/src/client.h
@@ -1,8 +1,6 @@
 #ifndef _CLIENT
 #define _CLIENT
 
-#include "binding.h"
-
 #if defined(__cplusplus)
     extern "C" {
 #endif
-- 
2.7.4



More information about the xorg-devel mailing list