From: Philipp Zabel <p.zabel@pengutronix.de>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>,
Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v8 4/5] drm: Add RZ/G2L DU Support
Date: Mon, 24 Apr 2023 20:38:22 +0200 [thread overview]
Message-ID: <20230424183822.GA30248@pengutronix.de> (raw)
In-Reply-To: <20230424161024.136316-5-biju.das.jz@bp.renesas.com>
Hi Biju,
On Mon, Apr 24, 2023 at 05:10:23PM +0100, Biju Das wrote:
> The LCD controller is composed of Frame Compression Processor (FCPVD),
> Video Signal Processor (VSPD), and Display Unit (DU).
>
> It has DPI/DSI interfaces and supports a maximum resolution of 1080p
> along with 2 RPFs to support the blending of two picture layers and
> raster operations (ROPs).
>
> The DU module is connected to VSPD. Add RZ/G2L DU support for RZ/G2L
> alike SoCs.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
[...]
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
> new file mode 100644
> index 000000000000..af877d0dadc2
> --- /dev/null
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
> @@ -0,0 +1,716 @@
[...]
> +static int rzg2l_du_crtc_get(struct rzg2l_du_crtc *rcrtc)
> +{
> + int ret;
> +
> + /*
> + * Guard against double-get, as the function is called from both the
> + * .atomic_enable() and .atomic_begin() handlers.
> + */
> + if (rcrtc->initialized)
> + return 0;
> +
> + ret = clk_prepare_enable(rcrtc->rzg2l_clocks.aclk);
> + if (ret < 0)
> + return ret;
> +
> + ret = clk_prepare_enable(rcrtc->rzg2l_clocks.pclk);
> + if (ret < 0)
> + goto error_clock;
> +
> + ret = reset_control_deassert(rcrtc->rstc);
> + if (ret < 0)
> + goto error_reset;
> +
> + rzg2l_du_crtc_setup(rcrtc);
> + rcrtc->initialized = true;
> +
> + return 0;
> +
> +error_reset:
> + reset_control_assert(rcrtc->rstc);
If deassertion did not succeed, there is no need to assert.
Worse, for shared reset controls this messes up the deassert_count.
You can just drop the reset_control_assert() here.
regards
Philipp
next prev parent reply other threads:[~2023-04-24 18:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-24 16:10 [PATCH v8 0/5] Add RZ/{G2L,G2LC} and RZ/V2L Display Unit support Biju Das
2023-04-24 16:10 ` [PATCH v8 1/5] drm: Place Renesas drivers in a separate dir Biju Das
2023-04-24 16:33 ` Kieran Bingham
2023-04-24 17:09 ` Laurent Pinchart
2023-04-24 16:10 ` [PATCH v8 2/5] dt-bindings: display: Document Renesas RZ/G2L DU bindings Biju Das
2023-04-25 2:58 ` Laurent Pinchart
2023-04-25 8:51 ` Biju Das
2023-04-24 16:10 ` [PATCH v8 3/5] dt-bindings: display: renesas,rzg2l-du: Document RZ/V2L " Biju Das
2023-04-25 2:59 ` Laurent Pinchart
2023-04-25 7:47 ` Geert Uytterhoeven
2023-04-24 16:10 ` [PATCH v8 4/5] drm: Add RZ/G2L DU Support Biju Das
2023-04-24 18:38 ` Philipp Zabel [this message]
2023-04-25 8:10 ` Biju Das
2023-04-24 16:10 ` [PATCH v8 5/5] MAINTAINERS: Add maintainer for RZ DU drivers Biju Das
2023-04-25 3:00 ` Laurent Pinchart
2023-04-25 7:55 ` Geert Uytterhoeven
2023-04-25 8:55 ` Biju Das
2023-04-25 9:39 ` Geert Uytterhoeven
2023-04-25 10:02 ` Biju Das
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=20230424183822.GA30248@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=airlied@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert+renesas@glider.be \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
/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