linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chen-Yu Tsai <wens@csie.org>
To: Icenowy Zheng <icenowy@aosc.io>
Cc: Chen-Yu Tsai <wens@csie.org>,
	devicetree <devicetree@vger.kernel.org>,
	linux-sunxi <linux-sunxi@googlegroups.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Rob Herring <robh+dt@kernel.org>,
	Maxime Ripard <maxime.ripard@free-electrons.com>,
	linux-clk <linux-clk@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [linux-sunxi] [PATCH v6 05/13] drm/sun4i: abstract a engine type
Date: Fri, 5 May 2017 16:38:16 +0800	[thread overview]
Message-ID: <CAGb2v65JxaifRt=QXH80Li3RrVzGULpfeYfSW-QeUn7SuNyGew@mail.gmail.com> (raw)
In-Reply-To: <a6dc783f7bd6e625fe456dffd93c4d57@aosc.io>

On Fri, May 5, 2017 at 4:36 PM,  <icenowy@aosc.io> wrote:
> 在 2017-05-05 10:56,Chen-Yu Tsai 写道:
>>
>> On Thu, May 4, 2017 at 7:48 PM, Icenowy Zheng <icenowy@aosc.io> wrote:
>>>
>>> As we are going to add support for the Allwinner DE2 engine in sun4i-drm
>>> driver, we will finally have two types of display engines -- the DE1
>>> backend and the DE2 mixer. They both do some display blending and feed
>>> graphics data to TCON, so I choose to call them both "engine" here.
>>
>>
>> These engines composite different layers into a final image which is
>> then sent out to the TCONs. As such, "compositor" would be an accurate
>> name.
>>
>> However, "engine" is OK, since Allwinner calls this stuff Display Engine
>> 1.0 and 2.0. Hope there won't be a 3.0 ...
>>
>> Maybe you should note that in your commit message. That is justifies the
>> name.
>>
>>>
>>> Abstract the engine type to a new struct with an ops struct, which
>>> contains
>>> functions that should be called outside the engine-specified code (in
>>> TCON, CRTC or TV Encoder code).
>>>
>>> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
>>> ---
>>> Changes in v6:
>>> - Rebased on wens's multi-pipeline patchset.
>>> - Split out Makefile changes.
>>> Changes in v5:
>>> - Really made a sunxi_engine struct type, and moved ops pointer
>>>   into it.
>>> - Added checked ops wrappers.
>>> - Changed the second parameter of layers_init from crtc to engine.
>>> Changes in v4:
>>> - Comments to tag the color correction functions as optional.
>>> - Check before calling the optional functions.
>>> - Change layers_init to satisfy new PATCH v4 04/11.
>>>
>>>  drivers/gpu/drm/sun4i/sun4i_backend.c |  68 ++++++++++++---------
>>>  drivers/gpu/drm/sun4i/sun4i_backend.h |  17 +++---
>>>  drivers/gpu/drm/sun4i/sun4i_crtc.c    |  11 ++--
>>>  drivers/gpu/drm/sun4i/sun4i_crtc.h    |   4 +-
>>>  drivers/gpu/drm/sun4i/sun4i_drv.c     |   2 +-
>>>  drivers/gpu/drm/sun4i/sun4i_drv.h     |   2 +-
>>>  drivers/gpu/drm/sun4i/sun4i_layer.c   |   8 +--
>>>  drivers/gpu/drm/sun4i/sun4i_layer.h   |   5 +-
>>>  drivers/gpu/drm/sun4i/sun4i_tcon.c    |  36 ++++++-----
>>>  drivers/gpu/drm/sun4i/sun4i_tv.c      |   9 ++-
>>>  drivers/gpu/drm/sun4i/sunxi_engine.h  | 112
>>> ++++++++++++++++++++++++++++++++++
>>>  11 files changed, 198 insertions(+), 76 deletions(-)
>>>  create mode 100644 drivers/gpu/drm/sun4i/sunxi_engine.h
>>>

[...]

