All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yakir Yang <ykk@rock-chips.com>
To: Rob Herring <robh@kernel.org>,
	linux-rockchip@lists.infradead.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH v1 2/4] drm: rockchip: add RGA driver support
Date: Tue, 29 Mar 2016 19:50:12 +0800	[thread overview]
Message-ID: <56FA6BF4.20205@rock-chips.com> (raw)
In-Reply-To: <20160323142021.GA19977@rob-hp-laptop>

Hi Rob,

+ rockchip / dri email list back

On 03/23/2016 10:20 PM, Rob Herring wrote:
> On Mon, Mar 21, 2016 at 05:40:06PM +0800, Yakir Yang wrote:
>> Rockchip RGA is a separate 2D raster graphic acceleration unit. It
>> accelerates 2D graphics operations, such as point/line drawing, image
>> scaling, rotation, BitBLT, alpha blending and image blur/sharpness.
>>
>> The RGA driver is based on Exynos G2D driver, it is performed by two
>> tasks simply.
>> 1. Configures the rendering parameters, such as foreground color and
>>     coordinates data by setting the drawing context registers.
>> 2. Start the rendering process by calling rga_exec() ioctl.
>>
>> The RGA supports DMA mode as host interface. User can make command list
>> to reduce HOST(ARM) loads. The contents of The command list is setted to
>> relevant registers of RGA by DMA.
>>
>> The command list is composed Header and command sets and Tail.
>> - Header: The number of command set(4Bytes)
>> - Command set: Register offset(4Bytes) + Register data(4Bytes)
>> - Tail: Pointer of base address of the other command list(4Bytes)
>>
>> By Tail field, the G2D can process many command lists without halt at
>> one go.
>>
>> The G2D has following the rendering pipeline.
>>                 --->     Color Fill     --->
>>                 |                          |
>> --> DMA (read) ---> Src Bitmap Process ----> Alpha/ROP ---> Format convert ---> DMA (Write)
>>                 |                          |
>>                 ---> Dst Bitmap Process --->
>>
>> And supports various operations from the rendering pipeline.
>> - copy
>> - fast solid color fill
>> - rotation
>> - flip
>> - 4 operand raster operation(ROP4)
>> - alpha blending
>> - color key
>> - dithering
>> - etc
>>
>> User should make the command list to data and registers needed by
>> operation to use. The Rockchip RGA driver only manages the command lists
>> received from user. Some registers needs memory base address(physical
>> address) of image. User doesn't know its physical address, so fills the
>> gem handle of that memory than address to command sets, then RGA driver
>> converts it to memory base address.
>>
>> We adds three ioctls for Rockchip RGA.
>>
>> - ioctls
>> DRM_ROCKCHIP_RGA_GET_VER: get the RGA hardware version
>> DRM_ROCKCHIP_RGA_SET_CMDLIST: set the command list from user to driver
>> DRM_ROCKCHIP_RGA_EXEC: execute the command lists setted to driver
>>
>> Signed-off-by: Yakir Yang <ykk@rock-chips.com>
>> ---
>>   .../bindings/display/rockchip/rockchip-rga.txt     |  36 +
>>   drivers/gpu/drm/rockchip/Kconfig                   |   9 +
>>   drivers/gpu/drm/rockchip/Makefile                  |   1 +
>>   drivers/gpu/drm/rockchip/rockchip_drm_drv.c        |  35 +-
>>   drivers/gpu/drm/rockchip/rockchip_drm_drv.h        |   4 +
>>   drivers/gpu/drm/rockchip/rockchip_drm_rga.c        | 977 +++++++++++++++++++++
>>   drivers/gpu/drm/rockchip/rockchip_drm_rga.h        | 108 +++
>>   include/uapi/drm/rockchip_drm.h                    |  63 ++
>>   8 files changed, 1232 insertions(+), 1 deletion(-)
>>   create mode 100644 Documentation/devicetree/bindings/display/rockchip/rockchip-rga.txt
>>   create mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_rga.c
>>   create mode 100644 drivers/gpu/drm/rockchip/rockchip_drm_rga.h
>>   create mode 100644 include/uapi/drm/rockchip_drm.h
>>
>> diff --git a/Documentation/devicetree/bindings/display/rockchip/rockchip-rga.txt b/Documentation/devicetree/bindings/display/rockchip/rockchip-rga.txt
>> new file mode 100644
>> index 0000000..0c606cb
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/display/rockchip/rockchip-rga.txt
>> @@ -0,0 +1,36 @@
>> +device-tree bindings for rockchip 2D raster graphic acceleration controller (RGA)
> s/rockchip/RockChip/
Done
>> +
>> +RGA is a separate 2D raster graphic acceleration unit. It accelerates 2D
>> +graphics operations, such as point/line drawing, image scaling, rotation,
>> +BitBLT, alpha blending and image blur/sharpness.
>> +
>> +Required properties:
>> +- compatible: value should be one of the following
>> +		"rockchip,rk3228-rga";
>> +		"rockchip,rk3288-rga";
>> +		"rockchip,rk3399-rga";
>> +
>> +- interrupts: RGA interrupt number.
>> +
>> +- clocks: phandle to RGA sclk/hclk/aclk clocks
>> +
>> +- clock-names: should be "aclk" "hclk" and "sclk"
> comma                             ^
>
> You have different orders for clocks and clock-names. Please be clear
> what the order is.
>
Okay
>> +
>> +- resets: Must contain an entry for each entry in reset-names.
>> +  See ../reset/reset.txt for details.
>> +- reset-names: should be "aclk" "hclk" and "sclk"
> Same as clocks?
I should rename them to "core", "axi" and "ahb"
>> +
>> +Example:
>> +SoC specific DT entry:
>> +	rga: rga@ff680000 {
> gpu@... to be generic
Done
>> +		compatible = "rockchip,rk3399-rga";
>> +		reg = <0xff680000 0x10000>;
>> +		interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
>> +		interrupt-names = "rga";
> Not documented. interrupt-names is pointless for single irq, so just
> drop it.
Okay
>> +		clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>;
>> +		clock-names = "aclk", "hclk", "sclk";
>> +
>> +		resets = <&cru SRST_A_RGA>, <&cru SRST_H_RGA>, <&cru SRST_RGA_CORE>;
>> +		reset-names = "aclk", "hclk", "sclk";
>> +		status = "disabled";
>> +	};
>
>


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-03-29 11:50 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21  9:28 [RFC PATCH v1 0/4] Add Rockchip RGA support Yakir Yang
2016-03-21  9:28 ` Yakir Yang
2016-03-21  9:28 ` Yakir Yang
2016-03-21  9:38 ` [RFC PATCH v1 1/4] drm: rockchip: add a common subdrv interfaces Yakir Yang
2016-03-21  9:38   ` Yakir Yang
2016-03-21  9:38   ` Yakir Yang
2016-03-21  9:40 ` [RFC PATCH v1 2/4] drm: rockchip: add RGA driver support Yakir Yang
2016-03-21  9:40   ` Yakir Yang
2016-03-21  9:40   ` Yakir Yang
     [not found]   ` <20160323142021.GA19977@rob-hp-laptop>
2016-03-29 11:50     ` Yakir Yang [this message]
     [not found]   ` <1458553206-26880-1-git-send-email-ykk-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-03-30 18:34     ` Rob Clark
