Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp710806pxv; Thu, 15 Jul 2021 14:08:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWCJ1piTmtxgZfD7h1kRgHkShD7iAhBK2qAfTGFSmOV3ySgM/u1wSruMchw5QGS/whxE3X X-Received: by 2002:a05:6402:4c5:: with SMTP id n5mr9615422edw.322.1626383303372; Thu, 15 Jul 2021 14:08:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626383303; cv=none; d=google.com; s=arc-20160816; b=L+PQWDTB8I+wvElxwU0tszKhW1OF4xHyZqwWZR+iaImJdAURSmjuOpAG0W4hkMZFgc xwsXdKGanORuHRkKfD0ESEZEF8H8YtiIg9Is+aiV5nfjfDrFPS2jbLbvKqiSBW4rf3Mt 9iGmsuPoy5UyFxNBVilJH5RAxWjH+Oru0835Ta1VNGEv3CYFzOWeyTdvua17M76/vvqG OlcVbPfDLL1sl7x5a1qVPqfqUvTtNKRlyUOMUJl0QN4Is6cvyoeXv/aI/p9XNDIr2fx3 S2c/QZzVJUKGVLVFI0kUawtxwtx0n+TBV10VKYF2NkOgF6I4dE1SWV+IdpZ4rukIB4kJ 1xcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bcbfgFusqAsc/bjNlRF288Rs4HZVQfSpaja2o+qo4bE=; b=MTU4dGfVYV/aNg4nhpHHzajKMNWWy6+zsm7gUDWM7L0D26CcQRsiuFyEEv0L5T079N J14N4qpyOHgJyrrzl2ykqFtyGfkBUDexd781bd+EICk/bscIG/l+ilsKQTw5AIVjAj6q onTEk+WS0LYUNELI0bFQblMrZJnJqZWrdV3FROYVzGL/0vCpNRpImdar0d2qnKgLmbzK K+bw0jMQha2tcCMtpV3k4VWC7MIm6zCSNC8zeietXCcfmWONxubjKVf7dTaKuS/iefhT 7vkrCsFlwty71l3l90TgwhbHhSXecGhoRcZHpglEnHbQ3dMrP40NuSR9c2WNS56ZPcba cCvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ok6ImwqS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f17si8023000edv.266.2021.07.15.14.07.58; Thu, 15 Jul 2021 14:08:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ok6ImwqS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245470AbhGOTTs (ORCPT + 99 others); Thu, 15 Jul 2021 15:19:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:39760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241460AbhGOTEo (ORCPT ); Thu, 15 Jul 2021 15:04:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 86CC761409; Thu, 15 Jul 2021 19:00:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375659; bh=WL4coB8igxkVHU+RhTg9k6iV3QdIlvvea6iAsOYIlDk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ok6ImwqSEhzmmuA39YGo0lFRyBK+CkJ3yS7SO0qfG2kZcDGzLSid/7I8W7nWAkDsK 54mUHGezp3CA/W2gpSE7c8nNhVQviru9tJTe2o0HboAVMBmPbKHCXG122nKLTCSkky Y1W6rf80dplXKDpXe5f0heaoIHUziEH08ZHRBa08= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Cercueil , Simon Ser Subject: [PATCH 5.12 181/242] drm/ingenic: Switch IPU plane to type OVERLAY Date: Thu, 15 Jul 2021 20:39:03 +0200 Message-Id: <20210715182625.173409561@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Cercueil commit 68b433fe6937cfa3f8975d18643d5956254edd6a upstream. It should have been an OVERLAY from the beginning. The documentation stipulates that there should be an unique PRIMARY plane per CRTC. Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU") Cc: # 5.8+ Signed-off-by: Paul Cercueil Acked-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20210329175046.214629-2-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 11 +++++------ drivers/gpu/drm/ingenic/ingenic-ipu.c | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -413,7 +413,7 @@ static void ingenic_drm_plane_enable(str unsigned int en_bit; if (priv->soc_info->has_osd) { - if (plane->type == DRM_PLANE_TYPE_PRIMARY) + if (plane != &priv->f0) en_bit = JZ_LCD_OSDC_F1EN; else en_bit = JZ_LCD_OSDC_F0EN; @@ -428,7 +428,7 @@ void ingenic_drm_plane_disable(struct de unsigned int en_bit; if (priv->soc_info->has_osd) { - if (plane->type == DRM_PLANE_TYPE_PRIMARY) + if (plane != &priv->f0) en_bit = JZ_LCD_OSDC_F1EN; else en_bit = JZ_LCD_OSDC_F0EN; @@ -455,8 +455,7 @@ void ingenic_drm_plane_config(struct dev ingenic_drm_plane_enable(priv, plane); - if (priv->soc_info->has_osd && - plane->type == DRM_PLANE_TYPE_PRIMARY) { + if (priv->soc_info->has_osd && plane != &priv->f0) { switch (fourcc) { case DRM_FORMAT_XRGB1555: ctrl |= JZ_LCD_OSDCTRL_RGB555; @@ -504,7 +503,7 @@ void ingenic_drm_plane_config(struct dev } if (priv->soc_info->has_osd) { - if (plane->type == DRM_PLANE_TYPE_PRIMARY) { + if (plane != &priv->f0) { xy_reg = JZ_REG_LCD_XYP1; size_reg = JZ_REG_LCD_SIZE1; } else { @@ -554,7 +553,7 @@ static void ingenic_drm_plane_atomic_upd height = state->src_h >> 16; cpp = state->fb->format->cpp[0]; - if (!priv->soc_info->has_osd || plane->type == DRM_PLANE_TYPE_OVERLAY) + if (!priv->soc_info->has_osd || plane == &priv->f0) hwdesc = &priv->dma_hwdescs->hwdesc_f0; else hwdesc = &priv->dma_hwdescs->hwdesc_f1; --- a/drivers/gpu/drm/ingenic/ingenic-ipu.c +++ b/drivers/gpu/drm/ingenic/ingenic-ipu.c @@ -760,7 +760,7 @@ static int ingenic_ipu_bind(struct devic err = drm_universal_plane_init(drm, plane, 1, &ingenic_ipu_plane_funcs, soc_info->formats, soc_info->num_formats, - NULL, DRM_PLANE_TYPE_PRIMARY, NULL); + NULL, DRM_PLANE_TYPE_OVERLAY, NULL); if (err) { dev_err(dev, "Failed to init plane: %i\n", err); return err;