From patchwork Mon Aug 27 12:37:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Juha-Pekka Heikkila X-Patchwork-Id: 10577057 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 D9FF717DB for ; Mon, 27 Aug 2018 12:38:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C50C82941B for ; Mon, 27 Aug 2018 12:38:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B965E2941F; Mon, 27 Aug 2018 12:38:16 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 7BC0A2941B for ; Mon, 27 Aug 2018 12:38:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C69A06E238; Mon, 27 Aug 2018 12:38:15 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 197246E238 for ; Mon, 27 Aug 2018 12:38:14 +0000 (UTC) Received: by mail-pf1-x443.google.com with SMTP id s13-v6so7538195pfi.7 for ; Mon, 27 Aug 2018 05:38:14 -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:in-reply-to :references; bh=Gtv5Aw6u0+jQpv22yuNFJ/J3EQlf5tZB9X7XzxFxkMg=; b=p7WcFUGMuVdPZLDUiUfcrmDr1hSIN4t1BLXTCUG0rhpAK1F69Q7HPOkykCs7kBWLjj VqAdry5eU/lV7CByZWtPWveNAKUAYNSqDhWyVCPoTD12r9plXU7Jy3LCt4qNJpRqe3VT 0XxrjAfgnf8PxOgRgrknxSt+G7Uv0p56k1+TQT1reqPjoGtlpRIwuTmJD8hmQK63bpd9 LDdjWbGxsTDyNHKOfIY5c3HriLchQdUiGPKLBfmAwTMHED+11yVXYrKlCk5HfU1mt/qP OG2SD4gjidirFcjwkXN622/ezHL0PjNSSpsJw/pHU8Map4OmhLllGC8w0L66Id7eIFhK hVfA== X-Gm-Message-State: APzg51BI3dMxL+gqKJJvFPjmCBDirI+Y1nY0I0pUcRHLB+oR2kvGRl/T aKZ7m3HOaGCenNkPN40sydZHMruW/DQ= X-Google-Smtp-Source: ANB0VdZjWy4KIdt+Xq1JiAUu95J4SHNGkL6aQ0csQ4stx8viIyxnbu2IGGzYJafY7AfGTrup8hZgbg== X-Received: by 2002:a65:464b:: with SMTP id k11-v6mr6386232pgr.448.1535373493399; Mon, 27 Aug 2018 05:38:13 -0700 (PDT) Received: from jheikkil-mobl.fi.intel.com (fmdmzpr04-ext.fm.intel.com. [192.55.54.39]) by smtp.gmail.com with ESMTPSA id j5-v6sm19262476pff.139.2018.08.27.05.38.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Aug 2018 05:38:13 -0700 (PDT) From: Juha-Pekka Heikkila To: intel-gfx@lists.freedesktop.org Date: Mon, 27 Aug 2018 15:37:53 +0300 Message-Id: <1535373473-3594-3-git-send-email-juhapekka.heikkila@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535373473-3594-1-git-send-email-juhapekka.heikkila@gmail.com> References: <1535373473-3594-1-git-send-email-juhapekka.heikkila@gmail.com> Subject: [Intel-gfx] [PATCH 2/2] drm/i915: Enable RGB565 90/270 plane rotation for gen11 onwards. 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" X-Virus-Scanned: ClamAV using ClamSMTP From gen11 onwards RGB565 90/270 plane rotation is supported on hardware. IGT: https://patchwork.freedesktop.org/series/48756/ Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_atomic_plane.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c index 344a16b..c245906 100644 --- a/drivers/gpu/drm/i915/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c @@ -123,14 +123,17 @@ static bool intel_plane_valid_rotation(const struct drm_plane_state *plane_state } /* - * 90/270 is not allowed with RGB64 16:16:16:16, - * RGB 16-bit 5:6:5, and Indexed 8-bit. + * 90/270 is not allowed with RGB64 16:16:16:16 and + * Indexed 8-bit. RGB 16-bit. 5:6:5 is allowed gen11 onwards. * TBD: Add RGB64 case once its added in supported format * list. */ switch (plane_state->fb->format->format) { - case DRM_FORMAT_C8: case DRM_FORMAT_RGB565: + if (INTEL_GEN(dev_priv) >= 11) + break; + /* fall through */ + case DRM_FORMAT_C8: DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n", drm_get_format_name(plane_state->fb->format->format, &format_name));