2016-03-30 18:34       ` Rob Clark
2016-03-30 18:34       ` Rob Clark
     [not found] ` <1458552518-25527-1-git-send-email-ykk-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-03-21  9:42   ` [RFC PATCH v1 3/4] ARM: dts: rockchip: add RGA device node for RK3288 Yakir Yang
2016-03-21  9:42     ` Yakir Yang
2016-03-21  9:42     ` Yakir Yang
2016-03-21  9:42 ` [RFC PATCH v1 4/4] ARM: dst: rockchip: enable RGA support on veyron devices Yakir Yang
2016-03-21  9:42   ` Yakir Yang
2016-03-21  9:42   ` Yakir Yang
2016-03-21 11:29 ` [RFC PATCH v1 0/4] Add Rockchip RGA support Heiko Stübner
2016-03-21 11:29   ` Heiko Stübner
2016-03-21 11:29   ` Heiko Stübner
2016-03-21 12:17   ` Yakir Yang
2016-03-21 12:17     ` Yakir Yang
2016-03-21 12:17     ` Yakir Yang
2016-03-22  0:42     ` Heiko Stuebner
2016-03-22  0:42       ` Heiko Stuebner
2016-03-22  0:42       ` Heiko Stuebner
2016-03-22  2:14       ` Yakir Yang
2016-03-22  2:14         ` Yakir Yang
2016-03-22  2:14         ` Yakir Yang
2016-03-28 12:21       ` Emil Velikov
2016-03-28 12:21         ` Emil Velikov
2016-03-28 12:21         ` Emil Velikov
2016-03-28 18:44         ` Heiko Stübner
2016-03-28 18:44           ` Heiko Stübner
2016-03-28 18:44           ` Heiko Stübner
2016-03-28 21:35           ` Emil Velikov
2016-03-28 21:35             ` Emil Velikov
2016-03-28 21:35             ` Emil Velikov
     [not found]             ` <CACvgo52vL5_HQfgfnxRMzSJXYw-sWT3QozZaWswQXHr9-bwBSA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-28 21:46               ` Heiko Stübner
2016-03-28 21:46                 ` Heiko Stübner
2016-03-28 21:46                 ` Heiko Stübner
2016-03-28 22:07                 ` Emil Velikov
2016-03-28 22:07                   ` Emil Velikov
2016-03-28 22:07                   ` Emil Velikov
2016-03-28 22:13                   ` Heiko Stübner
2016-03-28 22:13                     ` Heiko Stübner
2016-03-29 13:13                     ` Emil Velikov
2016-03-29 13:13                       ` Emil Velikov
2016-03-29 13:13                       ` Emil Velikov
     [not found]                       ` <CACvgo50REvRxN2_qdw=2NeTTSgjpA+9c8OZgPE0q19meH6ArKA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-03-30 20:03                         ` Emil Velikov
2016-03-30 20:03                           ` Emil Velikov
2016-03-30 20:03                           ` Emil Velikov
2016-04-05  1:13                           ` Mark yao
2016-04-05  1:13                             ` Mark yao
2016-04-05  1:13                             ` Mark yao
2016-03-29 11:17             ` Yakir Yang
2016-03-29 11:17               ` Yakir Yang
2016-03-29 11:17               ` Yakir Yang
2016-03-29 11:47               ` Heiko Stübner
2016-03-29 11:47                 ` Heiko Stübner
2016-03-29 11:40         ` Yakir Yang
2016-03-29 11:40           ` Yakir Yang
2016-03-29 11:40           ` Yakir Yang
     [not found]           ` <56FA69C5.5090602-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-03-29 13:27             ` Emil Velikov
2016-03-29 13:27               ` Emil Velikov
2016-03-29 13:27               ` Emil Velikov
2016-03-22 10:24     ` Andreas Färber
2016-03-22 10:24       ` Andreas Färber
2016-03-29 11:45       ` Yakir Yang
2016-03-29 11:45         ` Yakir Yang
2016-03-29 11:45         ` Yakir Yang

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=56FA6BF4.20205@rock-chips.com \
    --to=ykk@rock-chips.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.