drm/i915: Clean up skl_plane_has_planar()
Subsystems (2)
PATCH 1/2 drm/i915: Clean up skl_plane_has_planar()
skl_plane_has_planar is hard to read, simplify the logic by checking for support in the order of platform, pipe and plane.
No change in functionality intended.
--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/intel_display.c +9 -18
@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv,bool skl_plane_has_planar (struct drm_i915_private *dev_priv,enum pipe pipe,enum plane_id plane_id) { -if (plane_id ==PLANE_PRIMARY ) { -if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) -return false; -else if ((INTEL_GEN (dev_priv) ==9 && pipe ==PIPE_C ) && - !IS_GEMINILAKE (dev_priv)) -return false; - }else if (plane_id >=PLANE_SPRITE0 ) { -if (plane_id ==PLANE_CURSOR ) -return false; -if (IS_GEMINILAKE (dev_priv) ||INTEL_GEN (dev_priv) ==10 ) { -if (plane_id !=PLANE_SPRITE0 ) -return false; - }else { -if (plane_id !=PLANE_SPRITE0 || pipe ==PIPE_C || -IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) -return false; - } - } +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) +return false; + +if (INTEL_GEN (dev_priv) ==9 && !IS_GEMINILAKE (dev_priv) && pipe ==PIPE_C ) +return false; + +if (plane_id ==PLANE_CURSOR || plane_id !=PLANE_SPRITE0 ) +return false; +return true; }
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Do not advertize support for NV12 on ICL yet.
ICL requires two planes for scanning out a NV12 framebuffer. Do not advertize support for creating NV12 framebuffers until required plane programming is implemented.
v2: Do not allow adding buffers.
Check inside skl_plane_has_planar (Ville)
Bspec: Plane Planar YUV programming (18566)
--- drivers/gpu/drm/i915/intel_display.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +8 -1
@@ -13622,6 +13622,13 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv,bool skl_plane_has_planar (struct drm_i915_private *dev_priv,enum pipe pipe,enum plane_id plane_id) { +/* +* FIXME: ICL requires two hardware planes for scanning out NV12 +* framebuffers. Do not advertize support until this is implemented. +*/ +if (INTEL_GEN (dev_priv) >=11 ) +return false; +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv))return false;
@@ -14543,7 +14550,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,break ;case DRM_FORMAT_NV12 :if (INTEL_GEN (dev_priv) <9 ||IS_SKYLAKE (dev_priv) || -IS_BROXTON (dev_priv)) { +IS_BROXTON (dev_priv) ||INTEL_GEN (dev_priv) >=11 ) {DRM_DEBUG_KMS ("unsupported pixel format: %s\n" ,drm_get_format_name (mode_cmd->pixel_format, &format_name));
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Do not advertize support for NV12 on ICL yet.
Quoted 11 lines · Dhinakaran Pandiyan
ICL requires two planes for scanning out a NV12 framebuffer. Do not advertize support for creating NV12 framebuffers until required plane programming is implemented.
v2: Do not allow adding buffers.
Check insideskl_plane_has_planar(Ville)Bspec: Plane Planar YUV programming (18566)
Cc Ville Syrjälä <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>
Quoted 33 lines
--- drivers/gpu/drm/i915/intel_display.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_display.c +8
-1@@ -13622,6 +13622,13 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv,bool skl_plane_has_planar (struct drm_i915_private *dev_priv,enum pipe pipe,enum plane_id plane_id) { +/* +* FIXME: ICL requires two hardware planes for scanning out NV12 +* framebuffers. Do not advertize support until this is implemented. +*/ +if (INTEL_GEN (dev_priv) >=11 ) +return false; +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv))return false;@@ -14543,7 +14550,7 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,break ;case DRM_FORMAT_NV12 :if (INTEL_GEN (dev_priv) <9 ||IS_SKYLAKE (dev_priv) || -IS_BROXTON (dev_priv)) { +IS_BROXTON (dev_priv) ||INTEL_GEN (dev_priv) >=11 ) {DRM_DEBUG_KMS ("unsupported pixel format: %s\n" ,drm_get_format_name (mode_cmd->pixel_format, &format_name));Signature · 1 line
2.17.1
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Clean up skl_plane_has_planar()
In reply to Dhinakaran Pandiyan== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Clean up skl_plane_has_planar()
URL : https://patchwork.freedesktop.org/series/48687/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4704 -> Patchwork_10013 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48687/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10013:
=== IGT changes ===
==== Warnings ====
{igt@kms_psr@primary_page_flip}:
fi-cnl-psr: DMESG-WARN -> DMESG-FAIL== Known issues ==
Here are the changes found in Patchwork_10013 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_chamelium@hdmi-hpd-fast:
fi-kbl-7500u: SKIP -> FAIL (fdo#102672, fdo#103841)
igt@prime_vgem@basic-fence-flip:
fi-ilk-650: PASS -> FAIL (fdo#104008)
==== Possible fixes ====
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
fi-skl-guc: FAIL (fdo#103191) -> PASS +1
{fi-byt-clapper}: FAIL (fdo#107362, fdo#103191) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-skl-6260u: INCOMPLETE (fdo#104108) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102672 https://bugs.freedesktop.org/show_bug.cgi?id=102672
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103841 https://bugs.freedesktop.org/show_bug.cgi?id=103841
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
== Participating hosts (54 -> 49) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4704 -> Patchwork_10013
CI_DRM_4704: eb9a20b20d4790be1561235f45e209fba02dc6c0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4609: 0bc9763af77bbb37f2ed65cc39c398e88db7d8e3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10013: 24a2c0467627d06cbb32a43469a8b4dfbe9241a1 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
24a2c0467627 drm/i915: Do not advertize support for NV12 on ICL yet. b0c0b66f1e11 drm/i915: Clean up skl_plane_has_planar()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10013/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Clean up skl_plane_has_planar()
In reply to Dhinakaran Pandiyan== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915: Clean up skl_plane_has_planar()
URL : https://patchwork.freedesktop.org/series/48687/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4704_full -> Patchwork_10013_full =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_10013_full need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10013_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_10013_full:
=== IGT changes ===
==== Warnings ====
igt@kms_vblank@pipe-a-wait-busy-hang:
shard-snb: PASS -> SKIP +2== Known issues ==
Here are the changes found in Patchwork_10013_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_busy@extended-parallel-bsd1:
shard-hsw: SKIP -> INCOMPLETE (fdo#103540) +22
igt@gem_flink_basic@flink-lifetime:
shard-hsw: PASS -> INCOMPLETE (fdo#103540) +46
igt@kms_setmode@basic:
shard-kbl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@kms_cursor_legacy@cursor-vs-flip-toggle:
shard-hsw: FAIL (fdo#103355) -> PASS
igt@kms_vblank@pipe-a-ts-continuation-suspend:
shard-hsw: FAIL (fdo#104894) -> PASS fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#104894 https://bugs.freedesktop.org/show_bug.cgi?id=104894
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4704 -> Patchwork_10013
CI_DRM_4704: eb9a20b20d4790be1561235f45e209fba02dc6c0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4609: 0bc9763af77bbb37f2ed65cc39c398e88db7d8e3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10013: 24a2c0467627d06cbb32a43469a8b4dfbe9241a1 @ 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_10013/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerQuoted 29 lines · Dhinakaran Pandiyan
skl_plane_has_planaris hard to read, simplify the logic by checking for support in the order of platform, pipe and plane.No change in functionality intended.
Cc Ville Syrjälä <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-10@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv,bool skl_plane_has_planar (struct drm_i915_private *dev_priv,enum pipe pipe,enum plane_id plane_id) { -if (plane_id ==PLANE_PRIMARY ) { -if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) -return false; -else if ((INTEL_GEN (dev_priv) ==9 && pipe ==PIPE_C ) && - !IS_GEMINILAKE (dev_priv)) -return false; - }else if (plane_id >=PLANE_SPRITE0 ) { -if (plane_id ==PLANE_CURSOR ) -return false; -if (IS_GEMINILAKE (dev_priv) ||INTEL_GEN (dev_priv) ==10 ) {
drivers/gpu/drm/i915/intel_display.c static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv, · line 13626
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +2
-8-if (plane_id !=PLANE_SPRITE0 ) -return false; - }else { -if (plane_id !=PLANE_SPRITE0 || pipe ==PIPE_C || -IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) -return false; - } - } +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) +return false;
The current code is indeed ugly, but I'm afraid it doesn't always return false for these platforms.
for instance plane_id = PLANE_SPRITE0
Quoted 17 lines
drivers/gpu/drm/i915/intel_display.c +7
-0+ +if (INTEL_GEN (dev_priv) ==9 && !IS_GEMINILAKE (dev_priv) && pipe ==PIPE_C ) +return false; + +if (plane_id ==PLANE_CURSOR || plane_id !=PLANE_SPRITE0 ) +return false; +return true; }Signature · 6 lines
2.17.1 _______________________________________________ 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
Quoted 36 lines · Rodrigo Vivi
Quoted 35 lines · Dhinakaran Pandiyan
skl_plane_has_planaris hard to read, simplify the logic by checking for
support in the order of platform, pipe and plane.No change in functionality intended.
Cc Ville Syrjälä <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++--------------- --- 1 file changed, 9 insertions(+), 18 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-4@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv, bool skl_plane_has_planar(struct drm_i915_private *dev_priv, enum pipe pipe, enum plane_id plane_id) { - if (plane_id == PLANE_PRIMARY) { - if (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv)) - return false; - else if ((INTEL_GEN(dev_priv) == 9 && pipe ==
PIPE_C) &&drivers/gpu/drm/i915/intel_display.c +0
-6- !IS_GEMINILAKE(dev_priv)) -return false; - }else if (plane_id >=PLANE_SPRITE0 ) { -if (plane_id ==PLANE_CURSOR ) -return false; - if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv)== 10) {
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +0
-4-if (plane_id !=PLANE_SPRITE0 ) -return false; - } else { - if (plane_id != PLANE_SPRITE0 || pipe ==
PIPE_C||drivers/gpu/drm/i915/intel_display.c +0
-1- IS_SKYLAKE(dev_priv) ||
IS_BROXTON(dev_priv))drivers/gpu/drm/i915/intel_display.c +0
-1-return false;
^ Here it does, or am I not seeing the paranthesis correctly.
Quoted 22 lines
drivers/gpu/drm/i915/intel_display.c static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv, · line 13626
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +2
-2- } - } +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) +return false;The current code is indeed ugly, but I'm afraid it doesn't always return
false for these platforms.for instance
plane_id=PLANE_SPRITE0Quoted 11 lines
drivers/gpu/drm/i915/intel_display.c +2
-0+ + if (INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)&& pipe ==
PIPE_C)drivers/gpu/drm/i915/intel_display.c +5
-0+return false; + +if (plane_id ==PLANE_CURSOR || plane_id !=PLANE_SPRITE0 ) +return false; +return true; }
Quoted 7 lines
Quoted 7 lines
Signature · 6 lines
2.17.1 _______________________________________________ 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
Quoted 40 lines · Dhinakaran
Quoted 37 lines · Rodrigo Vivi
Quoted 36 lines · Dhinakaran Pandiyan
skl_plane_has_planaris hard to read, simplify the logic by checking for
support in the order of platform, pipe and plane.No change in functionality intended.
Cc Ville Syrjälä <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++--------------- --- 1 file changed, 9 insertions(+), 18 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-4@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv, bool skl_plane_has_planar(struct drm_i915_private *dev_priv, enum pipe pipe, enum plane_id plane_id) { - if (plane_id == PLANE_PRIMARY) { - if (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv)) - return false; - else if ((INTEL_GEN(dev_priv) == 9 && pipe ==
PIPE_C) &&drivers/gpu/drm/i915/intel_display.c +0
-6- !IS_GEMINILAKE(dev_priv)) -return false; - }else if (plane_id >=PLANE_SPRITE0 ) { -if (plane_id ==PLANE_CURSOR ) -return false; - if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv)== 10) {
drivers/gpu/drm/i915/intel_display.c +0
-1-if (plane_id !=PLANE_SPRITE0 )
Quoted 8 lines
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c +0
-3-return false; - } else { - if (plane_id != PLANE_SPRITE0 || pipe ==
PIPE_C||drivers/gpu/drm/i915/intel_display.c +0
-1- IS_SKYLAKE(dev_priv) ||
IS_BROXTON(dev_priv))drivers/gpu/drm/i915/intel_display.c +0
-1-return false;^ Here it does, or am I not seeing the paranthesis correctly.
dam... it is so bad that I got confused when drawing a table here...
nip: The name of the function seems wrong since "skl_" always return false....
but I don't have a better suggestion ... maybe just "intel_" and can be in a follow up patch...
so,
Quoted 26 lines
Quoted 26 lines
drivers/gpu/drm/i915/intel_display.c static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv, · line 13626
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c +2
-2- } - } +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) +return false;The current code is indeed ugly, but I'm afraid it doesn't always return
false for these platforms.for instance
plane_id=PLANE_SPRITE0Quoted 14 lines
drivers/gpu/drm/i915/intel_display.c +2
-0+ + if (INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)&& pipe ==
PIPE_C)drivers/gpu/drm/i915/intel_display.c +5
-0+return false; + +if (plane_id ==PLANE_CURSOR || plane_id !=PLANE_SPRITE0 ) +return false; +return true; }Signature · 2 lines
-- 2.17.1
Quoted 8 lines
Quoted 4 lines
Quoted 4 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
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 58 lines · Rodrigo Vivi
Quoted 48 lines · Dhinakaran
Quoted 45 lines · Rodrigo Vivi
Quoted 43 lines · Dhinakaran Pandiyan
skl_plane_has_planaris hard to read, simplify the logic by checking for
support in the order of platform, pipe and plane.No change in functionality intended.
Cc Ville Syrjälä <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]om>
--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++----------- ---- --- 1 file changed, 9 insertions(+), 18 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-4@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(structdrm_i915_private *dev_priv, bool skl_plane_has_planar(struct drm_i915_private *dev_priv, enum pipe pipe, enum plane_id plane_id) { - if (plane_id == PLANE_PRIMARY) { - if (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv)) - return false; - else if ((INTEL_GEN(dev_priv) == 9 && pipe ==
PIPE_C) &&drivers/gpu/drm/i915/intel_display.c +0
-6- !IS_GEMINILAKE(dev_priv)) -return false; - }else if (plane_id >=PLANE_SPRITE0 ) { -if (plane_id ==PLANE_CURSOR ) -return false; - if (IS_GEMINILAKE(dev_priv) ||
INTEL_GEN(dev_priv)
== 10) {drivers/gpu/drm/i915/intel_display.c +0
-3-if (plane_id !=PLANE_SPRITE0 ) -return false; - }else {Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +0
-1- if (plane_id != PLANE_SPRITE0 || pipe==
PIPE_C||drivers/gpu/drm/i915/intel_display.c +0
-1- IS_SKYLAKE(dev_priv) ||
IS_BROXTON(dev_priv))drivers/gpu/drm/i915/intel_display.c +0
-1-return false;^ Here it does, or am I not seeing the paranthesis correctly.
Quoted 5 lines
dam... it is so bad that I got confused when drawing a table here...
nip: The name of the function seems wrong since "
skl_" always return false....
Looks like the first versions of the patch implementing nv12 did include SKL, not clear what happened later.
Quoted 6 lines
but I don't have a better suggestion ... maybe just "
intel_" and can be in a follow up patch...so,
Reviewed-by Rodrigo Vivi <[email protected]>
Thanks!
-DK
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
drivers/gpu/drm/i915/intel_display.c static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv, · line 13626
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +2
-2- } - } +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) +return false;The current code is indeed ugly, but I'm afraid it doesn't always return
false for these platforms.for instance
plane_id=PLANE_SPRITE0Quoted 16 lines
drivers/gpu/drm/i915/intel_display.c +2
-0+ + if (INTEL_GEN(dev_priv) == 9 &&!IS_GEMINILAKE(dev_priv)
&& pipe ==PIPE_C)drivers/gpu/drm/i915/intel_display.c +3
-0+return false; + + if (plane_id == PLANE_CURSOR || plane_id !=
PLANE_SPRITE0)drivers/gpu/drm/i915/intel_display.c +2
-0+return false; +return true; }Signature · 2 lines
-- 2.17.1
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
Quoted 4 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
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 2 lines · Dhinakaran Pandiyan
skl_plane_has_planaris hard to read, simplify the logic by checking for support in the order of platform, pipe and plane.
I had a slightly different version of this somewhere. But this one might be even better.
Quoted 33 lines
No change in functionality intended.
Cc Ville Syrjälä <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-16@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv,bool skl_plane_has_planar (struct drm_i915_private *dev_priv,enum pipe pipe,enum plane_id plane_id) { -if (plane_id ==PLANE_PRIMARY ) { -if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) -return false; -else if ((INTEL_GEN (dev_priv) ==9 && pipe ==PIPE_C ) && - !IS_GEMINILAKE (dev_priv)) -return false; - }else if (plane_id >=PLANE_SPRITE0 ) { -if (plane_id ==PLANE_CURSOR ) -return false; -if (IS_GEMINILAKE (dev_priv) ||INTEL_GEN (dev_priv) ==10 ) { -if (plane_id !=PLANE_SPRITE0 ) -return false; - }else { -if (plane_id !=PLANE_SPRITE0 || pipe ==PIPE_C || -IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) -return false;
drivers/gpu/drm/i915/intel_display.c static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv, · line 13632
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +8
-2- } - } +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) +return false; + +if (INTEL_GEN (dev_priv) ==9 && !IS_GEMINILAKE (dev_priv) && pipe ==PIPE_C ) +return false; + +if (plane_id ==PLANE_CURSOR || plane_id !=PLANE_SPRITE0 ) +return false;
The cursor check is rather redundant here. IIRC I put it at the very start of the function to make it obvious that cursor never supports this. But we could just as well drop the check entirely.
This also disables NV12 for the primary plane which isn't correct.
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c +1
-0+return true; }Signature · 1 line
2.17.1
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 65 lines · Ville Syrjälä
Quoted 3 lines · Dhinakaran Pandiyan
skl_plane_has_planaris hard to read, simplify the logic by checking for
support in the order of platform, pipe and plane.I had a slightly different version of this somewhere. But this one might
be even better.Quoted 47 lines
No change in functionality intended.
Cc Ville Syrjälä <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++--------------- --- 1 file changed, 9 insertions(+), 18 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-4@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv, bool skl_plane_has_planar(struct drm_i915_private *dev_priv, enum pipe pipe, enum plane_id plane_id) { - if (plane_id == PLANE_PRIMARY) { - if (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv)) - return false; - else if ((INTEL_GEN(dev_priv) == 9 && pipe ==
PIPE_C) &&drivers/gpu/drm/i915/intel_display.c +0
-6- !IS_GEMINILAKE(dev_priv)) -return false; - }else if (plane_id >=PLANE_SPRITE0 ) { -if (plane_id ==PLANE_CURSOR ) -return false; - if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv)== 10) {
drivers/gpu/drm/i915/intel_display.c +0
-4-if (plane_id !=PLANE_SPRITE0 ) -return false; - } else { - if (plane_id != PLANE_SPRITE0 || pipe ==
PIPE_C||drivers/gpu/drm/i915/intel_display.c +0
-1- IS_SKYLAKE(dev_priv) ||
IS_BROXTON(dev_priv))drivers/gpu/drm/i915/intel_display.c +4
-3-return false; - } - } +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) +return false; + + if (INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)&& pipe ==
PIPE_C)drivers/gpu/drm/i915/intel_display.c static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv, · line 13632
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +4
-0+return false; + +if (plane_id ==PLANE_CURSOR || plane_id !=PLANE_SPRITE0 ) +return false;The cursor check is rather redundant here. IIRC I put it at the very start of the function to make it obvious that cursor never supports this. But we could just as well drop the check entirely.
Quoted 1 line
This also disables NV12 for the primary plane which isn't correct.
That's a good catch, thanks.
Switch the condition to
if (plane_id != PLANE_PRIMARY && plane_id != PLANE_SPRITE0)
return false;
?
Quoted 9 lines
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c +1
-0+return true; }Signature · 2 lines
-- 2.17.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 1/1 drm/i915: Clean up skl_plane_has_planar()
In reply to Ville Syrjäläskl_plane_has_planar is hard to read, simplify the logic by checking for support in the order of platform, pipe and plane.
No change in functionality intended.
v2: Fix logic for primary plane (Ville)
--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/intel_display.c +9 -18
@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv,bool skl_plane_has_planar (struct drm_i915_private *dev_priv,enum pipe pipe,enum plane_id plane_id) { -if (plane_id ==PLANE_PRIMARY ) { -if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) -return false; -else if ((INTEL_GEN (dev_priv) ==9 && pipe ==PIPE_C ) && - !IS_GEMINILAKE (dev_priv)) -return false; - }else if (plane_id >=PLANE_SPRITE0 ) { -if (plane_id ==PLANE_CURSOR ) -return false; -if (IS_GEMINILAKE (dev_priv) ||INTEL_GEN (dev_priv) ==10 ) { -if (plane_id !=PLANE_SPRITE0 ) -return false; - }else { -if (plane_id !=PLANE_SPRITE0 || pipe ==PIPE_C || -IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) -return false; - } - } +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) +return false; + +if (INTEL_GEN (dev_priv) ==9 && !IS_GEMINILAKE (dev_priv) && pipe ==PIPE_C ) +return false; + +if (plane_id !=PLANE_PRIMARY && plane_id !=PLANE_SPRITE0 ) +return false; +return true; }
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 8 lines · Dhinakaran Pandiyan
skl_plane_has_planaris hard to read, simplify the logic by checking for support in the order of platform, pipe and plane.No change in functionality intended.
v2: Fix logic for primary plane (Ville)Cc Ville Syrjälä <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>
Quoted 44 lines
--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-)drivers/gpu/drm/i915/intel_display.c +9
-18@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv,bool skl_plane_has_planar (struct drm_i915_private *dev_priv,enum pipe pipe,enum plane_id plane_id) { -if (plane_id ==PLANE_PRIMARY ) { -if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) -return false; -else if ((INTEL_GEN (dev_priv) ==9 && pipe ==PIPE_C ) && - !IS_GEMINILAKE (dev_priv)) -return false; - }else if (plane_id >=PLANE_SPRITE0 ) { -if (plane_id ==PLANE_CURSOR ) -return false; -if (IS_GEMINILAKE (dev_priv) ||INTEL_GEN (dev_priv) ==10 ) { -if (plane_id !=PLANE_SPRITE0 ) -return false; - }else { -if (plane_id !=PLANE_SPRITE0 || pipe ==PIPE_C || -IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) -return false; - } - } +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) +return false; + +if (INTEL_GEN (dev_priv) ==9 && !IS_GEMINILAKE (dev_priv) && pipe ==PIPE_C ) +return false; + +if (plane_id !=PLANE_PRIMARY && plane_id !=PLANE_SPRITE0 ) +return false; +return true; }Signature · 1 line
2.17.1
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · Ville Syrjälä
Quoted 4 lines · Dhinakaran Pandiyan
skl_plane_has_planaris hard to read, simplify the logic by checking for
support in the order of platform, pipe and plane.
Quoted 8 lines
Quoted 5 lines
No change in functionality intended.
v2: Fix logic for primary plane (Ville)Cc Ville Syrjälä <[email protected]>Signed-off-by Dhinakaran Pandiyan <[email protected]>Reviewed-by Ville Syrjälä <[email protected]>
Thank you, pushed the series.
-DK
Quoted 51 lines
Quoted 51 lines
--- drivers/gpu/drm/i915/intel_display.c | 27 +++++++++--------------- --- 1 file changed, 9 insertions(+), 18 deletions(-)drivers/gpu/drm/i915/intel_display.c +0
-4@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv, bool skl_plane_has_planar(struct drm_i915_private *dev_priv, enum pipe pipe, enum plane_id plane_id) { - if (plane_id == PLANE_PRIMARY) { - if (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv)) - return false; - else if ((INTEL_GEN(dev_priv) == 9 && pipe ==
PIPE_C) &&drivers/gpu/drm/i915/intel_display.c +0
-6- !IS_GEMINILAKE(dev_priv)) -return false; - }else if (plane_id >=PLANE_SPRITE0 ) { -if (plane_id ==PLANE_CURSOR ) -return false; - if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv)== 10) {
drivers/gpu/drm/i915/intel_display.c +0
-4-if (plane_id !=PLANE_SPRITE0 ) -return false; - } else { - if (plane_id != PLANE_SPRITE0 || pipe ==
PIPE_C||drivers/gpu/drm/i915/intel_display.c +0
-1- IS_SKYLAKE(dev_priv) ||
IS_BROXTON(dev_priv))drivers/gpu/drm/i915/intel_display.c +4
-3-return false; - } - } +if (IS_SKYLAKE (dev_priv) ||IS_BROXTON (dev_priv)) +return false; + + if (INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv)&& pipe ==
PIPE_C)drivers/gpu/drm/i915/intel_display.c +3
-0+return false; + + if (plane_id != PLANE_PRIMARY && plane_id !=
PLANE_SPRITE0)drivers/gpu/drm/i915/intel_display.c +2
-0+return false; +return true; }
Quoted 4 lines
Quoted 2 lines
Signature · 1 line
2.17.1
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for series starting with [v2] drm/i915: Clean up skl_plane_has_planar() (rev2)
In reply to Dhinakaran Pandiyan== Series Details ==
== Series Details ==
Series: series starting with [v2] drm/i915: Clean up skl_plane_has_planar() (rev2)
URL : https://patchwork.freedesktop.org/series/48687/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4713 -> Patchwork_10024 =
== Summary - SUCCESS ==
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/48687/revisions/2/mbox/
== Known issues ==
Here are the changes found in Patchwork_10024 that come from known issues:
=== IGT changes ===
==== Issues hit ====
{igt@pm_rpm@module-reload}:
fi-cnl-psr: PASS -> WARN (fdo#107602)
==== Possible fixes ====
igt@drv_selftest@live_hangcheck:
fi-cfl-guc: DMESG-FAIL -> PASS
fi-cfl-s3: DMESG-FAIL (fdo#106560) -> PASS
igt@kms_pipe_crc_basic@read-crc-pipe-b:
{fi-byt-clapper}: FAIL (fdo#107362) -> PASS +1
igt@pm_rpm@basic-pci-d3-state:
fi-skl-6770hq: WARN -> PASS +1 {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107602 https://bugs.freedesktop.org/show_bug.cgi?id=107602
== Participating hosts (54 -> 49) ==
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4713 -> Patchwork_10024
CI_DRM_4713: 9261175f56a1b035b9db12e959ba2e8c756924a6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4610: c40743d3fce5055682d31610519758dd7379c0f8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10024: 3bed945859e3c28fb1257c7d2cecae5121e60d8d @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
3bed945859e3 drm/i915: Do not advertize support for NV12 on ICL yet. cd298ba950fd drm/i915: Clean up skl_plane_has_planar()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10024/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for series starting with [v2] drm/i915: Clean up skl_plane_has_planar() (rev2)
In reply to Dhinakaran Pandiyan== Series Details ==
== Series Details ==
Series: series starting with [v2] drm/i915: Clean up skl_plane_has_planar() (rev2)
URL : https://patchwork.freedesktop.org/series/48687/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4713_full -> Patchwork_10024_full =
== Summary - SUCCESS ==
No regressions found.
== Known issues ==
Here are the changes found in Patchwork_10024_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_suspend@debugfs-reader:
shard-apl: PASS -> INCOMPLETE (fdo#103927)
igt@kms_flip@flip-vs-expired-vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#102887, fdo#105363)
igt@kms_setmode@basic:
shard-apl: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@drv_selftest@live_hangcheck:
shard-kbl: DMESG-FAIL (fdo#106560, fdo#106947) -> PASS
igt@drv_suspend@shrink:
shard-glk: INCOMPLETE (k.org#198133, fdo#103359, fdo#106886) -> PASS
igt@gem_eio@reset-stress:
shard-kbl: FAIL -> PASS
igt@gem_exec_await@wide-contexts:
shard-kbl: FAIL (fdo#105900) -> PASS
igt@gem_ppgtt@blt-vs-render-ctx0:
shard-kbl: INCOMPLETE (fdo#103665, fdo#106023) -> PASS fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
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#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105900 https://bugs.freedesktop.org/show_bug.cgi?id=105900
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
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 (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4713 -> Patchwork_10024
CI_DRM_4713: 9261175f56a1b035b9db12e959ba2e8c756924a6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4610: c40743d3fce5055682d31610519758dd7379c0f8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10024: 3bed945859e3c28fb1257c7d2cecae5121e60d8d @ 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_10024/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx