linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emil Velikov <emil.l.velikov@gmail.com>
To: Jonathan Liu <net147@gmail.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>,
	linux-sunxi@googlegroups.com,
	ML dri-devel <dri-devel@lists.freedesktop.org>,
	"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
	Chen-Yu Tsai <wens@csie.org>,
	LAKML <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] drm/sun4i: rgb: add missing calls to drm_panel_{prepare, unprepare}
Date: Tue, 30 Aug 2016 16:21:47 +0100	[thread overview]
Message-ID: <CACvgo53=_PQCEONbBpgRgHtLZGSiihGEYJFCPLYF1-ocLrfyMg@mail.gmail.com> (raw)
In-Reply-To: <20160830065500.31847-1-net147@gmail.com>

On 30 August 2016 at 07:55, Jonathan Liu <net147@gmail.com> wrote:
> If the enable-gpios property of a simple panel in device tree is set,
> the GPIO is not toggled on/off because of missing calls to
> drm_panel_prepare and drm_panel_unprepare.
>
> Signed-off-by: Jonathan Liu <net147@gmail.com>
> ---
>  drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c
> index f5bbac6..d6943e9 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
> @@ -151,6 +151,7 @@ static void sun4i_rgb_encoder_enable(struct drm_encoder *encoder)
>
>         DRM_DEBUG_DRIVER("Enabling RGB output\n");
>
> +       drm_panel_prepare(tcon->panel);
>         drm_panel_enable(tcon->panel);
IMHO it's worth having a _prepare_enable, and alike on the dtor side,
similar to clk. The clk helper attributes when .enable() fails, which
is a good idea. Looking on the drm side - all the users of such
helper(s) don't bother checking neither .prepare or .enable. So
updating that alongside the introduction would be a great move ;-)

Just an idea about another small task.
Emil

P.S. Skimming through v4.7 mediatek (mtk) driver looks a bit
assymetrical wrt using the drm_panel API. Worth checking if things
have improved with later versions ?

      parent reply	other threads:[~2016-08-30 15:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-30  6:55 [PATCH] drm/sun4i: rgb: add missing calls to drm_panel_{prepare,unprepare} Jonathan Liu
2016-08-30 12:53 ` Maxime Ripard
2016-08-30 15:21 ` Emil Velikov [this message]

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='CACvgo53=_PQCEONbBpgRgHtLZGSiihGEYJFCPLYF1-ocLrfyMg@mail.gmail.com' \
    --to=emil.l.velikov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=net147@gmail.com \
    --cc=wens@csie.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).