diff mbox

[04/14] drm: Add DSI panel power on/off sequence programming

Message ID 1483953349-26282-1-git-send-email-vidya.srinivas@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Srinivas, Vidya Jan. 9, 2017, 9:15 a.m. UTC
Panel Power On/Off sequences are part of Panel spec.
Enabling the support of same in DRM layer for fine grained
panel control.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
---
 include/drm/drm_panel.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Jani Nikula Jan. 9, 2017, 10:24 a.m. UTC | #1
On Mon, 09 Jan 2017, Vidya Srinivas <vidya.srinivas@intel.com> wrote:
> Panel Power On/Off sequences are part of Panel spec.
> Enabling the support of same in DRM layer for fine grained
> panel control.

http://lkml.kernel.org/r/20160302152549.GA21035@ulmo.nvidia.com

>
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
>  include/drm/drm_panel.h | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> index 220d1e2b..515595b 100644
> --- a/include/drm/drm_panel.h
> +++ b/include/drm/drm_panel.h
> @@ -69,6 +69,8 @@ struct drm_panel_funcs {
>  	int (*disable)(struct drm_panel *panel);
>  	int (*unprepare)(struct drm_panel *panel);
>  	int (*prepare)(struct drm_panel *panel);
> +	int (*power_on)(struct drm_panel *panel);
> +	int (*power_off)(struct drm_panel *panel);
>  	int (*enable)(struct drm_panel *panel);
>  	int (*get_modes)(struct drm_panel *panel);
>  	int (*get_timings)(struct drm_panel *panel, unsigned int num_timings,
> @@ -166,6 +168,22 @@ static inline int drm_panel_enable(struct drm_panel *panel)
>  	return panel ? -ENOSYS : -EINVAL;
>  }
>  
> +static inline int drm_panel_power_on(struct drm_panel *panel)
> +{
> +	if (panel && panel->funcs && panel->funcs->power_on)
> +		return panel->funcs->power_on(panel);
> +
> +	return panel ? -ENOSYS : -EINVAL;
> +}
> +
> +static inline int drm_panel_power_off(struct drm_panel *panel)
> +{
> +	if (panel && panel->funcs && panel->funcs->power_off)
> +		return panel->funcs->power_off(panel);
> +
> +	return panel ? -ENOSYS : -EINVAL;
> +}
> +
>  /**
>   * drm_panel_get_modes - probe the available display modes of a panel
>   * @panel: DRM panel
kernel test robot Jan. 9, 2017, 12:47 p.m. UTC | #2
Hi Vidya,

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on v4.10-rc3 next-20170106]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Vidya-Srinivas/drm-i915-Check-for-platform-specific-GPIO-config/20170109-175734
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

   make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
   include/linux/init.h:1: warning: no structured comments found
   include/linux/kthread.h:26: warning: Excess function parameter '...' description in 'kthread_create'
   kernel/sys.c:1: warning: no structured comments found
   drivers/dma-buf/seqno-fence.c:1: warning: no structured comments found
   include/drm/drm_drv.h:409: warning: No description found for parameter 'load'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'firstopen'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'open'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'preclose'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'postclose'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'lastclose'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'unload'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'dma_ioctl'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'dma_quiescent'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'context_dtor'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'set_busid'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'irq_handler'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'irq_preinstall'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'irq_postinstall'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'irq_uninstall'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'debugfs_init'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'debugfs_cleanup'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_open_object'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_close_object'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'prime_handle_to_fd'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'prime_fd_to_handle'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_prime_export'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_prime_import'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_prime_pin'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_prime_unpin'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_prime_res_obj'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_prime_get_sg_table'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_prime_import_sg_table'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_prime_vmap'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_prime_vunmap'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_prime_mmap'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'vgaarb_irq'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'gem_vm_ops'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'major'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'minor'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'patchlevel'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'name'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'desc'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'date'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'driver_features'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'dev_priv_size'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'ioctls'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'num_ioctls'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'fops'
   include/drm/drm_drv.h:409: warning: No description found for parameter 'legacy_dev_list'
>> include/drm/drm_panel.h:79: warning: No description found for parameter 'power_on'
>> include/drm/drm_panel.h:79: warning: No description found for parameter 'power_off'
   drivers/media/dvb-core/dvb_frontend.h:677: warning: No description found for parameter 'refcount'
   drivers/char/tpm/tpm_vtpm_proxy.c:73: warning: No description found for parameter 'filp'
   drivers/char/tpm/tpm_vtpm_proxy.c:73: warning: No description found for parameter 'buf'
   drivers/char/tpm/tpm_vtpm_proxy.c:73: warning: No description found for parameter 'count'
   drivers/char/tpm/tpm_vtpm_proxy.c:73: warning: No description found for parameter 'off'
   drivers/char/tpm/tpm_vtpm_proxy.c:123: warning: No description found for parameter 'filp'
   drivers/char/tpm/tpm_vtpm_proxy.c:123: warning: No description found for parameter 'buf'
   drivers/char/tpm/tpm_vtpm_proxy.c:123: warning: No description found for parameter 'count'
   drivers/char/tpm/tpm_vtpm_proxy.c:123: warning: No description found for parameter 'off'
   drivers/char/tpm/tpm_vtpm_proxy.c:203: warning: No description found for parameter 'proxy_dev'
   sound/soc/soc-core.c:994: warning: No description found for parameter 'stream_name'
   Documentation/core-api/assoc_array.rst:13: WARNING: Enumerated list ends without a blank line; unexpected unindent.
   Documentation/doc-guide/sphinx.rst:110: ERROR: Unknown target name: "sphinx c domain".
   include/net/cfg80211.h:3154: ERROR: Unexpected indentation.
   include/net/mac80211.h:3214: ERROR: Unexpected indentation.
   include/net/mac80211.h:3217: WARNING: Block quote ends without a blank line; unexpected unindent.
   include/net/mac80211.h:3219: ERROR: Unexpected indentation.
   include/net/mac80211.h:3220: WARNING: Block quote ends without a blank line; unexpected unindent.
   include/net/mac80211.h:1773: ERROR: Unexpected indentation.
   include/net/mac80211.h:1777: WARNING: Block quote ends without a blank line; unexpected unindent.
   kernel/sched/fair.c:7587: WARNING: Inline emphasis start-string without end-string.
   kernel/time/timer.c:1240: ERROR: Unexpected indentation.
   kernel/time/timer.c:1242: ERROR: Unexpected indentation.
   kernel/time/timer.c:1243: WARNING: Block quote ends without a blank line; unexpected unindent.
   include/linux/wait.h:121: WARNING: Block quote ends without a blank line; unexpected unindent.
   include/linux/wait.h:124: ERROR: Unexpected indentation.
   include/linux/wait.h:126: WARNING: Block quote ends without a blank line; unexpected unindent.
   kernel/time/hrtimer.c:1021: WARNING: Block quote ends without a blank line; unexpected unindent.
   kernel/signal.c:317: WARNING: Inline literal start-string without end-string.
   drivers/message/fusion/mptbase.c:5051: WARNING: Definition list ends without a blank line; unexpected unindent.
   drivers/tty/serial/serial_core.c:1897: WARNING: Definition list ends without a blank line; unexpected unindent.
   include/linux/spi/spi.h:369: ERROR: Unexpected indentation.
   drivers/usb/core/message.c:481: ERROR: Unexpected indentation.
   drivers/usb/core/message.c:482: WARNING: Block quote ends without a blank line; unexpected unindent.
   Documentation/driver-api/usb.rst:623: ERROR: Unknown target name: "usb_type".
   Documentation/driver-api/usb.rst:623: ERROR: Unknown target name: "usb_dir".
   Documentation/driver-api/usb.rst:623: ERROR: Unknown target name: "usb_recip".
   Documentation/driver-api/usb.rst:689: ERROR: Unknown target name: "usbdevfs_urb_type".
   sound/soc/soc-core.c:2508: ERROR: Unknown target name: "snd_soc_daifmt".
   sound/core/jack.c:312: ERROR: Unknown target name: "snd_jack_btn".
   Documentation/translations/ko_KR/howto.rst:293: WARNING: Inline emphasis start-string without end-string.
   WARNING: dvipng command 'dvipng' cannot be run (needed for math display), check the imgmath_dvipng setting

vim +/power_on +79 include/drm/drm_panel.h

45527d43 Ajay Kumar     2014-07-18  63   * cease transmission of video data.
45527d43 Ajay Kumar     2014-07-18  64   *
45527d43 Ajay Kumar     2014-07-18  65   * To save power when no video data is transmitted, a driver can power down
45527d43 Ajay Kumar     2014-07-18  66   * the panel. This is the job of the .unprepare() function.
45527d43 Ajay Kumar     2014-07-18  67   */
aead40ea Thierry Reding 2013-08-30  68  struct drm_panel_funcs {
aead40ea Thierry Reding 2013-08-30  69  	int (*disable)(struct drm_panel *panel);
45527d43 Ajay Kumar     2014-07-18  70  	int (*unprepare)(struct drm_panel *panel);
45527d43 Ajay Kumar     2014-07-18  71  	int (*prepare)(struct drm_panel *panel);
c1a64edd Vidya Srinivas 2017-01-09  72  	int (*power_on)(struct drm_panel *panel);
c1a64edd Vidya Srinivas 2017-01-09  73  	int (*power_off)(struct drm_panel *panel);
aead40ea Thierry Reding 2013-08-30  74  	int (*enable)(struct drm_panel *panel);
aead40ea Thierry Reding 2013-08-30  75  	int (*get_modes)(struct drm_panel *panel);
2938931f Philipp Zabel  2014-12-11  76  	int (*get_timings)(struct drm_panel *panel, unsigned int num_timings,
2938931f Philipp Zabel  2014-12-11  77  			   struct display_timing *timings);
aead40ea Thierry Reding 2013-08-30  78  };
aead40ea Thierry Reding 2013-08-30 @79  
83127f67 Thierry Reding 2016-05-06  80  /**
83127f67 Thierry Reding 2016-05-06  81   * struct drm_panel - DRM panel object
83127f67 Thierry Reding 2016-05-06  82   * @drm: DRM device owning the panel
83127f67 Thierry Reding 2016-05-06  83   * @connector: DRM connector that the panel is attached to
83127f67 Thierry Reding 2016-05-06  84   * @dev: parent device of the panel
83127f67 Thierry Reding 2016-05-06  85   * @funcs: operations that can be performed on the panel
83127f67 Thierry Reding 2016-05-06  86   * @list: panel entry in registry
83127f67 Thierry Reding 2016-05-06  87   */

:::::: The code at line 79 was first introduced by commit
:::::: aead40ea0b53a0e28d34adf7bb923ecb2968c04a drm: Add panel support

:::::: TO: Thierry Reding <treding@nvidia.com>
:::::: CC: Thierry Reding <treding@nvidia.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Srinivas, Vidya Feb. 8, 2017, 10:28 a.m. UTC | #3
> -----Original Message-----
> From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
> Sent: Monday, January 9, 2017 3:54 PM
> To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-
> gfx@lists.freedesktop.org
> Cc: Srinivas, Vidya <vidya.srinivas@intel.com>
> Subject: Re: [Intel-gfx] [PATCH 04/14] drm: Add DSI panel power on/off
> sequence programming
> 
> On Mon, 09 Jan 2017, Vidya Srinivas <vidya.srinivas@intel.com> wrote:
> > Panel Power On/Off sequences are part of Panel spec.
> > Enabling the support of same in DRM layer for fine grained panel
> > control.
> 
> http://lkml.kernel.org/r/20160302152549.GA21035@ulmo.nvidia.com

Thanks Jani for pointing to the earlier upstream discussion. We will resend
the patch with the valid justifications added.

Regards
Vidya
> 
> >
> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> > ---
> >  include/drm/drm_panel.h | 18 ++++++++++++++++++
> >  1 file changed, 18 insertions(+)
> >
> > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index
> > 220d1e2b..515595b 100644
> > --- a/include/drm/drm_panel.h
> > +++ b/include/drm/drm_panel.h
> > @@ -69,6 +69,8 @@ struct drm_panel_funcs {
> >  	int (*disable)(struct drm_panel *panel);
> >  	int (*unprepare)(struct drm_panel *panel);
> >  	int (*prepare)(struct drm_panel *panel);
> > +	int (*power_on)(struct drm_panel *panel);
> > +	int (*power_off)(struct drm_panel *panel);
> >  	int (*enable)(struct drm_panel *panel);
> >  	int (*get_modes)(struct drm_panel *panel);
> >  	int (*get_timings)(struct drm_panel *panel, unsigned int
> > num_timings, @@ -166,6 +168,22 @@ static inline int
> drm_panel_enable(struct drm_panel *panel)
> >  	return panel ? -ENOSYS : -EINVAL;
> >  }
> >
> > +static inline int drm_panel_power_on(struct drm_panel *panel) {
> > +	if (panel && panel->funcs && panel->funcs->power_on)
> > +		return panel->funcs->power_on(panel);
> > +
> > +	return panel ? -ENOSYS : -EINVAL;
> > +}
> > +
> > +static inline int drm_panel_power_off(struct drm_panel *panel) {
> > +	if (panel && panel->funcs && panel->funcs->power_off)
> > +		return panel->funcs->power_off(panel);
> > +
> > +	return panel ? -ENOSYS : -EINVAL;
> > +}
> > +
> >  /**
> >   * drm_panel_get_modes - probe the available display modes of a panel
> >   * @panel: DRM panel
> 
> --
> Jani Nikula, Intel Open Source Technology Center
Jani Nikula Feb. 8, 2017, 10:50 a.m. UTC | #4
On Wed, 08 Feb 2017, "Srinivas, Vidya" <vidya.srinivas@intel.com> wrote:
>> -----Original Message-----
>> From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
>> Sent: Monday, January 9, 2017 3:54 PM
>> To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-
>> gfx@lists.freedesktop.org
>> Cc: Srinivas, Vidya <vidya.srinivas@intel.com>
>> Subject: Re: [Intel-gfx] [PATCH 04/14] drm: Add DSI panel power on/off
>> sequence programming
>> 
>> On Mon, 09 Jan 2017, Vidya Srinivas <vidya.srinivas@intel.com> wrote:
>> > Panel Power On/Off sequences are part of Panel spec.
>> > Enabling the support of same in DRM layer for fine grained panel
>> > control.
>> 
>> http://lkml.kernel.org/r/20160302152549.GA21035@ulmo.nvidia.com
>
> Thanks Jani for pointing to the earlier upstream discussion. We will resend
> the patch with the valid justifications added.

No, that was not the point. I admit my reply was curt, but I don't
understand why you waited for a month to reply to this mail, and then
*immediately* sent the revised series with your reply. That's not how
this works. Conclude the discussion first, then send the patches. Or if
you send patches, don't wait for so long.

In the mean time, there's been discussion that we might just drop the
use of drm_panel altogether because we're really not sure it buys us
anything. And then we could use the granularity we want.

BR,
Jani.


>
> Regards
> Vidya
>> 
>> >
>> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
>> > ---
>> >  include/drm/drm_panel.h | 18 ++++++++++++++++++
>> >  1 file changed, 18 insertions(+)
>> >
>> > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index
>> > 220d1e2b..515595b 100644
>> > --- a/include/drm/drm_panel.h
>> > +++ b/include/drm/drm_panel.h
>> > @@ -69,6 +69,8 @@ struct drm_panel_funcs {
>> >  	int (*disable)(struct drm_panel *panel);
>> >  	int (*unprepare)(struct drm_panel *panel);
>> >  	int (*prepare)(struct drm_panel *panel);
>> > +	int (*power_on)(struct drm_panel *panel);
>> > +	int (*power_off)(struct drm_panel *panel);
>> >  	int (*enable)(struct drm_panel *panel);
>> >  	int (*get_modes)(struct drm_panel *panel);
>> >  	int (*get_timings)(struct drm_panel *panel, unsigned int
>> > num_timings, @@ -166,6 +168,22 @@ static inline int
>> drm_panel_enable(struct drm_panel *panel)
>> >  	return panel ? -ENOSYS : -EINVAL;
>> >  }
>> >
>> > +static inline int drm_panel_power_on(struct drm_panel *panel) {
>> > +	if (panel && panel->funcs && panel->funcs->power_on)
>> > +		return panel->funcs->power_on(panel);
>> > +
>> > +	return panel ? -ENOSYS : -EINVAL;
>> > +}
>> > +
>> > +static inline int drm_panel_power_off(struct drm_panel *panel) {
>> > +	if (panel && panel->funcs && panel->funcs->power_off)
>> > +		return panel->funcs->power_off(panel);
>> > +
>> > +	return panel ? -ENOSYS : -EINVAL;
>> > +}
>> > +
>> >  /**
>> >   * drm_panel_get_modes - probe the available display modes of a panel
>> >   * @panel: DRM panel
>> 
>> --
>> Jani Nikula, Intel Open Source Technology Center
Srinivas, Vidya Feb. 8, 2017, 11:06 a.m. UTC | #5
> -----Original Message-----
> From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
> Sent: Wednesday, February 8, 2017 4:20 PM
> To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-
> gfx@lists.freedesktop.org
> Subject: RE: [Intel-gfx] [PATCH 04/14] drm: Add DSI panel power on/off
> sequence programming
> 
> On Wed, 08 Feb 2017, "Srinivas, Vidya" <vidya.srinivas@intel.com> wrote:
> >> -----Original Message-----
> >> From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
> >> Sent: Monday, January 9, 2017 3:54 PM
> >> To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-
> >> gfx@lists.freedesktop.org
> >> Cc: Srinivas, Vidya <vidya.srinivas@intel.com>
> >> Subject: Re: [Intel-gfx] [PATCH 04/14] drm: Add DSI panel power
> >> on/off sequence programming
> >>
> >> On Mon, 09 Jan 2017, Vidya Srinivas <vidya.srinivas@intel.com> wrote:
> >> > Panel Power On/Off sequences are part of Panel spec.
> >> > Enabling the support of same in DRM layer for fine grained panel
> >> > control.
> >>
> >> http://lkml.kernel.org/r/20160302152549.GA21035@ulmo.nvidia.com
> >
> > Thanks Jani for pointing to the earlier upstream discussion. We will
> > resend the patch with the valid justifications added.
> 
> No, that was not the point. I admit my reply was curt, but I don't understand
> why you waited for a month to reply to this mail, and then
> *immediately* sent the revised series with your reply. That's not how this
> works. Conclude the discussion first, then send the patches. Or if you send
> patches, don't wait for so long.
> 
> In the mean time, there's been discussion that we might just drop the use of
> drm_panel altogether because we're really not sure it buys us anything. And
> then we could use the granularity we want.

Extremely sorry for the delay in replying to the email. I had a family medical
emergency and was not in office. Sincere apologies for the same.

Regards
Vidya
> 
> BR,
> Jani.
> 
> 
> >
> > Regards
> > Vidya
> >>
> >> >
> >> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> >> > ---
> >> >  include/drm/drm_panel.h | 18 ++++++++++++++++++
> >> >  1 file changed, 18 insertions(+)
> >> >
> >> > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> >> > index 220d1e2b..515595b 100644
> >> > --- a/include/drm/drm_panel.h
> >> > +++ b/include/drm/drm_panel.h
> >> > @@ -69,6 +69,8 @@ struct drm_panel_funcs {
> >> >  	int (*disable)(struct drm_panel *panel);
> >> >  	int (*unprepare)(struct drm_panel *panel);
> >> >  	int (*prepare)(struct drm_panel *panel);
> >> > +	int (*power_on)(struct drm_panel *panel);
> >> > +	int (*power_off)(struct drm_panel *panel);
> >> >  	int (*enable)(struct drm_panel *panel);
> >> >  	int (*get_modes)(struct drm_panel *panel);
> >> >  	int (*get_timings)(struct drm_panel *panel, unsigned int
> >> > num_timings, @@ -166,6 +168,22 @@ static inline int
> >> drm_panel_enable(struct drm_panel *panel)
> >> >  	return panel ? -ENOSYS : -EINVAL;  }
> >> >
> >> > +static inline int drm_panel_power_on(struct drm_panel *panel) {
> >> > +	if (panel && panel->funcs && panel->funcs->power_on)
> >> > +		return panel->funcs->power_on(panel);
> >> > +
> >> > +	return panel ? -ENOSYS : -EINVAL; }
> >> > +
> >> > +static inline int drm_panel_power_off(struct drm_panel *panel) {
> >> > +	if (panel && panel->funcs && panel->funcs->power_off)
> >> > +		return panel->funcs->power_off(panel);
> >> > +
> >> > +	return panel ? -ENOSYS : -EINVAL; }
> >> > +
> >> >  /**
> >> >   * drm_panel_get_modes - probe the available display modes of a
> panel
> >> >   * @panel: DRM panel
> >>
> >> --
> >> Jani Nikula, Intel Open Source Technology Center
> 
> --
> Jani Nikula, Intel Open Source Technology Center
Jani Nikula Feb. 8, 2017, 11:16 a.m. UTC | #6
On Wed, 08 Feb 2017, "Srinivas, Vidya" <vidya.srinivas@intel.com> wrote:
>> In the mean time, there's been discussion that we might just drop the use of
>> drm_panel altogether because we're really not sure it buys us anything. And
>> then we could use the granularity we want.
>
> Extremely sorry for the delay in replying to the email. I had a family medical
> emergency and was not in office. Sincere apologies for the same.

I'm very sorry to hear that.

Fact remains, I think it's wasted effort trying to add more granularity
to drm_panel. The drm_panel maintainer is not receptive to the idea, I
don't think even with more rationale. And I don't really disagree with
his reasons. We use drm_panel because we originally thought we'd support
more than just VBT based stuff, but it doesn't look like it. See [1] for
some discussion.

BR,
Jani.


[1] http://mid.mail-archive.com/87oa0uzkp0.fsf@intel.com

>
> Regards
> Vidya
>> 
>> BR,
>> Jani.
>> 
>> 
>> >
>> > Regards
>> > Vidya
>> >>
>> >> >
>> >> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
>> >> > ---
>> >> >  include/drm/drm_panel.h | 18 ++++++++++++++++++
>> >> >  1 file changed, 18 insertions(+)
>> >> >
>> >> > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
>> >> > index 220d1e2b..515595b 100644
>> >> > --- a/include/drm/drm_panel.h
>> >> > +++ b/include/drm/drm_panel.h
>> >> > @@ -69,6 +69,8 @@ struct drm_panel_funcs {
>> >> >  	int (*disable)(struct drm_panel *panel);
>> >> >  	int (*unprepare)(struct drm_panel *panel);
>> >> >  	int (*prepare)(struct drm_panel *panel);
>> >> > +	int (*power_on)(struct drm_panel *panel);
>> >> > +	int (*power_off)(struct drm_panel *panel);
>> >> >  	int (*enable)(struct drm_panel *panel);
>> >> >  	int (*get_modes)(struct drm_panel *panel);
>> >> >  	int (*get_timings)(struct drm_panel *panel, unsigned int
>> >> > num_timings, @@ -166,6 +168,22 @@ static inline int
>> >> drm_panel_enable(struct drm_panel *panel)
>> >> >  	return panel ? -ENOSYS : -EINVAL;  }
>> >> >
>> >> > +static inline int drm_panel_power_on(struct drm_panel *panel) {
>> >> > +	if (panel && panel->funcs && panel->funcs->power_on)
>> >> > +		return panel->funcs->power_on(panel);
>> >> > +
>> >> > +	return panel ? -ENOSYS : -EINVAL; }
>> >> > +
>> >> > +static inline int drm_panel_power_off(struct drm_panel *panel) {
>> >> > +	if (panel && panel->funcs && panel->funcs->power_off)
>> >> > +		return panel->funcs->power_off(panel);
>> >> > +
>> >> > +	return panel ? -ENOSYS : -EINVAL; }
>> >> > +
>> >> >  /**
>> >> >   * drm_panel_get_modes - probe the available display modes of a
>> panel
>> >> >   * @panel: DRM panel
>> >>
>> >> --
>> >> Jani Nikula, Intel Open Source Technology Center
>> 
>> --
>> Jani Nikula, Intel Open Source Technology Center
Srinivas, Vidya Feb. 9, 2017, 8:24 a.m. UTC | #7
> -----Original Message-----
> From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
> Sent: Wednesday, February 8, 2017 4:47 PM
> To: Srinivas, Vidya <vidya.srinivas@intel.com>; intel-
> gfx@lists.freedesktop.org
> Subject: RE: [Intel-gfx] [PATCH 04/14] drm: Add DSI panel power on/off
> sequence programming
> 
> On Wed, 08 Feb 2017, "Srinivas, Vidya" <vidya.srinivas@intel.com> wrote:
> >> In the mean time, there's been discussion that we might just drop the
> >> use of drm_panel altogether because we're really not sure it buys us
> >> anything. And then we could use the granularity we want.
> >
> > Extremely sorry for the delay in replying to the email. I had a family
> > medical emergency and was not in office. Sincere apologies for the same.
> 
> I'm very sorry to hear that.
> 
> Fact remains, I think it's wasted effort trying to add more granularity to
> drm_panel. The drm_panel maintainer is not receptive to the idea, I don't
> think even with more rationale. And I don't really disagree with his reasons.
> We use drm_panel because we originally thought we'd support more than
> just VBT based stuff, but it doesn't look like it. See [1] for some discussion.
> 
> BR,
> Jani.
> 
> 
> [1] http://mid.mail-archive.com/87oa0uzkp0.fsf@intel.com
> 

Thanks Jani, for pointing to the discussion in upstream related to this.
We went through the details. Now, we understand the concerns and
the possible options proposed.

Could you please let us know if we have any consensus on the design?
We will modify the series accordingly. Thanks much for all the valuable
Inputs.

Regards
Vidya

> >> >> >
> >> >> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> >> >> > ---
> >> >> >  include/drm/drm_panel.h | 18 ++++++++++++++++++
> >> >> >  1 file changed, 18 insertions(+)
> >> >> >
> >> >> > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> >> >> > index 220d1e2b..515595b 100644
> >> >> > --- a/include/drm/drm_panel.h
> >> >> > +++ b/include/drm/drm_panel.h
> >> >> > @@ -69,6 +69,8 @@ struct drm_panel_funcs {
> >> >> >  	int (*disable)(struct drm_panel *panel);
> >> >> >  	int (*unprepare)(struct drm_panel *panel);
> >> >> >  	int (*prepare)(struct drm_panel *panel);
> >> >> > +	int (*power_on)(struct drm_panel *panel);
> >> >> > +	int (*power_off)(struct drm_panel *panel);
> >> >> >  	int (*enable)(struct drm_panel *panel);
> >> >> >  	int (*get_modes)(struct drm_panel *panel);
> >> >> >  	int (*get_timings)(struct drm_panel *panel, unsigned int
> >> >> > num_timings, @@ -166,6 +168,22 @@ static inline int
> >> >> drm_panel_enable(struct drm_panel *panel)
> >> >> >  	return panel ? -ENOSYS : -EINVAL;  }
> >> >> >
> >> >> > +static inline int drm_panel_power_on(struct drm_panel *panel) {
> >> >> > +	if (panel && panel->funcs && panel->funcs->power_on)
> >> >> > +		return panel->funcs->power_on(panel);
> >> >> > +
> >> >> > +	return panel ? -ENOSYS : -EINVAL; }
> >> >> > +
> >> >> > +static inline int drm_panel_power_off(struct drm_panel *panel) {
> >> >> > +	if (panel && panel->funcs && panel->funcs->power_off)
> >> >> > +		return panel->funcs->power_off(panel);
> >> >> > +
> >> >> > +	return panel ? -ENOSYS : -EINVAL; }
> >> >> > +
> >> >> >  /**
> >> >> >   * drm_panel_get_modes - probe the available display modes of a
> >> panel
> >> >> >   * @panel: DRM panel
> >> >>
> >> >> --
> >> >> Jani Nikula, Intel Open Source Technology Center
diff mbox

Patch

diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 220d1e2b..515595b 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -69,6 +69,8 @@  struct drm_panel_funcs {
 	int (*disable)(struct drm_panel *panel);
 	int (*unprepare)(struct drm_panel *panel);
 	int (*prepare)(struct drm_panel *panel);
+	int (*power_on)(struct drm_panel *panel);
+	int (*power_off)(struct drm_panel *panel);
 	int (*enable)(struct drm_panel *panel);
 	int (*get_modes)(struct drm_panel *panel);
 	int (*get_timings)(struct drm_panel *panel, unsigned int num_timings,
@@ -166,6 +168,22 @@  static inline int drm_panel_enable(struct drm_panel *panel)
 	return panel ? -ENOSYS : -EINVAL;
 }
 
+static inline int drm_panel_power_on(struct drm_panel *panel)
+{
+	if (panel && panel->funcs && panel->funcs->power_on)
+		return panel->funcs->power_on(panel);
+
+	return panel ? -ENOSYS : -EINVAL;
+}
+
+static inline int drm_panel_power_off(struct drm_panel *panel)
+{
+	if (panel && panel->funcs && panel->funcs->power_off)
+		return panel->funcs->power_off(panel);
+
+	return panel ? -ENOSYS : -EINVAL;
+}
+
 /**
  * drm_panel_get_modes - probe the available display modes of a panel
  * @panel: DRM panel