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=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 250D4C49EA2 for ; Fri, 18 Jun 2021 12:49:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A97561369 for ; Fri, 18 Jun 2021 12:49:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232825AbhFRMv7 (ORCPT ); Fri, 18 Jun 2021 08:51:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231585AbhFRMvz (ORCPT ); Fri, 18 Jun 2021 08:51:55 -0400 Received: from mail-oo1-xc30.google.com (mail-oo1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63415C061574; Fri, 18 Jun 2021 05:49:45 -0700 (PDT) Received: by mail-oo1-xc30.google.com with SMTP id x22-20020a4a62160000b0290245cf6b7feeso2419219ooc.13; Fri, 18 Jun 2021 05:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gYRQQqkflstokbPMQ45EOzFFXs3cNTWmXdnRNdqXloc=; b=EfWWbdEB7R4vC8/JNVZrzmPs2b0Lrk5xFdvgVOkGZNtXPLiBcnD9WGYIogCKJi8RyQ ft70CvqyLzeUFrs5Eq+xMAwhu9Mai+9jh3kUOMYXm+V5rCQ8WGRh6ORbsqTpCtYch6Rg GdJCgPBbFHq3lLDGLp3ejWzlHdyhzpaY7yOfkV0pRri1HqU0I59pSwcu1Pemc9RdF/PF u7SyMC5//oe4mmhUVqRmX/XEeQgFrWTAD4+24xYgLf9/h/mvFhNHlUxcA4DM3vYw3JqH pI24vSWnm9gbcZRoEgtSwZE+LH4KHsnMj5skC5Wg1FN8dXD4SXis/QzT3wIM8AgvuQqp WFCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gYRQQqkflstokbPMQ45EOzFFXs3cNTWmXdnRNdqXloc=; b=OFxxdEnRuulN0g0pU5FUuugIQZF62v6K0ZTAOasmtTT+ryQidyN3soaxR5IMn5gtjd LD95ctp+Fg/SpTnUAJX1DICPJGjOoQVDAjDlthIZUJSAc+xGcciFnAeXQtbGAdsdhryB dmWChIA539o+YTdmmrzK5vbMchCMQhabPqQG1jFv+qeruzLjyPm+X8SMPFN4aCYd1yqx HXWG1Amepjp0q316dO1AZlNmHMMpm/HEDS/V6q7RigZ7gJ3aTtC/8KChTHuBRvbRLRXj vb8u3VDdZ38NdoCwcq85DKXyOFiWZjM9ibRm/xeOHqZUDdMPKJMw0tjHmoFqPSJ1yrUF yM0A== X-Gm-Message-State: AOAM533T+iZJkPRDHtWsN07C8/RcNkae+pEgK2xGRL8oZk2bLA2IokZq xsvvUehDoepJ66yNsIcQHHkqjXNxSTn5OSqE1pU= X-Google-Smtp-Source: ABdhPJxsNeYFNOtY5YWE85ME1DVFAJSS5hj3Ki4PDhCvGsj1DvzdeE8fSkfp5o2vm2uyoJbf3MY6e5TjxyQis22ggOc= X-Received: by 2002:a4a:b1c2:: with SMTP id j2mr8926777ooo.78.1624020584775; Fri, 18 Jun 2021 05:49:44 -0700 (PDT) MIME-Version: 1.0 References: <20210522211055.15988-1-mirela.rabulea@oss.nxp.com> <20210522211055.15988-3-mirela.rabulea@oss.nxp.com> <15d5728aeb7895f81f833e7f7e281861c1fcef9a.camel@collabora.com> In-Reply-To: <15d5728aeb7895f81f833e7f7e281861c1fcef9a.camel@collabora.com> From: Dong Aisheng Date: Fri, 18 Jun 2021 20:47:57 +0800 Message-ID: Subject: Re: [PATCH v13 2/2] arm64: dts: imx: Add jpeg encoder/decoder nodes To: Ezequiel Garcia Cc: Mirela Rabulea , "linux-arm-kernel@lists.infradead.org" , "mchehab@kernel.org" , "shawnguo@kernel.org" , "robh+dt@kernel.org" , Aisheng Dong , "G.n. Zhou" , dl-linux-imx , "linux-kernel@vger.kernel.org" , Laurentiu Palcu , "linux-media@vger.kernel.org" , "paul.kocialkowski@bootlin.com" , "devicetree@vger.kernel.org" , Robert Chiras , "p.zabel@pengutronix.de" , Peng Fan , "hverkuil-cisco@xs4all.nl" , Daniel Baluta , "kernel@pengutronix.de" , "s.hauer@pengutronix.de" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 11, 2021 at 11:01 PM Ezequiel Garcia wrote: > > On Fri, 2021-06-11 at 21:33 +0800, Dong Aisheng wrote: > > [...] > > > > > > > +img_subsys: bus@58000000 { > > > > > + compatible = "simple-bus"; > > > > > + #address-cells = <1>; > > > > > + #size-cells = <1>; > > > > > + ranges = <0x58000000 0x0 0x58000000 0x1000000>; > > > > > + > > > > > + img_ipg_clk: clock-img-ipg { > > > > > + compatible = "fixed-clock"; > > > > > + #clock-cells = <0>; > > > > > + clock-frequency = <200000000>; > > > > > + clock-output-names = "img_ipg_clk"; > > > > > + }; > > > > > + > > > > > + jpegdec: jpegdec@58400000 { > > > > > > > > Node should be disabled by default. > > > > And enable it in board dts including LPCG. > > > > > > At version v5 of this patch, the node was disabled by default, and I > > > received this feedback from Ezequiel Garcia: > > > > > > "Pure memory-to-memory are typically not enabled per-board, but just > > > per-platform. > > > So you can drop the disabled status here." > > > > > > So, in v6 I made it enabled by default. > > > > > > Any strong reasons for enabled/disabled per platform? > > > > AFAIK we usually only enable system basic features and let other > > user selectable features disabled by default in dts. > > Even for device LPCG clocks, if it's enabled by default and later > > enter runtime suspend if no users, it still consumes power. > > > > Well-written drivers shouldn't draw any power if not used. > LPCG won't draw power when not used. But the power domain used by LPCG will still draw power when enter idle state. > And DT is about hardware-description, not about usage-description. > Which means, at the soc.dtsi level you disable devices that need > some board-level hardware thing to be enabled (e.g. a physical > connected, a regulator, etc.). > A pure memory-to-memory should be enabled by default, because > in practice you can't predict what the users a board will want > to use, nor the DT is the place for that. It makes sense to me. Thanks Mirela, Please follow up with Ezequiel's suggestion. For LPCGS used by jpeg, you can keep it enabled by default. Regards Aisheng > > Sticking to hardware description is the best way to get DT right :-) > > Cheers, > Ezequiel > 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=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 ADA01C48BDF for ; Fri, 18 Jun 2021 12:51:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72ED761369 for ; Fri, 18 Jun 2021 12:51:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72ED761369 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qt4RW4nYQwxJLBkrn/sv7SicXCqSFngSUfGdRwXTAY4=; b=WwS+uhlTbXkvvO btaKzPU3xuaSbWcNA0maNUodxI/JLmzOIHaC7RgQD4CdfkTRFeRfelCUEcoKl8+5oQkGGPR4IIEfI zedrATs5q37yeBb0US4fjgldKNRqskjIz2SmM6NAMvzdCeUo+9z+GME83vUJpcAvOf0DoQ9XKog3/ L3cs2mvGeP4UuJOdXHyNDgiVr5CTGJiUIvStbtlF3ueHFM7MRvs4VxQqxWCoqMFoJXRApcUVZkwKQ 9sm9vyHdYsAH6uukUf1B/mgIjnlb+w3/jlFVtYwNuUUZyOSVFhg0FD0F7HxEyJOA5zE/Ph8MNIub9 Dud8F297XMTlhQzE00Xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luDwU-00E509-J1; Fri, 18 Jun 2021 12:49:50 +0000 Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luDwR-00E4zO-Bp for linux-arm-kernel@lists.infradead.org; Fri, 18 Jun 2021 12:49:48 +0000 Received: by mail-oo1-xc34.google.com with SMTP id n20-20020a4abd140000b029024b43f59314so612920oop.9 for ; Fri, 18 Jun 2021 05:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gYRQQqkflstokbPMQ45EOzFFXs3cNTWmXdnRNdqXloc=; b=EfWWbdEB7R4vC8/JNVZrzmPs2b0Lrk5xFdvgVOkGZNtXPLiBcnD9WGYIogCKJi8RyQ ft70CvqyLzeUFrs5Eq+xMAwhu9Mai+9jh3kUOMYXm+V5rCQ8WGRh6ORbsqTpCtYch6Rg GdJCgPBbFHq3lLDGLp3ejWzlHdyhzpaY7yOfkV0pRri1HqU0I59pSwcu1Pemc9RdF/PF u7SyMC5//oe4mmhUVqRmX/XEeQgFrWTAD4+24xYgLf9/h/mvFhNHlUxcA4DM3vYw3JqH pI24vSWnm9gbcZRoEgtSwZE+LH4KHsnMj5skC5Wg1FN8dXD4SXis/QzT3wIM8AgvuQqp WFCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gYRQQqkflstokbPMQ45EOzFFXs3cNTWmXdnRNdqXloc=; b=FaSsT08atWh8JzrOcyXS7l8fpComFNkj7qQHbJkiIlRSau0t2PyIJocBQTNh3PHsx4 RVlfe6J4nc44Blyf+NQc4zInxNFhKMkk8P0y4SpsdI6+9Q2Ppv5VnHEoExYn1lSg3EPc /koZR3MWrFV70IgMrk1AuDvnMh7sYPQrydU0f+diTN80IhXBQexk/qlj6Wjy47wqzRhp KR6fiy4VQ8F2JtayE9I/fuY+bpNrtIqonyIMOQdtEzmB/FHTpGJEtNT+vMj46R8Abfqi bTGwGtlmYV6F5yYUE474Q2RZHR1h5Vk3HDX5fo5Fida8Mx53pKV1eN+GzuFJGKeTNJux RnFw== X-Gm-Message-State: AOAM531uS20rU26b4me7QViFo1BEdmkLdB/OUZ5yqsGzZfDbxJEPEE99 Sk6dpq9VhMs/R3abbkcRtpRChz69c7XMgNJg25s= X-Google-Smtp-Source: ABdhPJxsNeYFNOtY5YWE85ME1DVFAJSS5hj3Ki4PDhCvGsj1DvzdeE8fSkfp5o2vm2uyoJbf3MY6e5TjxyQis22ggOc= X-Received: by 2002:a4a:b1c2:: with SMTP id j2mr8926777ooo.78.1624020584775; Fri, 18 Jun 2021 05:49:44 -0700 (PDT) MIME-Version: 1.0 References: <20210522211055.15988-1-mirela.rabulea@oss.nxp.com> <20210522211055.15988-3-mirela.rabulea@oss.nxp.com> <15d5728aeb7895f81f833e7f7e281861c1fcef9a.camel@collabora.com> In-Reply-To: <15d5728aeb7895f81f833e7f7e281861c1fcef9a.camel@collabora.com> From: Dong Aisheng Date: Fri, 18 Jun 2021 20:47:57 +0800 Message-ID: Subject: Re: [PATCH v13 2/2] arm64: dts: imx: Add jpeg encoder/decoder nodes To: Ezequiel Garcia Cc: Mirela Rabulea , "linux-arm-kernel@lists.infradead.org" , "mchehab@kernel.org" , "shawnguo@kernel.org" , "robh+dt@kernel.org" , Aisheng Dong , "G.n. Zhou" , dl-linux-imx , "linux-kernel@vger.kernel.org" , Laurentiu Palcu , "linux-media@vger.kernel.org" , "paul.kocialkowski@bootlin.com" , "devicetree@vger.kernel.org" , Robert Chiras , "p.zabel@pengutronix.de" , Peng Fan , "hverkuil-cisco@xs4all.nl" , Daniel Baluta , "kernel@pengutronix.de" , "s.hauer@pengutronix.de" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210618_054947_432668_1DC21B88 X-CRM114-Status: GOOD ( 22.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Jun 11, 2021 at 11:01 PM Ezequiel Garcia wrote: > > On Fri, 2021-06-11 at 21:33 +0800, Dong Aisheng wrote: > > [...] > > > > > > > +img_subsys: bus@58000000 { > > > > > + compatible = "simple-bus"; > > > > > + #address-cells = <1>; > > > > > + #size-cells = <1>; > > > > > + ranges = <0x58000000 0x0 0x58000000 0x1000000>; > > > > > + > > > > > + img_ipg_clk: clock-img-ipg { > > > > > + compatible = "fixed-clock"; > > > > > + #clock-cells = <0>; > > > > > + clock-frequency = <200000000>; > > > > > + clock-output-names = "img_ipg_clk"; > > > > > + }; > > > > > + > > > > > + jpegdec: jpegdec@58400000 { > > > > > > > > Node should be disabled by default. > > > > And enable it in board dts including LPCG. > > > > > > At version v5 of this patch, the node was disabled by default, and I > > > received this feedback from Ezequiel Garcia: > > > > > > "Pure memory-to-memory are typically not enabled per-board, but just > > > per-platform. > > > So you can drop the disabled status here." > > > > > > So, in v6 I made it enabled by default. > > > > > > Any strong reasons for enabled/disabled per platform? > > > > AFAIK we usually only enable system basic features and let other > > user selectable features disabled by default in dts. > > Even for device LPCG clocks, if it's enabled by default and later > > enter runtime suspend if no users, it still consumes power. > > > > Well-written drivers shouldn't draw any power if not used. > LPCG won't draw power when not used. But the power domain used by LPCG will still draw power when enter idle state. > And DT is about hardware-description, not about usage-description. > Which means, at the soc.dtsi level you disable devices that need > some board-level hardware thing to be enabled (e.g. a physical > connected, a regulator, etc.). > A pure memory-to-memory should be enabled by default, because > in practice you can't predict what the users a board will want > to use, nor the DT is the place for that. It makes sense to me. Thanks Mirela, Please follow up with Ezequiel's suggestion. For LPCGS used by jpeg, you can keep it enabled by default. Regards Aisheng > > Sticking to hardware description is the best way to get DT right :-) > > Cheers, > Ezequiel > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel