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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B7DEC433FE for ; Wed, 2 Feb 2022 12:28:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344141AbiBBM2e convert rfc822-to-8bit (ORCPT ); Wed, 2 Feb 2022 07:28:34 -0500 Received: from aposti.net ([89.234.176.197]:42234 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231841AbiBBM2d (ORCPT ); Wed, 2 Feb 2022 07:28:33 -0500 Date: Wed, 02 Feb 2022 12:28:17 +0000 From: Paul Cercueil Subject: Re: [PATCH v12 2/9] drm/ingenic: Add support for JZ4780 and HDMI output To: "H. Nikolaus Schaller" Cc: Rob Herring , Mark Rutland , Thomas Bogendoerfer , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal , David Airlie , Daniel Vetter , Neil Armstrong , Robert Foss , Laurent Pinchart , Jernej Skrabec , Harry Wentland , Sam Ravnborg , Maxime Ripard , Hans Verkuil , Liam Girdwood , Mark Brown , Paul Boddie , Andrzej Hajda , Kieran Bingham , devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, Jonas Karlman , dri-devel@lists.freedesktop.org, Ezequiel Garcia Message-Id: <5ZFO6R.M6Z7S3EBA1YC1@crapouillou.net> In-Reply-To: <37CB6D86-4295-4281-BF3E-3E4B40E74196@goldelico.com> References: <6a7b188769a7ad477bf8cb71e1b9bc086b92388d.1643632014.git.hns@goldelico.com> <1F27171F-DFCA-4707-8F50-D1A343F6D78E@goldelico.com> <37CB6D86-4295-4281-BF3E-3E4B40E74196@goldelico.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le mer., févr. 2 2022 at 13:17:14 +0100, H. Nikolaus Schaller a écrit : > Hi Paul, > >> Am 02.02.2022 um 13:06 schrieb Paul Cercueil : >> >> Hi Nikolaus, >> >>>>> @@ -446,6 +454,9 @@ static int >>>>> ingenic_drm_plane_atomic_check(struct drm_plane *plane, >>>>> if (!crtc) >>>>> return 0; >>>>> + if (plane == &priv->f0) >>>>> + return -EINVAL; >>>> This will break JZ4725B -> JZ4770 SoCs, the f0 plane is perfectly >>>> usable there. >>> Hm. I think it was your request/proposal to add this [1]? >> >> Because otherwise with your current patchset the f0 plane does not >> work *on JZ4780*. > > Not that I am eager to fix that, but... > maybe it could be better to fix than having the check and -EINVAL > depend on SoC compatible string > (or some new flag in soc_info. plane_f0_not_working)? Totally agree! A proper fix would be much better. A "plane_f0_not_working" in the meantime is OK with me. Note that there are other things not working with your current implementation, for instance you cannot set the X/Y start position of the f1 plane, which means it's only really usable for fullscreen desktop/windows. >> It does work on older SoCs. >> >>> What I have forgotten is why the f0 plane should not be usable for >>> jz4780. >> >> We return an error here to prevent userspace from using the f0 >> plane until it's effectively working on the JZ4780. > > Well, what would be not working with that plane if user-space would > try to use it? From what I remember, it wouldn't show anything on screen, and after that trying to use the f1 plane wouldn't work either. -Paul