From patchwork Tue Dec 1 05:33:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 63850 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 nB15XTPC024676 for ; Tue, 1 Dec 2009 05:33:29 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2D83B9E77C; Mon, 30 Nov 2009 21:33:29 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from azsmga102.ch.intel.com (mga12.intel.com [143.182.124.36]) by gabe.freedesktop.org (Postfix) with ESMTP id 985EA9E710 for ; Mon, 30 Nov 2009 21:33:26 -0800 (PST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 30 Nov 2009 21:33:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,316,1257148800"; d="asc'?scan'208";a="217295639" Received: from zhen-devel.sh.intel.com (HELO zhen-devel) ([10.239.13.159]) by azsmga001.ch.intel.com with ESMTP; 30 Nov 2009 21:33:24 -0800 Date: Tue, 1 Dec 2009 13:33:24 +0800 From: Zhenyu Wang To: Jesse Barnes Message-ID: <20091201053324.GF2564@zhen-devel.sh.intel.com> Mail-Followup-To: Jesse Barnes , Eric Anholt , intel-gfx@lists.freedesktop.org References: <1259125779-20634-1-git-send-email-zhenyuw@linux.intel.com> <1259125779-20634-2-git-send-email-zhenyuw@linux.intel.com> <1259125779-20634-3-git-send-email-zhenyuw@linux.intel.com> <87fx825pi6.fsf@gaiman.anholt.net> <20091126010852.GE19138@zhen-devel.sh.intel.com> <20091130125930.1b9bd964@jbarnes-piketon> MIME-Version: 1.0 In-Reply-To: <20091130125930.1b9bd964@jbarnes-piketon> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH 3/3] drm/i915: Don't wait interruptible for possible plane buffer flush X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: Zhenyu Wang 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 diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 3417cab..cea496d 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -313,6 +313,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, int fb_id; drmModeModeInfo kmode; unsigned int pitch = scrn->displayWidth * intel->cpp; + struct drm_intel_bo *fb_bo; if (drmmode->fb_id == 0) { ret = drmModeAddFB(drmmode->fd, @@ -336,6 +337,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, crtc->y = y; crtc->rotation = rotation; + fb_bo = intel->front_buffer->bo; + output_ids = xcalloc(sizeof(uint32_t), xf86_config->num_output); if (!output_ids) { ret = FALSE; @@ -376,7 +379,11 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, fb_id = drmmode_crtc->rotate_fb_id; x = 0; y = 0; + fb_bo = drmmode_crtc->rotate_bo; } + /* Wait rendering to fb object complete before actual modesetting */ + drm_intel_gem_start_gtt_access(fb_bo, 1); + ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, fb_id, x, y, output_ids, output_count, &kmode); if (ret)