All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Jacob Chen <jacob-chen@iotwrt.com>, linux-rockchip@lists.infradead.org
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	heiko@sntech.de, robh+dt@kernel.org, mchehab@kernel.org,
	linux-media@vger.kernel.org,
	laurent.pinchart+renesas@ideasonboard.com,
	hans.verkuil@cisco.com
Subject: Re: [PATCH v11 1/4] rockchip/rga: v4l2 m2m support
Date: Mon, 9 Oct 2017 14:48:13 +0200	[thread overview]
Message-ID: <39318451-a078-3451-47f8-9205a31cadb5@xs4all.nl> (raw)
In-Reply-To: <20171009090424.15292-2-jacob-chen@iotwrt.com>

On 09/10/17 11:04, Jacob Chen 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 driver supports various operations from the rendering pipeline.
>  - copy
>  - fast solid color fill
>  - rotation
>  - flip
>  - alpha blending
> 
> The code in rga-hw.c is used to configure regs according to operations
> The code in rga-buf.c is used to create private mmu table for RGA.
> 
> Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>

I ran checkpatch --strict on this patch and I found a few small issues:

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#1222: FILE: drivers/media/platform/rockchip/rga/rga.c:89:
+               BUG_ON(!ctx);

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#1229: FILE: drivers/media/platform/rockchip/rga/rga.c:96:
+               BUG_ON(!src);

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#1230: FILE: drivers/media/platform/rockchip/rga/rga.c:97:
+               BUG_ON(!dst);

I think you can use WARN_ON here and just return.

CHECK: struct mutex definition without comment
#2235: FILE: drivers/media/platform/rockchip/rga/rga.h:84:
+       struct mutex mutex;

CHECK: spinlock_t definition without comment
#2236: FILE: drivers/media/platform/rockchip/rga/rga.h:85:
+       spinlock_t ctrl_lock;

These two fields need a comment describing what the locks protect.

Also move patch 4/4 to the beginning of the patch series. The bindings
patch should come before the driver.

If I have a v12 with these issues fixed and a MAINTAINERS patch, then
I'll take it on Friday.

Do you want me to take the dts patches or will they go through another tree?

Regards,

	Hans

WARNING: multiple messages have this Message-ID (diff)
From: Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>
To: Jacob Chen <jacob-chen-fyOeoxGR3m/QT0dZR+AlfA@public.gmane.org>,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org,
	hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH v11 1/4] rockchip/rga: v4l2 m2m support
Date: Mon, 9 Oct 2017 14:48:13 +0200	[thread overview]
Message-ID: <39318451-a078-3451-47f8-9205a31cadb5@xs4all.nl> (raw)
In-Reply-To: <20171009090424.15292-2-jacob-chen-fyOeoxGR3m/QT0dZR+AlfA@public.gmane.org>

On 09/10/17 11:04, Jacob Chen 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 driver supports various operations from the rendering pipeline.
>  - copy
>  - fast solid color fill
>  - rotation
>  - flip
>  - alpha blending
> 
> The code in rga-hw.c is used to configure regs according to operations
> The code in rga-buf.c is used to create private mmu table for RGA.
> 
> Signed-off-by: Jacob Chen <jacob-chen-fyOeoxGR3m/QT0dZR+AlfA@public.gmane.org>

I ran checkpatch --strict on this patch and I found a few small issues:

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#1222: FILE: drivers/media/platform/rockchip/rga/rga.c:89:
+               BUG_ON(!ctx);

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#1229: FILE: drivers/media/platform/rockchip/rga/rga.c:96:
+               BUG_ON(!src);

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#1230: FILE: drivers/media/platform/rockchip/rga/rga.c:97:
+               BUG_ON(!dst);

I think you can use WARN_ON here and just return.

CHECK: struct mutex definition without comment
#2235: FILE: drivers/media/platform/rockchip/rga/rga.h:84:
+       struct mutex mutex;

CHECK: spinlock_t definition without comment
#2236: FILE: drivers/media/platform/rockchip/rga/rga.h:85:
+       spinlock_t ctrl_lock;

