Strip trailing whitespace from source files

Performed with: `git ls-files | xargs perl -i -p -e 's{[ \t]+$}{}'`

`git diff -w` & `git diff -b` show no diffs from this change

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/driver/xf86-video-siliconmotion/-/merge_requests/11>
This commit is contained in:
Alan Coopersmith
2025-08-20 17:30:15 -07:00
committed by Enrico Weigelt, metux IT consult
parent 6b3aec8351
commit f39c4d7574
9 changed files with 42 additions and 42 deletions

4
.gitignore vendored
View File

@@ -71,8 +71,8 @@ core
*.tar.bz2
*.tar.gz
#
# Add & Override patterns for xf86-video-siliconmotion
# Add & Override patterns for xf86-video-siliconmotion
#
# Edit the following section as needed
# For example, !report.pc overrides *.pc. See 'man gitignore'
#
#

View File

@@ -2,12 +2,12 @@
ChipIdentify (SMIIdentify)
ChipProbe (SMIProbe)
Passive only, no ram determination, no writing
-- For each ScrnInfoRec, still calling order --
ChipPreInit (SMIPreInit)
Allows probing and mapping, hardware must remain unchanged
ChipGetRec
ChipScreenInit
ChipMapMem
ChipSave

View File

@@ -357,9 +357,9 @@ do \
/******************************************************************************/
/* smi_dac.c */
void SMI_CommonCalcClock(int scrnIndex, long freq, int min_m, int min_n1,
int max_n1, int min_n2, int max_n2, long freq_min,
long freq_max, unsigned char * mdiv,
void SMI_CommonCalcClock(int scrnIndex, long freq, int min_m, int min_n1,
int max_n1, int min_n2, int max_n2, long freq_min,
long freq_max, unsigned char * mdiv,
unsigned char * ndiv);
/* smi_i2c */

View File

@@ -614,7 +614,7 @@ SMI501_CrtcLoadCursorArgb(xf86CrtcPtr crtc, CARD32 *image)
}
SMI501_WriteMode_alpha(pScrn, mode);
smi_crtc->argb_cursor = TRUE;
LEAVE();
}
#endif

View File

@@ -36,8 +36,8 @@ authorization from the XFree86 Project and Silicon Motion.
#define BASE_FREQ 14.31818 /* MHz */
void
SMI_CommonCalcClock(int scrnIndex, long freq, int min_m, int min_n1,
int max_n1, int min_n2, int max_n2, long freq_min,
SMI_CommonCalcClock(int scrnIndex, long freq, int min_m, int min_n1,
int max_n1, int min_n2, int max_n2, long freq_min,
long freq_max, unsigned char *mdiv, unsigned char *ndiv)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];

View File

