xf86-video-intel: 3 commits - src/intel_video.c src/sna/sna_accel.c src/sna/sna_video_textured.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Sep 13 08:21:41 PDT 2011
src/intel_video.c | 22 +++-------------------
src/sna/sna_accel.c | 11 ++++++++---
src/sna/sna_video_textured.c | 15 +++++++++++++--
3 files changed, 24 insertions(+), 24 deletions(-)
New commits:
commit a9242a77f0952d029be57d75615dd107af660de1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Sep 13 16:20:40 2011 +0100
sna: Add a couple of debug statements for why we may not flush the scanout
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index f7b784d..a635372 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -3211,16 +3211,21 @@ static Bool sna_accel_do_flush(struct sna *sna)
return_if_timer_active(FLUSH_TIMER);
priv = sna_accel_scanout(sna);
- if (priv == NULL)
+ if (priv == NULL) {
+ DBG(("%s -- no scanout attached\n", __FUNCTION__));
return FALSE;
+ }
- if (priv->cpu_damage == NULL && priv->gpu_bo->rq == NULL)
+ if (priv->cpu_damage == NULL && priv->gpu_bo->rq == NULL) {
+ DBG(("%s -- no pending write to scanout\n", __FUNCTION__));
return FALSE;
+ }
if (sna->timer[FLUSH_TIMER] == -1)
return TRUE;
- DBG(("%s, time=%ld\n", __FUNCTION__, (long)GetTimeInMillis()));
+ DBG(("%s, starting flush timer, at time=%ld\n",
+ __FUNCTION__, (long)GetTimeInMillis()));
/* Initial redraw after 10ms. */
to.it_value.tv_sec = 0;
commit 0056bfd11e9930c1bcad6c186cd80fbab3694a8d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Sep 13 14:44:48 2011 +0100
video: Stop advertising unsupported Xv attributes
We have yet to implement a yuv-shader that applies
contrast/brightness/saturation and so should not advertise such
features, potentially allowing the client to fallback and perform the
adjustments itself.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/intel_video.c b/src/intel_video.c
index 34206d1..a35445d 100644
--- a/src/intel_video.c
+++ b/src/intel_video.c
@@ -149,13 +149,6 @@ static XF86AttributeRec Attributes[NUM_ATTRIBUTES] = {
{XvSettable | XvGettable, -1, 1, "XV_PIPE"}
};
-#define NUM_TEXTURED_ATTRIBUTES 3
-static XF86AttributeRec TexturedAttributes[NUM_TEXTURED_ATTRIBUTES] = {
- {XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"},
- {XvSettable | XvGettable, 0, 255, "XV_CONTRAST"},
- {XvSettable | XvGettable, -1, 1, "XV_SYNC_TO_VBLANK"},
-};
-
#define GAMMA_ATTRIBUTES 6
static XF86AttributeRec GammaAttributes[GAMMA_ATTRIBUTES] = {
{XvSettable | XvGettable, 0, 0xffffff, "XV_GAMMA0"},
@@ -526,26 +519,19 @@ static XF86VideoAdaptorPtr I830SetupImageVideoTextured(ScreenPtr screen)
ScrnInfoPtr scrn = xf86Screens[screen->myNum];
intel_screen_private *intel = intel_get_screen_private(scrn);
XF86VideoAdaptorPtr adapt;
- XF86AttributePtr attrs;
intel_adaptor_private *adaptor_privs;
DevUnion *devUnions;
int nports = 16, i;
- int nAttributes;
OVERLAY_DEBUG("I830SetupImageVideoOverlay\n");
- nAttributes = NUM_TEXTURED_ATTRIBUTES;
-
adapt = calloc(1, sizeof(XF86VideoAdaptorRec));
adaptor_privs = calloc(nports, sizeof(intel_adaptor_private));
devUnions = calloc(nports, sizeof(DevUnion));
- attrs = calloc(nAttributes, sizeof(XF86AttributeRec));
- if (adapt == NULL || adaptor_privs == NULL || devUnions == NULL ||
- attrs == NULL) {
+ if (adapt == NULL || adaptor_privs == NULL || devUnions == NULL) {
free(adapt);
free(adaptor_privs);
free(devUnions);
- free(attrs);
return NULL;
}
@@ -559,10 +545,8 @@ static XF86VideoAdaptorPtr I830SetupImageVideoTextured(ScreenPtr screen)
adapt->pFormats = Formats;
adapt->nPorts = nports;
adapt->pPortPrivates = devUnions;
- adapt->nAttributes = nAttributes;
- adapt->pAttributes = attrs;
- memcpy(attrs, TexturedAttributes,
- nAttributes * sizeof(XF86AttributeRec));
+ adapt->nAttributes = 0;
+ adapt->pAttributes = NULL;
if (IS_I915G(intel) || IS_I915GM(intel))
adapt->nImages = NUM_IMAGES - XVMC_IMAGE;
else
commit 84a7c11a8134dfd040d2f90bb1e0670aa2c89962
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Sep 13 14:42:33 2011 +0100
sna/video: Stop advertising unsupported Xv attributes
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_video_textured.c b/src/sna/sna_video_textured.c
index 0e7a291..3b59cf2 100644
--- a/src/sna/sna_video_textured.c
+++ b/src/sna/sna_video_textured.c
@@ -66,8 +66,9 @@ static XF86VideoFormatRec Formats[NUM_FORMATS] = {
{15, TrueColor}, {16, TrueColor}, {24, TrueColor}
};
-#define NUM_TEXTURED_ATTRIBUTES 3
-static XF86AttributeRec TexturedAttributes[NUM_TEXTURED_ATTRIBUTES] = {
+//#define NUM_TEXTURED_ATTRIBUTES 3
+#define NUM_TEXTURED_ATTRIBUTES 0
+static XF86AttributeRec TexturedAttributes[] = {
{XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"},
{XvSettable | XvGettable, 0, 255, "XV_CONTRAST"},
{XvSettable | XvGettable, -1, 1, "XV_SYNC_TO_VBLANK"},
@@ -380,6 +381,7 @@ XF86VideoAdaptorPtr sna_video_textured_setup(struct sna *sna,
adaptor = calloc(1, sizeof(XF86VideoAdaptorRec));
video = calloc(nports, sizeof(struct sna_video));
devUnions = calloc(nports, sizeof(DevUnion));
+#if NUM_TEXTURED_ATTRIBUTES
attrs = calloc(NUM_TEXTURED_ATTRIBUTES, sizeof(XF86AttributeRec));
if (adaptor == NULL ||
video == NULL ||
@@ -391,6 +393,15 @@ XF86VideoAdaptorPtr sna_video_textured_setup(struct sna *sna,
free(attrs);
return NULL;
}
+#else
+ if (adaptor == NULL || video == NULL || devUnions == NULL) {
+ free(adaptor);
+ free(video);
+ free(devUnions);
+ return NULL;
+ }
+ attrs = NULL;
+#endif
adaptor->type = XvWindowMask | XvInputMask | XvImageMask;
adaptor->flags = 0;
More information about the xorg-commit
mailing list