These two fields need a comment describing what the locks protect.

Also move patch 4/4 to the beginning of the patch series. The bindings
patch should come before the driver.

If I have a v12 with these issues fixed and a MAINTAINERS patch, then
I'll take it on Friday.

Do you want me to take the dts patches or will they go through another tree?

Regards,

	Hans
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: hverkuil@xs4all.nl (Hans Verkuil)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v11 1/4] rockchip/rga: v4l2 m2m support
Date: Mon, 9 Oct 2017 14:48:13 +0200	[thread overview]
Message-ID: <39318451-a078-3451-47f8-9205a31cadb5@xs4all.nl> (raw)
In-Reply-To: <20171009090424.15292-2-jacob-chen@iotwrt.com>

On 09/10/17 11:04, Jacob Chen 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 driver supports various operations from the rendering pipeline.
>  - copy
>  - fast solid color fill
>  - rotation
>  - flip
>  - alpha blending
> 
> The code in rga-hw.c is used to configure regs according to operations
> The code in rga-buf.c is used to create private mmu table for RGA.
> 
> Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>

I ran checkpatch --strict on this patch and I found a few small issues:

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#1222: FILE: drivers/media/platform/rockchip/rga/rga.c:89:
+               BUG_ON(!ctx);

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#1229: FILE: drivers/media/platform/rockchip/rga/rga.c:96:
+               BUG_ON(!src);

WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON()
#1230: FILE: drivers/media/platform/rockchip/rga/rga.c:97:
+               BUG_ON(!dst);

I think you can use WARN_ON here and just return.

CHECK: struct mutex definition without comment
#2235: FILE: drivers/media/platform/rockchip/rga/rga.h:84:
+       struct mutex mutex;

CHECK: spinlock_t definition without comment
#2236: FILE: drivers/media/platform/rockchip/rga/rga.h:85:
+       spinlock_t ctrl_lock;

These two fields need a comment describing what the locks protect.

Also move patch 4/4 to the beginning of the patch series. The bindings
patch should come before the driver.

If I have a v12 with these issues fixed and a MAINTAINERS patch, then
I'll take it on Friday.

Do you want me to take the dts patches or will they go through another tree?

Regards,

	Hans

  reply	other threads:[~2017-10-09 12:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09  9:04 [PATCH v11 0/4] Add Rockchip RGA V4l2 support Jacob Chen
2017-10-09  9:04 ` Jacob Chen
2017-10-09  9:04 ` [PATCH v11 1/4] rockchip/rga: v4l2 m2m support Jacob Chen
2017-10-09  9:04   ` Jacob Chen
2017-10-09 12:48   ` Hans Verkuil [this message]
2017-10-09 12:48     ` Hans Verkuil
2017-10-09 12:48     ` Hans Verkuil
2017-10-09 12:52     ` Heiko Stübner
2017-10-09 12:52       ` Heiko Stübner
2017-10-09  9:04 ` [PATCH v11 2/4] ARM: dts: rockchip: add RGA device node for RK3288 Jacob Chen
2017-10-09  9:04   ` Jacob Chen
2017-10-09  9:04   ` Jacob Chen
2017-10-09  9:04 ` [PATCH v11 3/4] arm64: dts: rockchip: add RGA device node for RK3399 Jacob Chen
2017-10-09  9:04   ` Jacob Chen
2017-10-09  9:04 ` [PATCH v11 4/4] dt-bindings: Document the Rockchip RGA bindings Jacob Chen
2017-10-09  9:04   ` Jacob Chen
2017-10-09 12:43 ` [PATCH v11 0/4] Add Rockchip RGA V4l2 support Hans Verkuil
2017-10-09 12:43   ` Hans Verkuil

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=39318451-a078-3451-47f8-9205a31cadb5@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=devicetree@vger.kernel.org \
    --cc=hans.verkuil@cisco.com \
    --cc=heiko@sntech.de \
    --cc=jacob-chen@iotwrt.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mchehab@kernel.org \
    --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 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.