From patchwork Tue Jan 29 12:57:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwan-gyeong Mun X-Patchwork-Id: 10786157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1B8B7922 for ; Tue, 29 Jan 2019 12:57:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C79E2C1DD for ; Tue, 29 Jan 2019 12:57:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00C7F2C215; Tue, 29 Jan 2019 12:57:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0F5F42C1DD for ; Tue, 29 Jan 2019 12:57:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 22C1A89BD4; Tue, 29 Jan 2019 12:57:35 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7C73289BD4 for ; Tue, 29 Jan 2019 12:57:33 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2019 04:57:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,537,1539673200"; d="scan'208";a="270809869" Received: from helsinki.fi.intel.com ([10.237.66.155]) by orsmga004.jf.intel.com with ESMTP; 29 Jan 2019 04:57:30 -0800 From: Gwan-gyeong Mun To: intel-gfx@lists.freedesktop.org Date: Tue, 29 Jan 2019 14:57:29 +0200 Message-Id: <20190129125729.30538-1-gwan-gyeong.mun@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915/gen9: Disable FBC on planes which have an unsupported config. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 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-Virus-Scanned: ClamAV using ClamSMTP Enabling FBC on a plane which has a combination of a 180-degree rotation with having a Height that isn't divisible by 4 causes FIFO underrun, so disable FBC on such a config. Testcase: igt/kms_rotation_crc/multiplane-rotation-cropping-top Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105604 Signed-off-by: Gwan-gyeong Mun Reviewed-by: Juha-Pekka Heikkila --- drivers/gpu/drm/i915/intel_fbc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c index ccd5e110a19c..de4b5781922c 100644 --- a/drivers/gpu/drm/i915/intel_fbc.c +++ b/drivers/gpu/drm/i915/intel_fbc.c @@ -793,6 +793,18 @@ static bool intel_fbc_can_activate(struct intel_crtc *crtc) return false; } + /* + * Work around a problem on GEN9 HW, where enabling FBC on a plane + * which has a combination of a 180-degree rotation with having a Height + * that isn't divisible by 4 causes FIFO underrun. + */ + if (IS_GEN(dev_priv, 9) && + (cache->plane.rotation == DRM_MODE_ROTATE_180) && + (fbc->state_cache.plane.src_h & 3)) { + fbc->no_fbc_reason = "plane has a combination of a 180-degree rotation with a misaligned Height"; + return false; + } + return true; }