From patchwork Sat Oct 11 14:23:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Lothian X-Patchwork-Id: 5069041 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F08529F295 for ; Sat, 11 Oct 2014 14:23:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E1D9201C0 for ; Sat, 11 Oct 2014 14:23:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2B23820035 for ; Sat, 11 Oct 2014 14:23:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17C1D6E2C4; Sat, 11 Oct 2014 07:23:41 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 34BD96E2C4 for ; Sat, 11 Oct 2014 07:23:39 -0700 (PDT) Received: by mail-oi0-f43.google.com with SMTP id u20so9252015oif.16 for ; Sat, 11 Oct 2014 07:23:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=7eaocWYhlIDYmmw06vBC7B00ct3YmWRcigin/1Sh5Bo=; b=NEOYznmXmrsFn39imSZCv9u9Nm2AT6/OypRqCJwe8PQvQbNr37Pt6Q/AGXho+KAQU3 Yywix1fNdMXRtnq8/ouB9oIzc5Zjf3roavbnCMsR0VIRR4ZdMLl2+MfG1kr/rZ60tUvT WqAsHCy+O9hPiaGghYITugHGx4RFYUl5YXbEJmNiGDcJbB+3qQ6oxCpoTVQWun6usRrw gXt+3BzSG77QhPPtWXrC2jTsxDKxBQVp1q0vInKpIxbr0/8nqw/Fcdfp0nHAURcPum0s bOYZSGIsxKAwHZD3MbML0Ego/sE7byAK+KVdt+tQ0Dnkii0J/Pdfn0iZunzgRb2uTV1J WCJA== X-Gm-Message-State: ALoCoQm/QUEMfIs1V6Qro0yC4S6j6S9RMoeyepLKOpcMHNtpT4TFTl9ttmA/7ej2kJNsvhNttD4h X-Received: by 10.182.58.105 with SMTP id p9mr10927113obq.36.1413037419230; Sat, 11 Oct 2014 07:23:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.116.131 with HTTP; Sat, 11 Oct 2014 07:23:19 -0700 (PDT) In-Reply-To: References: <1412780701-8818-1-git-send-email-ajax@redhat.com> <1412780701-8818-9-git-send-email-ajax@redhat.com> From: Mike Lothian Date: Sat, 11 Oct 2014 15:23:19 +0100 Message-ID: To: Adam Jackson , intel-gfx@lists.freedesktop.org Cc: xorg-devel@lists.x.org Subject: Re: [Intel-gfx] [PATCH 08/37] mi: Drop plane argument from miHandleExposures X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I think I've found the correct way to do it I've tested against xorg-server 1.16.1 and xorg-server from the latest git - I'm not sure if the formatting if correct or not but it compiles and runs on both Cheers Mike On 11 October 2014 14:35, Mike Lothian wrote: > Hi > > This stops xf86-video-intel working or compiling for me > > The below patch is a work around but I'm not quite sure what to check > for to make it work with both old and new xservers > > Cheers > > Mike > > On 8 October 2014 16:04, Adam Jackson wrote: >> This existed to be passed to the bs recovery routine; since we back all >> planes, we don't care. >> >> Signed-off-by: Adam Jackson >> --- >> fb/fbcopy.c | 2 +- >> glamor/glamor_copy.c | 3 +-- >> hw/dmx/dmxgcops.c | 8 ++++---- >> mi/mi.h | 3 +-- >> mi/mibitblt.c | 5 ++--- >> mi/micopy.c | 3 +-- >> mi/miexpose.c | 8 +------- >> 7 files changed, 11 insertions(+), 21 deletions(-) >> >> diff --git a/fb/fbcopy.c b/fb/fbcopy.c >> index 541ef71..5bbabc3 100644 >> --- a/fb/fbcopy.c >> +++ b/fb/fbcopy.c >> @@ -271,5 +271,5 @@ fbCopyPlane(DrawablePtr pSrcDrawable, >> else >> return miHandleExposures(pSrcDrawable, pDstDrawable, pGC, >> xIn, yIn, >> - widthSrc, heightSrc, xOut, yOut, bitplane); >> + widthSrc, heightSrc, xOut, yOut); >> } >> diff --git a/glamor/glamor_copy.c b/glamor/glamor_copy.c >> index 6f422d4..3320935 100644 >> --- a/glamor/glamor_copy.c >> +++ b/glamor/glamor_copy.c >> @@ -677,8 +677,7 @@ glamor_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc, >> { >> if ((bitplane & FbFullMask(src->depth)) == 0) >> return miHandleExposures(src, dst, gc, >> - srcx, srcy, width, height, dstx, dsty, >> - bitplane); >> + srcx, srcy, width, height, dstx, dsty); >> return miDoCopy(src, dst, gc, >> srcx, srcy, width, height, >> dstx, dsty, glamor_copy, bitplane, NULL); >> diff --git a/hw/dmx/dmxgcops.c b/hw/dmx/dmxgcops.c >> index aa7c8eb..0ebd69a 100644 >> --- a/hw/dmx/dmxgcops.c >> +++ b/hw/dmx/dmxgcops.c >> @@ -179,7 +179,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, >> >> if (DMX_GCOPS_OFFSCREEN(pSrc) || DMX_GCOPS_OFFSCREEN(pDst)) >> return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, >> - dstx, dsty, 0L); >> + dstx, dsty); >> >> DMX_GCOPS_SET_DRAWABLE(pSrc, srcDraw); >> DMX_GCOPS_SET_DRAWABLE(pDst, dstDraw); >> @@ -188,7 +188,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, >> srcx, srcy, w, h, dstx, dsty); >> dmxSync(dmxScreen, FALSE); >> >> - return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, 0L); >> + return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); >> } >> >> /** Copy plane number \a bitPlane from \a pSrc drawable to \a pDst >> @@ -206,7 +206,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, >> >> if (DMX_GCOPS_OFFSCREEN(pSrc) || DMX_GCOPS_OFFSCREEN(pDst)) >> return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, width, height, >> - dstx, dsty, bitPlane); >> + dstx, dsty); >> >> DMX_GCOPS_SET_DRAWABLE(pSrc, srcDraw); >> DMX_GCOPS_SET_DRAWABLE(pDst, dstDraw); >> @@ -216,7 +216,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, >> dmxSync(dmxScreen, FALSE); >> >> return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, width, height, >> - dstx, dsty, bitPlane); >> + dstx, dsty); >> } >> >> /** Render list of points, \a pptInit in \a pDrawable on the back-end >> diff --git a/mi/mi.h b/mi/mi.h >> index a4a01b8..700bb11 100644 >> --- a/mi/mi.h >> +++ b/mi/mi.h >> @@ -229,8 +229,7 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , >> int /*width */ , >> int /*height */ , >> int /*dstx */ , >> - int /*dsty */ , >> - unsigned long /*plane */ >> + int /*dsty */ >> ); >> >> extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ , >> diff --git a/mi/mibitblt.c b/mi/mibitblt.c >> index 3ed4ed1..08bd1c5 100644 >> --- a/mi/mibitblt.c >> +++ b/mi/mibitblt.c >> @@ -242,8 +242,7 @@ miCopyArea(DrawablePtr pSrcDrawable, >> } >> } >> prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, >> - widthSrc, heightSrc, xOut, yOut, >> - (unsigned long) 0); >> + widthSrc, heightSrc, xOut, yOut); >> if (realSrcClip) >> RegionDestroy(prgnSrcClip); >> >> @@ -579,7 +578,7 @@ miCopyPlane(DrawablePtr pSrcDrawable, >> } >> } >> prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, >> - width, height, dstx, dsty, bitPlane); >> + width, height, dstx, dsty); >> RegionDestroy(prgnSrc); >> return prgnExposed; >> } >> diff --git a/mi/micopy.c b/mi/micopy.c >> index 3079511..a52b0a7 100644 >> --- a/mi/micopy.c >> +++ b/mi/micopy.c >> @@ -304,8 +304,7 @@ miDoCopy(DrawablePtr pSrcDrawable, >> yIn - pSrcDrawable->y, >> widthSrc, heightSrc, >> xOut - pDstDrawable->x, >> - yOut - pDstDrawable->y, >> - (unsigned long) bitPlane); >> + yOut - pDstDrawable->y); >> RegionUninit(&rgnDst); >> if (freeSrcClip) >> RegionDestroy(prgnSrcClip); >> diff --git a/mi/miexpose.c b/mi/miexpose.c >> index de0e148..7a1c172 100644 >> --- a/mi/miexpose.c >> +++ b/mi/miexpose.c >> @@ -116,18 +116,12 @@ NOTE: >> this should generally be called, even if graphicsExposures is false, >> because this is where bits get recovered from backing store. >> >> -NOTE: >> - added argument 'plane' is used to indicate how exposures from backing >> -store should be accomplished. If plane is 0 (i.e. no bit plane), CopyArea >> -should be used, else a CopyPlane of the indicated plane will be used. The >> -exposing is done by the backing store's GraphicsExpose function, of course. >> - >> */ >> >> RegionPtr >> miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, >> GCPtr pGC, int srcx, int srcy, int width, int height, >> - int dstx, int dsty, unsigned long plane) >> + int dstx, int dsty) >> { >> RegionPtr prgnSrcClip; /* drawable-relative source clip */ >> RegionRec rgnSrcRec; >> -- >> 1.9.3 >> >> _______________________________________________ >> xorg-devel@lists.x.org: X.Org development >> Archives: http://lists.x.org/archives/xorg-devel >> Info: http://lists.x.org/mailman/listinfo/xorg-devel From dbb53d0ffe03726608849473aacf863227843b3e Mon Sep 17 00:00:00 2001 From: Mike Lothian Date: Sat, 11 Oct 2014 15:12:53 +0100 Subject: [PATCH] sna: miHandleExposures no longer requires plane argument This is required since xorg-server commit mi: Drop plane argument from miHandleExposures 5d3bd8a3dc6456ea1ccf7b5f71b972379d7565ec --- src/sna/fb/fbcopy.c | 5 +++++ src/sna/sna_accel.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/sna/fb/fbcopy.c b/src/sna/fb/fbcopy.c index a486a5b..0be9055 100644 --- a/src/sna/fb/fbcopy.c +++ b/src/sna/fb/fbcopy.c @@ -219,7 +219,12 @@ fbCopyPlane(DrawablePtr src, DrawablePtr dst, GCPtr gc, return miDoCopy(src, dst, gc, sx, sy, width, height, dx, dy, fbCopy1toN, (Pixel) bitplane, 0); else +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,16,99,1,0) + return miHandleExposures(src, dst, gc, + sx, sy, width, height, dx, dy); +#else return miHandleExposures(src, dst, gc, sx, sy, width, height, dx, dy, bitplane); +#endif } diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 12221f2..8fa3599 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -7003,11 +7003,18 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc, /* Pixmap sources generate a NoExposed (we return NULL to do this) */ clip = NULL; if (expose && gc->fExpose) +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,16,99,1,0) + clip = miHandleExposures(src, dst, gc, + sx - src->x, sy - src->y, + width, height, + dx - dst->x, dy - dst->y); +#else clip = miHandleExposures(src, dst, gc, sx - src->x, sy - src->y, width, height, dx - dst->x, dy - dst->y, (unsigned long) bitPlane); +#endif return clip; } @@ -8713,10 +8720,17 @@ out: RegionUninit(®ion); return ret; empty: +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,16,99,1,0) + return miHandleExposures(src, dst, gc, + src_x, src_y, + w, h, + dst_x, dst_y); +#else return miHandleExposures(src, dst, gc, src_x, src_y, w, h, dst_x, dst_y, bit); +#endif } static bool -- 2.1.2