From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1BECC433E1 for ; Tue, 30 Mar 2021 11:54:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C07126199A for ; Tue, 30 Mar 2021 11:54:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbhC3Lxv convert rfc822-to-8bit (ORCPT ); Tue, 30 Mar 2021 07:53:51 -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