From patchwork Tue Feb 6 11:06:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vidya Srinivas X-Patchwork-Id: 10202767 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 011266020F for ; Tue, 6 Feb 2018 11:08:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEA5128AD7 for ; Tue, 6 Feb 2018 11:08:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E338B28AE2; Tue, 6 Feb 2018 11:08:07 +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=-4.2 required=2.0 tests=BAYES_00, 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 8E2B128AD7 for ; Tue, 6 Feb 2018 11:08:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1699C6E3C6; Tue, 6 Feb 2018 11:08:07 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72EC36E3C6 for ; Tue, 6 Feb 2018 11:08:05 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2018 03:08:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,468,1511856000"; d="scan'208";a="201746746" Received: from vsrini4-ubuntu.iind.intel.com ([10.223.161.6]) by fmsmga006.fm.intel.com with ESMTP; 06 Feb 2018 03:08:03 -0800 From: Vidya Srinivas To: intel-gfx@lists.freedesktop.org Date: Tue, 6 Feb 2018 16:36:44 +0530 Message-Id: <1517915206-30731-3-git-send-email-vidya.srinivas@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517915206-30731-1-git-send-email-vidya.srinivas@intel.com> References: <1517915206-30731-1-git-send-email-vidya.srinivas@intel.com> Subject: [Intel-gfx] [PATCH] drm/i915: NV12 changes for Gen10 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: , Cc: Vidya Srinivas MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Vidya Srinivas --- drivers/gpu/drm/i915/intel_atomic.c | 5 ++--- drivers/gpu/drm/i915/intel_display.c | 7 ++++++- drivers/gpu/drm/i915/intel_sprite.c | 4 ++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index ecba7c7..ca213bc 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -327,14 +327,13 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv, } /* set scaler mode */ - if ((IS_BROXTON(dev_priv) || IS_KABYLAKE(dev_priv)) && + if ((IS_BROXTON(dev_priv) || IS_KABYLAKE(dev_priv) || + IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) && plane_state && plane_state->base.fb && plane_state->base.fb->format->format == DRM_FORMAT_NV12) { scaler_state->scalers[*scaler_id].mode = PS_SCALER_MODE_NV12; - } else if (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) { - scaler_state->scalers[*scaler_id].mode = 0; } else if (num_scalers_need == 1 && intel_crtc->pipe != PIPE_C) { /* * when only 1 scaler is in use on either pipe A or B, diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index df6b11a..115e0ea 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -13200,7 +13200,11 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe) ((pipe == PIPE_A || pipe == PIPE_B))) { intel_primary_formats = nv12_primary_formats; num_formats = ARRAY_SIZE(nv12_primary_formats); + } else if (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) { + intel_primary_formats = nv12_primary_formats; + num_formats = ARRAY_SIZE(nv12_primary_formats); } else { + intel_primary_formats = skl_primary_formats; num_formats = ARRAY_SIZE(skl_primary_formats); } @@ -14006,7 +14010,8 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb, } break; case DRM_FORMAT_NV12: - if (!IS_BROXTON(dev_priv) && !IS_KABYLAKE(dev_priv)) { + if (!IS_BROXTON(dev_priv) && !IS_KABYLAKE(dev_priv) && + !IS_GEMINILAKE(dev_priv) && !IS_CANNONLAKE(dev_priv)) { DRM_DEBUG_KMS("unsupported pixel format: %s\n", drm_get_format_name(mode_cmd->pixel_format, &format_name)); diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 1d35a18..35dcba0 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -1340,6 +1340,10 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv, (pipe == PIPE_A || pipe == PIPE_B) && plane == 0) { plane_formats = nv12_plane_formats; num_plane_formats = ARRAY_SIZE(nv12_plane_formats); + } else if ((IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) && + plane == 0) { + plane_formats = nv12_plane_formats; + num_plane_formats = ARRAY_SIZE(nv12_plane_formats); } else { plane_formats = skl_plane_formats; num_plane_formats = ARRAY_SIZE(skl_plane_formats);