* [PATCH 1/2] drm: Add few more wrapper functions for drm panel @ 2016-02-19 11:28 Deepak M 2016-02-19 11:28 ` [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT Deepak M ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Deepak M @ 2016-02-19 11:28 UTC (permalink / raw) To: intel-gfx; +Cc: Deepak M, Jani Nikula, Gaurav K Singh 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: 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 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 13ff44b..c729f6d 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -73,6 +73,12 @@ 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); + int (*get_info)(struct drm_panel *panel, + struct drm_connector *connector); }; struct drm_panel { @@ -117,6 +123,47 @@ 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; +} + +static inline int drm_panel_backlight_on(struct drm_panel *panel) +{ + if (panel && panel->funcs && panel->funcs->backlight_on) + return panel->funcs->backlight_on(panel); + + return panel ? -ENOSYS : -EINVAL; +} + +static inline int drm_panel_backlight_off(struct drm_panel *panel) +{ + if (panel && panel->funcs && panel->funcs->backlight_off) + return panel->funcs->backlight_off(panel); + + return panel ? -ENOSYS : -EINVAL; +} + +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; +} + static inline int drm_panel_get_modes(struct drm_panel *panel) { if (panel && panel->funcs && panel->funcs->get_modes) -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT 2016-02-19 11:28 [PATCH 1/2] drm: Add few more wrapper functions for drm panel Deepak M @ 2016-02-19 11:28 ` Deepak M 2016-02-19 14:03 ` Jani Nikula 2016-02-19 12:37 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm: Add few more wrapper functions for drm panel Patchwork 2016-02-19 13:53 ` [PATCH 1/2] " Jani Nikula 2 siblings, 1 reply; 5+ messages in thread From: Deepak M @ 2016-02-19 11:28 UTC (permalink / raw) To: intel-gfx; +Cc: Jani Nikula, Shobhit Kumar, Deepak M, Gaurav K Singh From: Gaurav K Singh <gaurav.k.singh@intel.com> New sequences are added in the mipi sequence block of the VBT from version 3 onwards. The sequences are added to make the code more generic as the panel related info are placed in the VBT. Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com> Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com> Signed-off-by: Deepak M <m.deepak@intel.com> --- drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 48 ++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c index c6e18fe..db8e210 100644 --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c @@ -1035,12 +1035,60 @@ static int vbt_panel_get_modes(struct drm_panel *panel) return 1; } +static int vbt_panel_power_on(struct drm_panel *panel) +{ + generic_exec_sequence(panel, MIPI_SEQ_POWER_ON); + + return 0; +} + +static int vbt_panel_power_off(struct drm_panel *panel) +{ + generic_exec_sequence(panel, MIPI_SEQ_POWER_OFF); + + return 0; +} + +static int vbt_panel_backlight_on(struct drm_panel *panel) +{ + generic_exec_sequence(panel, MIPI_SEQ_BACKLIGHT_ON); + + return 0; +} + +static int vbt_panel_backlight_off(struct drm_panel *panel) +{ + generic_exec_sequence(panel, MIPI_SEQ_BACKLIGHT_OFF); + + return 0; +} + +static int vbt_panel_get_info(struct drm_panel *panel, + struct drm_connector *connector) +{ + struct intel_connector *intel_connector = + to_intel_connector(connector); + + if (intel_connector) { + connector->display_info.width_mm = + intel_connector->panel.fixed_mode->width_mm; + connector->display_info.height_mm = + intel_connector->panel.fixed_mode->height_mm; + } + return 0; +} + static const struct drm_panel_funcs vbt_panel_funcs = { .disable = vbt_panel_disable, .unprepare = vbt_panel_unprepare, .prepare = vbt_panel_prepare, .enable = vbt_panel_enable, .get_modes = vbt_panel_get_modes, + .power_on = vbt_panel_power_on, + .power_off = vbt_panel_power_off, + .backlight_on = vbt_panel_backlight_on, + .backlight_off = vbt_panel_backlight_off, + .get_info = vbt_panel_get_info, }; struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id) -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT 2016-02-19 11:28 ` [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT Deepak M @ 2016-02-19 14:03 ` Jani Nikula 0 siblings, 0 replies; 5+ messages in thread From: Jani Nikula @ 2016-02-19 14:03 UTC (permalink / raw) To: intel-gfx; +Cc: Deepak M, Shobhit Kumar, Gaurav K Singh On Fri, 19 Feb 2016, Deepak M <m.deepak@intel.com> wrote: > From: Gaurav K Singh <gaurav.k.singh@intel.com> > > New sequences are added in the mipi sequence block of the > VBT from version 3 onwards. The sequences are added to > make the code more generic as the panel related info > are placed in the VBT. > > Cc: Jani Nikula <jani.nikula@intel.com> > Signed-off-by: Gaurav K Singh <gaurav.k.singh@intel.com> > Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com> > Signed-off-by: Deepak M <m.deepak@intel.com> > --- > drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 48 ++++++++++++++++++++++++++++++ > 1 file changed, 48 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c > index c6e18fe..db8e210 100644 > --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c > +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c > @@ -1035,12 +1035,60 @@ static int vbt_panel_get_modes(struct drm_panel *panel) > return 1; > } > > +static int vbt_panel_power_on(struct drm_panel *panel) > +{ > + generic_exec_sequence(panel, MIPI_SEQ_POWER_ON); > + > + return 0; > +} > + > +static int vbt_panel_power_off(struct drm_panel *panel) > +{ > + generic_exec_sequence(panel, MIPI_SEQ_POWER_OFF); > + > + return 0; > +} > + > +static int vbt_panel_backlight_on(struct drm_panel *panel) > +{ > + generic_exec_sequence(panel, MIPI_SEQ_BACKLIGHT_ON); > + > + return 0; > +} > + > +static int vbt_panel_backlight_off(struct drm_panel *panel) > +{ > + generic_exec_sequence(panel, MIPI_SEQ_BACKLIGHT_OFF); > + > + return 0; > +} > + > +static int vbt_panel_get_info(struct drm_panel *panel, > + struct drm_connector *connector) > +{ > + struct intel_connector *intel_connector = > + to_intel_connector(connector); > + > + if (intel_connector) { > + connector->display_info.width_mm = > + intel_connector->panel.fixed_mode->width_mm; > + connector->display_info.height_mm = > + intel_connector->panel.fixed_mode->height_mm; > + } > + return 0; I think we could do this part in the ->get_modes hook. For all the other displays, it's the ->get_modes hook that reads the EDID, and ultimately sets the display_info from EDID. We wouldn't need a new hook at all. Also, this should be a separate change. If we can get the size information from the fixed mode from VBT, we should do that in ->get_modes, and backport this fix for stable kernels. It's sorely needed for BYT/CHV too. BR, Jani. > +} > + > static const struct drm_panel_funcs vbt_panel_funcs = { > .disable = vbt_panel_disable, > .unprepare = vbt_panel_unprepare, > .prepare = vbt_panel_prepare, > .enable = vbt_panel_enable, > .get_modes = vbt_panel_get_modes, > + .power_on = vbt_panel_power_on, > + .power_off = vbt_panel_power_off, > + .backlight_on = vbt_panel_backlight_on, > + .backlight_off = vbt_panel_backlight_off, > + .get_info = vbt_panel_get_info, > }; > > struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id) -- Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.BAT: warning for series starting with [1/2] drm: Add few more wrapper functions for drm panel 2016-02-19 11:28 [PATCH 1/2] drm: Add few more wrapper functions for drm panel Deepak M 2016-02-19 11:28 ` [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT Deepak M @ 2016-02-19 12:37 ` Patchwork 2016-02-19 13:53 ` [PATCH 1/2] " Jani Nikula 2 siblings, 0 replies; 5+ messages in thread From: Patchwork @ 2016-02-19 12:37 UTC (permalink / raw) To: Deepak M; +Cc: intel-gfx == Summary == Series 3624v1 Series without cover letter http://patchwork.freedesktop.org/api/1.0/series/3624/revisions/1/mbox/ Test gem_cs_prefetch: Subgroup basic-default: incomplete -> PASS (ilk-hp8440p) Test gem_ctx_param_basic: Subgroup basic-default: incomplete -> PASS (snb-x220t) Subgroup invalid-ctx-get: incomplete -> PASS (snb-x220t) Subgroup non-root-set-no-zeromap: incomplete -> PASS (snb-x220t) Subgroup root-set: incomplete -> PASS (snb-x220t) Subgroup root-set-no-zeromap-disabled: incomplete -> PASS (snb-x220t) Subgroup root-set-no-zeromap-enabled: incomplete -> PASS (snb-x220t) Test gem_exec_basic: Subgroup basic-blt: incomplete -> PASS (snb-x220t) Test gem_flink_basic: Subgroup bad-flink: incomplete -> PASS (snb-x220t) Test gem_linear_blits: Subgroup basic: incomplete -> PASS (snb-x220t) Test gem_mmap: Subgroup basic: incomplete -> PASS (snb-x220t) Subgroup basic-small-bo: incomplete -> PASS (snb-x220t) Test gem_mmap_gtt: Subgroup basic: incomplete -> PASS (snb-x220t) Subgroup basic-copy: incomplete -> PASS (snb-x220t) Subgroup basic-read-no-prefault: incomplete -> PASS (snb-x220t) Subgroup basic-read-write-distinct: incomplete -> PASS (snb-x220t) Subgroup basic-write-cpu-read-gtt: incomplete -> PASS (snb-x220t) Subgroup basic-write-read-distinct: incomplete -> PASS (snb-x220t) Test gem_pread: Subgroup basic: incomplete -> PASS (snb-x220t) Test gem_render_linear_blits: Subgroup basic: incomplete -> PASS (snb-x220t) Test gem_render_tiled_blits: Subgroup basic: incomplete -> PASS (snb-x220t) Test gem_ringfill: Subgroup basic-default: incomplete -> PASS (snb-x220t) Subgroup basic-default-bomb: incomplete -> PASS (ivb-t430s) Subgroup basic-default-forked: incomplete -> PASS (snb-x220t) Subgroup basic-default-hang: incomplete -> PASS (snb-x220t) Test gem_storedw_loop: Subgroup basic-bsd1: incomplete -> SKIP (snb-x220t) Subgroup basic-render: incomplete -> PASS (snb-x220t) Subgroup basic-vebox: incomplete -> SKIP (snb-x220t) Test gem_sync: Subgroup basic-blt: incomplete -> PASS (snb-x220t) Test gem_tiled_pread_basic: incomplete -> PASS (snb-x220t) Test kms_addfb_basic: Subgroup addfb25-modifier-no-flag: incomplete -> PASS (snb-x220t) Subgroup bad-pitch-0: incomplete -> PASS (snb-x220t) Subgroup bad-pitch-1024: incomplete -> PASS (snb-x220t) Subgroup bad-pitch-128: incomplete -> PASS (snb-x220t) Subgroup bad-pitch-256: incomplete -> PASS (snb-x220t) Subgroup bad-pitch-999: incomplete -> PASS (snb-x220t) Subgroup basic-x-tiled: incomplete -> PASS (snb-x220t) Subgroup framebuffer-vs-set-tiling: incomplete -> PASS (snb-x220t) Subgroup no-handle: incomplete -> PASS (snb-x220t) Subgroup size-max: incomplete -> PASS (snb-x220t) Subgroup too-wide: incomplete -> PASS (snb-x220t) Subgroup unused-handle: incomplete -> PASS (snb-x220t) Subgroup unused-modifier: incomplete -> PASS (snb-x220t) Test kms_flip: Subgroup basic-flip-vs-dpms: incomplete -> PASS (snb-x220t) Test kms_force_connector_basic: Subgroup force-load-detect: dmesg-fail -> FAIL (snb-dellxps) fail -> SKIP (ilk-hp8440p) Subgroup prune-stale-modes: skip -> PASS (snb-x220t) pass -> SKIP (ilk-hp8440p) Test kms_pipe_crc_basic: Subgroup nonblocking-crc-pipe-c-frame-sequence: incomplete -> SKIP (snb-x220t) Subgroup read-crc-pipe-a-frame-sequence: incomplete -> PASS (snb-x220t) Subgroup read-crc-pipe-b: incomplete -> PASS (snb-x220t) Subgroup read-crc-pipe-c-frame-sequence: incomplete -> SKIP (snb-x220t) Subgroup suspend-read-crc-pipe-a: incomplete -> PASS (snb-x220t) Test pm_rpm: Subgroup basic-pci-d3-state: incomplete -> FAIL (snb-x220t) pass -> DMESG-WARN (bsw-nuc-2) Subgroup basic-rte: dmesg-warn -> PASS (bsw-nuc-2) Test prime_self_import: Subgroup basic-with_two_bos: incomplete -> PASS (snb-x220t) bdw-nuci7 total:164 pass:153 dwarn:0 dfail:0 fail:0 skip:11 bdw-ultra total:167 pass:153 dwarn:0 dfail:0 fail:0 skip:14 bsw-nuc-2 total:167 pass:136 dwarn:1 dfail:0 fail:0 skip:30 byt-nuc total:167 pass:141 dwarn:1 dfail:0 fail:0 skip:25 hsw-gt2 total:167 pass:156 dwarn:0 dfail:1 fail:0 skip:10 ilk-hp8440p total:167 pass:117 dwarn:0 dfail:0 fail:0 skip:50 ivb-t430s total:167 pass:152 dwarn:0 dfail:0 fail:1 skip:14 skl-i5k-2 total:167 pass:150 dwarn:1 dfail:0 fail:0 skip:16 snb-dellxps total:167 pass:144 dwarn:0 dfail:0 fail:1 skip:22 snb-x220t total:167 pass:144 dwarn:0 dfail:0 fail:2 skip:21 Results at /archive/results/CI_IGT_test/Patchwork_1444/ e4599905334de9349501a383afb8503a1dde5728 drm-intel-nightly: 2016y-02m-18d-17h-13m-22s UTC integration manifest 5db201fbca7602784c9016292768fd03aced8d98 drm/i915: Add functions to execute the new sequences from VBT 1943085a8fd4900aac695f9c3bda502c19f3a639 drm: Add few more wrapper functions for drm panel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm: Add few more wrapper functions for drm panel 2016-02-19 11:28 [PATCH 1/2] drm: Add few more wrapper functions for drm panel Deepak M 2016-02-19 11:28 ` [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT Deepak M 2016-02-19 12:37 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm: Add few more wrapper functions for drm panel Patchwork @ 2016-02-19 13:53 ` Jani Nikula 2 siblings, 0 replies; 5+ messages in thread From: Jani Nikula @ 2016-02-19 13:53 UTC (permalink / raw) To: intel-gfx; +Cc: Deepak M, Gaurav K Singh On Fri, 19 Feb 2016, Deepak M <m.deepak@intel.com> 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. I want to see where all these new drm_panel_* functions would be called in intel_dsi.c. Also, this patch touches drm core, not i915. You need to send this kind of stuff to dri-devel@lists.freedesktop.org to get them merged, preferably Cc'ing the relevant maintainers (try scripts/get_maintainer.pl). But for that, I think you need to have the use case and the in-kernel user as well, so please send the intel_dsi.c patch too. BR, Jani. > > 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 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h > index 13ff44b..c729f6d 100644 > --- a/include/drm/drm_panel.h > +++ b/include/drm/drm_panel.h > @@ -73,6 +73,12 @@ 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); > + int (*get_info)(struct drm_panel *panel, > + struct drm_connector *connector); > }; > > struct drm_panel { > @@ -117,6 +123,47 @@ 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; > +} > + > +static inline int drm_panel_backlight_on(struct drm_panel *panel) > +{ > + if (panel && panel->funcs && panel->funcs->backlight_on) > + return panel->funcs->backlight_on(panel); > + > + return panel ? -ENOSYS : -EINVAL; > +} > + > +static inline int drm_panel_backlight_off(struct drm_panel *panel) > +{ > + if (panel && panel->funcs && panel->funcs->backlight_off) > + return panel->funcs->backlight_off(panel); > + > + return panel ? -ENOSYS : -EINVAL; > +} > + > +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; > +} > + > static inline int drm_panel_get_modes(struct drm_panel *panel) > { > if (panel && panel->funcs && panel->funcs->get_modes) -- Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-19 14:03 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-19 11:28 [PATCH 1/2] drm: Add few more wrapper functions for drm panel Deepak M 2016-02-19 11:28 ` [PATCH 2/2] drm/i915: Add functions to execute the new sequences from VBT Deepak M 2016-02-19 14:03 ` Jani Nikula 2016-02-19 12:37 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm: Add few more wrapper functions for drm panel Patchwork 2016-02-19 13:53 ` [PATCH 1/2] " Jani Nikula
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).