From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
Jernej Skrabec <jernej.skrabec-gGgVlfcn5nU@public.gmane.org>,
linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH v4 05/11] drm/sun4i: abstract a engine type
Date: Thu, 20 Apr 2017 16:39:57 +0200 [thread overview]
Message-ID: <20170420143957.t4vppaeydlaeocgh@lukather> (raw)
In-Reply-To: <5F52665D-8A24-40D3-B84B-E8991B3BE457-h8G6r0blFSE@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
On Tue, Apr 18, 2017 at 07:05:12PM +0800, Icenowy Zheng wrote:
> >> @@ -56,7 +55,7 @@ static void sun4i_crtc_atomic_flush(struct drm_crtc
> >*crtc,
> >>
> >> DRM_DEBUG_DRIVER("Committing plane changes\n");
> >>
> >> - sun4i_backend_commit(scrtc->backend);
> >> + scrtc->engine_ops->commit(scrtc->engine);
> >
> >You rely on the backend having setup things properly, which is pretty
> >fragile. Ideally, you should have a function to check that engine_ops
> >and commit is !NULL, and call it, and the consumers would use that
> >function...
>
> If it's really NULL how should the function return?
It depends on the return code. ENOSYS if it returns an int, and simply
does nothing if it's a void. I don't think any of the current
functions return an error code at the moment though, so I'd just keep
the current behaviour and just call the function if it's set.
You cannot fail in atomic_flush anyway.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2017-04-20 14:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-16 12:08 [PATCH v4 00/11] Initial Allwinner Display Engine 2.0 Support Icenowy Zheng
[not found] ` <20170416120849.54542-1-icenowy-h8G6r0blFSE@public.gmane.org>
2017-04-16 12:08 ` [PATCH v4 01/11] dt-bindings: add binding for the Allwinner DE2 CCU Icenowy Zheng
2017-04-20 13:58 ` Rob Herring
2017-04-16 12:08 ` [PATCH v4 02/11] clk: sunxi-ng: add support for " Icenowy Zheng
2017-04-20 14:02 ` Rob Herring
2017-04-20 14:36 ` Maxime Ripard
2017-04-20 22:36 ` Rob Herring
2017-04-16 12:08 ` [PATCH v4 03/11] dt-bindings: add bindings for DE2 on V3s SoC Icenowy Zheng
[not found] ` <20170416120849.54542-4-icenowy-h8G6r0blFSE@public.gmane.org>
2017-04-20 14:05 ` Rob Herring
2017-04-16 12:08 ` [PATCH v4 04/11] drm/sun4i: return only planes for layers created Icenowy Zheng
2017-04-16 12:08 ` [PATCH v4 05/11] drm/sun4i: abstract a engine type Icenowy Zheng
[not found] ` <20170416120849.54542-6-icenowy-h8G6r0blFSE@public.gmane.org>
2017-04-18 8:55 ` Maxime Ripard
2017-04-18 11:05 ` Icenowy Zheng
[not found] ` <5F52665D-8A24-40D3-B84B-E8991B3BE457-h8G6r0blFSE@public.gmane.org>
2017-04-20 14:39 ` Maxime Ripard [this message]
2017-04-16 12:08 ` [PATCH v4 06/11] drm/sun4i: add support for Allwinner DE2 mixers Icenowy Zheng
[not found] ` <20170416120849.54542-7-icenowy-h8G6r0blFSE@public.gmane.org>
2017-04-18 9:00 ` Maxime Ripard
2017-04-18 10:47 ` Icenowy Zheng
[not found] ` <88F5FAC9-1873-4C76-9AB9-FF361C07664E-h8G6r0blFSE@public.gmane.org>
2017-04-20 8:37 ` Maxime Ripard
2017-04-21 8:18 ` icenowy-h8G6r0blFSE
2017-04-16 12:08 ` [PATCH v4 07/11] drm/sun4i: Add compatible string for V3s display engine Icenowy Zheng
2017-04-16 12:08 ` [PATCH v4 08/11] drm/sun4i: tcon: add support for V3s TCON Icenowy Zheng
2017-04-16 12:08 ` [PATCH v4 09/11] ARM: dts: sun8i: add DE2 nodes for V3s SoC Icenowy Zheng
2017-04-16 12:08 ` [PATCH v4 10/11] ARM: dts: sun8i: add pinmux for LCD pins of " Icenowy Zheng
2017-04-16 12:08 ` [PATCH v4 11/11] [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=20170420143957.t4vppaeydlaeocgh@lukather \
--to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=icenowy-h8G6r0blFSE@public.gmane.org \
--cc=jernej.skrabec-gGgVlfcn5nU@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=wens-jdAy2FN1RRM@public.gmane.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