From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754243AbcIDUDu (ORCPT ); Sun, 4 Sep 2016 16:03:50 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33292 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753449AbcIDUDt (ORCPT ); Sun, 4 Sep 2016 16:03:49 -0400 From: Peter Korsgaard To: Maxime Ripard Cc: Daniel Vetter , David Airlie , Thierry Reding , Chen-Yu Tsai , Rob Herring , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Thomas Petazzoni Subject: Re: [linux-sunxi] [PATCH 3/7] drm/sun4i: Add SAT and DRC drivers References: <20160901153204.11217-1-maxime.ripard@free-electrons.com> <20160901153204.11217-4-maxime.ripard@free-electrons.com> Date: Sun, 04 Sep 2016 22:03:06 +0200 In-Reply-To: <20160901153204.11217-4-maxime.ripard@free-electrons.com> (Maxime Ripard's message of "Thu, 1 Sep 2016 17:32:00 +0200") Message-ID: <8737lfwhz9.fsf@dell.be.48ers.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Maxime" == Maxime Ripard writes: Hi, > The A33 pipeline also has some new components called SAT and DRC. Even > though their exact features and programming model is not known (or > documented), they need to be clocked for the pipeline to carry the video > signal all the way. > Add minimal drivers for those that just claim the needed resources for the > pipeline to operate properly. > Signed-off-by: Maxime Ripard > --- > .../bindings/display/sunxi/sun4i-drm.txt | 37 +++++++ > drivers/gpu/drm/sun4i/Makefile | 3 +- > drivers/gpu/drm/sun4i/sun6i_drc.c | 117 +++++++++++++++++++++ > drivers/gpu/drm/sun4i/sun8i_sat.c | 105 ++++++++++++++++++ > 4 files changed, 261 insertions(+), 1 deletion(-) > create mode 100644 drivers/gpu/drm/sun4i/sun6i_drc.c > create mode 100644 drivers/gpu/drm/sun4i/sun8i_sat.c > diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt > index d467ea93ac08..87c3c8dd34cb 100644 > --- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt > +++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt > @@ -51,6 +51,43 @@ Required properties: > second the block connected to the TCON channel 1 (usually the TV > encoder) > +SAT > +--- > + > +The SAT, found in the A33, allows to do some color correction. > + > +Required properties: > + - compatible: value must be one of: > + * allwinner,sun8i-a33-sat > + - reg: base address and size of the memory-mapped region. > + - clock: phandles to bus clock feeding the SAT > + - resets: phandles to the reset line driving the SAT > + > +- ports: A ports node with endpoint definitions as defined in > + Documentation/devicetree/bindings/media/video-interfaces.txt. The > + first port should be the input endpoints, the second one the outputs > + > +DRC > +--- > + > +The DRC, found in the latest Allwinner SoCs (A31, A23, A33), allows to > +do some backlight control to enhance the power consumption. 'Enhance the power consumption'? That doesn't sound like something you would want ;) Presumably it is something to allow you to save power by dynamically adjusting LCD backlight and pixel brightness/contrast depending on screen content? I believe this is typically called content adaptive backlight control: https://www.ecnmag.com/article/2010/04/content-adaptive-lcd-backlight-control You spell out what DRC and SAT stands for in the driver source code, perhaps it also makes sense to do it here? Perhaps rewording it to something like this is clearer: .. allows to dynamically adjust pixel brightness/contrast based on histogram measurements for LCD content adaptive backlight control. -- Bye, Peter Korsgaard From mboxrd@z Thu Jan 1 00:00:00 1970 From: peter@korsgaard.com (Peter Korsgaard) Date: Sun, 04 Sep 2016 22:03:06 +0200 Subject: [linux-sunxi] [PATCH 3/7] drm/sun4i: Add SAT and DRC drivers In-Reply-To: <20160901153204.11217-4-maxime.ripard@free-electrons.com> (Maxime Ripard's message of "Thu, 1 Sep 2016 17:32:00 +0200") References: <20160901153204.11217-1-maxime.ripard@free-electrons.com> <20160901153204.11217-4-maxime.ripard@free-electrons.com> Message-ID: <8737lfwhz9.fsf@dell.be.48ers.dk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org >>>>> "Maxime" == Maxime Ripard writes: Hi, > The A33 pipeline also has some new components called SAT and DRC. Even > though their exact features and programming model is not known (or > documented), they need to be clocked for the pipeline to carry the video > signal all the way. > Add minimal drivers for those that just claim the needed resources for the > pipeline to operate properly. > Signed-off-by: Maxime Ripard > --- > .../bindings/display/sunxi/sun4i-drm.txt | 37 +++++++ > drivers/gpu/drm/sun4i/Makefile | 3 +- > drivers/gpu/drm/sun4i/sun6i_drc.c | 117 +++++++++++++++++++++ > drivers/gpu/drm/sun4i/sun8i_sat.c | 105 ++++++++++++++++++ > 4 files changed, 261 insertions(+), 1 deletion(-) > create mode 100644 drivers/gpu/drm/sun4i/sun6i_drc.c > create mode 100644 drivers/gpu/drm/sun4i/sun8i_sat.c > diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt > index d467ea93ac08..87c3c8dd34cb 100644 > --- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt > +++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt > @@ -51,6 +51,43 @@ Required properties: > second the block connected to the TCON channel 1 (usually the TV > encoder) > +SAT > +--- > + > +The SAT, found in the A33, allows to do some color correction. > + > +Required properties: > + - compatible: value must be one of: > + * allwinner,sun8i-a33-sat > + - reg: base address and size of the memory-mapped region. > + - clock: phandles to bus clock feeding the SAT > + - resets: phandles to the reset line driving the SAT > + > +- ports: A ports node with endpoint definitions as defined in > + Documentation/devicetree/bindings/media/video-interfaces.txt. The > + first port should be the input endpoints, the second one the outputs > + > +DRC > +--- > + > +The DRC, found in the latest Allwinner SoCs (A31, A23, A33), allows to > +do some backlight control to enhance the power consumption. 'Enhance the power consumption'? That doesn't sound like something you would want ;) Presumably it is something to allow you to save power by dynamically adjusting LCD backlight and pixel brightness/contrast depending on screen content? I believe this is typically called content adaptive backlight control: https://www.ecnmag.com/article/2010/04/content-adaptive-lcd-backlight-control You spell out what DRC and SAT stands for in the driver source code, perhaps it also makes sense to do it here? Perhaps rewording it to something like this is clearer: .. allows to dynamically adjust pixel brightness/contrast based on histogram measurements for LCD content adaptive backlight control. -- Bye, Peter Korsgaard From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Korsgaard Subject: Re: [PATCH 3/7] drm/sun4i: Add SAT and DRC drivers Date: Sun, 04 Sep 2016 22:03:06 +0200 Message-ID: <8737lfwhz9.fsf@dell.be.48ers.dk> References: <20160901153204.11217-1-maxime.ripard@free-electrons.com> <20160901153204.11217-4-maxime.ripard@free-electrons.com> Reply-To: jacmet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Sender: Peter Korsgaard In-Reply-To: <20160901153204.11217-4-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> (Maxime Ripard's message of "Thu, 1 Sep 2016 17:32:00 +0200") List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Maxime Ripard Cc: Daniel Vetter , David Airlie , Thierry Reding , Chen-Yu Tsai , Rob Herring , dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Thomas Petazzoni List-Id: dri-devel@lists.freedesktop.org >>>>> "Maxime" == Maxime Ripard writes: Hi, > The A33 pipeline also has some new components called SAT and DRC. Even > though their exact features and programming model is not known (or > documented), they need to be clocked for the pipeline to carry the video > signal all the way. > Add minimal drivers for those that just claim the needed resources for the > pipeline to operate properly. > Signed-off-by: Maxime Ripard > --- > .../bindings/display/sunxi/sun4i-drm.txt | 37 +++++++ > drivers/gpu/drm/sun4i/Makefile | 3 +- > drivers/gpu/drm/sun4i/sun6i_drc.c | 117 +++++++++++++++++++++ > drivers/gpu/drm/sun4i/sun8i_sat.c | 105 ++++++++++++++++++ > 4 files changed, 261 insertions(+), 1 deletion(-) > create mode 100644 drivers/gpu/drm/sun4i/sun6i_drc.c > create mode 100644 drivers/gpu/drm/sun4i/sun8i_sat.c > diff --git a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt > index d467ea93ac08..87c3c8dd34cb 100644 > --- a/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt > +++ b/Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt > @@ -51,6 +51,43 @@ Required properties: > second the block connected to the TCON channel 1 (usually the TV > encoder) > +SAT > +--- > + > +The SAT, found in the A33, allows to do some color correction. > + > +Required properties: > + - compatible: value must be one of: > + * allwinner,sun8i-a33-sat > + - reg: base address and size of the memory-mapped region. > + - clock: phandles to bus clock feeding the SAT > + - resets: phandles to the reset line driving the SAT > + > +- ports: A ports node with endpoint definitions as defined in > + Documentation/devicetree/bindings/media/video-interfaces.txt. The > + first port should be the input endpoints, the second one the outputs > + > +DRC > +--- > + > +The DRC, found in the latest Allwinner SoCs (A31, A23, A33), allows to > +do some backlight control to enhance the power consumption. 'Enhance the power consumption'? That doesn't sound like something you would want ;) Presumably it is something to allow you to save power by dynamically adjusting LCD backlight and pixel brightness/contrast depending on screen content? I believe this is typically called content adaptive backlight control: https://www.ecnmag.com/article/2010/04/content-adaptive-lcd-backlight-control You spell out what DRC and SAT stands for in the driver source code, perhaps it also makes sense to do it here? Perhaps rewording it to something like this is clearer: .. allows to dynamically adjust pixel brightness/contrast based on histogram measurements for LCD content adaptive backlight control. -- Bye, Peter Korsgaard