summaryrefslogtreecommitdiff
path: root/src/i830_video.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2009-10-14 15:56:55 +0200
committerEric Anholt <eric@anholt.net>2009-10-15 12:36:17 -0700
commit703e3326bb41528cc57c0d25003707df209fc714 (patch)
tree057349a47d6def1a7c9f398574ef8057504a26c4 /src/i830_video.c
parent1c2aedfce9e6a7561347e873d125b6889dee7941 (diff)
Xv overlay: further cleanups
Kill some unnecessary stuff. Small code changes, but no functional ones. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/i830_video.c')
-rw-r--r--src/i830_video.c36
1 files changed, 13 insertions, 23 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index 69276de6..191f44e2 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -140,17 +140,13 @@ static XF86VideoFormatRec Formats[NUM_FORMATS] = {
{15, TrueColor}, {16, TrueColor}, {24, TrueColor}
};
-#define CLONE_ATTRIBUTES 1
-static XF86AttributeRec CloneAttributes[CLONE_ATTRIBUTES] = {
- {XvSettable | XvGettable, -1, 1, "XV_PIPE"}
-};
-
-#define NUM_ATTRIBUTES 4
+#define NUM_ATTRIBUTES 5
static XF86AttributeRec Attributes[NUM_ATTRIBUTES] = {
{XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"},
{XvSettable | XvGettable, -128, 127, "XV_BRIGHTNESS"},
{XvSettable | XvGettable, 0, 255, "XV_CONTRAST"},
- {XvSettable | XvGettable, 0, 1023, "XV_SATURATION"}
+ {XvSettable | XvGettable, 0, 1023, "XV_SATURATION"},
+ {XvSettable | XvGettable, -1, 1, "XV_PIPE"}
};
#define NUM_TEXTURED_ATTRIBUTES 3
@@ -390,18 +386,16 @@ void I830InitVideo(ScreenPtr screen)
}
}
- /* Set up overlay video if we can do it at this depth. */
- if (!OVERLAY_NOEXIST(intel) && scrn->bitsPerPixel != 8) {
- intel->use_drmmode_overlay = drmmode_has_overlay(scrn);
- if (intel->use_drmmode_overlay) {
- overlayAdaptor = I830SetupImageVideoOverlay(screen);
- if (overlayAdaptor != NULL) {
- xf86DrvMsg(scrn->scrnIndex, X_INFO,
- "Set up overlay video\n");
- } else {
- xf86DrvMsg(scrn->scrnIndex, X_ERROR,
- "Failed to set up overlay video\n");
- }
+ /* Set up overlay video if it is available */
+ intel->use_drmmode_overlay = drmmode_has_overlay(scrn);
+ if (intel->use_drmmode_overlay) {
+ overlayAdaptor = I830SetupImageVideoOverlay(screen);
+ if (overlayAdaptor != NULL) {
+ xf86DrvMsg(scrn->scrnIndex, X_INFO,
+ "Set up overlay video\n");
+ } else {
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR,
+ "Failed to set up overlay video\n");
}
}
@@ -470,7 +464,6 @@ static XF86VideoAdaptorPtr I830SetupImageVideoOverlay(ScreenPtr screen)
adapt->pPortPrivates[0].ptr = (pointer) (adaptor_priv);
adapt->nAttributes = NUM_ATTRIBUTES;
- adapt->nAttributes += CLONE_ATTRIBUTES;
if (IS_I9XX(intel))
adapt->nAttributes += GAMMA_ATTRIBUTES; /* has gamma */
adapt->pAttributes =
@@ -480,9 +473,6 @@ static XF86VideoAdaptorPtr I830SetupImageVideoOverlay(ScreenPtr screen)
memcpy((char *)att, (char *)Attributes,
sizeof(XF86AttributeRec) * NUM_ATTRIBUTES);
att += NUM_ATTRIBUTES;
- memcpy((char *)att, (char *)CloneAttributes,
- sizeof(XF86AttributeRec) * CLONE_ATTRIBUTES);
- att += CLONE_ATTRIBUTES;
if (IS_I9XX(intel)) {
memcpy((char *)att, (char *)GammaAttributes,
sizeof(XF86AttributeRec) * GAMMA_ATTRIBUTES);