From patchwork Thu Jun 29 08:57:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kumar, Mahesh" X-Patchwork-Id: 9816257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6D4136020A for ; Thu, 29 Jun 2017 08:54:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B2E1285EC for ; Thu, 29 Jun 2017 08:54:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3D5B2867D; Thu, 29 Jun 2017 08:54:32 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM 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 B2783285EC for ; Thu, 29 Jun 2017 08:54:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44CF36E630; Thu, 29 Jun 2017 08:54:31 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6BC986E62B for ; Thu, 29 Jun 2017 08:54:30 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2017 01:54:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,280,1496127600"; d="scan'208";a="280056354" Received: from unknown (HELO localhost.localdomain) ([10.223.25.241]) by fmsmga004.fm.intel.com with ESMTP; 29 Jun 2017 01:54:28 -0700 From: Mahesh Kumar To: intel-gfx@lists.freedesktop.org Date: Thu, 29 Jun 2017 14:27:40 +0530 Message-Id: <20170629085740.31588-3-mahesh1.kumar@intel.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170629085740.31588-1-mahesh1.kumar@intel.com> References: <20170629085740.31588-1-mahesh1.kumar@intel.com> Cc: paulo.r.zanoni@intel.com, maarten.lankhorst@intel.com Subject: [Intel-gfx] [PATCH 2/2] drm/i915/skl+: Pipe scaling not supported in IF-ID Interlace mode X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP GEN9+ Interlace fetch mode doesn't support pipe scaling, This patch adds check to fail the flip if pipe scaling is requested in Interlace fetch mode. Signed-off-by: Mahesh Kumar --- drivers/gpu/drm/i915/intel_atomic.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index 36d4e635e4ce..a1206d4f9a23 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -224,6 +224,7 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv, struct intel_crtc_scaler_state *scaler_state = &crtc_state->scaler_state; struct drm_atomic_state *drm_state = crtc_state->base.state; + const struct drm_display_mode *mode = &crtc_state->base.adjusted_mode; int num_scalers_need; int i, j; @@ -248,6 +249,13 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv, return -EINVAL; } + /* Scaling/fitting not supported in IF-ID mode in GEN9+ */ + if (INTEL_GEN(dev_priv) >=9 && mode->flags & DRM_MODE_FLAG_INTERLACE && + scaler_state->scaler_users & (1 << SKL_CRTC_INDEX)) { + DRM_DEBUG_KMS("Pipe Scaling not supported with IF-ID mode\n"); + return -EINVAL; + } + /* walkthrough scaler_users bits and start assigning scalers */ for (i = 0; i < sizeof(scaler_state->scaler_users) * 8; i++) { int *scaler_id;