>>> diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.h
>>> b/drivers/gpu/drm/sun4i/sun4i_layer.h
>>> index 5ea5c994d6ea..004b7cfe8ffb 100644
>>> --- a/drivers/gpu/drm/sun4i/sun4i_layer.h
>>> +++ b/drivers/gpu/drm/sun4i/sun4i_layer.h
>>> @@ -13,6 +13,8 @@
>>>  #ifndef _SUN4I_LAYER_H_
>>>  #define _SUN4I_LAYER_H_
>>>
>>> +struct sunxi_engine;
>>> +
>>>  struct sun4i_layer {
>>>         struct drm_plane        plane;
>>>         struct sun4i_drv        *drv;
>>> @@ -27,6 +29,5 @@ plane_to_sun4i_layer(struct drm_plane *plane)
>>>  }
>>>
>>>  struct drm_plane **sun4i_layers_init(struct drm_device *drm,
>>> -                                    struct sun4i_crtc *crtc);
>>> -
>>> +                                    struct sunxi_engine *engine);
>>
>>
>> Please keep the newline.
>>
>>>  #endif /* _SUN4I_LAYER_H_ */
>>> diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c
>>> b/drivers/gpu/drm/sun4i/sun4i_tcon.c
>>> index 29fd829aa54c..c48135a10fda 100644
>>> --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
>>> +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
>>> @@ -26,12 +26,12 @@
>>>  #include <linux/regmap.h>
>>>  #include <linux/reset.h>
>>>
>>> -#include "sun4i_backend.h"
>>>  #include "sun4i_crtc.h"
>>>  #include "sun4i_dotclock.h"
>>>  #include "sun4i_drv.h"
>>>  #include "sun4i_rgb.h"
>>>  #include "sun4i_tcon.h"
>>> +#include "sunxi_engine.h"
>>
>>
>> Please keep the headers in alphabetical order.
>
>
> sunxi is of course after sun4i.

Sorry. My bad. :(

  reply	other threads:[~2017-05-05  8:38 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-04 11:48 [PATCH v6 00/13] Initial Allwinner Display Engine 2.0 Support Icenowy Zheng
2017-05-04 11:48 ` [PATCH v6 01/13] dt-bindings: add binding for the Allwinner DE2 CCU Icenowy Zheng
2017-05-04 11:48 ` [PATCH v6 02/13] clk: sunxi-ng: add support for " Icenowy Zheng
2017-05-04 12:50   ` Maxime Ripard
2017-05-04 11:48 ` [PATCH v6 03/13] dt-bindings: add bindings for DE2 on V3s SoC Icenowy Zheng
2017-05-05  3:24   ` [linux-sunxi] " Chen-Yu Tsai
2017-05-04 11:48 ` [PATCH v6 04/13] drm/sun4i: return only planes for layers created Icenowy Zheng
2017-05-04 11:48 ` [PATCH v6 05/13] drm/sun4i: abstract a engine type Icenowy Zheng
2017-05-05  2:56   ` [linux-sunxi] " Chen-Yu Tsai
2017-05-05  8:36     ` icenowy
2017-05-05  8:38       ` Chen-Yu Tsai [this message]
2017-05-04 11:48 ` [PATCH v6 06/13] drm/sun4i: add a dedicated module for sun4i-backend and sun4i-layer Icenowy Zheng
2017-05-05  3:10   ` [linux-sunxi] " Chen-Yu Tsai
2017-05-04 11:48 ` [PATCH v6 07/13] drm/sun4i: add a Kconfig option for sun4i-backend Icenowy Zheng
2017-05-05  3:14   ` [linux-sunxi] " Chen-Yu Tsai
2017-05-04 11:48 ` [PATCH v6 08/13] drm/sun4i: add support for Allwinner DE2 mixers Icenowy Zheng
2017-05-04 13:05   ` Maxime Ripard
2017-05-04 16:50     ` icenowy
2017-05-04 16:57       ` icenowy
2017-05-04 17:14         ` icenowy
2017-05-05 12:36       ` Maxime Ripard
2017-05-05 12:39         ` Icenowy Zheng
2017-05-09 20:19           ` Maxime Ripard
2017-05-04 16:52     ` icenowy
2017-05-05  3:40       ` [linux-sunxi] " Chen-Yu Tsai
2017-05-04 11:48 ` [PATCH v6 09/13] drm/sun4i: Add compatible string for V3s display engine Icenowy Zheng
2017-05-04 11:48 ` [PATCH v6 10/13] drm/sun4i: tcon: add support for V3s TCON Icenowy Zheng
2017-05-05  3:33   ` [linux-sunxi] " Chen-Yu Tsai
2017-05-04 11:48 ` [PATCH v6 11/13] ARM: dts: sun8i: add DE2 nodes for V3s SoC Icenowy Zheng
2017-05-05  3:31   ` [linux-sunxi] " Chen-Yu Tsai
2017-05-05  8:53     ` icenowy
2017-05-05 12:30       ` Maxime Ripard
2017-05-05 12:34         ` Icenowy Zheng
2017-05-09 19:26           ` Maxime Ripard
2017-05-04 11:48 ` [PATCH v6 12/13] ARM: dts: sun8i: add pinmux for LCD pins of " Icenowy Zheng
2017-05-05  3:25   ` [linux-sunxi] " Chen-Yu Tsai
2017-05-04 11:48 ` [PATCH v6 13/13] [DO NOT MERGE] ARM: dts: sun8i: enable LCD panel of Lichee Pi Zero Icenowy Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGb2v65JxaifRt=QXH80Li3RrVzGULpfeYfSW-QeUn7SuNyGew@mail.gmail.com' \
    --to=wens@csie.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=icenowy@aosc.io \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).