summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-09-13 14:44:48 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-13 14:44:48 +0100
commit0056bfd11e9930c1bcad6c186cd80fbab3694a8d (patch)
tree7d0dfe10f883059f8862805afb704ba96ed61e47
parent84a7c11a8134dfd040d2f90bb1e0670aa2c89962 (diff)
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@chris-wilson.co.uk>
-rw-r--r--src/intel_video.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/intel_video.c b/src/intel_video.c
index 34206d16..a35445d6 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