drm/i915: Miscellaneous fixes to reduce dependency for I915_MAX_PIPES
Subsystems (2)
cover drm/i915: Miscellaneous fixes to reduce dependency for I915_MAX_PIPES
This patch series introduces fixes to reduce dependency for I915_MAX_PIPES and minor optimizations to reduce hardcoding.
Mika Kahola (5):
drm/i915: Don't relay on I915_MAX_PIPES
drm/i915: Remove I915_MAX_PIPES dependency for DDB allocation drm/i915: Fold IRQ pipe masks
drm/i915: Favor for_each_pipe() macro
drm/i915: Cleanup South Error Interrupts
drivers/gpu/drm/i915/i915_irq.c | 19 +++++++------------ drivers/gpu/drm/i915/i915_reg.h | 3 --- drivers/gpu/drm/i915/intel_audio.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 5 ++++- drivers/gpu/drm/i915/intel_drv.h | 3 ++- drivers/gpu/drm/i915/intel_pipe_crc.c | 15 ++++++++------- drivers/gpu/drm/i915/intel_pm.c | 12 +++++++----- 7 files changed, 29 insertions(+), 30 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/5 drm/i915: Don't relay on I915_MAX_PIPES
Let's remove the dependency on I915_MAX_PIPES. Instead, get the number of pipes from platform information.
--- drivers/gpu/drm/i915/intel_audio.c | 2 +- drivers/gpu/drm/i915/intel_pipe_crc.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_audio.c +1 -1
@@ -754,7 +754,7 @@ static struct intel_encoder *get_saved_enc(struct drm_i915_private *dev_priv, {struct intel_encoder *encoder; -if (WARN_ON (pipe >=I915_MAX_PIPES )) +if (WARN_ON (pipe >=INTEL_INFO (dev_priv)->num_pipes))return NULL ;/* MST */
drivers/gpu/drm/i915/intel_pipe_crc.c +4 -3
@@ -775,11 +775,12 @@ display_crc_ctl_parse_object(const char *buf, enum intel_pipe_crc_object *o)return -EINVAL ; } -static int display_crc_ctl_parse_pipe (const char *buf,enum pipe *pipe) +static int display_crc_ctl_parse_pipe (struct drm_i915_private *dev_priv, +const char *buf,enum pipe *pipe) {const char name = buf[0 ]; -if (name <'A' || name >=pipe_name (I915_MAX_PIPES )) +if (name <'A' || name >=pipe_name (INTEL_INFO (dev_priv)->num_pipes))return -EINVAL ; *pipe = name -'A' ;
@@ -828,7 +829,7 @@ static int display_crc_ctl_parse(struct drm_i915_private *dev_priv,return -EINVAL ; } -if (display_crc_ctl_parse_pipe (words[1 ], &pipe) <0 ) { +if (display_crc_ctl_parse_pipe (dev_priv, words[1 ], &pipe) <0 ) {DRM_DEBUG_DRIVER ("unknown pipe %s\n" , words[1 ]);return -EINVAL ; }
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/5 drm/i915: Remove I915_MAX_PIPES dependency for DDB allocation
In reply to Mika KaholaRemove dependency for I915_MAX_PIPES by replacing it with for_each_pipe() macro.
v2: use 'enum pipe pipe' instead of 'i'
--- drivers/gpu/drm/i915/intel_display.c | 5 ++++- drivers/gpu/drm/i915/intel_drv.h | 3 ++- drivers/gpu/drm/i915/intel_pm.c | 12 +++++++----- 3 files changed, 13 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/intel_display.c +4 -1
@@ -12223,7 +12223,10 @@ static void skl_update_crtcs(struct drm_atomic_state *state)if (updated & cmask || !cstate->base.active)continue ; -if (skl_ddb_allocation_overlaps (entries, &cstate->wm.skl.ddb, i)) +if (skl_ddb_allocation_overlaps (dev_priv, + entries, + &cstate->wm.skl.ddb, + i))continue ; updated |= cmask;
drivers/gpu/drm/i915/intel_drv.h +2 -1
@@ -1893,7 +1893,8 @@ int intel_enable_sagv(struct drm_i915_private *dev_priv);int intel_disable_sagv (struct drm_i915_private *dev_priv);bool skl_wm_level_equals (const struct skl_wm_level *l1,const struct skl_wm_level *l2); -bool skl_ddb_allocation_overlaps (const struct skl_ddb_entry **entries, +bool skl_ddb_allocation_overlaps (struct drm_i915_private *dev_priv, +const struct skl_ddb_entry **entries,const struct skl_ddb_entry *ddb,int ignore);bool ilk_disable_lp_wm (struct drm_device *dev);
drivers/gpu/drm/i915/intel_pm.c +7 -5
@@ -4820,16 +4820,18 @@ static inline bool skl_ddb_entries_overlap(const struct skl_ddb_entry *a,return a->start < b->end && b->start < a->end; } -bool skl_ddb_allocation_overlaps (const struct skl_ddb_entry **entries, +bool skl_ddb_allocation_overlaps (struct drm_i915_private *dev_priv, +const struct skl_ddb_entry **entries,const struct skl_ddb_entry *ddb,int ignore) { -int i; +enum pipe pipe; -for (i =0 ; i <I915_MAX_PIPES ; i++) -if (i != ignore && entries[i] && -skl_ddb_entries_overlap (ddb, entries[i])) +for_each_pipe (dev_priv, pipe) { +if (pipe != ignore && entries[pipe] && +skl_ddb_entries_overlap (ddb, entries[pipe]))return true; + }return false; }
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/5 drm/i915: Fold IRQ pipe masks
In reply to Mika KaholaFold IRQ pipe masks into one loop instead of hardcoding per pipe.
--- drivers/gpu/drm/i915/i915_irq.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +3 -4
@@ -3610,16 +3610,15 @@ static void gen8_de_irq_postinstall(struct drm_i915_private *dev_priv)else if (IS_BROADWELL (dev_priv)) de_port_enables |=GEN8_PORT_DP_A_HOTPLUG ; - dev_priv->de_irq_mask[PIPE_A ] = ~de_pipe_masked; - dev_priv->de_irq_mask[PIPE_B ] = ~de_pipe_masked; - dev_priv->de_irq_mask[PIPE_C ] = ~de_pipe_masked; +for_each_pipe (dev_priv, pipe) { + dev_priv->de_irq_mask[pipe] = ~de_pipe_masked; -for_each_pipe (dev_priv, pipe)if (intel_display_power_is_enabled (dev_priv,POWER_DOMAIN_PIPE (pipe)))GEN8_IRQ_INIT_NDX (DE_PIPE , pipe, dev_priv->de_irq_mask[pipe], de_pipe_enables); + }GEN3_IRQ_INIT (GEN8_DE_PORT_ , ~de_port_masked, de_port_enables);GEN3_IRQ_INIT (GEN8_DE_MISC_ , ~de_misc_masked, de_misc_masked);
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/5 drm/i915: Favor for_each_pipe() macro
In reply to Mika KaholaFavor for_each_pipe() macro when looping through pipes.
v2: use 'enum pipe pipe' instead of 'i'
--- drivers/gpu/drm/i915/intel_pipe_crc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_pipe_crc.c +4 -4
@@ -206,11 +206,11 @@ static const char *pipe_crc_source_name(enum intel_pipe_crc_source source)static int display_crc_ctl_show (struct seq_file *m,void *data) {struct drm_i915_private *dev_priv = m->private; -int i; +enum pipe pipe; -for (i =0 ; i <I915_MAX_PIPES ; i++) -seq_printf (m,"%c %s\n" ,pipe_name (i), -pipe_crc_source_name (dev_priv->pipe_crc[i].source)); +for_each_pipe (dev_priv, pipe) +seq_printf (m,"%c %s\n" ,pipe_name (pipe), +pipe_crc_source_name (dev_priv->pipe_crc[pipe].source));return 0 ; }
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/5 drm/i915: Cleanup South Error Interrupts
In reply to Mika KaholaCleanup and parametrize the handling of South Error Interrupts (SERR_INT).
--- drivers/gpu/drm/i915/i915_irq.c | 12 ++++-------- drivers/gpu/drm/i915/i915_reg.h | 3 --- 2 files changed, 4 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +4 -8
@@ -2252,18 +2252,14 @@ static void ivb_err_int_handler(struct drm_i915_private *dev_priv)static void cpt_serr_int_handler (struct drm_i915_private *dev_priv) {u32 serr_int =I915_READ (SERR_INT ); +enum pipe pipe;if (serr_int &SERR_INT_POISON )DRM_ERROR ("PCH poison interrupt\n" ); -if (serr_int &SERR_INT_TRANS_A_FIFO_UNDERRUN ) -intel_pch_fifo_underrun_irq_handler (dev_priv,PIPE_A ); - -if (serr_int &SERR_INT_TRANS_B_FIFO_UNDERRUN ) -intel_pch_fifo_underrun_irq_handler (dev_priv,PIPE_B ); - -if (serr_int &SERR_INT_TRANS_C_FIFO_UNDERRUN ) -intel_pch_fifo_underrun_irq_handler (dev_priv,PIPE_C ); +for_each_pipe (dev_priv, pipe) +if (serr_int &SERR_INT_TRANS_FIFO_UNDERRUN (pipe)) +intel_pch_fifo_underrun_irq_handler (dev_priv, pipe);I915_WRITE (SERR_INT , serr_int); }
drivers/gpu/drm/i915/i915_reg.h +0 -3
@@ -7183,9 +7183,6 @@ enum {#define SERR_INT _MMIO(0xc4040)#define SERR_INT_POISON (1<<31) -#define SERR_INT_TRANS_C_FIFO_UNDERRUN (1<<6) -#define SERR_INT_TRANS_B_FIFO_UNDERRUN (1<<3) -#define SERR_INT_TRANS_A_FIFO_UNDERRUN (1<<0)#define SERR_INT_TRANS_FIFO_UNDERRUN (pipe) (1<<((pipe)*3))/* digital port hotplug */
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 drm/i915: Miscellaneous fixes to reduce dependency for I915_MAX_PIPES (rev2)
In reply to Mika Kahola== Series Details ==
== Series Details ==
Series: drm/i915: Miscellaneous fixes to reduce dependency for I915_MAX_PIPES (rev2)
URL : https://patchwork.freedesktop.org/series/30336/
State : success
== Summary ==
Series 30336v2 drm/i915: Miscellaneous fixes to reduce dependency for I915_MAX_PIPES
https://patchwork.freedesktop.org/api/1.0/series/30336/revisions/2/mbox/
Test kms_frontbuffer_tracking:
Subgroup basic:
pass -> DMESG-WARN (fi-bdw-5557u) fdo#102473
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-kbl-r) fdo#102846
Test pm_rpm:
Subgroup basic-pci-d3-state:
dmesg-warn -> PASS (fi-cfl-s) fdo#103169
Test drv_module_reload:
Subgroup basic-no-display:
pass -> DMESG-WARN (fi-cfl-s) fdo#103022 +1fdo#102473 https://bugs.freedesktop.org/show_bug.cgi?id=102473
fdo#102846 https://bugs.freedesktop.org/show_bug.cgi?id=102846
fdo#103169 https://bugs.freedesktop.org/show_bug.cgi?id=103169
fdo#103022 https://bugs.freedesktop.org/show_bug.cgi?id=103022
fi-bdw-5557u total:289 pass:267 dwarn:1 dfail:0 fail:0 skip:21 time:457s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:467s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:390s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:563s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:287s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:522s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:522s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:532s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:522s fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:564s fi-cnl-y total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:613s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:434s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:597s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:439s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:417s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:462s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:509s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:475s fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:502s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:581s fi-kbl-7567u total:289 pass:265 dwarn:4 dfail:0 fail:0 skip:20 time:489s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:588s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:651s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:475s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:657s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:528s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:506s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:470s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:581s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:427s
6a08510077ad5bdbac044038138f217e413cdca2 drm-tip: 2017y-10m-10d-07h-48m-31s UTC integration manifest 19cfe6fbc051 drm/i915: Cleanup South Error Interruptsddcd3ac54ef1 drm/i915: Favor for_each_pipe() macrod3f2a5aad5e7 drm/i915: Fold IRQ pipe maskse751b00962fb drm/i915: Remove I915_MAX_PIPES dependency for DDB allocation ba0560b1b56e drm/i915: Don't relay on I915_MAX_PIPES
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5968/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: warning for drm/i915: Miscellaneous fixes to reduce dependency for I915_MAX_PIPES (rev2)
In reply to Mika Kahola== Series Details ==
== Series Details ==
Series: drm/i915: Miscellaneous fixes to reduce dependency for I915_MAX_PIPES (rev2)
URL : https://patchwork.freedesktop.org/series/30336/
State : warning
== Summary ==
Test kms_setmode:
Subgroup basic:
fail -> PASS (shard-hsw) fdo#99912
Test kms_flip:
Subgroup wf_vblank-vs-modeset-interruptible:
pass -> DMESG-WARN (shard-hsw)fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
shard-hsw total:2501 pass:1387 dwarn:24 dfail:0 fail:10 skip:1080 time:9508s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_5968/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Mika Kahola
This patch series introduces fixes to reduce dependency for
I915_MAX_PIPESand minor optimizations to reduce hardcoding.Mika Kahola (5):
drm/i915: Don't relay onI915_MAX_PIPES
drm/i915: RemoveI915_MAX_PIPESdependency for DDB allocation drm/i915: Fold IRQ pipe masks
drm/i915: Favorfor_each_pipe()macro
drm/i915: Cleanup South Error Interrupts
Pushed the lot to dinq. Thanks for the patches.
Quoted 17 lines
drivers/gpu/drm/i915/i915_irq.c | 19 +++++++------------ drivers/gpu/drm/i915/i915_reg.h | 3 --- drivers/gpu/drm/i915/intel_audio.c | 2 +- drivers/gpu/drm/i915/intel_display.c | 5 ++++- drivers/gpu/drm/i915/intel_drv.h | 3 ++- drivers/gpu/drm/i915/intel_pipe_crc.c | 15 ++++++++------- drivers/gpu/drm/i915/intel_pm.c | 12 +++++++----- 7 files changed, 29 insertions(+), 30 deletions(-)Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx