From patchwork Mon Sep 23 10:17:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juha-Pekka Heikkila X-Patchwork-Id: 11156571 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E826976 for ; Mon, 23 Sep 2019 10:18:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFD44206C2 for ; Mon, 23 Sep 2019 10:18:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFD44206C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5245C6E841; Mon, 23 Sep 2019 10:18:02 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by gabe.freedesktop.org (Postfix) with ESMTPS id E69FA6E841 for ; Mon, 23 Sep 2019 10:18:00 +0000 (UTC) Received: by mail-pl1-x644.google.com with SMTP id w10so6328974plq.5 for ; Mon, 23 Sep 2019 03:18:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VfN41AG+KhtN5EttR+w0Hts+64Kvq4jnr3t8WHus3Cc=; b=E26yoxI7lArHQDWsSvZRmfvLu01IU3WzXNQE4Xka3UHCtSwrAFGo7Mv4LhlR9XtEAY QZDVqn8LAeITxRybOCFoRL8h7VLCfmcqTda0+ZnF8Ogvd6c5yqUryyzjRk6gDnXShcZ6 jZRB8dFJS9bLYFDEIm2v36+w5ROhWnm0vk2inM748jSpYNlFmKlo5HXBVyNPujQ8RtLe ULlzmReVCvhfVJTwj6Zbyf7UqJBHQNOUAyKeISY3hSEr6KLYAyHqiswvJCgfdSJEqFGX a2GmF9bKlnNvD4ip3HABr4YxVf14dbCBAhZqISf3Qn5ur2QljGZhYBPOpYFyw1QZkTce DrbQ== X-Gm-Message-State: APjAAAW1wNaprkHVu2D0FAr4q2n4bZIIjr20Mex2QDv50NjGAlWXMGI5 ihrwdqCU4HgOQif1JTknVoAwu6vL X-Google-Smtp-Source: APXvYqwnKbkpPxNH/PnBdqAuneLPwZgbxLj5e63oSoSB/AD+hEaq4zUdE2KQCHifuTVmFuKbE4m76w== X-Received: by 2002:a17:902:7008:: with SMTP id y8mr31056548plk.176.1569233880045; Mon, 23 Sep 2019 03:18:00 -0700 (PDT) Received: from jheikkil-mobl.ger.corp.intel.com ([192.55.55.41]) by smtp.gmail.com with ESMTPSA id 16sm12123172pfn.35.2019.09.23.03.17.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Sep 2019 03:17:59 -0700 (PDT) From: Juha-Pekka Heikkila To: intel-gfx@lists.freedesktop.org Date: Mon, 23 Sep 2019 13:17:50 +0300 Message-Id: <1569233870-15007-1-git-send-email-juhapekka.heikkila@gmail.com> X-Mailer: git-send-email 2.7.4 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=VfN41AG+KhtN5EttR+w0Hts+64Kvq4jnr3t8WHus3Cc=; b=B0A+wNiOC6uqxbIMt8x/z1gfI0fJAPHBPRHjEmmimx03UFu0lGrVJ5RMiIMNw9iEuD RKLFWYr5BN0TkJBAbh2CzpC5eIq12FMKvUhK8BGiwQbwCHMkpB9aSFvkuuzNllKvhU6T jFqeziE6ByVJqUwWZW9O4sKJ9MT9zBLwhn3ofZpBdtOei2C2WyWYs9C3jh4KohSE5Cwl AHs7gv0aMYEbsK3RI3vwa7nw1KFsI6+v61zk/3p2wOUgJJG31r8p58Qd3Ulb7b8zNq3D EfB/xiaBxOoG2NhXKSYqBPlZUrjm4A3prj+zaev/hQNHGjZc+So2LcOI8VFnSxEbp+pI zLjg== Subject: [Intel-gfx] [PATCH] drm/i915: Allow gen11 to use over 32k long strides 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: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The stride in bytes must not exceed the size of 8K pixels. Linear 64 bpp pixel format maximum stride in tiles is 1024 which would mean gen11 support 64k long stride. Signed-off-by: Juha-Pekka Heikkila --- drivers/gpu/drm/i915/display/intel_sprite.c | 30 +++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c index 7a7078d..9456a11 100644 --- a/drivers/gpu/drm/i915/display/intel_sprite.c +++ b/drivers/gpu/drm/i915/display/intel_sprite.c @@ -330,16 +330,34 @@ skl_plane_max_stride(struct intel_plane *plane, unsigned int rotation) { const struct drm_format_info *info = drm_format_info(pixel_format); + struct drm_i915_private *dev_priv = to_i915(plane->base.dev); int cpp = info->cpp[0]; + int max_stride_bytes; + + if (INTEL_GEN(dev_priv) >= 11) { + /* + * The stride in bytes must not exceed the + * size of 8K pixels. Linear 64 bpp pixel format + * Maximum Stride in tiles = 1024 + * which would mean ICL support 64k long stride. + * Linear modifier seems to not work with maximum length. + */ + if (modifier == DRM_FORMAT_MOD_LINEAR) + max_stride_bytes = 65536-64; + else + max_stride_bytes = 65536; + } else { + /* + * "The stride in bytes must not exceed the + * of the size of 8K pixels and 32K bytes." + */ + max_stride_bytes = 32768; + } - /* - * "The stride in bytes must not exceed the - * of the size of 8K pixels and 32K bytes." - */ if (drm_rotation_90_or_270(rotation)) - return min(8192, 32768 / cpp); + return min(8192, max_stride_bytes / cpp); else - return min(8192 * cpp, 32768); + return min(8192 * cpp, max_stride_bytes); } static void