From: Thierry Reding <thierry.reding@gmail.com>
To: Deepak M <m.deepak@intel.com>
Cc: dri-devel@lists.freedesktop.org,
Jani Nikula <jani.nikula@intel.com>,
Daniel Vetter <daniel.vetter@intel.com>,
Gaurav K Singh <gaurav.k.singh@intel.com>
Subject: Re: [PATCH 1/2] drm: Add few more wrapper functions for drm panel
Date: Wed, 2 Mar 2016 16:25:49 +0100 [thread overview]
Message-ID: <20160302152549.GA21035@ulmo.nvidia.com> (raw)
In-Reply-To: <1456923511-6251-1-git-send-email-m.deepak@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 2632 bytes --]
On Wed, Mar 02, 2016 at 06:28:31PM +0530, Deepak M wrote:
> Currently there are few pair of functions which
> are called during the panel enable/disable sequence.
> To improve the granularity, adding few more wrapper
> functions so that the functions are more specific
> on what they are doing.
>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Deepak M <m.deepak@intel.com>
> Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com>
> ---
> include/drm/drm_panel.h | 92 +++++++++++++++++++++++++++++++++++++++++--------
> 1 file changed, 77 insertions(+), 15 deletions(-)
Sorry, but no. You're not giving any rationale for why you think the
granularity needs to be increased. The documentation already states that
panel drivers can use ->enable() and ->disable() to turn on and off the
backlight, why do you need the extra callbacks? The same is true for the
->prepare() and ->unprepare() callbacks, which are described to perform
what your new ->power_on() and ->power_off() callbacks would do.
Increasing the granularity isn't always a good thing. It means that
drivers can now call the functions in many more variations.
If you think you really need finer granularity, you need to do a better
job of explaining why. Also, Cc'ing me on the second patch, which I do
not have in any of my inboxes, and which I assume contains a usage
example of these new callbacks, might help me understand the need for
this.
One more comment below...
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
[...]
> struct drm_panel_funcs {
> int (*disable)(struct drm_panel *panel);
> @@ -73,6 +90,10 @@ struct drm_panel_funcs {
> int (*get_modes)(struct drm_panel *panel);
> int (*get_timings)(struct drm_panel *panel, unsigned int num_timings,
> struct display_timing *timings);
> + int (*power_on)(struct drm_panel *panel);
> + int (*power_off)(struct drm_panel *panel);
> + int (*backlight_on)(struct drm_panel *panel);
> + int (*backlight_off)(struct drm_panel *panel);
> };
[...]
> +static inline int drm_panel_get_info(struct drm_panel *panel,
> + struct drm_connector *connector)
> +{
> + if (connector && panel && panel->funcs && panel->funcs->get_info)
> + return panel->funcs->get_info(panel, connector);
> +
> + return panel ? -ENOSYS : -EINVAL;
> +}
This callback no longer exists, so this patch is going to break
compilation.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2016-03-02 15:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 11:45 [PATCH 1/2] drm: Add few more wrapper functions for drm panel Deepak M
2016-02-29 11:45 ` [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT Deepak M
2016-02-29 12:12 ` [PATCH 1/2] drm: Add few more wrapper functions for drm panel Jani Nikula
2016-03-02 12:58 ` Deepak M
2016-03-02 15:25 ` Thierry Reding [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=20160302152549.GA21035@ulmo.nvidia.com \
--to=thierry.reding@gmail.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gaurav.k.singh@intel.com \
--cc=jani.nikula@intel.com \
--cc=m.deepak@intel.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