From patchwork Tue Dec 1 06:18:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenyu Wang X-Patchwork-Id: 63854 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 nB16IHSk029797 for ; Tue, 1 Dec 2009 06:18:17 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E8D89E7C8; Mon, 30 Nov 2009 22:18:17 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fmsmga102.fm.intel.com (mga10.intel.com [192.55.52.92]) by gabe.freedesktop.org (Postfix) with ESMTP id A436D9E710 for ; Mon, 30 Nov 2009 22:18:16 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 30 Nov 2009 22:14:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,317,1257148800"; d="asc'?scan'208";a="518575402" Received: from zhen-devel.sh.intel.com (HELO zhen-devel) ([10.239.13.159]) by fmsmga002.fm.intel.com with ESMTP; 30 Nov 2009 22:18:15 -0800 Date: Tue, 1 Dec 2009 14:18:14 +0800 From: Zhenyu Wang To: Jesse Barnes , Eric Anholt , intel-gfx@lists.freedesktop.org Message-ID: <20091201061814.GH2564@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> <20091201053324.GF2564@zhen-devel.sh.intel.com> MIME-Version: 1.0 In-Reply-To: <20091201053324.GF2564@zhen-devel.sh.intel.com> User-Agent: Mutt/1.5.20 (2009-06-14) 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 a469f6c..707e148 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; + 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_bo_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)