From patchwork Wed May 8 09:55:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 2538181 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 1D4D0DF2E5 for ; Wed, 8 May 2013 09:57:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 158E2E62E2 for ; Wed, 8 May 2013 02:57:31 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 95BEFE62FF; Wed, 8 May 2013 02:55:37 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 08 May 2013 02:55:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,632,1363158000"; d="scan'208";a="334325270" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.168]) by fmsmga002.fm.intel.com with SMTP; 08 May 2013 02:55:34 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 08 May 2013 12:55:31 +0300 From: ville.syrjala@linux.intel.com To: intel-gfx@lists.freedesktop.org Subject: [PATCH 2/7] drm/i915: Don't enable cursors or sprites for fbdev Date: Wed, 8 May 2013 12:55:17 +0300 Message-Id: <1368006922-24957-3-git-send-email-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1368006922-24957-1-git-send-email-ville.syrjala@linux.intel.com> References: <1368006922-24957-1-git-send-email-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Ville Syrjälä Check if the CRTC framebuffer matches the fbdev helper's framebuffer, and if it does, doen't enable cursors/sprites. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_display.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 94d6604..cfe2803 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3264,12 +3264,23 @@ static void ironlake_pfit_enable(struct intel_crtc *crtc) } } +static bool fbdev_active_on_crtc(const struct drm_crtc *crtc) +{ + const struct drm_i915_private *dev_priv = crtc->dev->dev_private; + + return dev_priv->fbdev && dev_priv->fbdev->helper.fb == crtc->fb; +} + static void intel_enable_planes(struct drm_crtc *crtc) { struct drm_device *dev = crtc->dev; enum pipe pipe = to_intel_crtc(crtc)->pipe; struct intel_plane *intel_plane; + /* don't enable sprite planes for fbdev */ + if (fbdev_active_on_crtc(crtc)) + return; + list_for_each_entry(intel_plane, &dev->mode_config.plane_list, base.head) if (intel_plane->pipe == pipe) intel_plane_restore(&intel_plane->base); @@ -6522,6 +6533,10 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc, u32 base, pos; bool visible; + /* don't enable cursors for fbdev */ + if (on && fbdev_active_on_crtc(crtc)) + return; + pos = 0; if (on && crtc->enabled && crtc->fb) {