@@ -374,7 +374,7 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags)
SMIPtr pSmi;
MessageType from;
vgaHWPtr hwp;
ENTER();
/* Ignoring the Type list for now. It might be needed when multiple cards
@@ -875,7 +875,7 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags)
memset(&req, 0, sizeof(XF86ModReqInfo));
req.majorversion = 2;
req.minorversion = 1;
if (!LoadSubModule(pScrn->module, "exa", NULL, NULL, NULL,
&req, &errmaj, &errmin)) {
LoaderErrorMsg(NULL, "exa", errmaj, errmin);
@@ -1049,7 +1049,7 @@ SMI_DetectPanelSize(ScrnInfoPtr pScrn)
/* int10 support isn't setup on the second call to this function,
o if this is the second call, don't do detection again */
if (pSmi->lcd == 0)
/* If we get here, int10 support is not loaded or not working */
/* If we get here, int10 support is not loaded or not working */
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"No BIOS support for 730 panel detection!\n");
}
@@ -1605,7 +1605,7 @@ SMI_ScreenInit(ScreenPtr pScreen, int argc, char **argv)
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
SMIPtr pSmi = SMIPTR(pScrn);
EntityInfoPtr pEnt;
ENTER();
/* Map MMIO regs and framebuffer */
@@ -1690,7 +1690,7 @@ SMI_ScreenInit(ScreenPtr pScreen, int argc, char **argv)
/* must be after RGB ordering fixed */
fbPictureInit(pScreen, 0, 0);
/* Do the CRTC independent initialization */
if(!SMI_HWInit(pScrn))
LEAVE(FALSE);
@@ -1812,7 +1812,7 @@ SMI_CloseScreen(ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
SMIPtr pSmi = SMIPTR(pScrn);
Bool ret;
ENTER();
if (pSmi->HwCursor)

View File

@@ -93,7 +93,7 @@ SMI_EXAInit(ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
SMIPtr pSmi = SMIPTR(pScrn);
ENTER();
if (!(pSmi->EXADriverPtr = exaDriverAlloc())) {
@@ -225,7 +225,7 @@ SMI_PrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir, int ydir,
DEBUG("xdir=%d ydir=%d alu=%02X", xdir, ydir, alu);
/* Bit Mask not supported > 16 bpp */
if ((pSrcPixmap->drawable.bitsPerPixel > 16) &&
if ((pSrcPixmap->drawable.bitsPerPixel > 16) &&
(!EXA_PM_IS_SOLID(&pSrcPixmap->drawable, planemask)))
LEAVE(FALSE);
@@ -374,7 +374,7 @@ SMI_PrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg)
LEAVE(FALSE);
/* Bit Mask not supported > 16 bpp */
if ((pPixmap->drawable.bitsPerPixel > 16) &&
if ((pPixmap->drawable.bitsPerPixel > 16) &&
(!EXA_PM_IS_SOLID(&pPixmap->drawable, planemask)))
LEAVE(FALSE);

View File

@@ -31,7 +31,7 @@
enum region_type {
REGION_MEM,
REGION_IO
REGION_IO
};
#ifndef XSERVER_LIBPCIACCESS

View File

@@ -65,7 +65,7 @@ authorization from the XFree86 Project and silicon Motion.
#undef CLAMP
#undef ENTRIES
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define CLAMP(v, min, max) (((v) < (min)) ? (min) : MIN(v, max))
#define ENTRIES(array) (sizeof(array) / sizeof((array)[0]))
@@ -558,7 +558,7 @@ SMI_BuildEncodings(SMI_PortPtr p)
}
}
LEAVE();
fail:
free(p->input);
p->input = NULL;
@@ -641,7 +641,7 @@ SetAttr(ScrnInfoPtr pScrn, int i, int value)
if (i < XV_ENCODING || i > XV_HUE)
return BadMatch;
/* clamps value to attribute range */
value = CLAMP(value, SMI_VideoAttributes[i].min_value,
SMI_VideoAttributes[i].max_value);
@@ -719,7 +719,7 @@ SetAttrSAA7111(ScrnInfoPtr pScrn, int i, int value)
DEBUG("SetAttribute XV_BRIGHTNESS: %d\n", value);
slave_adr = 0x0a;
break;
case XV_CONTRAST:
DEBUG("SetAttribute XV_CONTRAST: %d\n", value);
slave_adr = 0x0b;
@@ -855,17 +855,17 @@ SMI_SetupVideo(ScreenPtr pScreen)
if (!IS_MSOC(pSmi) && xf86I2CDevInit(&(smiPortPtr->I2CDev))) {
if (xf86I2CWriteVec(&(smiPortPtr->I2CDev), SAA7111InitData, ENTRIES(SAA7111InitData) / 2)) {
xvEncoding = MAKE_ATOM(XV_ENCODING_NAME);
xvHue = MAKE_ATOM(XV_HUE_NAME);
xvSaturation = MAKE_ATOM(XV_SATURATION_NAME);
xvContrast = MAKE_ATOM(XV_CONTRAST_NAME);
xvInterlaced = MAKE_ATOM(XV_INTERLACED_NAME);
DEBUG("SAA7111 initialized\n");
} else {
} else {
xf86DestroyI2CDevRec(&(smiPortPtr->I2CDev),FALSE);
smiPortPtr->I2CDev.SlaveAddr = 0;
}
@@ -1024,7 +1024,7 @@ SMI_PutVideo(
Bit 21 = 0: Vertical Interpolation = s. below
Bit 22 = 0: Flicker Reduction for TV Modes = disabled
Bit 23 = 0: Fixed Vertical Interpolation = disabled
Bit 24 = 1: Select Video Window I Source Addr =
Bit 24 = 1: Select Video Window I Source Addr =
Bit 25 = 0: Enable V0FIFO to fetch 8-Bit color data = disabled
Bit 26 = 0:
Bit 27 = 1: Color Key for Window II = disabled
@@ -1207,7 +1207,7 @@ SMI_PutVideo(
WRITE_VPR(pSmi, 0x48, vid_address / 8);
/* Video Window II Source Start Address */
WRITE_VPR(pSmi, 0x4C, vid_address / 8 + vid_pitch / 8);
/* Video Source Clipping Control */
WRITE_CPR(pSmi, 0x04, left + ((top/2) << 16));
/* Video Source Capture Size Control */
@@ -1530,7 +1530,7 @@ SMI_PutImage(
offset3 = tmp;
}
nLines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top;
xf86XVCopyYUV12ToPacked(buf + (top * srcPitch) + (left >> 1),
xf86XVCopyYUV12ToPacked(buf + (top * srcPitch) + (left >> 1),
buf + offset2, buf + offset3, dstStart,
srcPitch, srcPitch2, dstPitch, nLines,
nPixels);
@@ -1574,7 +1574,7 @@ SMI_PutImage(
pPort->videoStatus = CLIENT_VIDEO_ON;
LEAVE(Success);
}
@@ -1906,7 +1906,7 @@ SMI_DisplayVideo0501(ScrnInfoPtr pScrn,
drw_h = vid_h >> 1;
vstretch = (4096 * drw_h / vid_h) | 0x8000;
}
/* Set Color Key Enable bit */
WRITE_DCR(pSmi, 0x0000, READ_DCR(pSmi, 0x0000) | (1 << 9));
@@ -1991,8 +1991,8 @@ SMI_DisplayVideo0730(
WRITE_FPR(pSmi, FPR18, (dstBox->x2) | (dstBox->y2 << 16));
WRITE_FPR(pSmi, FPR1C, offset >> 3);
WRITE_FPR(pSmi, FPR20, (pitch >> 3) | ((pitch >> 3) << 16));
WRITE_FPR(pSmi, FPR24, (hstretch & 0xFF00) | ((vstretch & 0xFF00)>>8));
WRITE_FPR(pSmi, FPR68, ((hstretch & 0x00FF)<<8) | (vstretch & 0x00FF));
WRITE_FPR(pSmi, FPR24, (hstretch & 0xFF00) | ((vstretch & 0xFF00)>>8));
WRITE_FPR(pSmi, FPR68, ((hstretch & 0x00FF)<<8) | (vstretch & 0x00FF));
LEAVE();
}
@@ -2069,10 +2069,10 @@ SMI_InitOffscreenImages(
offscreenImages->max_height = pSmi->lcdHeight;
if (!pPort->I2CDev.SlaveAddr) {
offscreenImages->num_attributes = nElems(SMI_VideoAttributes);
offscreenImages->attributes = SMI_VideoAttributes;
offscreenImages->attributes = SMI_VideoAttributes;
} else {
offscreenImages->num_attributes = nElems(SMI_VideoAttributesSAA711x);
offscreenImages->attributes = SMI_VideoAttributesSAA711x;
offscreenImages->attributes = SMI_VideoAttributesSAA711x;
}
xf86XVRegisterOffscreenImages(pScreen, offscreenImages, 1);
@@ -2085,7 +2085,7 @@ SMI_VideoSave(ScreenPtr pScreen, ExaOffscreenArea *area)
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
SMIPtr pSmi = SMIPTR(pScrn);
SMI_PortPtr pPort = pSmi->ptrAdaptor->pPortPrivates[0].ptr;
ENTER();
if (pPort->video_memory == area)
@@ -2171,13 +2171,13 @@ SMI_FreeMemory(
if (pSmi->useEXA) {
ExaOffscreenArea *area = mem_struct;
if (area != NULL)
if (area != NULL)
exaOffscreenFree(pScrn->pScreen, area);
} else {
FBLinearPtr linear = mem_struct;
if (linear != NULL)
if (linear != NULL)
xf86FreeOffscreenLinear(linear);
}