linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Vinay Simha BN <simhavcs@gmail.com>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:DRM PANEL DRIVERS" <dri-devel@lists.freedesktop.org>,
	Archit Taneja <archit.taneja@gmail.com>
Subject: Re: [PATCH v5 2/2] drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel
Date: Mon, 11 Jul 2016 14:29:37 +0200	[thread overview]
Message-ID: <20160711122937.GB14709@ulmo.ba.sec> (raw)
In-Reply-To: <CACvgo51rLs+N8qxhVrY+-NZgmFFANmiR84gJKc0rgCAeQUdFzg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

On Thu, Jun 16, 2016 at 06:02:53PM +0100, Emil Velikov wrote:
> On 16 June 2016 at 04:00, Vinay Simha BN <simhavcs@gmail.com> wrote:
[...]
> > +static int jdi_panel_disable(struct drm_panel *panel)
> > +{
> > +       struct jdi_panel *jdi = to_jdi_panel(panel);
> > +
> > +       if (!jdi->enabled)
> > +               return 0;
> > +
> Thinking out loud:
> 
> Thierry,
> Shouldn't we fold 'enabled' and 'prepared' in struct drm_panel and
> tweak the helpers respectively ? Is there any specific reason for
> keeping these in the drivers ?

Yes, I think that would make sense eventually. It's clearly a recurring
pattern. Ideally nothing would be calling these functions more than once
and thereby making the checks unnecessary. In practice that may mean
that we need to put the variables and checks into the drm/panel core
because display drivers (as opposed to a sane core implementation) call
these. I suppose we could encourage proper usage by adding a couple of
WARNs here and there if expectations aren't met.

I don't think doing this is terribly urgent because it's easy to rip out
of drivers once the drm/panel core supports it. And it's something that
we could even leave within drivers when the core supports it, so trivial
to remove one by one after the core patches have landed.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-07-11 12:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16  3:00 [PATCH v2 1/2] drm/dsi: Implement dcs set/get display brightness Vinay Simha BN
2016-06-16  3:00 ` [PATCH v5 2/2] drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel Vinay Simha BN
2016-06-16 17:02   ` Emil Velikov
2016-07-11 12:29     ` Thierry Reding [this message]
2016-07-12 10:34       ` Daniel Vetter
2016-07-12 10:59         ` Thierry Reding

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=20160711122937.GB14709@ulmo.ba.sec \
    --to=thierry.reding@gmail.com \
    --cc=archit.taneja@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simhavcs@gmail.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;
as well as URLs for NNTP newsgroup(s).