Reviving the PWM_LPSS patches yet again
Subsystems (4)
cover Reviving the PWM_LPSS patches yet again
Hi All,
Its been long since I have been sitting on these after I had received Tested-by for the same by Lluís for atleast the backlight working fine. The related bugs are -
https://bugs.freedesktop.org/show_bug.cgi?id=96571
https://bugs.freedesktop.org/show_bug.cgi?id=90075
Rebased the code on latest code and sending again. Still display was not working on devices referenced in these bugs but backlight control was tested to be working at that time. DSI issues of panel display not comming up is tracked separately at -
https://bugs.freedesktop.org/show_bug.cgi?id=96923 and should be again tested with latest drm-tip.
Module ordering problem remains still and for testing we should for now enable LPSS_PWM as in built with i915 as module.
Regards
Shobhit
Shobhit Kumar (3):
drm/i915: Encapsulate the pwm_device in a pwm_info structure
pwm: lpss: Add intel-gfx as consumer device in lookup table drm/i915: Add support for LPSS PWM on devices that support it
drivers/gpu/drm/i915/intel_drv.h | 8 ++++- drivers/gpu/drm/i915/intel_panel.c | 61 +++++++++++++++++++++++++++----------- drivers/pwm/pwm-lpss-platform.c | 12 ++++++++ 3 files changed, 62 insertions(+), 19 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/3 drm/i915: Encapsulate the pwm_device in a pwm_info structure
pwm_info helps in encapsulating the PWM period_ns values and will form basis of adding new pwm devices which can then be genrically used by initializing proper pwm_info structure in the backlight setup call.
v2: Rebase on latest code. Add BZ details
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96571
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90075
--- drivers/gpu/drm/i915/intel_drv.h | 8 ++++++- drivers/gpu/drm/i915/intel_panel.c | 47 +++++++++++++++++++++++--------------- 2 files changed, 36 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/intel_drv.h +7 -1
@@ -263,6 +263,12 @@ struct intel_encoder {const struct drm_connector *audio_connector; }; +struct intel_pwm_info { +struct pwm_device *dev; +unsigned int period_ns; +char *name; +}; +struct intel_panel {struct drm_display_mode *fixed_mode;struct drm_display_mode *downclock_mode;
@@ -282,7 +288,7 @@ struct intel_panel {/* PWM chip */ bool util_pin_active_low;/* bxt+ */ u8 controller;/* bxt+ only */ -struct pwm_device *pwm; +struct intel_pwm_info *pwm;struct backlight_device *device;
drivers/gpu/drm/i915/intel_panel.c +29 -18
114 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 pwm: lpss: Add intel-gfx as consumer device in lookup table
In reply to Shobhit Kumarv2: Rebase on latest code and correct the device name in
lookup table (viric)
Remove lookup table on driver remove
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96571
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90075
--- drivers/pwm/pwm-lpss-platform.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/pwm/pwm-lpss-platform.c +12 -0
@@ -40,6 +40,11 @@ static const struct pwm_lpss_boardinfo pwm_lpss_bxt_info = { .bypass = true, }; +/* PWM consumed by the Intel GFX */ +static struct pwm_lookup lpss_pwm_lookup[] = { +PWM_LOOKUP ("80860F09:00" ,0 ,"0000:00:02.0" ,"pwm_lpss" ,0 ,PWM_POLARITY_NORMAL ), +}; +static int pwm_lpss_probe_platform (struct platform_device *pdev) {const struct pwm_lpss_boardinfo *info;
@@ -60,6 +65,9 @@ static int pwm_lpss_probe_platform(struct platform_device *pdev)platform_set_drvdata (pdev, lpwm); +/* Register intel-gfx device as allowed consumer */ +pwm_add_table (lpss_pwm_lookup,ARRAY_SIZE (lpss_pwm_lookup)); +pm_runtime_set_active (&pdev->dev);pm_runtime_enable (&pdev->dev);
@@ -71,6 +79,10 @@ static int pwm_lpss_remove_platform(struct platform_device *pdev)struct pwm_lpss_chip *lpwm =platform_get_drvdata (pdev);pm_runtime_disable (&pdev->dev); + +/* remove lookup table */ +pwm_remove_table (lpss_pwm_lookup,ARRAY_SIZE (lpss_pwm_lookup)); +return pwm_lpss_remove (lpwm); }
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
kbuild test robot
build botRe: [PATCH 2/3] pwm: lpss: Add intel-gfx as consumer device in lookup table
reproduce:
Hi Shobhit,
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[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/Shobhit-Kumar/drm-i915-Encapsulate-the-pwm_device-in-a-pwm_info-structure/20170531-222631 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-randconfig-i0-201722 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
All errors (new ones prefixed by >>):
>> ERROR: "pwm_add_table" [drivers/pwm/pwm-lpss-platform.ko] undefined! >> ERROR: "pwm_remove_table" [drivers/pwm/pwm-lpss-platform.ko] undefined!
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/3] pwm: lpss: Add intel-gfx as consumer device in lookup table
Quoted 5 lines · kbuild test robot
Hi Shobhit,
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
Guess this needs to be built with CONFIG_PWM_LPSS_PLATFORM=y. Else I would have to send a patch to do EXPORT_SYMBOL_GPL for missing symbols. But then all the drivers that depend on this one are actually in-built.
Any suggestions ?
Regards
Shobhit
Quoted 20 lines
url: https://github.com/0day-ci/linux/commits/Shobhit-Kumar/drm-i915-Encapsulate-the-pwm_device-in-a-pwm_info-structure/20170531-222631 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-randconfig-i0-201722 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=x86_64All errors (new ones prefixed by >>):
Quoted 2 lines
Quoted 2 lines
ERROR: "
pwm_add_table" [drivers/pwm/pwm-lpss-platform.ko] undefined!
ERROR: "pwm_remove_table" [drivers/pwm/pwm-lpss-platform.ko] undefined!---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Quoted 5 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm/i915: Add support for LPSS PWM on devices that support it
In reply to Shobhit Kumarv2: Add bugzilla links
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96571
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90075
--- drivers/gpu/drm/i915/intel_panel.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_panel.c +15 -1
@@ -36,6 +36,7 @@#include "intel_drv.h" #define CRC_PMIC_PWM_PERIOD_NS 21333 +#define LPSS_PWM_PERIOD_NS 10240/* CRC PMIC based PWM Information */ struct intel_pwm_info crc_pwm_info = {
@@ -44,6 +45,13 @@ struct intel_pwm_info crc_pwm_info = { .dev = NULL, }; +/* LPSS based PWM Information */ +struct intel_pwm_info lpss_pwm_info = { + .period_ns =LPSS_PWM_PERIOD_NS , + .name ="pwm_lpss" , + .dev =NULL , +}; +void intel_fixed_panel_mode (const struct drm_display_mode *fixed_mode,struct drm_display_mode *adjusted_mode)
@@ -1658,10 +1666,16 @@ static int pwm_setup_backlight(struct intel_connector *connector, enum pipe pipe) {struct drm_device *dev = connector->base.dev; +struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);struct intel_panel *panel = &connector->panel; -struct intel_pwm_info *pwm = &crc_pwm_info; +struct intel_pwm_info *pwm;int retval; +if (dev_priv->vbt.dsi.config->pwm_blc ==PPS_BLC_PMIC ) + pwm = &crc_pwm_info; +else /* PPS_BLC_SOC */ + pwm = &lpss_pwm_info; +/* Get the PWM chip for backlight control */ pwm->dev =pwm_get (dev->dev, pwm->name);if (IS_ERR (pwm->dev)) {
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Reviving the PWM_LPSS patches yet again
In reply to Shobhit Kumar== Series Details ==
== Series Details ==
Series: Reviving the PWM_LPSS patches yet again
URL : https://patchwork.freedesktop.org/series/25090/
State : success
== Summary ==
Series 25090v1 Reviving the PWM_LPSS patches yet again
https://patchwork.freedesktop.org/api/1.0/series/25090/revisions/1/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
fail -> PASS (fi-snb-2600) fdo#100007fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:444s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:438s fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:584s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:515s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:489s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:487s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:429s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:410s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:417s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:496s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:461s fi-kbl-7500u total:278 pass:255 dwarn:5 dfail:0 fail:0 skip:18 time:463s fi-kbl-7560u total:278 pass:263 dwarn:5 dfail:0 fail:0 skip:10 time:570s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:460s fi-skl-6700hq total:278 pass:239 dwarn:0 dfail:1 fail:17 skip:21 time:426s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:462s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:498s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:441s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:532s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:401s
4aa1d46d3b24bbe545cdf7cbd407c18f5cd5e43d drm-tip: 2017y-05m-31d-08h-58m-36s UTC integration manifest 64799fa drm/i915: Add support for LPSS PWM on devices that support it
ca89437 pwm: lpss: Add intel-gfx as consumer device in lookup table
20ba8a2 drm/i915: Encapsulate the pwm_device in a pwm_info structure
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4840/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Hi Jani,
Quoted 3 lines · Shobhit Kumar
Hi All,
Its been long since I have been sitting on these after I had received Tested-by for the same by Lluís for atleast the backlight working fine. The related bugs
Can you have a look at these patches.
Regards
Shobhit
Quoted 22 lines
are -
https://bugs.freedesktop.org/show_bug.cgi?id=96571
https://bugs.freedesktop.org/show_bug.cgi?id=90075Rebased the code on latest code and sending again. Still display was not working on devices referenced in these bugs but backlight control was tested to be working at that time. DSI issues of panel display not comming up is tracked separately at -
https://bugs.freedesktop.org/show_bug.cgi?id=96923 and should be again tested with latest drm-tip.Module ordering problem remains still and for testing we should for now enable
LPSS_PWMas in built with i915 as module.Regards
ShobhitShobhit Kumar (3):
drm/i915: Encapsulate thepwm_devicein apwm_infostructure
pwm: lpss: Add intel-gfx as consumer device in lookup table drm/i915: Add support for LPSS PWM on devices that support it
Quoted 5 lines
drivers/gpu/drm/i915/intel_drv.h | 8 ++++- drivers/gpu/drm/i915/intel_panel.c | 61 +++++++++++++++++++++++++++----------- drivers/pwm/pwm-lpss-platform.c | 12 ++++++++ 3 files changed, 62 insertions(+), 19 deletions(-)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx