From patchwork Tue Aug 11 14:06:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 40677 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7BE7GoI022369 for ; Tue, 11 Aug 2009 14:07:16 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B0D329EE0C; Tue, 11 Aug 2009 07:07:15 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail.ffwll.ch (cable-static-49-187.intergga.ch [157.161.49.187]) by gabe.freedesktop.org (Postfix) with ESMTP id 572449EE01 for ; Tue, 11 Aug 2009 07:07:10 -0700 (PDT) Received: by mail.ffwll.ch (Postfix, from userid 1000) id E7CDF20C228; Wed, 12 Aug 2009 00:00:38 +0200 (CEST) X-Spam-ASN: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on orange.ffwll.ch X-Spam-Level: X-Spam-Hammy: 0.000-+--signed-off-by, 0.000-+--signedoffby, 0.000-+--100644 X-Spam-Status: No, score=-4.4 required=6.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Spammy: 0.970-+--H*Ad:U*daniel.vetter, 0.970-+--H*m:ffwll Received: from biene (unknown [192.168.23.129]) by mail.ffwll.ch (Postfix) with ESMTP id 4AA9E20C22A; Wed, 12 Aug 2009 00:00:08 +0200 (CEST) Received: from daniel by biene with local (Exim 4.69) (envelope-from ) id 1Mas0B-0003eh-Jo; Tue, 11 Aug 2009 16:06:59 +0200 From: Daniel Vetter To: intel-gfx@lists.freedesktop.org Date: Tue, 11 Aug 2009 16:06:42 +0200 Message-Id: <3a4e39fa527e6f1bec9306a0c9d7b69b222532a6.1249999028.git.daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: References: <0328734a90544a6cd72d9eaf64015db9d3462921.1249999028.git.daniel.vetter@ffwll.ch> <10614c7dd4ecbb1b4d3dd6a15b949cb389053f1f.1249999028.git.daniel.vetter@ffwll.ch> <891b387c6b31972a3e339508e57bd660b2991a17.1249999028.git.daniel.vetter@ffwll.ch> <2096013512e0099bfbb89439943c1b70cccabc92.1249999028.git.daniel.vetter@ffwll.ch> <8a3ddc0d78dcb40a14f8037b81cf202eaa40c301.1249999028.git.daniel.vetter@ffwll.ch> <3e0435569d2d7f58d58eb2f7c8a6952cc29b6934.1249999028.git.daniel.vetter@ffwll.ch> <52250eeaf73398c9c1f91ca7b2317f785f8eba56.1249999028.git.daniel.vetter@ffwll.ch> In-Reply-To: References: Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 12/18] Xv: small cleanups in I830PutImage X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org - scrap unused variable overlay - scrap an superflous if and attach the code to the preceeding else - tiny layout fix. Signed-off-by: Daniel Vetter --- src/i830_video.c | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/i830_video.c b/src/i830_video.c index 6b65e5e..5a961f9 100644 --- a/src/i830_video.c +++ b/src/i830_video.c @@ -2414,7 +2414,6 @@ I830PutImage(ScrnInfoPtr pScrn, I830Ptr pI830 = I830PTR(pScrn); I830PortPrivPtr pPriv = (I830PortPrivPtr) data; ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex]; - I830OverlayRegPtr overlay; PixmapPtr pPixmap = get_drawable_pixmap(pDraw);; INT32 x1, x2, y1, y2; int dstPitch; @@ -2422,11 +2421,6 @@ I830PutImage(ScrnInfoPtr pScrn, BoxRec dstBox; xf86CrtcPtr crtc; - if (pPriv->textured) - overlay = NULL; - else - overlay = I830OVERLAYREG(pI830); - #if 0 ErrorF("I830PutImage: src: (%d,%d)(%d,%d), dst: (%d,%d)(%d,%d)\n" "width %d, height %d\n", src_x, src_y, src_w, src_h, drw_x, drw_y, @@ -2462,7 +2456,7 @@ I830PutImage(ScrnInfoPtr pScrn, width, height)) return Success; - if (!pPriv->textured) { + if (!pPriv->textured) { /* texture video handles rotation differently. */ if (crtc) pPriv->rotation = crtc->rotation; @@ -2471,14 +2465,13 @@ I830PutImage(ScrnInfoPtr pScrn, "Fail to clip video to any crtc!\n"); return Success; } - } + } if (!i830_copy_video_data(pScrn, pPriv, width, height, &dstPitch, &dstPitch2, x1, y1, x2, y2, id, buf)) return BadAlloc; - if (!pPriv->textured) { i830_display_overlay(pScrn, crtc, id, width, height, dstPitch, x1, y1, x2, y2, &dstBox, src_w, src_h, @@ -2510,8 +2503,7 @@ I830PutImage(ScrnInfoPtr pScrn, dstPitch, dstPitch2, x1, y1, x2, y2, src_w, src_h, drw_w, drw_h, pPixmap); } - } - if (pPriv->textured) { + DamageDamageRegion(pDraw, clipBoxes); }