Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4310643pxf; Tue, 30 Mar 2021 04:55:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkioiGrF0OIpz9EYUDCTwheW+aeewquUlWAFwtXMwfSiVHQOeoVUpGnGnOOyVAFSz07fo9 X-Received: by 2002:aa7:da97:: with SMTP id q23mr32725301eds.180.1617105334998; Tue, 30 Mar 2021 04:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617105334; cv=none; d=google.com; s=arc-20160816; b=K6pkPsnoD59lZsYDZOaWSycWvb3QVnSQqoiXTxzNUjTtBq8+k99LNhw1cDQmDoM8t7 ihoTJ6bW7tBHYRiu1OmnpUovBCHrxB2bBsJPxkmlAk7B07Yi4+Qz2bnn9vZT2YEn3Jeo 65UXNksoYL0j+BUIEREetimgPrS/NliOtaONIG4+8hZ8LLAZMnuAEQvxnf3VmSqxdxiM YfYXjZ70SWXMul30ilHouByU1cN6Mu1fuFhhQlo8HiYdcke6LtaHdaK0+PFxqpsrEfJ9 qKyf2A4VXspSQXboLhdv/REJdSU5bMdCbY19iUUH8hgoN73qXLH5IHBjd6+qi5cQEWZY 6BAg== 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 :references:in-reply-to:message-id:cc:to:subject:from:date; bh=poGlkRlsXvRK/tj/9I1Hpp6jlQtW6TEe5OyKgqLkJPo=; b=uRu6QVkOTRhQ7/soJ+NMHCwO7yxDmoGg0zFKB+jNv33BhBVZNnyAUadnfA6vRlQyii /wNOPzbgRwx0MbTb0x0rM9bi6sajvYmfblt5wDoE1SRocJDYXMauNYK6YlbscnoHt7xu Eycr8FSbcPiW70W5hPnd663WpDmC2CjAU/h0AYO3ZcYss8Ym3ZPQ88luoJEPX5sZeebg SdCwYghWpt5urp/Ib6qA8iT+K9qXX1MtZpe49t0wyECZapgmop+/BcYP7KlISkx5eZWf V7J5Kmc7iodgfZPgYzAnIZiznMHq8o+CQOfyhYjVzIyyqyxy+w7wRHzD+cZ2JCLK6N8a NRaA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v25si14940707ejw.423.2021.03.30.04.55.12; Tue, 30 Mar 2021 04:55:34 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231902AbhC3Lxu convert rfc822-to-8bit (ORCPT + 99 others); Tue, 30 Mar 2021 07:53:50 -0400 Received: from aposti.net ([89.234.176.197]:58464 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231434AbhC3Lxb (ORCPT ); Tue, 30 Mar 2021 07:53:31 -0400 Date: Tue, 30 Mar 2021 12:53:04 +0100 From: Paul Cercueil Subject: Re: [PATCH 1/2] drm/ingenic: Switch IPU plane to type OVERLAY To: Simon Ser Cc: David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Sam Ravnborg , od@zcrc.me, linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Message-Id: In-Reply-To: References: <20210329175046.214629-1-paul@crapouillou.net> <20210329175046.214629-2-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Simon, Le mar. 30 mars 2021 à 7:23, Simon Ser a écrit : >> It should have been an OVERLAY from the beginning. The documentation >> stipulates that there should be an unique PRIMARY plane per CRTC. > > Thanks for the quick patch! One comment below… > >> Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU") >> Cc: # 5.8+ >> Signed-off-by: Paul Cercueil >> --- >> drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 11 +++++------ >> drivers/gpu/drm/ingenic/ingenic-ipu.c | 2 +- >> 2 files changed, 6 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c >> b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c >> index 29742ec5ab95..09225b770bb8 100644 >> --- 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(struct >> ingenic_drm *priv, >> unsigned int en_bit; >> >> if (priv->soc_info->has_osd) { >> - if (plane->type == DRM_PLANE_TYPE_PRIMARY) >> + if (plane != &priv->f0) > > I don't know about this driver but… is this really the same as the > previous > condition? The previous condition would match two planes, this one > seems to > match only a single plane. What am I missing? There are three planes, which we will call here f0, f1, and ipu. Previously, the "plane->type == DRM_PLANE_TYPE_PRIMARY" matched f1 and ipu. Since ipu is now OVERLAY we have to change the condition or the behaviour will be different, as otherwise it would only match the f1 plane. Cheers, -Paul