drm/i915: Check num_pipes before initializing audio component
Subsystems (2)
PATCH 1/2 drm/i915: Check num_pipes before initializing audio component
From: Elaine Wang <[email protected]>
when num_pipes is zero, it indicates there is no display and HDMI audio doesn't exist.
--- drivers/gpu/drm/i915/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +2 -1
@@ -1132,7 +1132,8 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)if (IS_GEN5 (dev_priv))intel_gpu_ips_init (dev_priv); -i915_audio_component_init (dev_priv); +if (INTEL_INFO (dev_priv)->num_pipes) +i915_audio_component_init (dev_priv);/* * Some ports require correctly set-up hpd registers for detection to
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Check num_pipes before initializing or calling display hooks
From: Elaine Wang <[email protected]>
when num_pipes is zero, it indicates display doesn't exist, so there is no need to initialize display hooks. And to avoid calling these uninitialized display hooks, respect num_pipes at the beginning of intel_modeset_init_hw and intel_init_clock_gating.
intel_init_pm() calls FBC init function and then initializes water mark hooks. Both aren't needed when display doesn't exist. So check num_pipes before invoking intel_init_pm().
--- drivers/gpu/drm/i915/intel_display.c | 9 +++++++-- drivers/gpu/drm/i915/intel_pm.c | 7 ++++++- 2 files changed, 13 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_display.c +7 -2
@@ -16030,6 +16030,9 @@ static void intel_atomic_state_free(struct drm_atomic_state *state)*/ void intel_init_display_hooks (struct drm_i915_private *dev_priv) { +if (INTEL_INFO (dev_priv)->num_pipes ==0 ) +return ; +if (INTEL_INFO (dev_priv)->gen >=9 ) { dev_priv->display.get_pipe_config = haswell_get_pipe_config; dev_priv->display.get_initial_plane_config =
@@ -16412,6 +16415,9 @@ void intel_modeset_init_hw(struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev); +if (INTEL_INFO (dev_priv)->num_pipes ==0 ) +return ; +intel_update_cdclk (dev_priv); dev_priv->atomic_cdclk_freq = dev_priv->cdclk_freq;
@@ -16524,11 +16530,10 @@ int intel_modeset_init(struct drm_device *dev)intel_init_quirks (dev); -intel_init_pm (dev_priv); -if (INTEL_INFO (dev_priv)->num_pipes ==0 )return 0 ; +intel_init_pm (dev_priv);/* * There may be no VBT; and if the BIOS enabled SSC we can * just keep using it to avoid unnecessary flicker. Whereas if the
drivers/gpu/drm/i915/intel_pm.c +6 -1
@@ -7619,7 +7619,8 @@ static void i830_init_clock_gating(struct drm_i915_private *dev_priv)void intel_init_clock_gating (struct drm_i915_private *dev_priv) { - dev_priv->display.init_clock_gating (dev_priv); +if (INTEL_INFO (dev_priv)->num_pipes) + dev_priv->display.init_clock_gating (dev_priv); }void intel_suspend_hw (struct drm_i915_private *dev_priv)
@@ -7644,6 +7645,10 @@ static void nop_init_clock_gating(struct drm_i915_private *dev_priv)*/ void intel_init_clock_gating_hooks (struct drm_i915_private *dev_priv) { + +if (INTEL_INFO (dev_priv)->num_pipes ==0 ) +return ; +if (IS_SKYLAKE (dev_priv)) dev_priv->display.init_clock_gating = skylake_init_clock_gating;else if (IS_KABYLAKE (dev_priv))
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Check num_pipes before initializing audio component
In reply to Wang Elaine== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Check num_pipes before initializing audio component
URL : https://patchwork.freedesktop.org/series/16902/
State : warning
== Summary ==
Series 16902v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/16902/revisions/1/mbox/
Test kms_force_connector_basic:
Subgroup force-connector-state:
pass -> SKIP (fi-snb-2520m)fi-bdw-5557u total:247 pass:233 dwarn:0 dfail:0 fail:0 skip:14 fi-bsw-n3050 total:247 pass:208 dwarn:0 dfail:0 fail:0 skip:39 fi-bxt-j4205 total:247 pass:222 dwarn:0 dfail:0 fail:0 skip:25 fi-bxt-t5700 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-j1900 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-n2820 total:247 pass:216 dwarn:0 dfail:0 fail:0 skip:31 fi-hsw-4770 total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19 fi-hsw-4770r total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19 fi-ilk-650 total:247 pass:195 dwarn:0 dfail:0 fail:0 skip:52 fi-ivb-3520m total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-kbl-7500u total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6260u total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13 fi-skl-6700hq total:247 pass:227 dwarn:0 dfail:0 fail:0 skip:20 fi-skl-6700k total:247 pass:224 dwarn:3 dfail:0 fail:0 skip:20 fi-skl-6770hq total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13 fi-snb-2520m total:247 pass:215 dwarn:0 dfail:0 fail:0 skip:32 fi-snb-2600 total:247 pass:215 dwarn:0 dfail:0 fail:0 skip:32
639f10d1159e87cac2f85769dcd081520b904f56 drm-tip: 2016y-12m-15d-17h-57m-41s UTC integration manifest 9bd18fd drm/i915: Check num_pipes before initializing or calling display hooks 273e44e drm/i915: Check num_pipes before initializing audio component
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3305/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Check num_pipes before initializing audio component
These two patches shouldn't impact the platforms that have none-zero num_pipes.
The failed case happened to fi-snb-2520m which has none-zero num_pipes("Found CougarPoint PCH" in dmesg log). And compared dmesg with the one caught when test pass, I didn't see extra error messages. One difference in the log is that "connector 48 enabled" showed "yes" on Patchwork_3305 but show "no" on CI_DRM_1960.
dmesg logs with these 2 patches:
https://intel-gfx-ci.01.org/CI/Patchwork_3305/fi-snb-2520m/igt@[email protected]
Base build dmegs logs:
https://intel-gfx-ci.01.org/CI/CI_DRM_1960/fi-snb-2520m/igt@[email protected]
dmesg log before and during running force-connector-state on Patchwork_3305:
[ 430.495420] [drm:drm_setup_crtcs] connector 39 enabled? yes [ 430.495422] [drm:drm_setup_crtcs] connector 45 enabled? yes [ 430.495424] [drm:drm_setup_crtcs] connector 48 enabled? yes [ 430.495425] [drm:drm_setup_crtcs] connector 53 enabled? no [ 430.495427] [drm:drm_setup_crtcs] connector 55 enabled? no [ 430.495428] [drm:drm_setup_crtcs] connector 57 enabled? no [ 430.495429] [drm:drm_setup_crtcs] connector 59 enabled? no [ 430.495431] [drm:drm_setup_crtcs] connector 61 enabled? no [ 430.495453] [drm:intel_fb_initial_config [i915]] looking for cmdline mode on connector LVDS-1 [ 430.495853] [drm:intel_fb_initial_config [i915]] looking for preferred mode on connector LVDS-1 0 [ 430.495871] [drm:intel_fb_initial_config [i915]] connector LVDS-1 on [CRTC:31:pipe A]: 1366x768 [ 430.495888] [drm:intel_fb_initial_config [i915]] connector VGA-1 has no encoder or crtc, skipping [ 430.495904] [drm:intel_fb_initial_config [i915]] looking for cmdline mode on connector HDMI-A-1 [ 430.495920] [drm:intel_fb_initial_config [i915]] looking for preferred mode on connector HDMI-A-1 0 [ 430.495936] [drm:intel_fb_initial_config [i915]] connector HDMI-A-1 on [CRTC:38:pipe B]: 1920x1080 [ 430.495953] [drm:intel_fb_initial_config [i915]] connector DP-1 not enabled, skipping [ 430.495968] [drm:intel_fb_initial_config [i915]] connector HDMI-A-2 not enabled, skipping [ 430.495984] [drm:intel_fb_initial_config [i915]] connector HDMI-A-3 not enabled, skipping [ 430.496000] [drm:intel_fb_initial_config [i915]] connector DP-2 not enabled, skipping [ 430.496015] [drm:intel_fb_initial_config [i915]] connector DP-3 not enabled, skipping [ 430.496026] [drm:drm_setup_crtcs] desired mode 1366x768 set on crtc 31 (0,0) [ 430.496031] [drm:drm_setup_crtcs] desired mode 1920x1080 set on crtc 38 (0,0) [ 430.814402] [IGT] kms_force_connector_basic: executing [ 430.828390] [IGT] kms_force_connector_basic: exiting, ret=77 [ 430.918595] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00080000, dig 0x00101010, pins 0x00000002 [ 430.918641] [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 1 - cnt: 0 [ 430.918748] [drm:i915_hotplug_work_func [i915]] running encoder hotplug functions [ 430.918787] [drm:i915_hotplug_work_func [i915]] Connector VGA-1 (pin 1) received hotplug event. [ 430.918822] [drm:intel_crt_detect [i915]] [CONNECTOR:45:VGA-1] force=0 [ 430.918865] [drm:intel_crt_detect [i915]] ironlake hotplug adpa=0x20f40000, result 0 [ 430.918896] [drm:intel_crt_detect [i915]] CRT not detected via hotplug
dmesg log before and during running force-connector-state on CI_DRM_1960:
[ 433.614115] [drm:drm_setup_crtcs] connector 39 enabled? yes [ 433.614118] [drm:drm_setup_crtcs] connector 45 enabled? no [ 433.614120] [drm:drm_setup_crtcs] connector 48 enabled? yes [ 433.614123] [drm:drm_setup_crtcs] connector 53 enabled? no [ 433.614125] [drm:drm_setup_crtcs] connector 55 enabled? no [ 433.614127] [drm:drm_setup_crtcs] connector 57 enabled? no [ 433.614129] [drm:drm_setup_crtcs] connector 59 enabled? no [ 433.614132] [drm:drm_setup_crtcs] connector 61 enabled? no [ 433.614167] [drm:intel_fb_initial_config [i915]] looking for cmdline mode on connector LVDS-1 [ 433.614196] [drm:intel_fb_initial_config [i915]] looking for preferred mode on connector LVDS-1 0 [ 433.614224] [drm:intel_fb_initial_config [i915]] connector LVDS-1 on [CRTC:31:pipe A]: 1366x768 [ 433.614259] [drm:intel_fb_initial_config [i915]] connector VGA-1 not enabled, skipping [ 433.614478] [drm:intel_fb_initial_config [i915]] looking for cmdline mode on connector HDMI-A-1 [ 433.614601] [drm:intel_fb_initial_config [i915]] looking for preferred mode on connector HDMI-A-1 0 [ 433.614644] [drm:intel_fb_initial_config [i915]] connector HDMI-A-1 on [CRTC:38:pipe B]: 1920x1080 [ 433.614686] [drm:intel_fb_initial_config [i915]] connector DP-1 not enabled, skipping [ 433.614726] [drm:intel_fb_initial_config [i915]] connector HDMI-A-2 not enabled, skipping [ 433.614768] [drm:intel_fb_initial_config [i915]] connector HDMI-A-3 not enabled, skipping [ 433.614812] [drm:intel_fb_initial_config [i915]] connector DP-2 not enabled, skipping [ 433.614854] [drm:intel_fb_initial_config [i915]] connector DP-3 not enabled, skipping [ 433.614881] [drm:drm_setup_crtcs] desired mode 1366x768 set on crtc 31 (0,0) [ 433.614894] [drm:drm_setup_crtcs] desired mode 1920x1080 set on crtc 38 (0,0) [ 433.957915] [IGT] kms_force_connector_basic: executing [ 433.972031] [IGT] kms_force_connector_basic: starting subtest force-connector-state [ 433.972586] [drm:status_store] [CONNECTOR:45:VGA-1] force updated from 0 to 2 or reprobing [ 433.972594] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:45:VGA-1] [ 433.972599] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:45:VGA-1] status updated from disconnected to connected [ 433.972992] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus vga] NAK for addr: 0050 w(1) [ 433.973024] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus vga] NAK on first message, retry [ 433.973220] [drm:gmbus_xfer [i915]] GMBUS [i915 gmbus vga] NAK for addr: 0050 w(1) [ 433.973229] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter i915 gmbus vga [ 433.973695] [drm:intel_crt_get_edid [i915]] CRT GMBUS EDID read failed, retry using GPIO bit-banging [ 433.973725] [drm:intel_gmbus_force_bit [i915]] enabling bit-banging on i915 gmbus vga. force bit now 1 [ 433.974759] [drm:drm_do_probe_ddc_edid] drm: skipping non-existent adapter i915 gmbus vga [ 433.974794] [drm:intel_gmbus_force_bit [i915]] disabling bit-banging on i915 gmbus vga. force bit now 0 [ 433.974827] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:45:VGA-1] probed modes : [ 433.974832] [drm:drm_mode_debug_printmodeline] Modeline 95:"1024x768" 60 65000 1024 1048 1184 1344 768 771 777 806 0x40 0xa [ 433.974837] [drm:drm_mode_debug_printmodeline] Modeline 93:"800x600" 60 40000 800 840 968 1056 600 601 605 628 0x40 0x5 [ 433.974840] [drm:drm_mode_debug_printmodeline] Modeline 82:"800x600" 56 36000 800 824 896 1024 600 601 603 625 0x40 0x5 [ 433.974844] [drm:drm_mode_debug_printmodeline] Modeline 94:"848x480" 60 33750 848 864 976 1088 480 486 494 517 0x40 0x5 [ 433.974847] [drm:drm_mode_debug_printmodeline] Modeline 62:"640x480" 60 25175 640 656 752 800 480 490 492 525 0x40 0xa [ 433.974931] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:45:VGA-1]
Quoted 42 lines
-----Original Message-----
From: Patchwork [mailto:[email protected]]
Sent: Friday, December 16, 2016 3:16 PM
To: Wang, Elaine <[email protected]>
Cc: [email protected]
Subject: ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Checknum_pipesbefore initializing audio component== Series Details ==
Series: series starting with [1/2] drm/i915: Check
num_pipesbefore initializing audio component
URL : https://patchwork.freedesktop.org/series/16902/
State : warning== Summary ==
Series 16902v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/16902/revisions/1/mbox/Test
kms_force_connector_basic:Subgroup force-connector-state: pass -> SKIP (fi-snb-2520m)fi-bdw-5557u total:247 pass:233 dwarn:0 dfail:0 fail:0 skip:14 fi-bsw-n3050 total:247 pass:208 dwarn:0 dfail:0 fail:0 skip:39 fi-bxt-j4205 total:247 pass:222 dwarn:0 dfail:0 fail:0 skip:25 fi-bxt-t5700 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-j1900 total:247 pass:220 dwarn:0 dfail:0 fail:0 skip:27 fi-byt-n2820 total:247 pass:216 dwarn:0 dfail:0 fail:0 skip:31 fi-hsw-4770 total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19 fi-hsw-4770r total:247 pass:228 dwarn:0 dfail:0 fail:0 skip:19 fi-ilk-650 total:247 pass:195 dwarn:0 dfail:0 fail:0 skip:52 fi-ivb-3520m total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-kbl-7500u total:247 pass:226 dwarn:0 dfail:0 fail:0 skip:21 fi-skl-6260u total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13 fi-skl-6700hq total:247 pass:227 dwarn:0 dfail:0 fail:0 skip:20 fi-skl-6700k total:247 pass:224 dwarn:3 dfail:0 fail:0 skip:20 fi-skl-6770hq total:247 pass:234 dwarn:0 dfail:0 fail:0 skip:13 fi-snb-2520m total:247 pass:215 dwarn:0 dfail:0 fail:0 skip:32 fi-snb-2600 total:247 pass:215 dwarn:0 dfail:0 fail:0 skip:32
Quoted 8 lines
639f10d1159e87cac2f85769dcd081520b904f56drm-tip: 2016y-12m-15d-17h- 57m-41s UTC integration manifest 9bd18fd drm/i915: Checknum_pipesbefore initializing or calling display hooks 273e44e drm/i915: Checknum_pipesbefore initializing audio component== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3305/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 17 lines · Wang Elaine
From: Elaine Wang <[email protected]>
when
num_pipesis zero, it indicates there is no display and HDMI audio doesn't exist.Cc Chris Wilson <[email protected]>Cc Joonas Lahtinen <[email protected]>Signed-off-by Elaine Wang <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_drv.c +0
-0
drivers/gpu/drm/i915/i915_drv.c static void i915_driver_register(struct drm_i915_private *dev_priv) · line 1136
Quoted 6 lines
drivers/gpu/drm/i915/i915_drv.c +2
-1@@ -1132,7 +1132,8 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)if (IS_GEN5 (dev_priv))intel_gpu_ips_init (dev_priv); -i915_audio_component_init (dev_priv); +if (INTEL_INFO (dev_priv)->num_pipes) +i915_audio_component_init (dev_priv);
I just wonder why on some patches in the series the check is on the caller side and on some others on the callee side. I'd like consistency.
BR,
Jani.
Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.c +0
-0/* * Some ports require correctly set-up hpd registers for detection to
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 30 lines · Wang Elaine
drivers/gpu/drm/i915/i915_drv.c static void i915_driver_register(struct
Quoted 17 lines
From: Elaine Wang <[email protected]>
when
num_pipesis zero, it indicates there is no display and HDMI audio doesn't exist.Cc Chris Wilson <[email protected]>Cc Joonas Lahtinen <[email protected]>Signed-off-by Elaine Wang <[email protected]>--- drivers/gpu/drm/i915/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_drv.cindex 6428588..c94e26d 100644drivers/gpu/drm/i915/i915_drv.c +0
-0@@ -1132,7 +1132,8 @@ static void i915_driver_register(struct
drm_i915_private*dev_priv)drivers/gpu/drm/i915/i915_drv.c static void i915_driver_register(struct drm_i915_private *dev_priv) · line 1136
Quoted 6 lines
drivers/gpu/drm/i915/i915_drv.c +2
-1if (IS_GEN5 (dev_priv))intel_gpu_ips_init (dev_priv); -i915_audio_component_init (dev_priv); +if (INTEL_INFO (dev_priv)->num_pipes) +i915_audio_component_init (dev_priv);I just wonder why on some patches in the series the check is on the caller side and on some others on the callee side. I'd like consistency.
Quoted 2 lines
BR,
Jani.
Thanks for the comment. I'll revise the patch and made all the check on callee side. Elaine
Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.c +0
-0/* * Some ports require correctly set-up hpd registers for detection to
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx