[openchrome-devel] xf86-video-openchrome: 9 commits - configure.ac src/via_dri.c src/via_driver.h src/via_kms.c src/via_memcpy.c src/via_xv.c src/via_xvmc.c src/via_xv_overlay.c src/via_xvpriv.h
Kevin Brace
kevinbrace at kemper.freedesktop.org
Wed Dec 11 23:15:38 UTC 2019
configure.ac | 2 -
src/via_dri.c | 2 -
src/via_driver.h | 2 -
src/via_kms.c | 8 +++----
src/via_memcpy.c | 4 +--
src/via_xv.c | 56 +++++++++++++++++++++++++++++----------------------
src/via_xv_overlay.c | 2 -
src/via_xvmc.c | 3 +-
src/via_xvpriv.h | 1
9 files changed, 43 insertions(+), 37 deletions(-)
New commits:
commit fd3058ef1686c6471518a89f8f70bf089524d730
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Dec 11 17:13:43 2019 -0600
Version bumped to 0.6.195
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/configure.ac b/configure.ac
index 36d89a4..96cec72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-openchrome],
- [0.6.194],
+ [0.6.195],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/openchrome],
[xf86-video-openchrome])
commit 5ecc2d0453f7854b57507555b87f8011241a6a42
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Dec 11 17:06:00 2019 -0600
Fix declaration after statement compilation warning for via_xv_overlay.c
Inside viaWaitHQVFlipClear().
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_xv_overlay.c b/src/via_xv_overlay.c
index 14aa28c..ccf7dd5 100644
--- a/src/via_xv_overlay.c
+++ b/src/via_xv_overlay.c
@@ -123,10 +123,10 @@ viaWaitHQVFlip(VIAPtr pVia)
static void
viaWaitHQVFlipClear(VIAPtr pVia, unsigned long dwData)
{
+ unsigned count = 50000;
CARD32 volatile *pdwState =
(CARD32 volatile *)(pVia->MapBase + HQV_CONTROL);
*pdwState = dwData;
- unsigned count = 50000;
while (--count && (*pdwState & HQV_FLIP_STATUS)) {
VIASETREG(HQV_CONTROL, *pdwState | HQV_FLIP_STATUS);
commit 1bc9e5e59169613d0a19f75b08e8f981c7413d60
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Dec 11 17:05:48 2019 -0600
Delete unnecessary extern declaration of viaPortPriv[]
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_xvpriv.h b/src/via_xvpriv.h
index b6c796b..8f0c9a0 100644
--- a/src/via_xvpriv.h
+++ b/src/via_xvpriv.h
@@ -84,7 +84,6 @@ typedef struct
} viaPortPrivRec, *viaPortPrivPtr;
-extern viaPortPrivPtr viaPortPriv[];
extern unsigned viaNumXvPorts;
#endif /* _VIA_XVPRIV_H_ */
commit 7f9d854defba1bcaea8fac0ae2e9f98ca4553c74
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Dec 11 17:05:01 2019 -0600
viaPortPriv pointer is renamed pPriv inside viaSetupAdaptors()
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_xv.c b/src/via_xv.c
index 0299a22..8d2823a 100644
--- a/src/via_xv.c
+++ b/src/via_xv.c
@@ -682,7 +682,7 @@ viaSetupAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr ** adaptors)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
int i, j, usedPorts, numPorts;
- viaPortPrivRec *viaPortPriv;
+ viaPortPrivPtr pPriv;
DevUnion *pdevUnion;
DBG_DD(ErrorF(" via_xv.c : viaSetupAdaptors (viaSetupImageVideo): \n"));
@@ -702,7 +702,7 @@ viaSetupAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr ** adaptors)
return 0;
numPorts = numAdaptPort[i];
- viaPortPriv =
+ pPriv =
(viaPortPrivPtr) xnfcalloc(numPorts, sizeof(viaPortPrivRec));
pdevUnion = (DevUnion *) xnfcalloc(numPorts, sizeof(DevUnion));
@@ -725,7 +725,7 @@ viaSetupAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr ** adaptors)
/* The adapter can handle 1 port simultaneously */
viaAdaptPtr[i]->nPorts = numPorts;
viaAdaptPtr[i]->pPortPrivates = pdevUnion;
- viaAdaptPtr[i]->pPortPrivates->ptr = (pointer) viaPortPriv;
+ viaAdaptPtr[i]->pPortPrivates->ptr = (pointer) pPriv;
viaAdaptPtr[i]->nAttributes = NUM_ATTRIBUTES_G;
viaAdaptPtr[i]->pAttributes = AttributesG;
@@ -740,23 +740,23 @@ viaSetupAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr ** adaptors)
viaAdaptPtr[i]->ReputImage = NULL;
viaAdaptPtr[i]->QueryImageAttributes = viaQueryImageAttributes;
for (j = 0; j < numPorts; ++j) {
- viaPortPriv[j].dmaBounceBuffer = NULL;
- viaPortPriv[j].dmaBounceStride = 0;
- viaPortPriv[j].dmaBounceLines = 0;
- viaPortPriv[j].colorKey = 0x0821;
- viaPortPriv[j].autoPaint = TRUE;
- viaPortPriv[j].brightness = 5000.;
- viaPortPriv[j].saturation = 10000;
- viaPortPriv[j].contrast = 10000;
- viaPortPriv[j].hue = 0;
- viaPortPriv[j].FourCC = 0;
- viaPortPriv[j].xv_portnum = j + usedPorts;
- viaPortPriv[j].xvErr = xve_none;
+ pPriv[j].dmaBounceBuffer = NULL;
+ pPriv[j].dmaBounceStride = 0;
+ pPriv[j].dmaBounceLines = 0;
+ pPriv[j].colorKey = 0x0821;
+ pPriv[j].autoPaint = TRUE;
+ pPriv[j].brightness = 5000.;
+ pPriv[j].saturation = 10000;
+ pPriv[j].contrast = 10000;
+ pPriv[j].hue = 0;
+ pPriv[j].FourCC = 0;
+ pPriv[j].xv_portnum = j + usedPorts;
+ pPriv[j].xvErr = xve_none;
#ifdef X_USE_REGION_NULL
- REGION_NULL(pScreen, &viaPortPriv[j].clip);
+ REGION_NULL(pScreen, &pPriv[j].clip);
#else
- REGION_INIT(pScreen, &viaPortPriv[j].clip, NullBox, 1);
+ REGION_INIT(pScreen, &pPriv[j].clip, NullBox, 1);
#endif
}
usedPorts += j;
commit bd7c40192e83d267c03519783b442ab6fbd48c5a
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Dec 11 17:04:43 2019 -0600
Eliminate compilation warnings with XF86AttributeRec struct
In particular, with name member. The original struct name is
XvAttributeRec (the struct is renamed to XF86AttributeRec by
include/xorg/xf86xv.h) declared inside include/xorg/xvdix.h.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_xv.c b/src/via_xv.c
index 001f3f1..0299a22 100644
--- a/src/via_xv.c
+++ b/src/via_xv.c
@@ -139,13 +139,21 @@ static XF86VideoFormatRec FormatsG[NUM_FORMATS_G] = {
#define NUM_ATTRIBUTES_G 6
+static char attributeXvColorkey[] = { "XV_COLORKEY" };
+static char attributeXvBrightness[] = { "XV_BRIGHTNESS" };
+static char attributeXvContrast[] = { "XV_CONTRAST" };
+static char attributeXvSaturation[] = { "XV_SATURATION" };
+static char attributeXvHue[] = { "XV_HUE" };
+static char attributeXvAutopaintColorkey[] =
+ { "XV_AUTOPAINT_COLORKEY" };
+
static XF86AttributeRec AttributesG[NUM_ATTRIBUTES_G] = {
- {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"},
- {XvSettable | XvGettable, 0, 10000, "XV_BRIGHTNESS"},
- {XvSettable | XvGettable, 0, 20000, "XV_CONTRAST"},
- {XvSettable | XvGettable, 0, 20000, "XV_SATURATION"},
- {XvSettable | XvGettable, -180, 180, "XV_HUE"},
- {XvSettable | XvGettable, 0, 1, "XV_AUTOPAINT_COLORKEY"}
+ {XvSettable | XvGettable, 0, (1 << 24) - 1, attributeXvColorkey},
+ {XvSettable | XvGettable, 0, 10000, attributeXvBrightness},
+ {XvSettable | XvGettable, 0, 20000, attributeXvContrast},
+ {XvSettable | XvGettable, 0, 20000, attributeXvSaturation},
+ {XvSettable | XvGettable, -180, 180, attributeXvHue},
+ {XvSettable | XvGettable, 0, 1, attributeXvAutopaintColorkey}
};
#define NUM_IMAGES_G 7
commit 44b2e9fda7bb128ab9b5dd90c2d9b3b54ae182c5
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Dec 11 17:04:35 2019 -0600
Declare Xv attribute strings as const char* type
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_xv.c b/src/via_xv.c
index a4c8140..001f3f1 100644
--- a/src/via_xv.c
+++ b/src/via_xv.c
@@ -235,7 +235,7 @@ static XF86ImageRec ImagesG[NUM_IMAGES_G] = {
};
-static char *XvAdaptorName[XV_ADAPT_NUM] = {
+static const char *XvAdaptorName[XV_ADAPT_NUM] = {
"XV_SWOV"
};
diff --git a/src/via_xvmc.c b/src/via_xvmc.c
index 0fdfe46..c3c8a8e 100644
--- a/src/via_xvmc.c
+++ b/src/via_xvmc.c
@@ -69,7 +69,8 @@
* to be added here to be supported also by XvMC.
* Currently, only colorkey seems to be supported by Xv for Putimage.
*/
-static char *attrXvMC[VIA_NUM_XVMC_ATTRIBUTES] = { "XV_COLORKEY",
+static const char *attrXvMC[VIA_NUM_XVMC_ATTRIBUTES] = {
+ "XV_COLORKEY",
"XV_AUTOPAINT_COLORKEY",
"XV_BRIGHTNESS",
"XV_CONTRAST",
commit 42c02544c8099ffb5d7454391c5f3e259fbfc217
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Dec 11 17:04:23 2019 -0600
Declare copyType parameter of viaVidCopyInit() as const char* type
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_driver.h b/src/via_driver.h
index 0ef15d3..e606cd8 100644
--- a/src/via_driver.h
+++ b/src/via_driver.h
@@ -438,7 +438,7 @@ void viaSetColorSpace(VIAPtr pVia, int hue, int saturation,
/* In via_memcpy.c */
typedef void (*vidCopyFunc)(unsigned char *, const unsigned char *,
int, int, int, int);
-extern vidCopyFunc viaVidCopyInit( char *copyType, ScreenPtr pScreen );
+extern vidCopyFunc viaVidCopyInit(const char *copyType, ScreenPtr pScreen );
/* In via_xwmc.c */
diff --git a/src/via_memcpy.c b/src/via_memcpy.c
index 9d98173..d2f1d94 100644
--- a/src/via_memcpy.c
+++ b/src/via_memcpy.c
@@ -515,7 +515,7 @@ cpuValid(const char *cpuinfo, const char **flags)
* Benchmark the video copy routines and choose the fastest.
*/
vidCopyFunc
-viaVidCopyInit(char *copyType, ScreenPtr pScreen)
+viaVidCopyInit(const char *copyType, ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
@@ -638,7 +638,7 @@ viaVidCopyInit(char *copyType, ScreenPtr pScreen)
#else
vidCopyFunc
-viaVidCopyInit(char *copyType, ScreenPtr pScreen)
+viaVidCopyInit(const char *copyType, ScreenPtr pScreen)
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
commit aae3d86acf9a9c6754f2e3c7165b8ef9121de9f4
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Dec 11 17:03:57 2019 -0600
Rename range to prop_range within drmmode_output_create_resources()
Inside via_kms.c.
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_kms.c b/src/via_kms.c
index 82ed444..66dba2f 100644
--- a/src/via_kms.c
+++ b/src/via_kms.c
@@ -398,7 +398,7 @@ drmmode_output_create_resources(xf86OutputPtr output)
drmmode_prop = p->mode_prop;
if (drmmode_prop->flags & DRM_MODE_PROP_RANGE) {
- INT32 range[2];
+ INT32 prop_range[2];
INT32 value = p->value;
p->num_atoms = 1;
@@ -406,12 +406,12 @@ drmmode_output_create_resources(xf86OutputPtr output)
if (!p->atoms)
continue;
p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE);
- range[0] = drmmode_prop->values[0];
- range[1] = drmmode_prop->values[1];
+ prop_range[0] = drmmode_prop->values[0];
+ prop_range[1] = drmmode_prop->values[1];
err = RRConfigureOutputProperty(output->randr_output, p->atoms[0],
FALSE, TRUE,
drmmode_prop->flags & DRM_MODE_PROP_IMMUTABLE ? TRUE : FALSE,
- 2, range);
+ 2, prop_range);
if (err != 0) {
xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
"RRConfigureOutputProperty error, %d\n", err);
commit 8584b52bae5b540830ae6d340815393e52380036
Author: Kevin Brace <kevinbrace at gmx.com>
Date: Wed Dec 11 17:03:35 2019 -0600
Remove drmExpected and drmCompat structs from via_dri.c
Signed-off-by: Kevin Brace <kevinbrace at gmx.com>
diff --git a/src/via_dri.c b/src/via_dri.c
index 8b5a9f1..e0f049a 100644
--- a/src/via_dri.c
+++ b/src/via_dri.c
@@ -76,8 +76,6 @@ typedef struct
static char VIAKernelDriverName[] = "via";
static char VIAClientDriverName[] = "unichrome";
-static const ViaDRMVersion drmExpected = { 1, 3, 0 };
-static const ViaDRMVersion drmCompat = { 2, 0, 0 };
static char SWRastClientDriverName[] = "swrast";
More information about the openchrome-devel
mailing list