Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp664157pxv; Thu, 15 Jul 2021 12:51:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygPc0Q7ilFYIDKnYBm44GtNl4QL3l55hXuJHAUxJzhQXAdtH1+zIwzAPaKYSj/wm255foj X-Received: by 2002:a02:942e:: with SMTP id a43mr5570663jai.74.1626378708605; Thu, 15 Jul 2021 12:51:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626378708; cv=none; d=google.com; s=arc-20160816; b=ibck3JrSJopuiVHAP0/rv6yhsAGRoPP/MIGd8DrZlY/P76gL2x1gSF7o7GLPx1zkTf 2U+sMyeanQLS2+PERh0DA0gr5MR9Mz1Vuw4/5+z2U5TulgaaKuSTlVQ/NkBLgvbpsrdm BSL6t1xAacVcyZjuointgzlOA7WRv6s4eccpDopdGIoZRwiQYPaMP3llDrJlDP9G71sp DuM/LeZBWFjMn8pFgMv8X44DHpyoxBkoQKG3ehq1oGfq8vIKbNVoQoTlzz32dt+PeKO8 FB/MiiYwBr4mDwFt42HrXUjv4w9M6qbpxKAHqeYN7b4iRMEuz0y5UwkpD0K0VLKXrYWG FuWQ== 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=lmNpCiPo92j2CaSLfLCyKM3lY4rDnURsNB/8hnb2XS4=; b=pT2n7RDUFxGKOdWGkG2j2vDZjO7p5ZWPH5K83dFyIO/NAvv1pzLXZZurKCtZ1QM6Mx vfVKHjS0dC9cfN6a2TplsT9bjD+D1CjsIBXVWXZeB3meIjwb5uzUbh+XosixUAPLMMK4 zk7viXIwFI/Yx2moZexILlBFydcIH0Hg5y9a9P67CAOm3RRmjI7GRRZXGtF+XVA2BRdb 6PqEmXHEjERdAhf1xq1A985DH3wIQN3ctcNr4ShtxBUOtGx22btOkwo87MqDGu7x5HFs Huy7oX1TjLr8DEPC8DtVTzyPFjJcYK5MSFypJ0uzCIxR+9C+dLGsOiAA2HVoFco9qLQH mtpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yGnf1p6D; 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 z9si7911945ilu.28.2021.07.15.12.51.35; Thu, 15 Jul 2021 12:51:48 -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=yGnf1p6D; 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 S1344464AbhGOTtj (ORCPT + 99 others); Thu, 15 Jul 2021 15:49:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:57698 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244622AbhGOTSM (ORCPT ); Thu, 15 Jul 2021 15:18:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0290A61420; Thu, 15 Jul 2021 19:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626376402; bh=kfcPFkTHXH0uaD2baG9cJbDNvsviwsK8Z5CUc7cS8QA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yGnf1p6DiL6bWa/pslMEWdEWzZB5053c9m6e4FqKmOwgdCyiGbSgcr8f6TwZR84dA ADOugeXf4ICywMI7rAw5J1t3P04S3JVQO4poEZHHH4avzMF+rL18+L0u6NDKhfYJZ6 mHWPjrxKmc0IeEKxnhzHJiGRmyyGubPd6QHkNhk0= 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.13 205/266] drm/ingenic: Switch IPU plane to type OVERLAY Date: Thu, 15 Jul 2021 20:39:20 +0200 Message-Id: <20210715182646.203914100@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182613.933608881@linuxfoundation.org> References: <20210715182613.933608881@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 @@ -419,7 +419,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; @@ -434,7 +434,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; @@ -461,8 +461,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; @@ -510,7 +509,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 { @@ -561,7 +560,7 @@ static void ingenic_drm_plane_atomic_upd height = newstate->src_h >> 16; cpp = newstate->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 @@ -767,7 +767,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;