Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3600087pxb; Fri, 4 Feb 2022 12:04:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHGcNGb42HrJBW2xiBnCkFv/pTFEo2viPQQaeVW73uGlPZRlOGgrQzuiGAqiz3jib6Kt1Q X-Received: by 2002:a17:906:730a:: with SMTP id di10mr442348ejc.489.1644005069206; Fri, 04 Feb 2022 12:04:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644005069; cv=none; d=google.com; s=arc-20160816; b=FR83f09e80prPOBMNPosRDTwDg0S3UrbBwSQPpD71eZeXlLPdDu8kPwxWrVmc/d86v 3cgYEzOF/84sd8RzGSxAKfaCc8Fl1MdEJ6jUP6c4OdyoUIo95IjMzDCt6YNpHpLCYbYG NmD9pMifXE27P39u77M82sEazBs37lV+1U2u7JS/xgKDYYgXE2DxR1Cn1Kc7CiiX6TVd LQt2WAyeX3eCxDnagvf9edtbR5ZgjdEeTf74ow0efEZvlq72wOzsTmatotBRahqJjHtr LbP7URIG1qW2ZXUo/shWZ4BaxDlwpAMVe1G7Zz7rB/FLeshkXrzviVLU+41mtwf2LgTC AM+A== 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=iiFyIos4ebeig//Nc2LoWiE6ZFk4hdyJY5QOGDRW5N0=; b=aFegyV/FAMkrbGsIV181EcQ8QOrzGmJSWzO2dSo4Ro6m1OHCHISM/9H9YgsSIV6bwn 9Pe2kVxOXOP9vbHaE04HSMllT5F1L8uOXYY6ZXjve7JgZjHjyJwNz5szjqcrxk3pTC7f HkCm8gJOWwXu45aCsmeUBpZZW2qsdiYQ8sv9Js783ASO0KulQKhPGJuNhXJ6rq0Rdogk e/yUw49P/MpOkkZjDAUGzF+BhLTlvYpRy/Loaq086f7ruf5ULmT2JrPz67S+syLc/dAU oEOjlc7oK5WRFnBqAsv1Z9ZaMUAAO7AFlNjq3aFMynWEox6fZbnJM6259tcD28bnTGpq nRhA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12si2097913edc.406.2022.02.04.12.04.04; Fri, 04 Feb 2022 12:04:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1344139AbiBBM2e convert rfc822-to-8bit (ORCPT + 99 others); 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