All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Cc: David Airlie <airlied@linux.ie>,
	Thierry Reding <thierry.reding@gmail.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 01/25] drm/drm_panel: no error when no callback
Date: Sun, 8 Dec 2019 09:41:12 +0100	[thread overview]
Message-ID: <20191208084112.GA21056@ravnborg.org> (raw)
In-Reply-To: <20191207190803.GA19924@qmqm.qmqm.pl>

Hi Michał

> > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> > index ce8da64022b4..d71655b2634c 100644
> > --- a/include/drm/drm_panel.h
> > +++ b/include/drm/drm_panel.ha
> [...]
> >  	/**
> >  	 * @get_modes:
> >  	 *
> > -	 * Add modes to the connector that the panel is attached to and
> > -	 * return the number of modes added.
> > +	 * Add modes to the connector that the panel is attached to.
> > +	 *
> > +	 * This function is mandatory.
> > +	 *
> > +	 * Returns the number of modes added, -EOPNOTSUPP if callback
> > +	 * is missing, -EINVAL if panel is NULL.
> >  	 */
> >  	int (*get_modes)(struct drm_panel *panel);
> >  
> 
> Hi!
> 
> If .get_modes is mandatory, then panel->func != NULL checks can be removed
> if panel->func and .get_modes presence gets checked at panel probe time.

drivers are supposed to use drm_panel_init() to set up panel-func,
so that would be a good time to verify that preconditions are met.
But as we have no control if any drivers does wrong things later
the checks for consistency still makes sense.
I have a few other small changes pending and will include checks
in drm_panel_init().

Thanks,
	Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-12-08  8:41 UTC|newest]

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-07 14:03 [PATCH v2 0/25] drm/panel infrastructure + backlight update Sam Ravnborg
2019-12-07 14:03 ` Sam Ravnborg
2019-12-07 14:03 ` Sam Ravnborg
2019-12-07 14:03 ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 01/25] drm/drm_panel: no error when no callback Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 19:08   ` Michał Mirosław
2019-12-08  8:41     ` Sam Ravnborg [this message]
2019-12-09  0:50   ` Laurent Pinchart
2019-12-09  0:50     ` Laurent Pinchart
2019-12-09  0:50     ` Laurent Pinchart
2019-12-09  0:50     ` Laurent Pinchart
2019-12-07 14:03 ` [PATCH v2 02/25] drm/panel: add backlight support Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-09  0:55   ` Laurent Pinchart
2019-12-09  0:55     ` Laurent Pinchart
2019-12-09  0:55     ` Laurent Pinchart
2019-12-09  0:55     ` Laurent Pinchart
2019-12-13 13:30   ` Linus Walleij
2019-12-13 13:30     ` Linus Walleij
2019-12-13 13:30     ` Linus Walleij
2019-12-13 13:30     ` Linus Walleij
2019-12-13 13:30     ` Linus Walleij
2019-12-07 14:03 ` [PATCH v2 03/25] drm/panel: simple: use drm_panel " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 04/25] drm: get drm_bridge_panel connector via helper Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-10 14:48   ` [PATCH] drm/bridge: panel: export drm_panel_bridge_connector Mihail Atanassov
2019-12-10 14:48     ` Mihail Atanassov
2019-12-10 16:26     ` Laurent Pinchart
2019-12-10 16:26       ` Laurent Pinchart
2019-12-10 17:28       ` Mihail Atanassov
2019-12-10 17:28         ` Mihail Atanassov
2019-12-07 14:03 ` [PATCH v2 05/25] drm/panel: add drm_connector argument to get_modes() Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 06/25] drm/panel: decouple connector from drm_panel Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 07/25] drm/panel: drop drm_device " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 08/25] drm/panel: feiyang-fy07024di26a30d: use drm_panel backlight support Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 09/25] drm/panel: ilitek-ili9881c: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 10/25] drm/panel: innolux-p079zca: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 11/25] drm/panel: kingdisplay-kd097d04: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 12/25] drm/panel: lvds: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 13/25] drm/panel: olimex-lcd-olinuxino: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 14/25] drm/panel: osd-osd101t2587-53ts: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 15/25] drm/panel: panasonic-vvx10f034n00: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 16/25] drm/panel: raydium-rm68200: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 17/25] drm/panel: rocktech-jh057n00900: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 18/25] drm/panel: ronbo-rb070d30: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 19/25] drm/panel: seiko-43wvf1g: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 20/25] drm/panel: sharp-lq101r1sx01: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 21/25] drm/panel: sharp-ls043t1le01: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 22/25] drm/panel: sitronix-st7701: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 23/25] drm/panel: sitronix-st7789v: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 24/25] drm/panel: tpo-td028ttec1: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03 ` [PATCH v2 25/25] drm/panel: tpo-tpg110: " Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-07 14:03   ` Sam Ravnborg
2019-12-09 22:04 ` [PATCH v2 0/25] drm/panel infrastructure + backlight update Sam Ravnborg
2019-12-09 22:04   ` Sam Ravnborg
2019-12-09 22:04   ` Sam Ravnborg
2019-12-09 22:04   ` Sam Ravnborg

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=20191208084112.GA21056@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mirq-linux@rere.qmqm.pl \
    --cc=thierry.reding@gmail.com \
    --subject='Re: [PATCH v2 01/25] drm/drm_panel: no error when no callback' \
    /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

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.