drm/i915/gen11: Enable all sprite planes.
Subsystems (2)
cover drm/i915/gen11: Enable all sprite planes.
Preparation patch series to make NV12 work, which needs all planes. Patch 2 is a resend. :)
Maarten Lankhorst (2):
drm/i915: Fix unsigned overflow when calculating total data rate drm/i915/gen11: Enable 6 sprites on gen11
drivers/gpu/drm/i915/intel_device_info.c | 5 ++- drivers/gpu/drm/i915/intel_display.h | 3 ++ drivers/gpu/drm/i915/intel_pm.c | 47 +++++++++++------------- 3 files changed, 29 insertions(+), 26 deletions(-)
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 drm/i915: Fix unsigned overflow when calculating total data rate
On gen11, we can definitely smash the 32-bits barrier with just a when we enable all planes in the next patch.
--- drivers/gpu/drm/i915/intel_pm.c | 47 +++++++++++++++------------------ 1 file changed, 22 insertions(+), 25 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +22 -25
@@ -3784,7 +3784,7 @@ bool intel_can_enable_sagv(struct drm_atomic_state *state)static u16 intel_get_ddb_size (struct drm_i915_private *dev_priv,const struct intel_crtc_state *cstate, -const unsigned int total_data_rate, +const u64 total_data_rate,const int num_active,struct skl_ddb_allocation *ddb) {
@@ -3798,12 +3798,12 @@ static u16 intel_get_ddb_size(struct drm_i915_private *dev_priv,return ddb_size -4 ;/* 4 blocks for bypass path allocation */ adjusted_mode = &cstate->base.adjusted_mode; - total_data_bw = (u64 )total_data_rate *drm_mode_vrefresh (adjusted_mode); + total_data_bw = total_data_rate *drm_mode_vrefresh (adjusted_mode);/* * 12GB/s is maximum BW supported by single DBuf slice. */ -if (total_data_bw >=GBps (12 ) || num_active >1 ) { +if (num_active >1 || total_data_bw >=GBps (12 )) { ddb->enabled_slices =2 ; }else { ddb->enabled_slices =1 ;
@@ -3816,7 +3816,7 @@ static u16 intel_get_ddb_size(struct drm_i915_private *dev_priv,static void skl_ddb_get_pipe_allocation_limits (struct drm_device *dev,const struct intel_crtc_state *cstate, -const unsigned int total_data_rate, +const u64 total_data_rate,struct skl_ddb_allocation *ddb,struct skl_ddb_entry *alloc,/* out */ int *num_active/* out */ )
@@ -4139,7 +4139,7 @@ int skl_check_pipe_max_pixel_rate(struct intel_crtc *intel_crtc,return 0 ; } -static unsigned int +static u64 skl_plane_relative_data_rate (const struct intel_crtc_state *cstate,const struct drm_plane_state *pstate,const int plane)
@@ -4151,6 +4151,7 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate,struct drm_framebuffer *fb;u32 format;uint_fixed_16_16_t down_scale_amount; +u64 rate;if (!intel_pstate->base.visible)return 0 ;
@@ -4177,28 +4178,26 @@ skl_plane_relative_data_rate(const struct intel_crtc_state *cstate, height /=2 ; } - data_rate = width * height * fb->format->cpp[plane]; + data_rate = width * height; down_scale_amount =skl_plane_downscale_amount (cstate, intel_pstate); -return mul_round_up_u32_fixed16 (data_rate, down_scale_amount); + rate =mul_round_up_u32_fixed16 (data_rate, down_scale_amount); + + rate *= fb->format->cpp[plane]; +return rate; } -/* -* We don't overflow 32 bits. Worst case is 3 planes enabled, each fetching -* a 8192x4096@32bpp framebuffer: -* 3 * 4096 * 8192 * 4 < 2^32 -*/ -static unsigned int +static u64 skl_get_total_relative_data_rate (struct intel_crtc_state *intel_cstate, -unsigned int *plane_data_rate, -unsigned int *uv_plane_data_rate) +u64 *plane_data_rate, +u64 *uv_plane_data_rate) {struct drm_crtc_state *cstate = &intel_cstate->base;struct drm_atomic_state *state = cstate->state;struct drm_plane *plane;const struct drm_plane_state *pstate; -unsigned int total_data_rate =0 ; +u64 total_data_rate =0 ;if (WARN_ON (!state))return 0 ;
@@ -4206,7 +4205,7 @@ skl_get_total_relative_data_rate(struct intel_crtc_state *intel_cstate,/* Calculate and cache data rate for each plane */ drm_atomic_crtc_state_for_each_plane_state (plane, pstate, cstate) {enum plane_id plane_id =to_intel_plane (plane)->id; -unsigned int rate; +u64 rate;/* packed/y */ rate = skl_plane_relative_data_rate(intel_cstate,
@@ -4325,11 +4324,11 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,uint16_t alloc_size, start;uint16_t minimum[I915_MAX_PLANES ] = {};uint16_t uv_minimum[I915_MAX_PLANES ] = {}; -unsigned int total_data_rate; +u64 total_data_rate;enum plane_id plane_id;int num_active; -unsigned int plane_data_rate[I915_MAX_PLANES ] = {}; -unsigned int uv_plane_data_rate[I915_MAX_PLANES ] = {}; +u64 plane_data_rate[I915_MAX_PLANES ] = {}; +u64 uv_plane_data_rate[I915_MAX_PLANES ] = {};uint16_t total_min_blocks =0 ;/* Clear the partitioning for disabled planes. */
@@ -4388,7 +4387,7 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate, start = alloc->start;for_each_plane_id_on_crtc (intel_crtc, plane_id) { -unsigned int data_rate, uv_data_rate; +u64 data_rate, uv_data_rate;uint16_t plane_blocks, uv_plane_blocks;if (plane_id ==PLANE_CURSOR )
@@ -4402,8 +4401,7 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate,* result is < available as data_rate / total_data_rate < 1 */ plane_blocks = minimum[plane_id]; - plane_blocks +=div_u64 ((uint64_t )alloc_size * data_rate, - total_data_rate); + plane_blocks += alloc_size * data_rate / total_data_rate;/* Leave disabled planes at (0,0) */ if (data_rate) {
@@ -4417,8 +4415,7 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate, uv_data_rate = uv_plane_data_rate[plane_id]; uv_plane_blocks = uv_minimum[plane_id]; - uv_plane_blocks +=div_u64 ((uint64_t )alloc_size * uv_data_rate, - total_data_rate); + uv_plane_blocks += alloc_size * uv_data_rate / total_data_rate;if (uv_data_rate) { ddb->uv_plane[pipe][plane_id].start = start;
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915/gen11: Enable 6 sprites on gen11
In reply to Maarten LankhorstGen11 supports 7 planes + 1 cursor on each pipe. Bump I915_MAX_PLANES to 8, and set num_sprites correctly.
--- drivers/gpu/drm/i915/intel_device_info.c | 5 ++++- drivers/gpu/drm/i915/intel_display.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_device_info.c +4 -1
@@ -760,7 +760,10 @@ void intel_device_info_runtime_init(struct intel_device_info *info)* we don't expose the topmost plane at all to prevent ABI breakage * down the line. */ -if (IS_GEN10 (dev_priv) ||IS_GEMINILAKE (dev_priv)) +if (IS_GEN11 (dev_priv)) +for_each_pipe (dev_priv, pipe) + info->num_sprites[pipe] =6 ; +else if (IS_GEN10 (dev_priv) ||IS_GEMINILAKE (dev_priv))for_each_pipe (dev_priv, pipe) info->num_sprites[pipe] =3 ;else if (IS_BROXTON (dev_priv)) {
drivers/gpu/drm/i915/intel_display.h +3 -0
@@ -120,6 +120,9 @@ enum plane_id {PLANE_SPRITE0 ,PLANE_SPRITE1 ,PLANE_SPRITE2 , +PLANE_SPRITE3 , +PLANE_SPRITE4 , +PLANE_SPRITE5 ,PLANE_CURSOR , I915_MAX_PLANES,
Signature · 6 lines
2.19.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915/gen11: Enable 6 sprites on gen11
Op 15-10-18 om 11:52 schreef Maarten Lankhorst:
Quoted 31 lines
Gen11 supports 7 planes + 1 cursor on each pipe. Bump
I915_MAX_PLANESto 8, and setnum_spritescorrectly.Signed-off-by Maarten Lankhorst <[email protected]>Reviewed-by Matt Roper <[email protected]>--- drivers/gpu/drm/i915/intel_device_info.c | 5 ++++- drivers/gpu/drm/i915/intel_display.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_device_info.c +4
-1@@ -760,7 +760,10 @@ void intel_device_info_runtime_init(struct intel_device_info *info)* we don't expose the topmost plane at all to prevent ABI breakage * down the line. */ -if (IS_GEN10 (dev_priv) ||IS_GEMINILAKE (dev_priv)) +if (IS_GEN11 (dev_priv)) +for_each_pipe (dev_priv, pipe) + info->num_sprites[pipe] =6 ; +else if (IS_GEN10 (dev_priv) ||IS_GEMINILAKE (dev_priv))for_each_pipe (dev_priv, pipe) info->num_sprites[pipe] =3 ;else if (IS_BROXTON (dev_priv)) {drivers/gpu/drm/i915/intel_display.h +0
-0
drivers/gpu/drm/i915/intel_display.h enum plane_id { · line 128
Quoted 9 lines
drivers/gpu/drm/i915/intel_display.h +3
-0@@ -120,6 +120,9 @@ enum plane_id {PLANE_SPRITE0 ,PLANE_SPRITE1 ,PLANE_SPRITE2 , +PLANE_SPRITE3 , +PLANE_SPRITE4 , +PLANE_SPRITE5 ,PLANE_CURSOR , I915_MAX_PLANES,
Oops, missed the
And should probably fix the stale comments. :)
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen11: Enable all sprite planes.
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: drm/i915/gen11: Enable all sprite planes.
URL : https://patchwork.freedesktop.org/series/50995/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
f35ce280b30a drm/i915: Fix unsigned overflow when calculating total data rate
-:36: CHECK:CAMELCASE: Avoid CamelCase: <GBps>
#36: FILE: drivers/gpu/drm/i915/intel_pm.c:3806:
+ if (num_active > 1 || total_data_bw >= GBps(12)) {total: 0 errors, 0 warnings, 1 checks, 130 lines checked c76ba255095d drm/i915/gen11: Enable 6 sprites on gen11 -:11: WARNING:BAD_SIGN_OFF: Duplicate signature #11:
total: 0 errors, 1 warnings, 0 checks, 20 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/gen11: Enable all sprite planes.
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: drm/i915/gen11: Enable all sprite planes.
URL : https://patchwork.freedesktop.org/series/50995/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4979 -> Patchwork_10455 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/50995/revisions/1/mbox/
== Known issues ==
Here are the changes found in Patchwork_10455 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-blb-e6850: PASS -> INCOMPLETE (fdo#107718)
==== Possible fixes ====
igt@drv_module_reload@basic-reload:
fi-glk-j4005: DMESG-WARN (fdo#106725, fdo#106248) -> PASS
igt@drv_selftest@live_hangcheck:
fi-icl-u: INCOMPLETE (fdo#108315) -> PASS
igt@kms_flip@basic-flip-vs-modeset:
fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS
igt@kms_flip@basic-plain-flip:
fi-ilk-650: DMESG-WARN (fdo#106387) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-a:
fi-byt-clapper: FAIL (fdo#107362) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#103191, fdo#107362) -> PASS +1 fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
fdo#106387 https://bugs.freedesktop.org/show_bug.cgi?id=106387
fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
== Participating hosts (44 -> 47) ==
Additional (6): fi-snb-2520m fi-ivb-3770 fi-pnv-d510 fi-kbl-7560u fi-byt-n2820 fi-snb-2600
Missing (3): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan
== Build changes ==
* Linux: CI_DRM_4979 -> Patchwork_10455
CI_DRM_4979: 2c411746783a4db33844f298ee88f0301cf0453e @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4674: 93871c6fb3c25e5d350c9faf36ded917174214de @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10455: c76ba255095df853862b8d0c56ab67541b82a2f7 @ git://anongit.freedesktop.org/gfx-ci/linux
== Kernel 32bit build ==
Warning: Kernel 32bit buildtest failed:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10455/build_32bit.log
CALL scripts/checksyscalls.sh
CHK include/generated/compile.h
Kernel: arch/x86/boot/bzImage is ready (#1)
Building modules, stage 2.
MODPOST 110 modules
ERROR: "__udivdi3" [drivers/gpu/drm/i915/i915.ko] undefined! scripts/Makefile.modpost:92: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1
Makefile:1225: recipe for target 'modules' failed
make: *** [modules] Error 2
== Linux commits ==
c76ba255095d drm/i915/gen11: Enable 6 sprites on gen11 f35ce280b30a drm/i915: Fix unsigned overflow when calculating total data rate
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10455/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915/gen11: Enable all sprite planes.
In reply to Maarten Lankhorst== Series Details ==
== Series Details ==
Series: drm/i915/gen11: Enable all sprite planes.
URL : https://patchwork.freedesktop.org/series/50995/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4979_full -> Patchwork_10455_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_10455_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10455_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10455_full:
=== IGT changes ===
==== Warnings ====
igt@kms_plane@pixel-format-pipe-a-planes:
shard-snb: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_10455_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_cpu_reloc@full:
shard-skl: NOTRUN -> INCOMPLETE (fdo#108073)
igt@gem_ctx_isolation@bcs0-s3:
shard-skl: PASS -> INCOMPLETE (fdo#107773, fdo#104108)
igt@gem_exec_schedule@pi-ringfull-render:
shard-skl: NOTRUN -> FAIL (fdo#103158)
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: PASS -> INCOMPLETE (fdo#103665, fdo#106023)
igt@gem_ppgtt@blt-vs-render-ctxn:
shard-skl: NOTRUN -> TIMEOUT (fdo#108039)
igt@kms_chv_cursor_fail@pipe-a-64x64-right-edge:
shard-skl: PASS -> FAIL (fdo#104671)
igt@kms_cursor_crc@cursor-256x256-offscreen:
shard-apl: PASS -> INCOMPLETE (fdo#103927)
igt@kms_cursor_crc@cursor-256x256-suspend:
shard-apl: PASS -> FAIL (fdo#103232, fdo#103191)
igt@kms_cursor_crc@cursor-64x21-random:
shard-apl: PASS -> FAIL (fdo#103232) +1
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt:
shard-apl: PASS -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-gtt:
shard-glk: PASS -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@fbcpsr-stridechange:
shard-skl: NOTRUN -> FAIL (fdo#105683)
igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-wc:
shard-skl: PASS -> FAIL (fdo#103167)
igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-blt:
shard-skl: NOTRUN -> FAIL (fdo#103167)
igt@kms_plane@plane-position-covered-pipe-c-planes:
shard-apl: PASS -> FAIL (fdo#103166)
igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max:
shard-skl: NOTRUN -> FAIL (fdo#108145) +2
igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
shard-skl: NOTRUN -> FAIL (fdo#108146)
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
shard-skl: NOTRUN -> FAIL (fdo#99912)
igt@kms_sysfs_edid_timing:
shard-skl: NOTRUN -> FAIL (fdo#100047)
==== Possible fixes ====
igt@drv_suspend@shrink:
shard-apl: INCOMPLETE (fdo#103927, fdo#106886) -> PASS
igt@gem_userptr_blits@readonly-unsync:
shard-skl: INCOMPLETE (fdo#108074) -> PASS
igt@kms_cursor_crc@cursor-128x128-suspend:
shard-glk: INCOMPLETE (fdo#103359, k.org#198133) -> PASS
igt@kms_cursor_crc@cursor-256x85-sliding:
shard-apl: FAIL (fdo#103232) -> PASS +2
igt@kms_cursor_crc@cursor-64x64-suspend:
shard-apl: FAIL (fdo#103232, fdo#103191) -> PASS
igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
shard-glk: DMESG-WARN (fdo#105763, fdo#106538) -> PASS
igt@kms_fbcon_fbt@fbc-suspend:
shard-skl: INCOMPLETE (fdo#107773, fdo#104108) -> PASS
igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
shard-apl: FAIL (fdo#103167) -> PASS
igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
shard-apl: FAIL (fdo#103166) -> PASS
igt@pm_rpm@drm-resources-equal:
shard-skl: INCOMPLETE (fdo#107807) -> PASS fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#103158 https://bugs.freedesktop.org/show_bug.cgi?id=103158
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#104671 https://bugs.freedesktop.org/show_bug.cgi?id=104671
fdo#105683 https://bugs.freedesktop.org/show_bug.cgi?id=105683
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#107773 https://bugs.freedesktop.org/show_bug.cgi?id=107773
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#108039 https://bugs.freedesktop.org/show_bug.cgi?id=108039
fdo#108073 https://bugs.freedesktop.org/show_bug.cgi?id=108073
fdo#108074 https://bugs.freedesktop.org/show_bug.cgi?id=108074
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108146 https://bugs.freedesktop.org/show_bug.cgi?id=108146
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133
== Participating hosts (6 -> 6) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4979 -> Patchwork_10455
CI_DRM_4979: 2c411746783a4db33844f298ee88f0301cf0453e @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4674: 93871c6fb3c25e5d350c9faf36ded917174214de @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10455: c76ba255095df853862b8d0c56ab67541b82a2f7 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10455/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx