[Intel-gfx] [PATCH] drm/i915/gvt: Annotate iomem usage
Fix the sparse warning for blithely using iomem with normal memcpy: drivers/gpu/drm/i915/gvt/kvmgt.c:916:21: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/i915/gvt/kvmgt.c:916:21:expected void *aperture_va drivers/gpu/drm/i915/gvt/kvmgt.c:916:21:got void [noderef] * drivers/gpu/drm/i915/gvt/kvmgt.c:927:26: warning: incorrect type in argument 1 (different address spaces) drivers/gpu/drm/i915/gvt/kvmgt.c:927:26:expected void [noderef] *vaddr drivers/gpu/drm/i915/gvt/kvmgt.c:927:26:got void *aperture_va Fixes: d480b28a41a6 ("drm/i915/gvt: Fix aperture read/write emulation when enable x-no-mmap=on") Signed-off-by: Chris Wilson Cc: Zhenyu Wang Cc: Changbin Du Cc: Zhi Wang --- drivers/gpu/drm/i915/gvt/kvmgt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c index d5fcc447d22f..a68addf95c23 100644 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c @@ -905,7 +905,7 @@ static inline bool intel_vgpu_in_aperture(struct intel_vgpu *vgpu, u64 off) static int intel_vgpu_aperture_rw(struct intel_vgpu *vgpu, u64 off, void *buf, unsigned long count, bool is_write) { - void *aperture_va; + void __iomem *aperture_va; if (!intel_vgpu_in_aperture(vgpu, off) || !intel_vgpu_in_aperture(vgpu, off + count)) { @@ -920,9 +920,9 @@ static int intel_vgpu_aperture_rw(struct intel_vgpu *vgpu, u64 off, return -EIO; if (is_write) - memcpy(aperture_va + offset_in_page(off), buf, count); + memcpy_toio(aperture_va + offset_in_page(off), buf, count); else - memcpy(buf, aperture_va + offset_in_page(off), count); + memcpy_fromio(buf, aperture_va + offset_in_page(off), count); io_mapping_unmap(aperture_va); -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt()
ppgtt_free_all_spt() iterates the radixtree as it is deleting it, forgoing all protection against the leaves being freed in the process (leaving the iter pointing into the void). A minimal fix seems to be to use the available post_shadow_list to decompose the tree into a list prior to destroying the radixtree. Alerted by the sparse warnings: drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** drivers/gpu/drm/i915/gvt/gtt.c:758:45: warning: incorrect type in argument 1 (different address spaces) drivers/gpu/drm/i915/gvt/gtt.c:758:45:expected void [noderef] **slot drivers/gpu/drm/i915/gvt/gtt.c:758:45:got void **slot drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in argument 1 (different address spaces) drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void [noderef] **slot drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void **slot drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** This would also have been loudly warning if run through CI for the invalid RCU dereferences. Fixes: b6c126a39345 ("drm/i915/gvt: Manage shadow pages with radix tree") Signed-off-by: Chris Wilson Cc: Changbin Du Cc: Zhenyu Wang Cc: Zhi Wang --- drivers/gpu/drm/i915/gvt/gtt.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c index cf133ef03873..9814773882ec 100644 --- a/drivers/gpu/drm/i915/gvt/gtt.c +++ b/drivers/gpu/drm/i915/gvt/gtt.c @@ -750,14 +750,20 @@ static void ppgtt_free_spt(struct intel_vgpu_ppgtt_spt *spt) static void ppgtt_free_all_spt(struct intel_vgpu *vgpu) { - struct intel_vgpu_ppgtt_spt *spt; + struct intel_vgpu_ppgtt_spt *spt, *spn; struct radix_tree_iter iter; - void **slot; + LIST_HEAD(all_spt); + void __rcu **slot; + rcu_read_lock(); radix_tree_for_each_slot(slot, &vgpu->gtt.spt_tree, &iter, 0) { spt = radix_tree_deref_slot(slot); - ppgtt_free_spt(spt); + list_move(&spt->post_shadow_list, &all_spt); } + rcu_read_unlock(); + + list_for_each_entry_safe(spt, spn, &all_spt, post_shadow_list) + ppgtt_free_spt(spt); } static int ppgtt_handle_guest_write_page_table_bytes( -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915: Fixup kerneldoc for intel_cdclk_needs_cd2x_update
drivers/gpu/drm/i915/intel_cdclk.c:2116: warning: Function parameter or member 'dev_priv' not described in 'intel_cdclk_needs_cd2x_update' Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Abhay Kumar Cc: Imre Deak --- drivers/gpu/drm/i915/intel_cdclk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c index b8cd481f5e33..b911fe86be56 100644 --- a/drivers/gpu/drm/i915/intel_cdclk.c +++ b/drivers/gpu/drm/i915/intel_cdclk.c @@ -2104,6 +2104,7 @@ bool intel_cdclk_needs_modeset(const struct intel_cdclk_state *a, /** * intel_cdclk_needs_cd2x_update - Determine if two CDCLK states require a cd2x divider update + * @dev_priv: Not a CDCLK state, it's the drm_i915_private! * @a: first CDCLK state * @b: second CDCLK state * -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/gvt: Annotate iomem usage
On 2019.04.04 08:14:25 +0100, Chris Wilson wrote: > Fix the sparse warning for blithely using iomem with normal memcpy: > > drivers/gpu/drm/i915/gvt/kvmgt.c:916:21: warning: incorrect type in > assignment (different address spaces) > drivers/gpu/drm/i915/gvt/kvmgt.c:916:21:expected void *aperture_va > drivers/gpu/drm/i915/gvt/kvmgt.c:916:21:got void [noderef] * > drivers/gpu/drm/i915/gvt/kvmgt.c:927:26: warning: incorrect type in argument > 1 (different address spaces) > drivers/gpu/drm/i915/gvt/kvmgt.c:927:26:expected void [noderef] > *vaddr > drivers/gpu/drm/i915/gvt/kvmgt.c:927:26:got void *aperture_va > > Fixes: d480b28a41a6 ("drm/i915/gvt: Fix aperture read/write emulation when > enable x-no-mmap=on") > Signed-off-by: Chris Wilson > Cc: Zhenyu Wang > Cc: Changbin Du > Cc: Zhi Wang > --- > drivers/gpu/drm/i915/gvt/kvmgt.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c > b/drivers/gpu/drm/i915/gvt/kvmgt.c > index d5fcc447d22f..a68addf95c23 100644 > --- a/drivers/gpu/drm/i915/gvt/kvmgt.c > +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c > @@ -905,7 +905,7 @@ static inline bool intel_vgpu_in_aperture(struct > intel_vgpu *vgpu, u64 off) > static int intel_vgpu_aperture_rw(struct intel_vgpu *vgpu, u64 off, > void *buf, unsigned long count, bool is_write) > { > - void *aperture_va; > + void __iomem *aperture_va; > > if (!intel_vgpu_in_aperture(vgpu, off) || > !intel_vgpu_in_aperture(vgpu, off + count)) { > @@ -920,9 +920,9 @@ static int intel_vgpu_aperture_rw(struct intel_vgpu > *vgpu, u64 off, > return -EIO; > > if (is_write) > - memcpy(aperture_va + offset_in_page(off), buf, count); > + memcpy_toio(aperture_va + offset_in_page(off), buf, count); > else > - memcpy(buf, aperture_va + offset_in_page(off), count); > + memcpy_fromio(buf, aperture_va + offset_in_page(off), count); > > io_mapping_unmap(aperture_va); > > -- Reviewed-by: Zhenyu Wang thanks! -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 signature.asc Description: PGP signature ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt()
On 2019.04.04 08:30:56 +0100, Chris Wilson wrote: > ppgtt_free_all_spt() iterates the radixtree as it is deleting it, > forgoing all protection against the leaves being freed in the process > (leaving the iter pointing into the void). > > A minimal fix seems to be to use the available post_shadow_list to > decompose the tree into a list prior to destroying the radixtree. > > Alerted by the sparse warnings: > > drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment > (different address spaces) > drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot > drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** > drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment > (different address spaces) > drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot > drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** > drivers/gpu/drm/i915/gvt/gtt.c:758:45: warning: incorrect type in argument 1 > (different address spaces) > drivers/gpu/drm/i915/gvt/gtt.c:758:45:expected void [noderef] > **slot > drivers/gpu/drm/i915/gvt/gtt.c:758:45:got void **slot > drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in argument 1 > (different address spaces) > drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void [noderef] > **slot > drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void **slot > drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment > (different address spaces) > drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot > drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** > > This would also have been loudly warning if run through CI for the > invalid RCU dereferences. > > Fixes: b6c126a39345 ("drm/i915/gvt: Manage shadow pages with radix tree") > Signed-off-by: Chris Wilson > Cc: Changbin Du > Cc: Zhenyu Wang > Cc: Zhi Wang > --- > drivers/gpu/drm/i915/gvt/gtt.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c > index cf133ef03873..9814773882ec 100644 > --- a/drivers/gpu/drm/i915/gvt/gtt.c > +++ b/drivers/gpu/drm/i915/gvt/gtt.c > @@ -750,14 +750,20 @@ static void ppgtt_free_spt(struct intel_vgpu_ppgtt_spt > *spt) > > static void ppgtt_free_all_spt(struct intel_vgpu *vgpu) > { > - struct intel_vgpu_ppgtt_spt *spt; > + struct intel_vgpu_ppgtt_spt *spt, *spn; > struct radix_tree_iter iter; > - void **slot; > + LIST_HEAD(all_spt); > + void __rcu **slot; > > + rcu_read_lock(); > radix_tree_for_each_slot(slot, &vgpu->gtt.spt_tree, &iter, 0) { > spt = radix_tree_deref_slot(slot); > - ppgtt_free_spt(spt); > + list_move(&spt->post_shadow_list, &all_spt); > } > + rcu_read_unlock(); > + > + list_for_each_entry_safe(spt, spn, &all_spt, post_shadow_list) > + ppgtt_free_spt(spt); > } > As we ensure to flush post shadow list, so this is safe to reuse. Reviewed-by: Zhenyu Wang thanks! > static int ppgtt_handle_guest_write_page_table_bytes( > -- > 2.20.1 > -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 signature.asc Description: PGP signature ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gvt: Annotate iomem usage
== Series Details == Series: drm/i915/gvt: Annotate iomem usage URL : https://patchwork.freedesktop.org/series/58979/ State : failure == Summary == CI Bug Log - changes from CI_DRM_5869 -> Patchwork_12679 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_12679 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_12679, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/58979/revisions/1/mbox/ Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_12679: ### IGT changes ### Possible regressions * igt@i915_selftest@live_contexts: - fi-skl-gvtdvm: PASS -> DMESG-FAIL Known issues Here are the changes found in Patchwork_12679 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_basic@gtt-bsd2: - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +57 * igt@i915_module_load@reload-with-fault-injection: - fi-icl-y: PASS -> INCOMPLETE [fdo#107713] * igt@kms_busy@basic-flip-a: - fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1 * igt@kms_busy@basic-flip-c: - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@hdmi-crc-fast: - fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] +62 * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: NOTRUN -> FAIL [fdo#103167] * igt@runner@aborted: - fi-bxt-dsi: NOTRUN -> FAIL [fdo#109516] Possible fixes * igt@prime_vgem@basic-fence-flip: - fi-ilk-650: FAIL [fdo#104008] -> PASS {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008 [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713 [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109516]: https://bugs.freedesktop.org/show_bug.cgi?id=109516 Participating hosts (47 -> 39) -- Additional (3): fi-bxt-dsi fi-byt-clapper fi-bsw-n3050 Missing(11): fi-ilk-m540 fi-bdw-samus fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bsw-cyan fi-apl-guc fi-ctg-p8600 fi-gdg-551 fi-blb-e6850 fi-skl-6600u Build changes - * Linux: CI_DRM_5869 -> Patchwork_12679 CI_DRM_5869: 03f8f3298b90c7f80da6a98c3eb8413d7aeaa52b @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4926: c9a9cf357b6b2a304623790bf8dae797e12888a8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12679: 7cee7bb7c94374460425ace810fb3d7f394e6537 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 7cee7bb7c943 drm/i915/gvt: Annotate iomem usage == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12679/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt()
== Series Details == Series: drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt() URL : https://patchwork.freedesktop.org/series/58985/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt() -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void [noderef] **slot -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void **slot -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in argument 1 (different address spaces) -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) -O:drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) -O:drivers/gpu/drm/i915/gvt/gtt.c:758:45:expected void [noderef] **slot -O:drivers/gpu/drm/i915/gvt/gtt.c:758:45:got void **slot -O:drivers/gpu/drm/i915/gvt/gtt.c:758:45: warning: incorrect type in argument 1 (different address spaces) ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt()
Quoting Zhenyu Wang (2019-04-04 08:48:34) > On 2019.04.04 08:30:56 +0100, Chris Wilson wrote: > > ppgtt_free_all_spt() iterates the radixtree as it is deleting it, > > forgoing all protection against the leaves being freed in the process > > (leaving the iter pointing into the void). > > > > A minimal fix seems to be to use the available post_shadow_list to > > decompose the tree into a list prior to destroying the radixtree. > > > > Alerted by the sparse warnings: > > > > drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment > > (different address spaces) > > drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot > > drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** > > drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment > > (different address spaces) > > drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot > > drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** > > drivers/gpu/drm/i915/gvt/gtt.c:758:45: warning: incorrect type in argument > > 1 (different address spaces) > > drivers/gpu/drm/i915/gvt/gtt.c:758:45:expected void [noderef] > > **slot > > drivers/gpu/drm/i915/gvt/gtt.c:758:45:got void **slot > > drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in argument 1 > > (different address spaces) > > drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void [noderef] > > **slot > > drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void **slot > > drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment > > (different address spaces) > > drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot > > drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** > > > > This would also have been loudly warning if run through CI for the > > invalid RCU dereferences. > > > > Fixes: b6c126a39345 ("drm/i915/gvt: Manage shadow pages with radix tree") > > Signed-off-by: Chris Wilson > > Cc: Changbin Du > > Cc: Zhenyu Wang > > Cc: Zhi Wang > > --- > > drivers/gpu/drm/i915/gvt/gtt.c | 12 +--- > > 1 file changed, 9 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c > > index cf133ef03873..9814773882ec 100644 > > --- a/drivers/gpu/drm/i915/gvt/gtt.c > > +++ b/drivers/gpu/drm/i915/gvt/gtt.c > > @@ -750,14 +750,20 @@ static void ppgtt_free_spt(struct > > intel_vgpu_ppgtt_spt *spt) > > > > static void ppgtt_free_all_spt(struct intel_vgpu *vgpu) > > { > > - struct intel_vgpu_ppgtt_spt *spt; > > + struct intel_vgpu_ppgtt_spt *spt, *spn; > > struct radix_tree_iter iter; > > - void **slot; > > + LIST_HEAD(all_spt); > > + void __rcu **slot; > > > > + rcu_read_lock(); > > radix_tree_for_each_slot(slot, &vgpu->gtt.spt_tree, &iter, 0) { > > spt = radix_tree_deref_slot(slot); > > - ppgtt_free_spt(spt); > > + list_move(&spt->post_shadow_list, &all_spt); > > } > > + rcu_read_unlock(); > > + > > + list_for_each_entry_safe(spt, spn, &all_spt, post_shadow_list) > > + ppgtt_free_spt(spt); > > } > > > > As we ensure to flush post shadow list, so this is safe to reuse. Phew! I looked, couldn't see that it would be used at this point, so hoped for the best. > Reviewed-by: Zhenyu Wang Will you take both of these patches through your tree? -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 0/3] Fix mipi dsi pipe_config mismatch for icl
This is series fixes the WARN_ON that we see due to pipe_config mismatch on mipi dsi for icl. Only DSI0 trancoder regs are read even in case of dual link mode as the values programmed for DSI0 and DSI1 transcoder registers are same. Vandita Kulkarni (3): drm/i915: Fix pipe config timing mismatch warnings drm/i915: Fix pipe config mismatch for bpp, output format drm/i915: Fix pixel clock and crtc clock config mismatch drivers/gpu/drm/i915/icl_dsi.c | 88 +++- drivers/gpu/drm/i915/intel_display.c | 3 +- 2 files changed, 89 insertions(+), 2 deletions(-) -- 1.9.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/3] drm/i915: Fix pipe config mismatch for bpp, output format
Read back the pixel fomrat register and get the bpp. Signed-off-by: Vandita Kulkarni --- drivers/gpu/drm/i915/icl_dsi.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c index db6bc3d..69cd6b2 100644 --- a/drivers/gpu/drm/i915/icl_dsi.c +++ b/drivers/gpu/drm/i915/icl_dsi.c @@ -1226,6 +1226,30 @@ static void gen11_dsi_get_timings(struct intel_encoder *encoder, adjusted_mode->crtc_vsync_end = ((tmp >> 16) & 0x) + 1; } +enum mipi_dsi_pixel_format +gen11_dsi_get_pixel_fmt(struct drm_i915_private *dev_priv, + struct intel_crtc_state *pipe_config) +{ + u32 tmp; + /* get config for dsi0 transcoder only */ + enum transcoder cpu_transcoder = pipe_config->cpu_transcoder; + + tmp = I915_READ(DSI_TRANS_FUNC_CONF(cpu_transcoder)); + tmp &= PIX_FMT_MASK; + + switch (tmp) { + default: + case PIX_FMT_RGB565: + return MIPI_DSI_FMT_RGB565; + case PIX_FMT_RGB666_PACKED: + return MIPI_DSI_FMT_RGB666_PACKED; + case PIX_FMT_RGB666_LOOSE: + return MIPI_DSI_FMT_RGB666; + case PIX_FMT_RGB888: + return MIPI_DSI_FMT_RGB888; + } +} + static void gen11_dsi_get_config(struct intel_encoder *encoder, struct intel_crtc_state *pipe_config) { @@ -1238,6 +1262,9 @@ static void gen11_dsi_get_config(struct intel_encoder *encoder, pipe_config->base.adjusted_mode.crtc_clock = intel_dsi->pclk; gen11_dsi_get_timings(encoder, pipe_config); pipe_config->output_types |= BIT(INTEL_OUTPUT_DSI); + pipe_config->pipe_bpp = mipi_dsi_pixel_format_to_bpp + (gen11_dsi_get_pixel_fmt(dev_priv, + pipe_config)); } static int gen11_dsi_compute_config(struct intel_encoder *encoder, @@ -1253,6 +1280,7 @@ static int gen11_dsi_compute_config(struct intel_encoder *encoder, struct drm_display_mode *adjusted_mode = &pipe_config->base.adjusted_mode; + pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB; intel_fixed_panel_mode(fixed_mode, adjusted_mode); intel_pch_panel_fitting(crtc, pipe_config, conn_state->scaling_mode); -- 1.9.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt()
== Series Details == Series: drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt() URL : https://patchwork.freedesktop.org/series/58985/ State : success == Summary == CI Bug Log - changes from CI_DRM_5869 -> Patchwork_12680 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58985/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12680 that come from known issues: ### IGT changes ### Issues hit * igt@amdgpu/amd_basic@userptr: - fi-kbl-8809g: PASS -> DMESG-WARN [fdo#108965] * igt@gem_exec_basic@gtt-bsd2: - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +57 * igt@kms_busy@basic-flip-a: - fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1 * igt@kms_busy@basic-flip-c: - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@hdmi-crc-fast: - fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] +62 * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: NOTRUN -> FAIL [fdo#103167] * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a: - fi-byt-clapper: NOTRUN -> FAIL [fdo#103191] / [fdo#107362] +3 * igt@runner@aborted: - fi-bxt-dsi: NOTRUN -> FAIL [fdo#109516] Possible fixes * igt@i915_selftest@live_execlists: - fi-apl-guc: INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS * igt@prime_vgem@basic-fence-flip: - fi-ilk-650: FAIL [fdo#104008] -> PASS [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109516]: https://bugs.freedesktop.org/show_bug.cgi?id=109516 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 Participating hosts (47 -> 41) -- Additional (3): fi-bxt-dsi fi-byt-clapper fi-bsw-n3050 Missing(9): fi-ilk-m540 fi-bdw-samus fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-y fi-blb-e6850 fi-skl-6600u Build changes - * Linux: CI_DRM_5869 -> Patchwork_12680 CI_DRM_5869: 03f8f3298b90c7f80da6a98c3eb8413d7aeaa52b @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4926: c9a9cf357b6b2a304623790bf8dae797e12888a8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12680: 104723ada2173f759a30427d2f8e14991637962a @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 104723ada217 drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt() == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12680/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/3] drm/i915: Fix pipe config timing mismatch warnings
Mipi dsi programs the transcoder timings as part of encoder enable sequence, with dual link or single link in consideration. Hence add get transcoder timings as part of the encoder's get_config function. Signed-off-by: Vandita Kulkarni --- drivers/gpu/drm/i915/icl_dsi.c | 51 drivers/gpu/drm/i915/intel_display.c | 3 ++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c index b67ffaa..db6bc3d 100644 --- a/drivers/gpu/drm/i915/icl_dsi.c +++ b/drivers/gpu/drm/i915/icl_dsi.c @@ -1176,6 +1176,56 @@ static void gen11_dsi_disable(struct intel_encoder *encoder, gen11_dsi_disable_io_power(encoder); } +static void gen11_dsi_get_timings(struct intel_encoder *encoder, + struct intel_crtc_state *pipe_config) +{ + struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); + struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base); + struct drm_display_mode *adjusted_mode = + &pipe_config->base.adjusted_mode; + /* get config for dsi0 transcoder only */ + enum transcoder cpu_transcoder = pipe_config->cpu_transcoder; + /* horizontal timings */ + u16 htotal, hactive, hsync_start, hsync_end; + u32 tmp; + + tmp = I915_READ(HTOTAL(cpu_transcoder)); + hactive = (tmp & 0x) + 1; + htotal = ((tmp >> 16) & 0x) + 1; + if (intel_dsi->dual_link) { + hactive *= 2; + if (intel_dsi->dual_link == DSI_DUAL_LINK_FRONT_BACK) + hactive -= intel_dsi->pixel_overlap; + htotal *= 2; + } + adjusted_mode->crtc_hdisplay = hactive; + adjusted_mode->crtc_htotal = htotal; + adjusted_mode->crtc_hblank_start = adjusted_mode->crtc_hdisplay; + adjusted_mode->crtc_hblank_end = adjusted_mode->crtc_htotal; + + tmp = I915_READ(HSYNC(cpu_transcoder)); + hsync_start = (tmp & 0x) + 1; + hsync_end = ((tmp >> 16) & 0x) + 1; + if (intel_dsi->operation_mode == INTEL_DSI_VIDEO_MODE) { + if (intel_dsi->dual_link) { + hsync_start *= 2; + hsync_end *= 2; + } + } + adjusted_mode->crtc_hsync_start = hsync_start; + adjusted_mode->crtc_hsync_end = hsync_end; + + tmp = I915_READ(VTOTAL(cpu_transcoder)); + adjusted_mode->crtc_vdisplay = (tmp & 0x) + 1; + adjusted_mode->crtc_vtotal = ((tmp >> 16) & 0x) + 1; + adjusted_mode->crtc_vblank_start = adjusted_mode->crtc_vdisplay; + adjusted_mode->crtc_vblank_end = adjusted_mode->crtc_vtotal; + + tmp = I915_READ(VSYNC(cpu_transcoder)); + adjusted_mode->crtc_vsync_start = (tmp & 0x) + 1; + adjusted_mode->crtc_vsync_end = ((tmp >> 16) & 0x) + 1; +} + static void gen11_dsi_get_config(struct intel_encoder *encoder, struct intel_crtc_state *pipe_config) { @@ -1186,6 +1236,7 @@ static void gen11_dsi_get_config(struct intel_encoder *encoder, pipe_config->port_clock = cnl_calc_wrpll_link(dev_priv, &pipe_config->dpll_hw_state); pipe_config->base.adjusted_mode.crtc_clock = intel_dsi->pclk; + gen11_dsi_get_timings(encoder, pipe_config); pipe_config->output_types |= BIT(INTEL_OUTPUT_DSI); } diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7ecfb7d..9f7e4f7 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -9965,8 +9965,9 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc, if (!transcoder_is_dsi(pipe_config->cpu_transcoder) || INTEL_GEN(dev_priv) >= 11) { haswell_get_ddi_port_state(crtc, pipe_config); - intel_get_pipe_timings(crtc, pipe_config); } + if (!transcoder_is_dsi(pipe_config->cpu_transcoder)) + intel_get_pipe_timings(crtc, pipe_config); intel_get_pipe_src_size(crtc, pipe_config); intel_get_crtc_ycbcr_config(crtc, pipe_config); -- 1.9.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/3] drm/i915: Fix pixel clock and crtc clock config mismatch
In case of dual link mode, the mode clock that we get from the VBT is halved. Signed-off-by: Vandita Kulkarni --- drivers/gpu/drm/i915/icl_dsi.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c index 69cd6b2..c77960f 100644 --- a/drivers/gpu/drm/i915/icl_dsi.c +++ b/drivers/gpu/drm/i915/icl_dsi.c @@ -1255,11 +1255,18 @@ static void gen11_dsi_get_config(struct intel_encoder *encoder, { struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base); + int crtc_clock; /* FIXME: adapt icl_ddi_clock_get() for DSI and use that? */ pipe_config->port_clock = cnl_calc_wrpll_link(dev_priv, &pipe_config->dpll_hw_state); - pipe_config->base.adjusted_mode.crtc_clock = intel_dsi->pclk; + + if (intel_dsi->dual_link) + crtc_clock = intel_dsi->pclk * 2; + else + crtc_clock = intel_dsi->pclk; + + pipe_config->base.adjusted_mode.crtc_clock = crtc_clock; gen11_dsi_get_timings(encoder, pipe_config); pipe_config->output_types |= BIT(INTEL_OUTPUT_DSI); pipe_config->pipe_bpp = mipi_dsi_pixel_format_to_bpp -- 1.9.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915: Be precise in types for i915_gem_busy
Mixing u8 and -1u together leads to zero-extended integer expansion, and comparing 0x00ff against 0x, causing us to report a mixed uabi-class request as not busy. The input flag is a u8, and we want to generate a u32 uABI response, mark our functions so. Fixes: c8b502422bfe ("drm/i915: Remove last traces of exec-id (GEM_BUSY)") Testcase: igt/gem_exec_balance/busy Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_gem.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index bf594a5e88bc..708916cb095e 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3841,16 +3841,16 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj, return vma; } -static __always_inline unsigned int __busy_read_flag(unsigned int id) +static __always_inline u32 __busy_read_flag(u8 id) { - if (id == I915_ENGINE_CLASS_INVALID) - return 0x; + if (id == (u8)I915_ENGINE_CLASS_INVALID) + return 0xu; GEM_BUG_ON(id >= 16); - return 0x1 << id; + return 0x1u << id; } -static __always_inline unsigned int __busy_write_id(unsigned int id) +static __always_inline u32 __busy_write_id(u8 id) { /* * The uABI guarantees an active writer is also amongst the read @@ -3861,15 +3861,14 @@ static __always_inline unsigned int __busy_write_id(unsigned int id) * last_read - hence we always set both read and write busy for * last_write. */ - if (id == I915_ENGINE_CLASS_INVALID) - return 0x; + if (id == (u8)I915_ENGINE_CLASS_INVALID) + return 0xu; return (id + 1) | __busy_read_flag(id); } static __always_inline unsigned int -__busy_set_if_active(const struct dma_fence *fence, -unsigned int (*flag)(unsigned int id)) +__busy_set_if_active(const struct dma_fence *fence, u32 (*flag)(u8 id)) { const struct i915_request *rq; -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2] drm/i915: Be precise in types for i915_gem_busy
Mixing u8 and -1u together leads to zero-extended integer expansion, and comparing 0x00ff against 0x, causing us to report a mixed uabi-class request as not busy. The input flag is a u8, and we want to generate a u32 uABI response, mark our functions so. Fixes: c8b502422bfe ("drm/i915: Remove last traces of exec-id (GEM_BUSY)") Testcase: igt/gem_exec_balance/busy Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- Include a typecheck so we notice if we ever change engine->uabi_class. --- drivers/gpu/drm/i915/i915_gem.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index bf594a5e88bc..f25a1ba24927 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3841,16 +3841,16 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj, return vma; } -static __always_inline unsigned int __busy_read_flag(unsigned int id) +static __always_inline u32 __busy_read_flag(u8 id) { - if (id == I915_ENGINE_CLASS_INVALID) - return 0x; + if (id == (u8)I915_ENGINE_CLASS_INVALID) + return 0xu; GEM_BUG_ON(id >= 16); - return 0x1 << id; + return 0x1u << id; } -static __always_inline unsigned int __busy_write_id(unsigned int id) +static __always_inline u32 __busy_write_id(u8 id) { /* * The uABI guarantees an active writer is also amongst the read @@ -3861,15 +3861,14 @@ static __always_inline unsigned int __busy_write_id(unsigned int id) * last_read - hence we always set both read and write busy for * last_write. */ - if (id == I915_ENGINE_CLASS_INVALID) - return 0x; + if (id == (u8)I915_ENGINE_CLASS_INVALID) + return 0xu; return (id + 1) | __busy_read_flag(id); } static __always_inline unsigned int -__busy_set_if_active(const struct dma_fence *fence, -unsigned int (*flag)(unsigned int id)) +__busy_set_if_active(const struct dma_fence *fence, u32 (*flag)(u8 id)) { const struct i915_request *rq; @@ -3889,6 +3888,8 @@ __busy_set_if_active(const struct dma_fence *fence, if (i915_request_completed(rq)) return 0; + /* Beware type-expansion follies! */ + BUILD_BUG_ON(!typecheck(u8, rq->engine->uabi_class)); return flag(rq->engine->uabi_class); } -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915: Fix context IDs not released on driver hot unbind
From: Janusz Krzysztofik In case the driver gets unbound while a device is open, kernel panic may be forced if a list of allocated context IDs is not empty. When a device is open, the list may happen to be not empty because a context ID, once allocated by a context ID allocator to a context assosiated with that open file descriptor, is released as late as on device close. On the other hand, there is a need to release all allocated context IDs and destroy the context ID allocator on driver unbind, even if a device is open, in order to free memory resources consumed and prevent from memory leaks. The purpose of the forced kernel panic was to protect the context ID allocator from being silently destroyed if not all allocated IDs had been released. Before forcing the kernel panic on non-empty list of allocated context IDs, do that unlikely on non-empty list of contexts that should be freed by preceding drain of work queue (there must be another bug if that list happens to be not empty). If empty, we may assume that remaining contexts are idle (not pinned) and their IDs can be safely released. Once done, release context IDs of each of those remaining contexts unless it happens a context is unlikely pinned. Force kernel panic in that case, there must be still another bug in the driver code. Now the kernel panic protecting the allocator should not pop up as the list it checks should be empty. If it unlikely happens to be not empty, there must be still another bug. Signed-off-by: Janusz Krzysztofik --- drivers/gpu/drm/i915/i915_gem_context.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 280813a4bf82..18d004d94e43 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -611,6 +611,8 @@ void i915_gem_contexts_lost(struct drm_i915_private *dev_priv) void i915_gem_contexts_fini(struct drm_i915_private *i915) { + struct i915_gem_context *ctx, *cn; + lockdep_assert_held(&i915->drm.struct_mutex); if (i915->preempt_context) @@ -618,6 +620,14 @@ void i915_gem_contexts_fini(struct drm_i915_private *i915) destroy_kernel_context(&i915->kernel_context); /* Must free all deferred contexts (via flush_workqueue) first */ + GEM_BUG_ON(!llist_empty(&i915->contexts.free_list)); + + /* Release all remaining HW IDs before ID allocator is destroyed */ + list_for_each_entry_safe(ctx, cn, &i915->contexts.hw_id_list, +hw_id_link) { + GEM_BUG_ON(atomic_read(&ctx->hw_id_pin_count)); + release_hw_id(ctx); + } GEM_BUG_ON(!list_empty(&i915->contexts.hw_id_list)); ida_destroy(&i915->contexts.hw_ida); } -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Fix context IDs not released on driver hot unbind
Quoting Janusz Krzysztofik (2019-04-04 11:24:45) > From: Janusz Krzysztofik > > In case the driver gets unbound while a device is open, kernel panic > may be forced if a list of allocated context IDs is not empty. > > When a device is open, the list may happen to be not empty because a > context ID, once allocated by a context ID allocator to a context > assosiated with that open file descriptor, is released as late as > on device close. > > On the other hand, there is a need to release all allocated context IDs > and destroy the context ID allocator on driver unbind, even if a device > is open, in order to free memory resources consumed and prevent from > memory leaks. The purpose of the forced kernel panic was to protect > the context ID allocator from being silently destroyed if not all > allocated IDs had been released. Those open fd are still pointing into kernel memory where the driver used to be. The panic is entirely correct, we should not be unloading the module before those dangling pointers have been made safe. This is papering over the symptom. How is the module being unloaded with open fd? If all the fd have been closed, how have we failed to flush and retire all requests (thereby unpinning the contexts and all other pointers). -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Fix context IDs not released on driver hot unbind
On Thu, 2019-04-04 at 11:28 +0100, Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-04-04 11:24:45) > > From: Janusz Krzysztofik > > > > In case the driver gets unbound while a device is open, kernel > > panic > > may be forced if a list of allocated context IDs is not empty. > > > > When a device is open, the list may happen to be not empty because > > a > > context ID, once allocated by a context ID allocator to a context > > assosiated with that open file descriptor, is released as late as > > on device close. > > > > On the other hand, there is a need to release all allocated context > > IDs > > and destroy the context ID allocator on driver unbind, even if a > > device > > is open, in order to free memory resources consumed and prevent > > from > > memory leaks. The purpose of the forced kernel panic was to > > protect > > the context ID allocator from being silently destroyed if not all > > allocated IDs had been released. > > Those open fd are still pointing into kernel memory where the driver > used to be. The panic is entirely correct, we should not be unloading > the module before those dangling pointers have been made safe. > > This is papering over the symptom. How is the module being unloaded > with > open fd? A user can play with the driver unbind or device remove sysfs interface. Thanks, Janusz > If all the fd have been closed, how have we failed to flush and > retire all requests (thereby unpinning the contexts and all other > pointers). > -Chris > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Fix context IDs not released on driver hot unbind
Quoting Janusz Krzysztofik (2019-04-04 11:40:24) > On Thu, 2019-04-04 at 11:28 +0100, Chris Wilson wrote: > > Quoting Janusz Krzysztofik (2019-04-04 11:24:45) > > > From: Janusz Krzysztofik > > > > > > In case the driver gets unbound while a device is open, kernel > > > panic > > > may be forced if a list of allocated context IDs is not empty. > > > > > > When a device is open, the list may happen to be not empty because > > > a > > > context ID, once allocated by a context ID allocator to a context > > > assosiated with that open file descriptor, is released as late as > > > on device close. > > > > > > On the other hand, there is a need to release all allocated context > > > IDs > > > and destroy the context ID allocator on driver unbind, even if a > > > device > > > is open, in order to free memory resources consumed and prevent > > > from > > > memory leaks. The purpose of the forced kernel panic was to > > > protect > > > the context ID allocator from being silently destroyed if not all > > > allocated IDs had been released. > > > > Those open fd are still pointing into kernel memory where the driver > > used to be. The panic is entirely correct, we should not be unloading > > the module before those dangling pointers have been made safe. > > > > This is papering over the symptom. How is the module being unloaded > > with > > open fd? > > A user can play with the driver unbind or device remove sysfs > interface. Sure, but we must still follow all the steps before _unloading_ the module or else the user is left pointing into reused kernel memory. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Fix context IDs not released on driver hot unbind
On Thu, 2019-04-04 at 11:43 +0100, Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-04-04 11:40:24) > > On Thu, 2019-04-04 at 11:28 +0100, Chris Wilson wrote: > > > Quoting Janusz Krzysztofik (2019-04-04 11:24:45) > > > > From: Janusz Krzysztofik > > > > > > > > In case the driver gets unbound while a device is open, kernel > > > > panic > > > > may be forced if a list of allocated context IDs is not empty. > > > > > > > > When a device is open, the list may happen to be not empty > > > > because > > > > a > > > > context ID, once allocated by a context ID allocator to a > > > > context > > > > assosiated with that open file descriptor, is released as late > > > > as > > > > on device close. > > > > > > > > On the other hand, there is a need to release all allocated > > > > context > > > > IDs > > > > and destroy the context ID allocator on driver unbind, even if > > > > a > > > > device > > > > is open, in order to free memory resources consumed and prevent > > > > from > > > > memory leaks. The purpose of the forced kernel panic was to > > > > protect > > > > the context ID allocator from being silently destroyed if not > > > > all > > > > allocated IDs had been released. > > > > > > Those open fd are still pointing into kernel memory where the > > > driver > > > used to be. The panic is entirely correct, we should not be > > > unloading > > > the module before those dangling pointers have been made safe. > > > > > > This is papering over the symptom. How is the module being > > > unloaded > > > with > > > open fd? > > > > A user can play with the driver unbind or device remove sysfs > > interface. > > Sure, but we must still follow all the steps before _unloading_ the > module or else the user is left pointing into reused kernel memory. I'm not talking about unloading the module, that is prevented by open fds. The driver still exists after being unbound from a device and may just respond with -ENODEV. Janusz > -Chris > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Fix context IDs not released on driver hot unbind
Quoting Janusz Krzysztofik (2019-04-04 11:50:14) > On Thu, 2019-04-04 at 11:43 +0100, Chris Wilson wrote: > > Quoting Janusz Krzysztofik (2019-04-04 11:40:24) > > > On Thu, 2019-04-04 at 11:28 +0100, Chris Wilson wrote: > > > > Quoting Janusz Krzysztofik (2019-04-04 11:24:45) > > > > > From: Janusz Krzysztofik > > > > > > > > > > In case the driver gets unbound while a device is open, kernel > > > > > panic > > > > > may be forced if a list of allocated context IDs is not empty. > > > > > > > > > > When a device is open, the list may happen to be not empty > > > > > because > > > > > a > > > > > context ID, once allocated by a context ID allocator to a > > > > > context > > > > > assosiated with that open file descriptor, is released as late > > > > > as > > > > > on device close. > > > > > > > > > > On the other hand, there is a need to release all allocated > > > > > context > > > > > IDs > > > > > and destroy the context ID allocator on driver unbind, even if > > > > > a > > > > > device > > > > > is open, in order to free memory resources consumed and prevent > > > > > from > > > > > memory leaks. The purpose of the forced kernel panic was to > > > > > protect > > > > > the context ID allocator from being silently destroyed if not > > > > > all > > > > > allocated IDs had been released. > > > > > > > > Those open fd are still pointing into kernel memory where the > > > > driver > > > > used to be. The panic is entirely correct, we should not be > > > > unloading > > > > the module before those dangling pointers have been made safe. > > > > > > > > This is papering over the symptom. How is the module being > > > > unloaded > > > > with > > > > open fd? > > > > > > A user can play with the driver unbind or device remove sysfs > > > interface. > > > > Sure, but we must still follow all the steps before _unloading_ the > > module or else the user is left pointing into reused kernel memory. > > I'm not talking about unloading the module, that is prevented by open > fds. The driver still exists after being unbound from a device and may > just respond with -ENODEV. i915_gem_contexts_fini() *is* module unload. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2] drm/i915: Be precise in types for i915_gem_busy
On 04/04/2019 11:19, Chris Wilson wrote: Mixing u8 and -1u together leads to zero-extended integer expansion, and comparing 0x00ff against 0x, causing us to report a mixed uabi-class request as not busy. The input flag is a u8, and we want to generate a u32 uABI response, mark our functions so. Fixes: c8b502422bfe ("drm/i915: Remove last traces of exec-id (GEM_BUSY)") Testcase: igt/gem_exec_balance/busy Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- Include a typecheck so we notice if we ever change engine->uabi_class. --- drivers/gpu/drm/i915/i915_gem.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index bf594a5e88bc..f25a1ba24927 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3841,16 +3841,16 @@ i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj, return vma; } -static __always_inline unsigned int __busy_read_flag(unsigned int id) +static __always_inline u32 __busy_read_flag(u8 id) { - if (id == I915_ENGINE_CLASS_INVALID) - return 0x; + if (id == (u8)I915_ENGINE_CLASS_INVALID) + return 0xu; GEM_BUG_ON(id >= 16); - return 0x1 << id; + return 0x1u << id; } -static __always_inline unsigned int __busy_write_id(unsigned int id) +static __always_inline u32 __busy_write_id(u8 id) { /* * The uABI guarantees an active writer is also amongst the read @@ -3861,15 +3861,14 @@ static __always_inline unsigned int __busy_write_id(unsigned int id) * last_read - hence we always set both read and write busy for * last_write. */ - if (id == I915_ENGINE_CLASS_INVALID) - return 0x; + if (id == (u8)I915_ENGINE_CLASS_INVALID) + return 0xu; return (id + 1) | __busy_read_flag(id); } static __always_inline unsigned int -__busy_set_if_active(const struct dma_fence *fence, -unsigned int (*flag)(unsigned int id)) +__busy_set_if_active(const struct dma_fence *fence, u32 (*flag)(u8 id)) { const struct i915_request *rq; @@ -3889,6 +3888,8 @@ __busy_set_if_active(const struct dma_fence *fence, if (i915_request_completed(rq)) return 0; + /* Beware type-expansion follies! */ + BUILD_BUG_ON(!typecheck(u8, rq->engine->uabi_class)); return flag(rq->engine->uabi_class); } Reviewed-by: Tvrtko Ursulin Regards, Tvrtko ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Fixup kerneldoc for intel_cdclk_needs_cd2x_update
== Series Details == Series: drm/i915: Fixup kerneldoc for intel_cdclk_needs_cd2x_update URL : https://patchwork.freedesktop.org/series/58988/ State : success == Summary == CI Bug Log - changes from CI_DRM_5869 -> Patchwork_12681 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58988/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12681 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_basic@gtt-bsd2: - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +57 * igt@i915_selftest@live_contexts: - fi-bdw-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] * igt@i915_selftest@live_uncore: - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110210] * igt@kms_busy@basic-flip-a: - fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1 * igt@kms_busy@basic-flip-c: - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@hdmi-crc-fast: - fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] +62 * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: NOTRUN -> FAIL [fdo#103167] * igt@kms_psr@cursor_plane_move: - fi-skl-6260u: NOTRUN -> SKIP [fdo#109271] +37 * igt@kms_psr@primary_mmap_gtt: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +27 * igt@runner@aborted: - fi-bxt-dsi: NOTRUN -> FAIL [fdo#109516] Possible fixes * igt@i915_selftest@live_execlists: - fi-apl-guc: INCOMPLETE [fdo#103927] / [fdo#109720] -> PASS * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: - fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS * igt@prime_vgem@basic-fence-flip: - fi-ilk-650: FAIL [fdo#104008] -> PASS [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109516]: https://bugs.freedesktop.org/show_bug.cgi?id=109516 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (47 -> 44) -- Additional (4): fi-bxt-dsi fi-byt-clapper fi-skl-6260u fi-bsw-n3050 Missing(7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-u3 fi-bdw-samus Build changes - * Linux: CI_DRM_5869 -> Patchwork_12681 CI_DRM_5869: 03f8f3298b90c7f80da6a98c3eb8413d7aeaa52b @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4926: c9a9cf357b6b2a304623790bf8dae797e12888a8 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12681: a59a48cc19c9e719b680dc30a0f80061ca16edaf @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == a59a48cc19c9 drm/i915: Fixup kerneldoc for intel_cdclk_needs_cd2x_update == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12681/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] i915/gem_exec_big: Only warn for the first sign of a pagefault
On 28/03/2019 11:49, Chris Wilson wrote: We only need the warning once, not for the several thousand relocations we try. The current execbuf implementation will set all presumed_offset to -1 so this loop should quit on the first entry if we hit the pagefault, but for the sake of completeness check all. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110269 Signed-off-by: Chris Wilson --- tests/i915/gem_exec_big.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/i915/gem_exec_big.c b/tests/i915/gem_exec_big.c index 440136ee8..9da90ead6 100644 --- a/tests/i915/gem_exec_big.c +++ b/tests/i915/gem_exec_big.c @@ -169,8 +169,10 @@ static void execN(int fd, uint32_t handle, uint64_t batch_size, unsigned flags, igt_permute_array(gem_reloc, nreloc, xchg_reloc); gem_execbuf(fd, &execbuf); - for (n = 0; n < nreloc; n++) - igt_warn_on(gem_reloc[n].presumed_offset == -1); + for (n = 0; n < nreloc; n++) { + if (igt_warn_on(gem_reloc[n].presumed_offset == -1)) + break; + } if (use_64bit_relocs) { for (n = 0; n < nreloc; n++) { Reviewed-by: Tvrtko Ursulin Regards, Tvrtko ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: add immutable zpos plane properties (rev2)
== Series Details == Series: drm/i915: add immutable zpos plane properties (rev2) URL : https://patchwork.freedesktop.org/series/58761/ State : success == Summary == CI Bug Log - changes from CI_DRM_5865_full -> Patchwork_12675_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_12675_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_param@set-priority-not-supported: - shard-iclb: NOTRUN -> SKIP [fdo#109314] * igt@gem_exec_capture@capture-bsd2: - shard-snb: NOTRUN -> SKIP [fdo#109271] +40 * igt@gem_exec_params@no-bsd: - shard-iclb: NOTRUN -> SKIP [fdo#109283] +1 * igt@gem_exec_parse@basic-rejected: - shard-iclb: NOTRUN -> SKIP [fdo#109289] * igt@gem_tiled_pread_pwrite: - shard-iclb: PASS -> TIMEOUT [fdo#109673] * igt@i915_pm_rpm@system-suspend-devices: - shard-iclb: PASS -> DMESG-WARN [fdo#109638] * igt@kms_atomic_transition@3x-modeset-transitions: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +14 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_chamelium@dp-edid-read: - shard-iclb: NOTRUN -> SKIP [fdo#109284] +2 * igt@kms_cursor_crc@cursor-128x128-dpms: - shard-skl: NOTRUN -> FAIL [fdo#103232] +1 * igt@kms_cursor_crc@cursor-128x128-suspend: - shard-skl: PASS -> INCOMPLETE [fdo#104108] * igt@kms_cursor_crc@cursor-64x64-suspend: - shard-iclb: PASS -> FAIL [fdo#103232] * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: - shard-glk: PASS -> FAIL [fdo#104873] * igt@kms_fbcon_fbt@psr-suspend: - shard-skl: NOTRUN -> FAIL [fdo#103833] * igt@kms_flip@2x-flip-vs-expired-vblank: - shard-glk: PASS -> FAIL [fdo#105363] * igt@kms_flip@2x-flip-vs-fences-interruptible: - shard-iclb: NOTRUN -> SKIP [fdo#109274] +1 * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt: - shard-iclb: PASS -> FAIL [fdo#103167] +9 * igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw: - shard-iclb: NOTRUN -> FAIL [fdo#103167] * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-shrfb-pgflip-blt: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +10 * igt@kms_frontbuffer_tracking@fbcpsr-stridechange: - shard-skl: NOTRUN -> FAIL [fdo#105683] * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-blt: - shard-iclb: PASS -> FAIL [fdo#109247] +10 * igt@kms_frontbuffer_tracking@psr-rgb565-draw-mmap-wc: - shard-skl: NOTRUN -> FAIL [fdo#103167] +1 * igt@kms_lease@page_flip_implicit_plane: - shard-skl: NOTRUN -> FAIL [fdo#110281] * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-f: - shard-iclb: NOTRUN -> SKIP [fdo#109278] +3 * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-f: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3 * igt@kms_plane_alpha_blend@pipe-a-alpha-7efc: - shard-skl: NOTRUN -> FAIL [fdo#107815] / [fdo#108145] +1 * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max: - shard-skl: NOTRUN -> FAIL [fdo#108145] +4 * igt@kms_plane_multiple@atomic-pipe-b-tiling-y: - shard-iclb: PASS -> FAIL [fdo#110037] +1 * igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] +1 * igt@kms_plane_scaling@pipe-b-scaler-with-rotation: - shard-iclb: NOTRUN -> FAIL [fdo#109052] * igt@kms_psr@cursor_render: - shard-iclb: PASS -> DMESG-WARN [fdo#110025] * igt@kms_psr@primary_mmap_cpu: - shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +2 * igt@kms_psr@psr2_basic: - shard-iclb: PASS -> SKIP [fdo#109441] +2 * igt@kms_psr@psr2_cursor_plane_move: - shard-iclb: NOTRUN -> SKIP [fdo#109441] * igt@kms_rotation_crc@multiplane-rotation: - shard-kbl: PASS -> INCOMPLETE [fdo#103665] * igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm: - shard-apl: PASS -> FAIL [fdo#104894] * igt@kms_vrr@flip-suspend: - shard-skl: NOTRUN -> SKIP [fdo#109271] +172 * igt@perf_pmu@most-busy-check-all-vcs1: - shard-iclb: NOTRUN -> SKIP [fdo#109276] +3 * igt@prime_nv_api@nv_self_import: - shard-iclb: NOTRUN -> SKIP [fdo#109291] Possible fixes * igt@gem_exec_suspend@basic-s4-devices: - shard-iclb: DMESG-WARN [fdo#109638] -> PASS * igt@gem_ppgtt@blt-vs-render-ctx0: - shard-iclb: INCOMPLETE [fdo#109801] -> PASS * igt@kms_busy@extended-modeset-hang-newfb-render-c: - shard-iclb: DMESG-WARN [fdo#110222] -> PASS *
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: add immutable zpos plane properties (rev2)
== Series Details == Series: drm/i915: add immutable zpos plane properties (rev2) URL : https://patchwork.freedesktop.org/series/58761/ State : success == Summary == CI Bug Log - changes from CI_DRM_5865_full -> Patchwork_12675_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_12675_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_param@set-priority-not-supported: - shard-iclb: NOTRUN -> SKIP [fdo#109314] * igt@gem_exec_capture@capture-bsd2: - shard-snb: NOTRUN -> SKIP [fdo#109271] +40 * igt@gem_exec_params@no-bsd: - shard-iclb: NOTRUN -> SKIP [fdo#109283] +1 * igt@gem_exec_parse@basic-rejected: - shard-iclb: NOTRUN -> SKIP [fdo#109289] * igt@gem_tiled_pread_pwrite: - shard-iclb: PASS -> TIMEOUT [fdo#109673] * igt@i915_pm_rpm@system-suspend-devices: - shard-iclb: PASS -> DMESG-WARN [fdo#109638] * igt@kms_atomic_transition@3x-modeset-transitions: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +14 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_chamelium@dp-edid-read: - shard-iclb: NOTRUN -> SKIP [fdo#109284] +2 * igt@kms_cursor_crc@cursor-128x128-dpms: - shard-skl: NOTRUN -> FAIL [fdo#103232] +1 * igt@kms_cursor_crc@cursor-128x128-suspend: - shard-skl: PASS -> INCOMPLETE [fdo#104108] * igt@kms_cursor_crc@cursor-64x64-suspend: - shard-iclb: PASS -> FAIL [fdo#103232] * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: - shard-glk: PASS -> FAIL [fdo#104873] * igt@kms_fbcon_fbt@psr-suspend: - shard-skl: NOTRUN -> FAIL [fdo#103833] * igt@kms_flip@2x-flip-vs-expired-vblank: - shard-glk: PASS -> FAIL [fdo#105363] * igt@kms_flip@2x-flip-vs-fences-interruptible: - shard-iclb: NOTRUN -> SKIP [fdo#109274] +1 * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt: - shard-iclb: PASS -> FAIL [fdo#103167] +9 * igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw: - shard-iclb: NOTRUN -> FAIL [fdo#103167] * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-shrfb-pgflip-blt: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +10 * igt@kms_frontbuffer_tracking@fbcpsr-stridechange: - shard-skl: NOTRUN -> FAIL [fdo#105683] * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-blt: - shard-iclb: PASS -> FAIL [fdo#109247] +10 * igt@kms_frontbuffer_tracking@psr-rgb565-draw-mmap-wc: - shard-skl: NOTRUN -> FAIL [fdo#103167] +1 * igt@kms_lease@page_flip_implicit_plane: - shard-skl: NOTRUN -> FAIL [fdo#110281] * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-f: - shard-iclb: NOTRUN -> SKIP [fdo#109278] +3 * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-f: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3 * igt@kms_plane_alpha_blend@pipe-a-alpha-7efc: - shard-skl: NOTRUN -> FAIL [fdo#107815] / [fdo#108145] +1 * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max: - shard-skl: NOTRUN -> FAIL [fdo#108145] +4 * igt@kms_plane_multiple@atomic-pipe-b-tiling-y: - shard-iclb: PASS -> FAIL [fdo#110037] +1 * igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] +1 * igt@kms_plane_scaling@pipe-b-scaler-with-rotation: - shard-iclb: NOTRUN -> FAIL [fdo#109052] * igt@kms_psr@cursor_render: - shard-iclb: PASS -> DMESG-WARN [fdo#110025] * igt@kms_psr@primary_mmap_cpu: - shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +2 * igt@kms_psr@psr2_basic: - shard-iclb: PASS -> SKIP [fdo#109441] +2 * igt@kms_psr@psr2_cursor_plane_move: - shard-iclb: NOTRUN -> SKIP [fdo#109441] * igt@kms_rotation_crc@multiplane-rotation: - shard-kbl: PASS -> INCOMPLETE [fdo#103665] * igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm: - shard-apl: PASS -> FAIL [fdo#104894] * igt@kms_vrr@flip-suspend: - shard-skl: NOTRUN -> SKIP [fdo#109271] +172 * igt@perf_pmu@most-busy-check-all-vcs1: - shard-iclb: NOTRUN -> SKIP [fdo#109276] +3 * igt@prime_nv_api@nv_self_import: - shard-iclb: NOTRUN -> SKIP [fdo#109291] Possible fixes * igt@gem_exec_suspend@basic-s4-devices: - shard-iclb: DMESG-WARN [fdo#109638] -> PASS * igt@gem_ppgtt@blt-vs-render-ctx0: - shard-iclb: INCOMPLETE [fdo#109801] -> PASS * igt@kms_busy@extended-modeset-hang-newfb-render-c: - shard-iclb: DMESG-WARN [fdo#110222] -> PASS *
Re: [Intel-gfx] [PATCH] drm/i915: Fixup kerneldoc for intel_cdclk_needs_cd2x_update
On Thu, Apr 04, 2019 at 08:33:57AM +0100, Chris Wilson wrote: > drivers/gpu/drm/i915/intel_cdclk.c:2116: warning: Function parameter or > member 'dev_priv' not described in 'intel_cdclk_needs_cd2x_update' > > Signed-off-by: Chris Wilson > Cc: Ville Syrjälä > Cc: Abhay Kumar > Cc: Imre Deak Reviewed-by: Ville Syrjälä > --- > drivers/gpu/drm/i915/intel_cdclk.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/i915/intel_cdclk.c > b/drivers/gpu/drm/i915/intel_cdclk.c > index b8cd481f5e33..b911fe86be56 100644 > --- a/drivers/gpu/drm/i915/intel_cdclk.c > +++ b/drivers/gpu/drm/i915/intel_cdclk.c > @@ -2104,6 +2104,7 @@ bool intel_cdclk_needs_modeset(const struct > intel_cdclk_state *a, > > /** > * intel_cdclk_needs_cd2x_update - Determine if two CDCLK states require a > cd2x divider update > + * @dev_priv: Not a CDCLK state, it's the drm_i915_private! > * @a: first CDCLK state > * @b: second CDCLK state > * > -- > 2.20.1 -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: add Makefile magic for testing headers are self-contained
== Series Details == Series: series starting with [1/2] drm/i915: add Makefile magic for testing headers are self-contained URL : https://patchwork.freedesktop.org/series/58963/ State : success == Summary == CI Bug Log - changes from CI_DRM_5865_full -> Patchwork_12676_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_12676_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_capture@capture-bsd2: - shard-snb: NOTRUN -> SKIP [fdo#109271] +40 * igt@gem_exec_params@no-bsd: - shard-iclb: NOTRUN -> SKIP [fdo#109283] * igt@gem_exec_parse@basic-rejected: - shard-iclb: NOTRUN -> SKIP [fdo#109289] * igt@gem_exec_schedule@fifo-bsd1: - shard-iclb: NOTRUN -> SKIP [fdo#109276] * igt@i915_pm_rpm@sysfs-read: - shard-skl: PASS -> INCOMPLETE [fdo#107807] +1 * igt@kms_atomic_transition@3x-modeset-transitions: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +9 * igt@kms_busy@basic-flip-d: - shard-iclb: NOTRUN -> SKIP [fdo#109278] * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_cursor_crc@cursor-128x128-dpms: - shard-skl: NOTRUN -> FAIL [fdo#103232] * igt@kms_cursor_crc@cursor-64x21-onscreen: - shard-glk: PASS -> FAIL [fdo#103232] * igt@kms_cursor_crc@cursor-64x64-suspend: - shard-skl: NOTRUN -> INCOMPLETE [fdo#104108] * igt@kms_draw_crc@draw-method-xrgb-mmap-cpu-xtiled: - shard-glk: PASS -> FAIL [fdo#107791] * igt@kms_flip@2x-flip-vs-fences-interruptible: - shard-iclb: NOTRUN -> SKIP [fdo#109274] * igt@kms_flip@flip-vs-suspend: - shard-skl: PASS -> INCOMPLETE [fdo#109507] * igt@kms_flip@plain-flip-fb-recreate: - shard-skl: PASS -> FAIL [fdo#100368] * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw: - shard-iclb: PASS -> FAIL [fdo#103167] +8 * igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-cpu: - shard-skl: PASS -> FAIL [fdo#103167] * igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw: - shard-iclb: NOTRUN -> FAIL [fdo#103167] * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-mmap-gtt: - shard-iclb: PASS -> INCOMPLETE [fdo#106978] * igt@kms_frontbuffer_tracking@fbcpsr-stridechange: - shard-skl: NOTRUN -> FAIL [fdo#105683] * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-gtt: - shard-iclb: PASS -> FAIL [fdo#109247] +10 * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-pri-indfb-draw-pwrite: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +5 * igt@kms_frontbuffer_tracking@psr-rgb565-draw-mmap-wc: - shard-skl: NOTRUN -> FAIL [fdo#103167] +1 * igt@kms_lease@page_flip_implicit_plane: - shard-skl: NOTRUN -> FAIL [fdo#110281] * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-f: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3 * igt@kms_plane_alpha_blend@pipe-a-alpha-7efc: - shard-skl: NOTRUN -> FAIL [fdo#107815] / [fdo#108145] +1 * igt@kms_plane_alpha_blend@pipe-c-alpha-transparant-fb: - shard-skl: NOTRUN -> FAIL [fdo#108145] +3 * igt@kms_plane_scaling@pipe-a-scaler-with-pixel-format: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] +1 * igt@kms_psr@psr2_primary_blt: - shard-iclb: PASS -> SKIP [fdo#109441] * igt@kms_vblank@pipe-b-ts-continuation-suspend: - shard-iclb: PASS -> FAIL [fdo#104894] * igt@kms_vrr@flip-suspend: - shard-skl: NOTRUN -> SKIP [fdo#109271] +120 * igt@prime_nv_api@nv_self_import: - shard-iclb: NOTRUN -> SKIP [fdo#109291] Possible fixes * igt@gem_exec_suspend@basic-s4-devices: - shard-iclb: DMESG-WARN [fdo#109638] -> PASS * igt@i915_selftest@live_workarounds: - shard-iclb: DMESG-FAIL [fdo#108954] -> PASS * igt@kms_color@pipe-a-ctm-green-to-red: - shard-skl: FAIL [fdo#107201] -> PASS * igt@kms_cursor_crc@cursor-64x21-onscreen: - shard-iclb: FAIL [fdo#103232] -> PASS * igt@kms_fbcon_fbt@fbc-suspend: - shard-skl: INCOMPLETE [fdo#104108] / [fdo#107773] -> PASS * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible: - shard-glk: FAIL [fdo#105363] -> PASS * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite: - shard-iclb: FAIL [fdo#103167] -> PASS +5 * igt@kms_frontbuffer_tracking@fbc-suspend: - shard-skl: INCOMPLETE [fdo#104108] -> PASS * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-blt: - shard-iclb: FAIL [fdo#105682] / [fdo#109247] ->
Re: [Intel-gfx] [PATCH] drm/i915: Fix context IDs not released on driver hot unbind
On Thu, 04 Apr 2019, Chris Wilson wrote: > Quoting Janusz Krzysztofik (2019-04-04 11:50:14) >> On Thu, 2019-04-04 at 11:43 +0100, Chris Wilson wrote: >> > Quoting Janusz Krzysztofik (2019-04-04 11:40:24) >> > > On Thu, 2019-04-04 at 11:28 +0100, Chris Wilson wrote: >> > > > Quoting Janusz Krzysztofik (2019-04-04 11:24:45) >> > > > > From: Janusz Krzysztofik >> > > > > >> > > > > In case the driver gets unbound while a device is open, kernel >> > > > > panic >> > > > > may be forced if a list of allocated context IDs is not empty. >> > > > > >> > > > > When a device is open, the list may happen to be not empty >> > > > > because >> > > > > a >> > > > > context ID, once allocated by a context ID allocator to a >> > > > > context >> > > > > assosiated with that open file descriptor, is released as late >> > > > > as >> > > > > on device close. >> > > > > >> > > > > On the other hand, there is a need to release all allocated >> > > > > context >> > > > > IDs >> > > > > and destroy the context ID allocator on driver unbind, even if >> > > > > a >> > > > > device >> > > > > is open, in order to free memory resources consumed and prevent >> > > > > from >> > > > > memory leaks. The purpose of the forced kernel panic was to >> > > > > protect >> > > > > the context ID allocator from being silently destroyed if not >> > > > > all >> > > > > allocated IDs had been released. >> > > > >> > > > Those open fd are still pointing into kernel memory where the >> > > > driver >> > > > used to be. The panic is entirely correct, we should not be >> > > > unloading >> > > > the module before those dangling pointers have been made safe. >> > > > >> > > > This is papering over the symptom. How is the module being >> > > > unloaded >> > > > with >> > > > open fd? >> > > >> > > A user can play with the driver unbind or device remove sysfs >> > > interface. >> > >> > Sure, but we must still follow all the steps before _unloading_ the >> > module or else the user is left pointing into reused kernel memory. >> >> I'm not talking about unloading the module, that is prevented by open >> fds. The driver still exists after being unbound from a device and may >> just respond with -ENODEV. > > i915_gem_contexts_fini() *is* module unload. Janusz, please describe what you're doing exactly. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [RFC PATCH] drm/i915: gen11_dsi_get_pixel_fmt can be static
Fixes: bab7d9431d53 ("drm/i915: Fix pipe config mismatch for bpp, output format") Signed-off-by: kbuild test robot --- icl_dsi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c index 69cd6b2..163dc54 100644 --- a/drivers/gpu/drm/i915/icl_dsi.c +++ b/drivers/gpu/drm/i915/icl_dsi.c @@ -1226,7 +1226,7 @@ static void gen11_dsi_get_timings(struct intel_encoder *encoder, adjusted_mode->crtc_vsync_end = ((tmp >> 16) & 0x) + 1; } -enum mipi_dsi_pixel_format +static enum mipi_dsi_pixel_format gen11_dsi_get_pixel_fmt(struct drm_i915_private *dev_priv, struct intel_crtc_state *pipe_config) { ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/3] drm/i915: Fix pipe config mismatch for bpp, output format
Hi Vandita, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on v5.1-rc3 next-20190404] [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/Vandita-Kulkarni/Fix-mipi-dsi-pipe_config-mismatch-for-icl/20190404-192608 base: git://anongit.freedesktop.org/drm-intel for-linux-next reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' sparse warnings: (new ones prefixed by >>) include/uapi/linux/perf_event.h:147:56: sparse: cast truncates bits from constant value (8000 becomes 0) drivers/gpu/drm/i915/icl_dsi.c:129:33: sparse: expression using sizeof(void) >> drivers/gpu/drm/i915/icl_dsi.c:1230:1: sparse: symbol >> 'gen11_dsi_get_pixel_fmt' was not declared. Should it be static? Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2] drm/i915/dp: On link train failure on eDP, retry with max params first
Certain eDP panels fail to link train with optimized settings for link rate and lane count and need the max link parameters to be used for link training to pass. So in on link training failure for eDP, retry the link training with max link parameters first since this tends to fix link failures on most eDP 1.4 panels v2: * Forgot to ammend the previous patch with the fixes. This is a clean fixed patch Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Cc: Albert Astals Cid Cc: Emanuele Panigati Cc: Ralgor Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109959 Signed-off-by: Manasi Navare --- drivers/gpu/drm/i915/intel_dp.c | 37 +--- drivers/gpu/drm/i915/intel_drv.h | 3 +++ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 72c49070ed14..ae9766400171 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -463,6 +463,14 @@ static bool intel_dp_can_link_train_fallback_for_edp(struct intel_dp *intel_dp, return true; } +static bool intel_dp_uses_max_link_params(struct intel_dp *intel_dp, + int link_rate, + u8 lane_count) +{ + return link_rate == intel_dp->max_link_rate && + lane_count == intel_dp->max_link_lane_count; +} + int intel_dp_get_link_train_fallback_values(struct intel_dp *intel_dp, int link_rate, u8 lane_count) { @@ -471,24 +479,24 @@ int intel_dp_get_link_train_fallback_values(struct intel_dp *intel_dp, index = intel_dp_rate_index(intel_dp->common_rates, intel_dp->num_common_rates, link_rate); - if (index > 0) { - if (intel_dp_is_edp(intel_dp) && - !intel_dp_can_link_train_fallback_for_edp(intel_dp, - intel_dp->common_rates[index - 1], - lane_count)) { + + if (intel_dp_is_edp(intel_dp)) { + if (!intel_dp_uses_max_link_params(intel_dp, link_rate, + lane_count)) { + intel_dp->retry_with_max_link_params = true; + DRM_DEBUG_KMS("Retrying Link training for eDP with max link parameters\n"); + return 0; + } else if (!intel_dp_can_link_train_fallback_for_edp(intel_dp, + intel_dp->common_rates[index - 1], + lane_count)) { DRM_DEBUG_KMS("Retrying Link training for eDP with same parameters\n"); return 0; } + } + if (index > 0) { intel_dp->max_link_rate = intel_dp->common_rates[index - 1]; intel_dp->max_link_lane_count = lane_count; } else if (lane_count > 1) { - if (intel_dp_is_edp(intel_dp) && - !intel_dp_can_link_train_fallback_for_edp(intel_dp, - intel_dp_max_common_rate(intel_dp), - lane_count >> 1)) { - DRM_DEBUG_KMS("Retrying Link training for eDP with same parameters\n"); - return 0; - } intel_dp->max_link_rate = intel_dp_max_common_rate(intel_dp); intel_dp->max_link_lane_count = lane_count >> 1; } else { @@ -2028,7 +2036,8 @@ intel_dp_compute_link_config(struct intel_encoder *encoder, limits.min_bpp = 6 * 3; limits.max_bpp = intel_dp_compute_bpp(intel_dp, pipe_config); - if (intel_dp_is_edp(intel_dp) && intel_dp->edp_dpcd[0] < DP_EDP_14) { + if ((intel_dp_is_edp(intel_dp) && intel_dp->edp_dpcd[0] < DP_EDP_14) || + intel_dp->retry_with_max_link_params) { /* * Use the maximum clock and number of lanes the eDP panel * advertizes being capable of. The eDP 1.3 and earlier panels @@ -5432,6 +5441,8 @@ intel_dp_detect(struct drm_connector *connector, /* Initial max link rate */ intel_dp->max_link_rate = intel_dp_max_common_rate(intel_dp); + intel_dp->retry_with_max_link_params = false; + intel_dp->reset_link_params = false; } diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index f8c7b291fdc3..c3cf702c1cba 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1327,6 +1327,9 @@ struct intel_dp { /* Display stream compression testing */ bool force_dsc_en; + + /* Some pan
[Intel-gfx] [PULL] drm-intel-fixes
Hi Dave and Daniel, Here goes drm-intel-fixes-2019-04-04: Only one fix for DSC (backoff after drm_modeset_lock deadlock) and GVT's fixes including vGPU display plane size calculation, shadow mm pin count, error recovery path for workload create and one kerneldoc fix. Thanks, Rodrigo. The following changes since commit 79a3aaa7b82e3106be97842dedfd8429248896e6: Linux 5.1-rc3 (2019-03-31 14:39:29 -0700) are available in the Git repository at: git://anongit.freedesktop.org/drm/drm-intel tags/drm-intel-fixes-2019-04-04 for you to fetch changes up to 57cbec02f9b10992319ca578797c8059ac47d71e: Merge tag 'gvt-fixes-2019-04-04' of https://github.com/intel/gvt-linux into drm-intel-fixes (2019-04-03 18:00:42 -0700) Only one fix for DSC (backoff after drm_modeset_lock deadlock) and GVT's fixes including vGPU display plane size calculation, shadow mm pin count, error recovery path for workload create and one kerneldoc fix. Chris Wilson (2): drm/i915: Always backoff after a drm_modeset_lock() deadlock drm/i915/gvt: Fix kerneldoc typo for intel_vgpu_emulate_hotplug Rodrigo Vivi (1): Merge tag 'gvt-fixes-2019-04-04' of https://github.com/intel/gvt-linux into drm-intel-fixes Xiong Zhang (1): drm/i915/gvt: Correct the calculation of plane size Yan Zhao (2): drm/i915/gvt: do not deliver a workload if its creation fails drm/i915/gvt: do not let pin count of shadow mm go negative drivers/gpu/drm/i915/gvt/display.c | 2 +- drivers/gpu/drm/i915/gvt/dmabuf.c| 8 ++-- drivers/gpu/drm/i915/gvt/gtt.c | 2 +- drivers/gpu/drm/i915/gvt/scheduler.c | 5 +++-- drivers/gpu/drm/i915/i915_debugfs.c | 5 - 5 files changed, 11 insertions(+), 11 deletions(-) ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Be precise in types for i915_gem_busy (rev2)
== Series Details == Series: drm/i915: Be precise in types for i915_gem_busy (rev2) URL : https://patchwork.freedesktop.org/series/58993/ State : success == Summary == CI Bug Log - changes from CI_DRM_5871 -> Patchwork_12682 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58993/revisions/2/mbox/ Known issues Here are the changes found in Patchwork_12682 that come from known issues: ### IGT changes ### Issues hit * igt@amdgpu/amd_basic@cs-compute: - fi-kbl-8809g: NOTRUN -> FAIL [fdo#108094] * igt@amdgpu/amd_basic@query-info: - fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] +55 * igt@amdgpu/amd_cs_nop@fork-compute0: - fi-icl-y: NOTRUN -> SKIP [fdo#109315] +17 * igt@gem_exec_basic@basic-bsd2: - fi-icl-y: NOTRUN -> SKIP [fdo#109276] +7 * igt@gem_exec_basic@readonly-bsd1: - fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] +57 * igt@gem_exec_basic@readonly-bsd2: - fi-pnv-d510:NOTRUN -> SKIP [fdo#109271] +76 * igt@gem_exec_parse@basic-rejected: - fi-icl-y: NOTRUN -> SKIP [fdo#109289] +1 * igt@gem_exec_store@basic-bsd2: - fi-hsw-4770:NOTRUN -> SKIP [fdo#109271] +41 * igt@gem_exec_suspend@basic-s4-devices: - fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718] * igt@i915_selftest@live_contexts: - fi-bdw-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] - fi-icl-y: NOTRUN -> DMESG-FAIL [fdo#108569] * igt@i915_selftest@live_uncore: - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110210] - fi-ivb-3770:PASS -> DMESG-FAIL [fdo#110210] * igt@kms_addfb_basic@addfb25-y-tiled-small: - fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] +56 * igt@kms_busy@basic-flip-a: - fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1 * igt@kms_busy@basic-flip-c: - fi-byt-j1900: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-pnv-d510:NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@dp-crc-fast: - fi-icl-y: NOTRUN -> SKIP [fdo#109284] +8 * igt@kms_chamelium@hdmi-crc-fast: - fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] +62 - fi-byt-j1900: NOTRUN -> SKIP [fdo#109271] +52 * igt@kms_force_connector_basic@force-load-detect: - fi-icl-y: NOTRUN -> SKIP [fdo#109285] +3 * igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence: - fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] * igt@kms_psr@primary_mmap_gtt: - fi-icl-y: NOTRUN -> SKIP [fdo#110189] +3 * igt@prime_vgem@basic-fence-flip: - fi-icl-y: NOTRUN -> SKIP [fdo#109294] Possible fixes * igt@amdgpu/amd_basic@userptr: - fi-kbl-8809g: DMESG-WARN [fdo#108965] -> PASS * igt@i915_selftest@live_hangcheck: - fi-skl-iommu: INCOMPLETE [fdo#108602] / [fdo#108744] -> PASS * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS +2 {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602 [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744 [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284 [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285 [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289 [fdo#109294]: https://bugs.freedesktop.org/show_bug.cgi?id=109294 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (43 -> 43) --
Re: [Intel-gfx] [PATCH 6/6] drm/i915: Expose the legacy LUT via the GAMMA_LUT/GAMMA_LUT_SIZE props on gen2/3
On Thu, 2019-03-28 at 23:05 +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Just so we don't leave gen2/3 out in the cold let's advertize the > legacy LUT via the GAMMA_LUT/GAMMA_LUT_SIZE props. Without the > GAMMA_LUT prop we can't actually load a LUT using the atomic ioctl > (in preparation for the day of 100% atomic driver). > > Supposedly some gen2/3 platforms have an interpolated 10bit gamma > mode > as well. It's slightly funkier than the i965+ mode since you have to > specify the slope for the interpolation by hand. But when I tried it > I couldn't get it to work, the hardware just insisted on using the > 8bit more regardless of the state of the relevant PIPECONF bit. > > Signed-off-by: Ville Syrjälä LGTM. Revieweed-by: Radhakrishna Sripada > --- > drivers/gpu/drm/i915/i915_pci.c| 5 + > drivers/gpu/drm/i915/intel_color.c | 13 + > 2 files changed, 10 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_pci.c > b/drivers/gpu/drm/i915/i915_pci.c > index 0c5258aa13bb..0e76df27f151 100644 > --- a/drivers/gpu/drm/i915/i915_pci.c > +++ b/drivers/gpu/drm/i915/i915_pci.c > @@ -116,6 +116,8 @@ > [PIPE_C] = IVB_CURSOR_C_OFFSET, \ > } > > +#define I9XX_COLORS \ > + .color = { .gamma_lut_size = 256 } > #define I965_COLORS \ > .color = { .gamma_lut_size = 129, \ > .gamma_lut_tests = DRM_COLOR_LUT_NON_DECREASING, \ > @@ -156,6 +158,7 @@ > .has_coherent_ggtt = false, \ > I9XX_PIPE_OFFSETS, \ > I9XX_CURSOR_OFFSETS, \ > + I9XX_COLORS, \ > GEN_DEFAULT_PAGE_SIZES > > #define I845_FEATURES \ > @@ -172,6 +175,7 @@ > .has_coherent_ggtt = false, \ > I845_PIPE_OFFSETS, \ > I845_CURSOR_OFFSETS, \ > + I9XX_COLORS, \ > GEN_DEFAULT_PAGE_SIZES > > static const struct intel_device_info intel_i830_info = { > @@ -205,6 +209,7 @@ static const struct intel_device_info > intel_i865g_info = { > .has_coherent_ggtt = true, \ > I9XX_PIPE_OFFSETS, \ > I9XX_CURSOR_OFFSETS, \ > + I9XX_COLORS, \ > GEN_DEFAULT_PAGE_SIZES > > static const struct intel_device_info intel_i915g_info = { > diff --git a/drivers/gpu/drm/i915/intel_color.c > b/drivers/gpu/drm/i915/intel_color.c > index 07d62c7cb386..fd4a65af5cc4 100644 > --- a/drivers/gpu/drm/i915/intel_color.c > +++ b/drivers/gpu/drm/i915/intel_color.c > @@ -1272,12 +1272,9 @@ void intel_color_init(struct intel_crtc *crtc) > dev_priv->display.load_luts = ilk_load_luts; > } > > - /* Enable color management support when we have degamma and/or > gamma LUT. */ > - if (INTEL_INFO(dev_priv)->color.degamma_lut_size != 0 || > - INTEL_INFO(dev_priv)->color.gamma_lut_size != 0) > - drm_crtc_enable_color_mgmt(&crtc->base, > -INTEL_INFO(dev_priv)- > >color.degamma_lut_size, > -INTEL_INFO(dev_priv)- > >color.degamma_lut_size && > -INTEL_INFO(dev_priv)- > >color.gamma_lut_size, > -INTEL_INFO(dev_priv)- > >color.gamma_lut_size); > + drm_crtc_enable_color_mgmt(&crtc->base, > +INTEL_INFO(dev_priv)- > >color.degamma_lut_size, > +INTEL_INFO(dev_priv)- > >color.degamma_lut_size && > +INTEL_INFO(dev_priv)- > >color.gamma_lut_size, > +INTEL_INFO(dev_priv)- > >color.gamma_lut_size); > } ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Fix context IDs not released on driver hot unbind
== Series Details == Series: drm/i915: Fix context IDs not released on driver hot unbind URL : https://patchwork.freedesktop.org/series/58996/ State : failure == Summary == CI Bug Log - changes from CI_DRM_5871 -> Patchwork_12683 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_12683 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_12683, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/58996/revisions/1/mbox/ Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_12683: ### IGT changes ### Possible regressions * igt@gem_close_race@basic-threads: - fi-icl-y: NOTRUN -> INCOMPLETE Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@gem_ctx_exec@basic: - {fi-icl-u3}:PASS -> INCOMPLETE Known issues Here are the changes found in Patchwork_12683 that come from known issues: ### IGT changes ### Issues hit * igt@amdgpu/amd_basic@cs-compute: - fi-kbl-8809g: NOTRUN -> FAIL [fdo#108094] * igt@amdgpu/amd_basic@query-info: - fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] +55 * igt@amdgpu/amd_cs_nop@fork-compute0: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +18 * igt@gem_ctx_create@basic-files: - fi-icl-u2: PASS -> INCOMPLETE [fdo#109100] * igt@gem_exec_basic@readonly-bsd1: - fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] +57 * igt@gem_exec_basic@readonly-bsd2: - fi-pnv-d510:NOTRUN -> SKIP [fdo#109271] +76 * igt@gem_exec_store@basic-bsd2: - fi-hsw-4770:NOTRUN -> SKIP [fdo#109271] +41 * igt@i915_selftest@live_evict: - fi-bsw-kefka: NOTRUN -> DMESG-WARN [fdo#107709] * igt@i915_selftest@live_uncore: - fi-ivb-3770:PASS -> DMESG-FAIL [fdo#110210] * igt@kms_addfb_basic@addfb25-y-tiled-small: - fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] +56 * igt@kms_busy@basic-flip-a: - fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1 * igt@kms_busy@basic-flip-c: - fi-byt-j1900: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-bsw-kefka: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-pnv-d510:NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-byt-n2820: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@hdmi-crc-fast: - fi-bsw-n3050: NOTRUN -> SKIP [fdo#109271] +62 - fi-byt-j1900: NOTRUN -> SKIP [fdo#109271] +52 * igt@runner@aborted: - fi-bsw-kefka: NOTRUN -> FAIL [fdo#107709] Possible fixes * igt@amdgpu/amd_basic@userptr: - fi-kbl-8809g: DMESG-WARN [fdo#108965] -> PASS * igt@i915_module_load@reload: - fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS * igt@i915_selftest@live_hangcheck: - fi-skl-iommu: INCOMPLETE [fdo#108602] / [fdo#108744] -> PASS * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: FAIL [fdo#103167] -> PASS * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS +1 {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#107709]: https://bugs.freedesktop.org/show_bug.cgi?id=107709 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108094]: https://bugs.freedesktop.org/show_bug.cgi?id=108094 [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602 [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744 [fdo#108965]: https://bugs.freedesktop.org/show_bug.cgi?id=108965 [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 Participating hosts (43 -> 43) -- Additional (8): fi-bsw-n3050 fi-byt-j1900 fi-snb-2520m fi-hsw-4770 fi-pnv-d510 fi-icl-y fi-byt-n2820 fi-bsw-kefka Missing(8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bwr-2160 fi-ctg-p8600 fi-gdg-551 Build changes - * Linux: CI_DRM_5871 -> Patchwork_
Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: add Makefile magic for testing headers are self-contained (rev4)
On Thu, 04 Apr 2019, Patchwork wrote: > == Series Details == > > Series: drm/i915: add Makefile magic for testing headers are self-contained > (rev4) > URL : https://patchwork.freedesktop.org/series/58938/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_5863_full -> Patchwork_12674_full > > > Summary > --- > > **FAILURE** > > Serious unknown changes coming with Patchwork_12674_full absolutely need to > be > verified manually. > > If you think the reported changes have nothing to do with the changes > introduced in Patchwork_12674_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_12674_full: > > ### IGT changes ### > > Possible regressions > > * igt@gem_eio@reset-stress: > - shard-skl: PASS -> DMESG-WARN Pushed, I'm pretty sure testing headers has no impact here. BR, Jani. > > > Known issues > > > Here are the changes found in Patchwork_12674_full that come from known > issues: > > ### IGT changes ### > > Issues hit > > * igt@gem_ppgtt@blt-vs-render-ctxn: > - shard-iclb: PASS -> INCOMPLETE [fdo#109801] > > * igt@gem_userptr_blits@process-exit-gtt: > - shard-glk: NOTRUN -> SKIP [fdo#109271] +44 > > * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c: > - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] +1 > > * igt@kms_busy@extended-pageflip-hang-oldfb-render-f: > - shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3 > > * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a: > - shard-apl: PASS -> DMESG-WARN [fdo#110222] > > * igt@kms_chamelium@hdmi-crc-fast: > - shard-skl: NOTRUN -> SKIP [fdo#109271] +83 > > * igt@kms_cursor_crc@cursor-256x256-random: > - shard-glk: NOTRUN -> FAIL [fdo#103232] > > * igt@kms_cursor_legacy@cursor-vs-flip-atomic: > - shard-iclb: PASS -> FAIL [fdo#103355] +1 > > * igt@kms_flip@2x-modeset-vs-vblank-race: > - shard-glk: PASS -> FAIL [fdo#103060] > > * igt@kms_flip@flip-vs-expired-vblank-interruptible: > - shard-iclb: PASS -> FAIL [fdo#105363] > - shard-skl: PASS -> FAIL [fdo#105363] > > * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt: > - shard-iclb: PASS -> FAIL [fdo#103167] +4 > > * igt@kms_frontbuffer_tracking@psr-1p-primscrn-indfb-plflip-blt: > - shard-skl: PASS -> FAIL [fdo#103167] > > * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu: > - shard-iclb: PASS -> FAIL [fdo#109247] +18 > > * igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-shrfb-draw-mmap-gtt: > - shard-apl: NOTRUN -> SKIP [fdo#109271] +1 > > * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-f: > - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +10 > > * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes: > - shard-skl: NOTRUN -> INCOMPLETE [fdo#104108] > > * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min: > - shard-skl: PASS -> FAIL [fdo#108145] > > * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc: > - shard-skl: PASS -> FAIL [fdo#107815] > > * igt@kms_psr@primary_mmap_gtt: > - shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] > > > Possible fixes > > * igt@gem_tiled_pread_pwrite: > - shard-iclb: TIMEOUT [fdo#109673] -> PASS > > * igt@i915_pm_rpm@system-suspend-devices: > - shard-skl: INCOMPLETE [fdo#107807] -> PASS > > * igt@kms_cursor_crc@cursor-128x42-offscreen: > - shard-skl: FAIL [fdo#103232] -> PASS > > * igt@kms_cursor_edge_walk@pipe-a-128x128-left-edge: > - shard-snb: SKIP [fdo#109271] / [fdo#109278] -> PASS > > * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: > - shard-glk: FAIL [fdo#104873] -> PASS > > * igt@kms_flip@flip-vs-expired-vblank-interruptible: > - shard-glk: FAIL [fdo#102887] / [fdo#105363] -> PASS > > * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-move: > - shard-iclb: FAIL [fdo#103167] -> PASS +14 > > * igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-shrfb-draw-mmap-wc: > - shard-iclb: FAIL [fdo#109247] -> PASS +21 > > * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite: > - shard-iclb: FAIL [fdo#105682] / [fdo#109247] -> PASS +3 > > * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min: > - shard-skl: FAIL [fdo#108145] -> PASS > > * igt@kms_psr2_su@page_flip: > - shard-iclb: SKIP [fdo#109642] -> PASS > > * igt@kms_psr@cursor_mmap_gtt: > - shard-iclb:
[Intel-gfx] ✗ Fi.CI.BAT: failure for Fix mipi dsi pipe_config mismatch for icl (rev2)
== Series Details == Series: Fix mipi dsi pipe_config mismatch for icl (rev2) URL : https://patchwork.freedesktop.org/series/58990/ State : failure == Summary == Applying: drm/i915: Fix pipe config timing mismatch warnings Applying: drm/i915: gen11_dsi_get_pixel_fmt can be static error: sha1 information is lacking or useless (drivers/gpu/drm/i915/icl_dsi.c). error: could not build fake ancestor hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0002 drm/i915: gen11_dsi_get_pixel_fmt can be static When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dp: On link train failure on eDP, retry with max params first (rev2)
== Series Details == Series: drm/i915/dp: On link train failure on eDP, retry with max params first (rev2) URL : https://patchwork.freedesktop.org/series/58975/ State : warning == Summary == $ dim checkpatch origin/drm-tip 58de6f859ee4 drm/i915/dp: On link train failure on eDP, retry with max params first -:65: WARNING:LONG_LINE: line over 100 characters #65: FILE: drivers/gpu/drm/i915/intel_dp.c:490: + intel_dp->common_rates[index - 1], total: 0 errors, 1 warnings, 0 checks, 76 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dp: On link train failure on eDP, retry with max params first (rev2)
== Series Details == Series: drm/i915/dp: On link train failure on eDP, retry with max params first (rev2) URL : https://patchwork.freedesktop.org/series/58975/ State : success == Summary == CI Bug Log - changes from CI_DRM_5874 -> Patchwork_12685 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58975/revisions/2/mbox/ Known issues Here are the changes found in Patchwork_12685 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@i915_selftest@live_uncore: - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110210] * igt@kms_busy@basic-flip-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_pipe_crc_basic@hang-read-crc-pipe-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +48 Possible fixes * igt@gem_exec_suspend@basic-s3: - fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS * igt@i915_selftest@live_hangcheck: - fi-skl-iommu: INCOMPLETE [fdo#108602] / [fdo#108744] -> PASS * igt@i915_selftest@live_uncore: - fi-ivb-3770:DMESG-FAIL [fdo#110210] -> PASS * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS +1 {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602 [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 Participating hosts (49 -> 45) -- Missing(4): fi-kbl-soraka fi-ilk-m540 fi-bsw-cyan fi-hsw-4200u Build changes - * Linux: CI_DRM_5874 -> Patchwork_12685 CI_DRM_5874: a9040359beb75050c8a2f2e1b4dd07c621a7583c @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4928: 014a6fa238322b497116b359cb92df1ce7fa8847 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12685: 58de6f859ee4277eeac01eabf18fdd06a3bb38cc @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 58de6f859ee4 drm/i915/dp: On link train failure on eDP, retry with max params first == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12685/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/7] drm/i915/psr: Initialize PSR mutex even when sink is not reliable
On Wed, 2019-04-03 at 17:27 -0700, Rodrigo Vivi wrote: > On Wed, Apr 03, 2019 at 04:35:35PM -0700, José Roberto de Souza > wrote: > > Even when driver is reloaded and hits this scenario the PSR mutex > > should be initialized, otherwise reading PSR debugfs status will > > execute mutex_lock() over a mutex that was not initialized. > > > > Cc: Dhinakaran Pandiyan > > Cc: Rodrigo Vivi > > Signed-off-by: José Roberto de Souza > > --- > > drivers/gpu/drm/i915/intel_psr.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > b/drivers/gpu/drm/i915/intel_psr.c > > index c80bb3003a7d..a84da931c3be 100644 > > --- a/drivers/gpu/drm/i915/intel_psr.c > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > @@ -1227,7 +1227,6 @@ void intel_psr_init(struct drm_i915_private > > *dev_priv) > > if (val) { > > DRM_DEBUG_KMS("PSR interruption error set\n"); > > dev_priv->psr.sink_not_reliable = true; > > - return; > > There are other returns above and if debugfs hits this case maybe it > is worth to move the mutex initialization up instead? We have those two returns in PSR debugfs, !HAS_PSR(dev_priv) and !psr- >sink_support and in this cases we don't have any PSR functionality so not worthy to initialize anything PSR related. > > > } > > > > /* Set link_standby x link_off defaults */ > > -- > > 2.21.0 > > signature.asc Description: This is a digitally signed message part ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 6/7] drm/i915/psr: Remove partial PSR support on multiple transcoders
On Wed, 2019-04-03 at 17:31 -0700, Rodrigo Vivi wrote: > On Wed, Apr 03, 2019 at 04:35:38PM -0700, José Roberto de Souza > wrote: > > PSR is only supported in eDP transcoder and there is only one > > instance of it, so lets drop all of this code. > > Is this sentence true? I mean, in the way it is written it > seems like HW doesn't actually support it... > Or should we re-phrase for we are not really enabling support > for other transcoders than eDP and we do not have plans to do > it so soon so let's clean the code... > or something like that? Okay, what about replace it for: Since BDW all transcoders have PSR registers but only EDP transcoder can drive a EDP panel and as PSR is only part of the EDP specification, for real usage PSR is only supported in EDP panel, so lets drop all of this useless code. > > > Cc: Dhinakaran Pandiyan > > Cc: Rodrigo Vivi > > Signed-off-by: José Roberto de Souza > > --- > > drivers/gpu/drm/i915/i915_reg.h | 17 +--- > > drivers/gpu/drm/i915/intel_psr.c | 147 --- > > > > 2 files changed, 42 insertions(+), 122 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_reg.h > > b/drivers/gpu/drm/i915/i915_reg.h > > index c59cfa83dbaf..18e2991b376d 100644 > > --- a/drivers/gpu/drm/i915/i915_reg.h > > +++ b/drivers/gpu/drm/i915/i915_reg.h > > @@ -4241,13 +4241,9 @@ enum { > > /* Bspec claims those aren't shifted but stay at 0x64800 */ > > #define EDP_PSR_IMR_MMIO(0x64834) > > #define EDP_PSR_IIR_MMIO(0x64838) > > -#define EDP_PSR_ERROR(shift) (1 << ((shift) > > + 2)) > > -#define EDP_PSR_POST_EXIT(shift) (1 << ((shift) + 1)) > > -#define EDP_PSR_PRE_ENTRY(shift) (1 << (shift)) > > -#define EDP_PSR_TRANSCODER_C_SHIFT 24 > > -#define EDP_PSR_TRANSCODER_B_SHIFT 16 > > -#define EDP_PSR_TRANSCODER_A_SHIFT 8 > > -#define EDP_PSR_TRANSCODER_EDP_SHIFT 0 > > +#define EDP_PSR_ERROR(1 << 2) > > +#define EDP_PSR_POST_EXIT(1 << 1) > > +#define EDP_PSR_PRE_ENTRY(1 << 0) > > > > #define EDP_PSR_AUX_CTL_MMIO(dev_priv- > > >psr_mmio_base + 0x10) > > #define EDP_PSR_AUX_CTL_TIME_OUT_MASK(3 << 26) > > @@ -4312,12 +4308,7 @@ enum { > > #define EDP_PSR2_IDLE_FRAME_MASK 0xf > > #define EDP_PSR2_IDLE_FRAME_SHIFT0 > > > > -#define _PSR_EVENT_TRANS_A 0x60848 > > -#define _PSR_EVENT_TRANS_B 0x61848 > > -#define _PSR_EVENT_TRANS_C 0x62848 > > -#define _PSR_EVENT_TRANS_D 0x63848 > > -#define _PSR_EVENT_TRANS_EDP 0x6F848 > > -#define PSR_EVENT(trans) _MMIO_TRANS2(trans, > > _PSR_EVENT_TRANS_A) > > +#define PSR_EVENT _MMIO(0x6F848) > > #define PSR_EVENT_PSR2_WD_TIMER_EXPIRE(1 << 17) > > #define PSR_EVENT_PSR2_DISABLED (1 << 16) > > #define PSR_EVENT_SU_DIRTY_FIFO_UNDERRUN (1 << 15) > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > b/drivers/gpu/drm/i915/intel_psr.c > > index bb97c1657493..b984e005b72e 100644 > > --- a/drivers/gpu/drm/i915/intel_psr.c > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > @@ -84,46 +84,12 @@ static bool intel_psr2_enabled(struct > > drm_i915_private *dev_priv, > > } > > } > > > > -static int edp_psr_shift(enum transcoder cpu_transcoder) > > -{ > > - switch (cpu_transcoder) { > > - case TRANSCODER_A: > > - return EDP_PSR_TRANSCODER_A_SHIFT; > > - case TRANSCODER_B: > > - return EDP_PSR_TRANSCODER_B_SHIFT; > > - case TRANSCODER_C: > > - return EDP_PSR_TRANSCODER_C_SHIFT; > > - default: > > - MISSING_CASE(cpu_transcoder); > > - /* fallthrough */ > > - case TRANSCODER_EDP: > > - return EDP_PSR_TRANSCODER_EDP_SHIFT; > > - } > > -} > > - > > void intel_psr_irq_control(struct drm_i915_private *dev_priv, u32 > > debug) > > { > > - u32 debug_mask, mask; > > - enum transcoder cpu_transcoder; > > - u32 transcoders = BIT(TRANSCODER_EDP); > > - > > - if (INTEL_GEN(dev_priv) >= 8) > > - transcoders |= BIT(TRANSCODER_A) | > > - BIT(TRANSCODER_B) | > > - BIT(TRANSCODER_C); > > - > > - debug_mask = 0; > > - mask = 0; > > - for_each_cpu_transcoder_masked(dev_priv, cpu_transcoder, > > transcoders) { > > - int shift = edp_psr_shift(cpu_transcoder); > > - > > - mask |= EDP_PSR_ERROR(shift); > > - debug_mask |= EDP_PSR_POST_EXIT(shift) | > > - EDP_PSR_PRE_ENTRY(shift); > > - } > > + u32 mask = EDP_PSR_ERROR; > > > > if (debug & I915_PSR_DEBUG_IRQ) > > - mask |= debug_mask; > > + mask |= EDP_PSR_POST_EXIT | EDP_PSR_PRE_ENTRY; > > > > I915_WRITE(EDP_PSR
[Intel-gfx] [PULL] drm-misc-next
Hi Da.*, So this one is a blockbuster! We've got 1 new gpu, 1 new display controller, 2 new panels, 4 new ioctls, and 1 new encoder. Everything seems to check out on my side of the world, please pull. drm-misc-next-2019-04-04: drm-misc-next for 5.2: UAPI Changes: -syncobj: Add TIMELINE_WAIT|QUERY|TRANSFER|TIMELINE_SIGNAL ioctls (Chunming) -Clarify that 1.0 can be represented by drm_color_lut (Daniel) Cross-subsystem Changes: -dt-bindings: Add binding for rk3066 hdmi (Johan) -dt-bindings: Add binding for Feiyang FY07024DI26A30-D panel (Jagan) -dt-bindings: Add Rocktech vendor prefix and jh057n00900 panel bindings (Guido) -MAINTAINERS: Add lima and ASPEED entries (Joel & Qiang) Core Changes: -memory: use dma_alloc_coherent when mem encryption is active (Christian) -dma_buf: add support for a dma_fence chain (Christian) -shmem_gem: fix off-by-one bug in new shmem gem helpers (Dan) Driver Changes: -rockchip: Add support for rk3066 hdmi (Johan) -ASPEED: Add driver supporting ASPEED BMC display controller to drm (Joel) -lima: Add driver supporting Arm Mali4xx gpus to drm (Qiang) -vc4/v3d: Various cleanups and improved error handling (Eric) -panel: Add support for Feiyang FY07024DI26A30-D MIPI-DSI panel (Jagan) -panel: Add support for Rocktech jh057n00900 MIPI-DSI panel (Guido) Cc: Johan Jonker Cc: Christian König Cc: Chunming Zhou Cc: Dan Carpenter Cc: Eric Anholt Cc: Qiang Yu Cc: Daniel Vetter Cc: Jagan Teki Cc: Guido Günther Cc: Joel Stanley Cheers, Sean The following changes since commit 530b28426a94b822b3c03491cde5c9a961d80e7f: drm/virtio: rework resource creation workflow. (2019-03-28 12:11:56 +0100) are available in the Git repository at: git://anongit.freedesktop.org/drm/drm-misc tags/drm-misc-next-2019-04-04 for you to fetch changes up to f15a3ea80391e83f32d4a23f83b1f02415cd5889: MAINTAINERS: Add ASPEED BMC GFX DRM driver entry (2019-04-04 11:57:34 +1030) drm-misc-next for 5.2: UAPI Changes: -syncobj: Add TIMELINE_WAIT|QUERY|TRANSFER|TIMELINE_SIGNAL ioctls (Chunming) -Clarify that 1.0 can be represented by drm_color_lut (Daniel) Cross-subsystem Changes: -dt-bindings: Add binding for rk3066 hdmi (Johan) -dt-bindings: Add binding for Feiyang FY07024DI26A30-D panel (Jagan) -dt-bindings: Add Rocktech vendor prefix and jh057n00900 panel bindings (Guido) -MAINTAINERS: Add lima and ASPEED entries (Joel & Qiang) Core Changes: -memory: use dma_alloc_coherent when mem encryption is active (Christian) -dma_buf: add support for a dma_fence chain (Christian) -shmem_gem: fix off-by-one bug in new shmem gem helpers (Dan) Driver Changes: -rockchip: Add support for rk3066 hdmi (Johan) -ASPEED: Add driver supporting ASPEED BMC display controller to drm (Joel) -lima: Add driver supporting Arm Mali4xx gpus to drm (Qiang) -vc4/v3d: Various cleanups and improved error handling (Eric) -panel: Add support for Feiyang FY07024DI26A30-D MIPI-DSI panel (Jagan) -panel: Add support for Rocktech jh057n00900 MIPI-DSI panel (Guido) Cc: Johan Jonker Cc: Christian König Cc: Chunming Zhou Cc: Dan Carpenter Cc: Eric Anholt Cc: Qiang Yu Cc: Daniel Vetter Cc: Jagan Teki Cc: Guido Günther Cc: Joel Stanley Christian König (4): drm: fallback to dma_alloc_coherent when memory encryption is active dma-buf: add new dma_fence_chain container v7 drm/syncobj: add new drm_syncobj_add_point interface v4 drm/syncobj: use the timeline point in drm_syncobj_find_fence v4 Chunming Zhou (4): drm/syncobj: add support for timeline point wait v8 drm/syncobj: add timeline payload query ioctl v6 drm/syncobj: add transition iotcls between binary and timeline v2 drm/syncobj: add timeline signal ioctl for syncobj v5 Dan Carpenter (2): drm/v3d: fix a NULL vs error pointer mixup drm: shmem: Off by one in drm_gem_shmem_fault() Daniel Vetter (1): drm/gamma: Clarify gamma lut uapi Eric Anholt (10): drm/vc4: Make sure to emit a tile coordinates between two MSAA loads. drm/v3d: Add a note about OOM vs FLDONE, which may be racing on v3.3. drm/v3d: Rename the fence signaled from IRQs to "irq_fence". drm: Add a helper function for printing a debugfs_regset32. drm/vc4: Use drm_print_regset32() for our debug register dumping. drm/vc4: Use drm_printer for the debugfs and runtime bo stats output. drm/vc4: Add helpers for pm get/put. drm/vc4: Make sure that the v3d ident debugfs has vc4's power on. drm/vc4: Use common helpers for debugfs setup by the driver components. drm/vc4: Disable V3D interactions if the v3d component didn't probe. Gerd Hoffmann (5): drm/virtio: add missing drm_atomic_helper_shutdown() call. drm/bochs: add missing drm_atomic_helper_shutdown() call. drm/cirrus: add missing drm_helper_force_disable_all() call. drm/bochs: drop mode_co
Re: [Intel-gfx] [PATCH 1/3] drm/i915: Fix pipe config timing mismatch warnings
On Thu, Apr 04, 2019 at 01:36:25PM +0530, Vandita Kulkarni wrote: > Mipi dsi programs the transcoder timings as part of > encoder enable sequence, with dual link or single link > in consideration. Hence add get transcoder timings as > part of the encoder's get_config function. > > Signed-off-by: Vandita Kulkarni > --- > drivers/gpu/drm/i915/icl_dsi.c | 51 > > drivers/gpu/drm/i915/intel_display.c | 3 ++- > 2 files changed, 53 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c > index b67ffaa..db6bc3d 100644 > --- a/drivers/gpu/drm/i915/icl_dsi.c > +++ b/drivers/gpu/drm/i915/icl_dsi.c > @@ -1176,6 +1176,56 @@ static void gen11_dsi_disable(struct intel_encoder > *encoder, > gen11_dsi_disable_io_power(encoder); > } > > +static void gen11_dsi_get_timings(struct intel_encoder *encoder, > + struct intel_crtc_state *pipe_config) > +{ > + struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); > + struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base); > + struct drm_display_mode *adjusted_mode = > + &pipe_config->base.adjusted_mode; > + /* get config for dsi0 transcoder only */ > + enum transcoder cpu_transcoder = pipe_config->cpu_transcoder; > + /* horizontal timings */ > + u16 htotal, hactive, hsync_start, hsync_end; > + u32 tmp; > + > + tmp = I915_READ(HTOTAL(cpu_transcoder)); > + hactive = (tmp & 0x) + 1; > + htotal = ((tmp >> 16) & 0x) + 1; > + if (intel_dsi->dual_link) { > + hactive *= 2; > + if (intel_dsi->dual_link == DSI_DUAL_LINK_FRONT_BACK) > + hactive -= intel_dsi->pixel_overlap; > + htotal *= 2; > + } > + adjusted_mode->crtc_hdisplay = hactive; > + adjusted_mode->crtc_htotal = htotal; > + adjusted_mode->crtc_hblank_start = adjusted_mode->crtc_hdisplay; > + adjusted_mode->crtc_hblank_end = adjusted_mode->crtc_htotal; > + > + tmp = I915_READ(HSYNC(cpu_transcoder)); > + hsync_start = (tmp & 0x) + 1; > + hsync_end = ((tmp >> 16) & 0x) + 1; > + if (intel_dsi->operation_mode == INTEL_DSI_VIDEO_MODE) { > + if (intel_dsi->dual_link) { > + hsync_start *= 2; > + hsync_end *= 2; > + } > + } This looks like a hand rolled intel_get_pipe_timings() with an extra twist. I would suggest trying to reuse intel_get_pipe_timings() and just adjusting what it gave you a bit. -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH i-g-t] tests/i915/gem_madvise.c: Add more mappings
Check madvise versus more memory mappings. Suggested-by: Chris Wilson Signed-off-by: Antonio Argenziano --- tests/i915/gem_madvise.c | 115 ++- 1 file changed, 76 insertions(+), 39 deletions(-) diff --git a/tests/i915/gem_madvise.c b/tests/i915/gem_madvise.c index 729a4d33..bcaaa22e 100644 --- a/tests/i915/gem_madvise.c +++ b/tests/i915/gem_madvise.c @@ -47,66 +47,103 @@ IGT_TEST_DESCRIPTION("Checks that the kernel reports EFAULT when trying to use" * */ -static jmp_buf jmp; +static sigjmp_buf jmp; static void __attribute__((noreturn)) sigtrap(int sig) { - longjmp(jmp, sig); + siglongjmp(jmp, sig); } +enum mode { CPU, WC, GTT }; +const char* modes[] = {[CPU] = "cpu", [WC] = "wc", [GTT] = "gtt"}; + static void dontneed_before_mmap(void) { - int fd = drm_open_driver(DRIVER_INTEL); + int fd; uint32_t handle; char *ptr; - handle = gem_create(fd, OBJECT_SIZE); - gem_madvise(fd, handle, I915_MADV_DONTNEED); - ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); - close(fd); - - signal(SIGSEGV, sigtrap); - signal(SIGBUS, sigtrap); - switch (setjmp(jmp)) { - case SIGBUS: - break; - case 0: - *ptr = 0; - default: - igt_assert(!"reached"); - break; + for (unsigned mode = CPU; mode <= GTT; mode++) { + igt_debug("Mapping mode: %s\n", modes[mode]); + + fd = drm_open_driver(DRIVER_INTEL); + handle = gem_create(fd, OBJECT_SIZE); + gem_madvise(fd, handle, I915_MADV_DONTNEED); + + switch (mode) { + case GTT: + ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); + break; + case CPU: + ptr = gem_mmap__cpu(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); + break; + case WC: + ptr = gem_mmap__wc(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); + break; + } + + close(fd); + + signal(SIGSEGV, sigtrap); + signal(SIGBUS, sigtrap); + switch (sigsetjmp(jmp, SIGBUS | SIGSEGV)) { + case SIGBUS: + break; + case 0: + *ptr = 0; + default: + igt_assert(!"reached"); + break; + } + munmap(ptr, OBJECT_SIZE); + signal(SIGBUS, SIG_DFL); + signal(SIGSEGV, SIG_DFL); } - munmap(ptr, OBJECT_SIZE); - signal(SIGBUS, SIG_DFL); - signal(SIGSEGV, SIG_DFL); } static void dontneed_after_mmap(void) { - int fd = drm_open_driver(DRIVER_INTEL); + int fd; uint32_t handle; char *ptr; - handle = gem_create(fd, OBJECT_SIZE); - ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); - igt_assert(ptr); - gem_madvise(fd, handle, I915_MADV_DONTNEED); - close(fd); - - signal(SIGBUS, sigtrap); - switch (setjmp(jmp)) { - case SIGBUS: - break; - case 0: - *ptr = 0; - default: - igt_assert(!"reached"); - break; + for (unsigned mode = CPU; mode <= GTT; mode++) { + igt_debug("Mapping mode: %s\n", modes[mode]); + + fd = drm_open_driver(DRIVER_INTEL); + handle = gem_create(fd, OBJECT_SIZE); + + switch (mode) { + case GTT: + ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); + break; + case CPU: + ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE); + break; + case WC: + ptr = gem_mmap__wc(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE); + break; + } + + igt_assert(ptr); + gem_madvise(fd, handle, I915_MADV_DONTNEED); + close(fd); + + signal(SIGBUS, sigtrap); + switch (sigsetjmp(jmp, SIGBUS)) { + case SIGBUS: + break; + case 0: + *ptr = 0; + default: + igt_assert(!"reached"); + break; + } + munmap(ptr, OBJECT_SIZE); + signal(SIGBUS, SIG_DFL); } -
Re: [Intel-gfx] [PATCH v5] drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color
On Tue, Apr 02, 2019 at 11:22:22PM -0700, Aditya Swarup wrote: > From: Clinton Taylor > > v2: Fix commit msg to reflect why issue occurs(Jani) > Set GCP_COLOR_INDICATION only when we set 10/12 bit deep color. > > Changing settings from 10/12 bit deep color to 8 bit(& vice versa) > doesn't work correctly using xrandr max bpc property. When we > connect a monitor which supports deep color, the highest deep color > setting is selected; which sets GCP_COLOR_INDICATION. When we change > the setting to 8 bit color, we still set GCP_COLOR_INDICATION which > doesn't allow the switch back to 8 bit color. > > v3,4: Add comments & drop changes in intel_hdmi_compute_config(Ville) > Since HSW+, GCP_COLOR_INDICATION is not required for 8bpc. > > Drop the changes in intel_hdmi_compute_config as desired_bpp > is needed to change values for pipe_bpp based on bw_constrained flag. > > v5: Fix missing logical && in condition for setting GCP_COLOR_INDICATION. > > Signed-off-by: Clinton Taylor > Signed-off-by: Aditya Swarup > Cc: Ville Syrjälä > Cc: Jani Nikula > Cc: Manasi Navare > --- > I tested the patch and there is still a bug in setting 10 bit deep > color mode. I am unable to set 10 bit color from xrandr from 12 bit > deep color or 8 bit. Hmm. Does @@ -2161,7 +2161,7 @@ static bool hdmi_deep_color_possible(const struct intel_crtc_state *crtc_state, if (bpc == 10 && INTEL_GEN(dev_priv) < 11) return false; - if (crtc_state->pipe_bpp <= 8*3) + if (crtc_state->pipe_bpp < bpc*3) return false; if (!crtc_state->has_hdmi_sink) help? > drivers/gpu/drm/i915/intel_hdmi.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c > b/drivers/gpu/drm/i915/intel_hdmi.c > index 5ccb305a6e1c..d550653ad29f 100644 > --- a/drivers/gpu/drm/i915/intel_hdmi.c > +++ b/drivers/gpu/drm/i915/intel_hdmi.c > @@ -962,8 +962,12 @@ static void intel_hdmi_compute_gcp_infoframe(struct > intel_encoder *encoder, > crtc_state->infoframes.enable |= > intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GENERAL_CONTROL); > > - /* Indicate color depth whenever the sink supports deep color */ > - if (hdmi_sink_is_deep_color(conn_state)) > + /* Indicate color depth whenever the sink supports deep color > + * Also, 8bpc + color depth indication is no longer supported > + * for HSW+ platforms. > + * */ > + if (hdmi_sink_is_deep_color(conn_state) && > + crtc_state->pipe_bpp > 24) > crtc_state->infoframes.gcp |= GCP_COLOR_INDICATION; > > /* Enable default_phase whenever the display mode is suitably aligned */ > -- > 2.17.1 -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] drm/i915/psr: Update PSR2 SU corruption workaround comment (rev2)
== Series Details == Series: series starting with [1/7] drm/i915/psr: Update PSR2 SU corruption workaround comment (rev2) URL : https://patchwork.freedesktop.org/series/58974/ State : warning == Summary == $ dim checkpatch origin/drm-tip 73fa7ed439e6 drm/i915/psr: Update PSR2 SU corruption workaround comment 0ca6002ada07 drm/i915: Remove unused VLV/CHV PSR registers 5ce75180483f drm/i915/psr: Initialize PSR mutex even when sink is not reliable e47e5b39db34 drm/i915/psr: Do not enable PSR in interlaced mode for all GENs 9f93f7096863 drm/i915/bdw+: Move misc display IRQ handling to it own function 43add19f1fa5 drm/i915/psr: Remove partial PSR support on multiple transcoders a46b5a8681d1 drm/i915: Make PSR registers relative to transcoders -:93: WARNING:LONG_LINE: line over 100 characters #93: FILE: drivers/gpu/drm/i915/i915_reg.h:254: + INTEL_INFO(dev_priv)->trans_offsets[TRANSCODER_A] + (reg) + \ -:109: WARNING:LONG_LINE: line over 100 characters #109: FILE: drivers/gpu/drm/i915/i915_reg.h:4217: +#define _TRANS2_PSR(reg) (_TRANS2(dev_priv->psr.transcoder, (reg)) - dev_priv->psr.mmio_base_adjust) -:135: WARNING:LONG_LINE_COMMENT: line over 100 characters #135: FILE: drivers/gpu/drm/i915/i915_reg.h:4266: +#define EDP_PSR_AUX_DATA(i) _MMIO(_TRANS2_PSR(_SRD_AUX_DATA_A) + (i) + 4) /* 5 registers */ total: 0 errors, 3 warnings, 0 checks, 166 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/7] drm/i915/psr: Update PSR2 SU corruption workaround comment (rev2)
== Series Details == Series: series starting with [1/7] drm/i915/psr: Update PSR2 SU corruption workaround comment (rev2) URL : https://patchwork.freedesktop.org/series/58974/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915/psr: Update PSR2 SU corruption workaround comment Okay! Commit: drm/i915: Remove unused VLV/CHV PSR registers Okay! Commit: drm/i915/psr: Initialize PSR mutex even when sink is not reliable Okay! Commit: drm/i915/psr: Do not enable PSR in interlaced mode for all GENs Okay! Commit: drm/i915/bdw+: Move misc display IRQ handling to it own function Okay! Commit: drm/i915/psr: Remove partial PSR support on multiple transcoders Okay! Commit: drm/i915: Make PSR registers relative to transcoders -drivers/gpu/drm/i915/selftests/../i915_drv.h:3623:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3624:16: warning: expression using sizeof(void) ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v5] drm/i915/icl: Set GCP_COLOR_INDICATION only for 10/12 bit deep color
On Tue, Apr 02, 2019 at 11:22:22PM -0700, Aditya Swarup wrote: > From: Clinton Taylor > > v2: Fix commit msg to reflect why issue occurs(Jani) > Set GCP_COLOR_INDICATION only when we set 10/12 bit deep color. > > Changing settings from 10/12 bit deep color to 8 bit(& vice versa) > doesn't work correctly using xrandr max bpc property. When we > connect a monitor which supports deep color, the highest deep color > setting is selected; which sets GCP_COLOR_INDICATION. When we change > the setting to 8 bit color, we still set GCP_COLOR_INDICATION which > doesn't allow the switch back to 8 bit color. > > v3,4: Add comments & drop changes in intel_hdmi_compute_config(Ville) > Since HSW+, GCP_COLOR_INDICATION is not required for 8bpc. > > Drop the changes in intel_hdmi_compute_config as desired_bpp > is needed to change values for pipe_bpp based on bw_constrained flag. > > v5: Fix missing logical && in condition for setting GCP_COLOR_INDICATION. > > Signed-off-by: Clinton Taylor > Signed-off-by: Aditya Swarup > Cc: Ville Syrjälä > Cc: Jani Nikula > Cc: Manasi Navare > --- > I tested the patch and there is still a bug in setting 10 bit deep > color mode. I am unable to set 10 bit color from xrandr from 12 bit > deep color or 8 bit. > drivers/gpu/drm/i915/intel_hdmi.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c > b/drivers/gpu/drm/i915/intel_hdmi.c > index 5ccb305a6e1c..d550653ad29f 100644 > --- a/drivers/gpu/drm/i915/intel_hdmi.c > +++ b/drivers/gpu/drm/i915/intel_hdmi.c > @@ -962,8 +962,12 @@ static void intel_hdmi_compute_gcp_infoframe(struct > intel_encoder *encoder, > crtc_state->infoframes.enable |= > intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GENERAL_CONTROL); > > - /* Indicate color depth whenever the sink supports deep color */ > - if (hdmi_sink_is_deep_color(conn_state)) > + /* Indicate color depth whenever the sink supports deep color > + * Also, 8bpc + color depth indication is no longer supported > + * for HSW+ platforms. > + * */ Comment formatting is off. It should be /* * blah */ > + if (hdmi_sink_is_deep_color(conn_state) && > + crtc_state->pipe_bpp > 24) I think this would fit on one line? With those adjusted this is Reviewed-by: Ville Syrjälä > crtc_state->infoframes.gcp |= GCP_COLOR_INDICATION; > > /* Enable default_phase whenever the display mode is suitably aligned */ > -- > 2.17.1 -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/7] drm/i915/psr: Update PSR2 SU corruption workaround comment (rev2)
== Series Details == Series: series starting with [1/7] drm/i915/psr: Update PSR2 SU corruption workaround comment (rev2) URL : https://patchwork.freedesktop.org/series/58974/ State : success == Summary == CI Bug Log - changes from CI_DRM_5875 -> Patchwork_12686 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58974/revisions/2/mbox/ Known issues Here are the changes found in Patchwork_12686 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_basic@basic-bsd2: - fi-kbl-7500u: NOTRUN -> SKIP [fdo#109271] +9 * igt@gem_exec_basic@gtt-bsd2: - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +57 * igt@i915_selftest@live_contexts: - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] * igt@i915_selftest@live_uncore: - fi-ivb-3770:PASS -> DMESG-FAIL [fdo#110210] * igt@kms_busy@basic-flip-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@dp-crc-fast: - fi-kbl-7500u: NOTRUN -> DMESG-WARN [fdo#103841] * igt@kms_pipe_crc_basic@hang-read-crc-pipe-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +20 * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: - fi-blb-e6850: NOTRUN -> INCOMPLETE [fdo#107718] * igt@runner@aborted: - fi-kbl-7500u: NOTRUN -> FAIL [fdo#103841] Possible fixes * igt@gem_exec_suspend@basic-s3: - fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS * igt@i915_selftest@live_hangcheck: - fi-skl-iommu: INCOMPLETE [fdo#108602] / [fdo#108744] -> PASS * igt@kms_flip@basic-flip-vs-wf_vblank: - fi-bsw-n3050: FAIL [fdo#100368] -> PASS {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368 [fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602 [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (48 -> 42) -- Additional (2): fi-byt-clapper fi-kbl-7500u Missing(8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-whl-u fi-icl-y Build changes - * Linux: CI_DRM_5875 -> Patchwork_12686 CI_DRM_5875: 5cc7c47c44aaef5bfe07e7307d06caa98e401fad @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4928: 014a6fa238322b497116b359cb92df1ce7fa8847 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12686: a46b5a8681d15f9c7888adf75ea6f574446690f0 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == a46b5a8681d1 drm/i915: Make PSR registers relative to transcoders 43add19f1fa5 drm/i915/psr: Remove partial PSR support on multiple transcoders 9f93f7096863 drm/i915/bdw+: Move misc display IRQ handling to it own function e47e5b39db34 drm/i915/psr: Do not enable PSR in interlaced mode for all GENs 5ce75180483f drm/i915/psr: Initialize PSR mutex even when sink is not reliable 0ca6002ada07 drm/i915: Remove unused VLV/CHV PSR registers 73fa7ed439e6 drm/i915/psr: Update PSR2 SU corruption workaround comment == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12686/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for tests/i915/gem_madvise.c: Add more mappings
== Series Details == Series: tests/i915/gem_madvise.c: Add more mappings URL : https://patchwork.freedesktop.org/series/59021/ State : success == Summary == CI Bug Log - changes from CI_DRM_5875 -> IGTPW_2790 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/59021/revisions/1/mbox/ Known issues Here are the changes found in IGTPW_2790 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_basic@basic-bsd2: - fi-kbl-7500u: NOTRUN -> SKIP [fdo#109271] +9 * igt@gem_exec_basic@gtt-bsd2: - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +57 * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@i915_selftest@live_uncore: - fi-ivb-3770:PASS -> DMESG-FAIL [fdo#110210] * igt@kms_busy@basic-flip-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@dp-crc-fast: - fi-kbl-7500u: NOTRUN -> DMESG-WARN [fdo#103841] * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a: - fi-byt-clapper: NOTRUN -> FAIL [fdo#103191] / [fdo#107362] * igt@kms_pipe_crc_basic@hang-read-crc-pipe-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +48 * igt@runner@aborted: - fi-kbl-7500u: NOTRUN -> FAIL [fdo#103841] - fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720] Possible fixes * igt@gem_exec_suspend@basic-s3: - fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS * igt@i915_selftest@live_hangcheck: - fi-skl-iommu: INCOMPLETE [fdo#108602] / [fdo#108744] -> PASS * igt@kms_flip@basic-flip-vs-wf_vblank: - fi-bsw-n3050: FAIL [fdo#100368] -> PASS [fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602 [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622 [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 Participating hosts (48 -> 42) -- Additional (2): fi-byt-clapper fi-kbl-7500u Missing(8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-u2 fi-bwr-2160 fi-bsw-cyan fi-skl-6700k2 Build changes - * IGT: IGT_4928 -> IGTPW_2790 CI_DRM_5875: 5cc7c47c44aaef5bfe07e7307d06caa98e401fad @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_2790: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2790/ IGT_4928: 014a6fa238322b497116b359cb92df1ce7fa8847 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2790/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 00/25] drm/i915: the great header refactoring, part one
intel_drv.h has grown out of proportions, and turned into a dumping ground. Way back when it was useful to have only a handful of headers, but we're long past that. Start splitting off per-module headers. The basic principles: * Make the new headers self-contained (i.e. can be compiled without including other headers first), and test this using the new infra for that. * Use minimal includes for making the headers self-contained. Use forward declarations for structs where applicable, and e.g. include instead of . * Only split off the headers, and mostly refrain from doing other refactoring while at it. (There are a few minor things.) * Mostly only split off function declarations. Splitting off types is left for follow-up work. * Include the new headers only where needed. This leads to a lot of includes here and there, but on the other hand increases the clarity of the relationships between the modules. (And already raises a bunch of questions about the split and cross-calls between some modules. It'll be easier to analyze this.) * Wherever adding new includes, group the includes by first, then , then "...", and sort the groups alphabetically. * Choice of what to extract first here is purely arbitrary. * Follow-up work should consider renaming functions according to the module, i.e. functions in intel_foo.c should be prefixed intel_foo_. Better naming will be helpful in further organizing the driver, as well as grasping the structure to begin with. BR, Jani. Jani Nikula (25): drm/i915: make intel_frontbuffer.h self-contained drm/i915: extract intel_audio.h from intel_drv.h drm/i915: extract intel_crt.h from intel_drv.h drm/i915: extract intel_ddi.h from intel_drv.h drm/i915: extract intel_connector.h from intel_drv.h drm/i915: extract intel_csr.h from intel_drv.h drm/i915: extract intel_fbc.h from intel_drv.h drm/i915: extract intel_psr.h from intel_drv.h drm/i915: extract intel_color.h from intel_drv.h drm/i915: extract intel_lspcon.h from intel_drv.h drm/i915: extract intel_sdvo.h from intel_drv.h drm/i915: extract intel_hdcp.h from intel_drv.h drm/i915: extract intel_panel.h from intel_drv.h drm/i915: extract intel_pm.h from intel_drv.h drm/i915: extract intel_fbdev.h from intel_drv.h drm/i915: extract intel_dp.h from intel_drv.h drm/i915: extract intel_hdmi.h from intel_drv.h drm/i915: extract intel_atomic_plane.h from intel_drv.h drm/i915: extract intel_pipe_crc.h from intel_drv.h drm/i915: extract intel_tv.h from intel_drv.h drm/i915: extract intel_lvds.h from intel_drv.h drm/i915: extract intel_dvo.h from intel_drv.h drm/i915: extract intel_sprite.h from intel_drv.h drm/i915: extract intel_cdclk.h from intel_drv.h drm/i915/cdclk: have only one init/uninit function drivers/gpu/drm/i915/Makefile.header-test | 24 + drivers/gpu/drm/i915/i915_debugfs.c | 13 +- drivers/gpu/drm/i915/i915_drv.c | 11 +- drivers/gpu/drm/i915/i915_drv.h | 11 +- drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_irq.c | 11 +- drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/i915_request.c | 3 +- drivers/gpu/drm/i915/i915_reset.h | 1 + drivers/gpu/drm/i915/i915_suspend.c | 5 +- drivers/gpu/drm/i915/icl_dsi.c| 6 +- drivers/gpu/drm/i915/intel_atomic.c | 2 + drivers/gpu/drm/i915/intel_atomic_plane.c | 36 +- drivers/gpu/drm/i915/intel_atomic_plane.h | 40 ++ drivers/gpu/drm/i915/intel_audio.c| 12 +- drivers/gpu/drm/i915/intel_audio.h| 24 + drivers/gpu/drm/i915/intel_cdclk.c| 121 ++-- drivers/gpu/drm/i915/intel_cdclk.h| 46 ++ drivers/gpu/drm/i915/intel_color.h| 17 + drivers/gpu/drm/i915/intel_connector.c| 8 +- drivers/gpu/drm/i915/intel_connector.h| 35 ++ drivers/gpu/drm/i915/intel_crt.c | 7 +- drivers/gpu/drm/i915/intel_crt.h | 21 + drivers/gpu/drm/i915/intel_csr.h | 17 + drivers/gpu/drm/i915/intel_ddi.c | 9 + drivers/gpu/drm/i915/intel_ddi.h | 53 ++ drivers/gpu/drm/i915/intel_display.c | 28 +- drivers/gpu/drm/i915/intel_dp.c | 20 +- drivers/gpu/drm/i915/intel_dp.h | 121 drivers/gpu/drm/i915/intel_dp_link_training.c | 1 + drivers/gpu/drm/i915/intel_dp_mst.c | 9 +- drivers/gpu/drm/i915/intel_dpio_phy.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 580 +- drivers/gpu/drm/i915/intel_dvo.c | 9 +- drivers/gpu/drm/i915/intel_dvo.h | 13 + drivers/gpu/drm/i915/intel_fbc.c | 3 +- drivers/gpu/drm/i915/intel_fbc.h | 42 ++ drivers/gpu/drm/i915/intel_fbdev.c| 17 +- drivers/gpu/drm/i915/intel_fbdev.h| 53
[Intel-gfx] [PATCH 01/25] drm/i915: make intel_frontbuffer.h self-contained
This will be helpful in the follow-up work. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.h | 11 ++- drivers/gpu/drm/i915/intel_frontbuffer.h | 10 ++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index f7809b5c21ad..243a64fb4cc7 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -10,6 +10,7 @@ header_test := \ i915_timeline_types.h \ intel_context_types.h \ intel_engine_types.h \ + intel_frontbuffer.h \ intel_workarounds_types.h quiet_cmd_header_test = HDRTEST $@ diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 4af815c3c02d..35fe464e5ed3 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -66,13 +66,14 @@ #include "intel_device_info.h" #include "intel_display.h" #include "intel_dpll_mgr.h" +#include "intel_frontbuffer.h" #include "intel_lrc.h" #include "intel_opregion.h" #include "intel_ringbuffer.h" +#include "intel_uc.h" #include "intel_uncore.h" #include "intel_wopcm.h" #include "intel_workarounds.h" -#include "intel_uc.h" #include "i915_gem.h" #include "i915_gem_context.h" @@ -375,14 +376,6 @@ enum i915_cache_level { #define I915_COLOR_UNEVICTABLE (-1) /* a non-vma sharing the address space */ -enum fb_op_origin { - ORIGIN_GTT, - ORIGIN_CPU, - ORIGIN_CS, - ORIGIN_FLIP, - ORIGIN_DIRTYFB, -}; - struct intel_fbc { /* This is always the inner lock when overlapping with struct_mutex and * it's the outer lock when overlapping with stolen_lock. */ diff --git a/drivers/gpu/drm/i915/intel_frontbuffer.h b/drivers/gpu/drm/i915/intel_frontbuffer.h index 63cd9a753a72..d5894666f658 100644 --- a/drivers/gpu/drm/i915/intel_frontbuffer.h +++ b/drivers/gpu/drm/i915/intel_frontbuffer.h @@ -24,9 +24,19 @@ #ifndef __INTEL_FRONTBUFFER_H__ #define __INTEL_FRONTBUFFER_H__ +#include "i915_gem_object.h" + struct drm_i915_private; struct drm_i915_gem_object; +enum fb_op_origin { + ORIGIN_GTT, + ORIGIN_CPU, + ORIGIN_CS, + ORIGIN_FLIP, + ORIGIN_DIRTYFB, +}; + void intel_frontbuffer_flip_prepare(struct drm_i915_private *dev_priv, unsigned frontbuffer_bits); void intel_frontbuffer_flip_complete(struct drm_i915_private *dev_priv, -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 02/25] drm/i915: extract intel_audio.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.c | 5 +++-- drivers/gpu/drm/i915/intel_audio.c| 12 +++- drivers/gpu/drm/i915/intel_audio.h| 24 +++ drivers/gpu/drm/i915/intel_ddi.c | 2 ++ drivers/gpu/drm/i915/intel_dp.c | 11 +++ drivers/gpu/drm/i915/intel_dp_mst.c | 6 -- drivers/gpu/drm/i915/intel_drv.h | 13 drivers/gpu/drm/i915/intel_hdmi.c | 9 ++--- 9 files changed, 54 insertions(+), 29 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_audio.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 243a64fb4cc7..09bba7c9376c 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -8,6 +8,7 @@ header_test := \ i915_priolist_types.h \ i915_scheduler_types.h \ i915_timeline_types.h \ + intel_audio.h \ intel_context_types.h \ intel_engine_types.h \ intel_frontbuffer.h \ diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 0bbf3f5db5fc..80166e3ee68e 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -48,11 +48,12 @@ #include #include "i915_drv.h" -#include "i915_trace.h" #include "i915_pmu.h" -#include "i915_reset.h" #include "i915_query.h" +#include "i915_reset.h" +#include "i915_trace.h" #include "i915_vgpu.h" +#include "intel_audio.h" #include "intel_drv.h" #include "intel_uc.h" #include "intel_workarounds.h" diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c index 20324b0d34c7..bca4cc025d3d 100644 --- a/drivers/gpu/drm/i915/intel_audio.c +++ b/drivers/gpu/drm/i915/intel_audio.c @@ -21,14 +21,16 @@ * DEALINGS IN THE SOFTWARE. */ -#include #include +#include + +#include #include #include -#include "intel_drv.h" -#include #include "i915_drv.h" +#include "intel_audio.h" +#include "intel_drv.h" /** * DOC: High Definition Audio over HDMI and Display Port @@ -1045,7 +1047,7 @@ static const struct component_ops i915_audio_component_bind_ops = { * We ignore any error during registration and continue with reduced * functionality (i.e. without HDMI audio). */ -void i915_audio_component_init(struct drm_i915_private *dev_priv) +static void i915_audio_component_init(struct drm_i915_private *dev_priv) { int ret; @@ -1068,7 +1070,7 @@ void i915_audio_component_init(struct drm_i915_private *dev_priv) * Deregisters the audio component, breaking any existing binding to the * corresponding snd_hda_intel driver's master component. */ -void i915_audio_component_cleanup(struct drm_i915_private *dev_priv) +static void i915_audio_component_cleanup(struct drm_i915_private *dev_priv) { if (!dev_priv->audio_component_registered) return; diff --git a/drivers/gpu/drm/i915/intel_audio.h b/drivers/gpu/drm/i915/intel_audio.h new file mode 100644 index ..a3657c7a7ba2 --- /dev/null +++ b/drivers/gpu/drm/i915/intel_audio.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_AUDIO_H__ +#define __INTEL_AUDIO_H__ + +struct drm_connector_state; +struct drm_i915_private; +struct intel_crtc_state; +struct intel_encoder; + +void intel_init_audio_hooks(struct drm_i915_private *dev_priv); +void intel_audio_codec_enable(struct intel_encoder *encoder, + const struct intel_crtc_state *crtc_state, + const struct drm_connector_state *conn_state); +void intel_audio_codec_disable(struct intel_encoder *encoder, + const struct intel_crtc_state *old_crtc_state, + const struct drm_connector_state *old_conn_state); +void intel_audio_init(struct drm_i915_private *dev_priv); +void intel_audio_deinit(struct drm_i915_private *dev_priv); + +#endif /* __INTEL_AUDIO_H__ */ diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 3f1e491bd0c0..46a6adea815a 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -26,7 +26,9 @@ */ #include + #include "i915_drv.h" +#include "intel_audio.h" #include "intel_drv.h" #include "intel_dsi.h" diff --git a/drivers/gpu/drm/i915/intel_dp.c b/d
[Intel-gfx] [PATCH 03/25] drm/i915: extract intel_crt.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_crt.c | 5 - drivers/gpu/drm/i915/intel_crt.h | 21 + drivers/gpu/drm/i915/intel_display.c | 11 ++- drivers/gpu/drm/i915/intel_drv.h | 6 -- drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + 6 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_crt.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 09bba7c9376c..fd0f33ea896d 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -10,6 +10,7 @@ header_test := \ i915_timeline_types.h \ intel_audio.h \ intel_context_types.h \ + intel_crt.h \ intel_engine_types.h \ intel_frontbuffer.h \ intel_workarounds_types.h diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index 50530e49982c..a14afbe51b08 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -27,13 +27,16 @@ #include #include #include + #include #include #include #include -#include "intel_drv.h" #include + #include "i915_drv.h" +#include "intel_crt.h" +#include "intel_drv.h" /* Here's the desired hotplug mode */ #define ADPA_HOTPLUG_BITS (ADPA_CRT_HOTPLUG_PERIOD_128 | \ diff --git a/drivers/gpu/drm/i915/intel_crt.h b/drivers/gpu/drm/i915/intel_crt.h new file mode 100644 index ..1b3fba359efc --- /dev/null +++ b/drivers/gpu/drm/i915/intel_crt.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_CRT_H__ +#define __INTEL_CRT_H__ + +#include "i915_reg.h" + +enum pipe; +struct drm_encoder; +struct drm_i915_private; +struct drm_i915_private; + +bool intel_crt_port_enabled(struct drm_i915_private *dev_priv, + i915_reg_t adpa_reg, enum pipe *pipe); +void intel_crt_init(struct drm_i915_private *dev_priv); +void intel_crt_reset(struct drm_encoder *encoder); + +#endif /* __INTEL_CRT_H__ */ diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7ecfb7d98839..5cf82dbead65 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -46,20 +46,13 @@ #include "i915_drv.h" #include "i915_gem_clflush.h" +#include "i915_reset.h" #include "i915_trace.h" +#include "intel_crt.h" #include "intel_drv.h" #include "intel_dsi.h" #include "intel_frontbuffer.h" -#include "intel_drv.h" -#include "intel_dsi.h" -#include "intel_frontbuffer.h" - -#include "i915_drv.h" -#include "i915_gem_clflush.h" -#include "i915_reset.h" -#include "i915_trace.h" - /* Primary plane formats for gen <= 3 */ static const u32 i8xx_primary_formats[] = { DRM_FORMAT_C8, diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 5dc434d74ada..847da5b24548 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1627,12 +1627,6 @@ void gen9_reset_guc_interrupts(struct drm_i915_private *dev_priv); void gen9_enable_guc_interrupts(struct drm_i915_private *dev_priv); void gen9_disable_guc_interrupts(struct drm_i915_private *dev_priv); -/* intel_crt.c */ -bool intel_crt_port_enabled(struct drm_i915_private *dev_priv, - i915_reg_t adpa_reg, enum pipe *pipe); -void intel_crt_init(struct drm_i915_private *dev_priv); -void intel_crt_reset(struct drm_encoder *encoder); - /* intel_ddi.c */ void intel_ddi_fdi_post_disable(struct intel_encoder *intel_encoder, const struct intel_crtc_state *old_crtc_state, diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c index 40ddfbb97acb..a9931081462b 100644 --- a/drivers/gpu/drm/i915/intel_runtime_pm.c +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c @@ -32,6 +32,7 @@ #include #include "i915_drv.h" +#include "intel_crt.h" #include "intel_drv.h" /** -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 05/25] drm/i915: extract intel_connector.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/icl_dsi.c| 1 + drivers/gpu/drm/i915/intel_connector.h| 35 +++ drivers/gpu/drm/i915/intel_crt.c | 1 + drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_dp_mst.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 19 drivers/gpu/drm/i915/intel_dvo.c | 8 -- drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_lvds.c | 7 +++-- drivers/gpu/drm/i915/intel_panel.c| 2 ++ drivers/gpu/drm/i915/intel_sdvo.c | 10 +-- drivers/gpu/drm/i915/intel_tv.c | 4 ++- drivers/gpu/drm/i915/vlv_dsi.c| 9 -- 15 files changed, 71 insertions(+), 30 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_connector.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index d9a6089f0de5..c0095a4ed26f 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -9,6 +9,7 @@ header_test := \ i915_scheduler_types.h \ i915_timeline_types.h \ intel_audio.h \ + intel_connector.h \ intel_context_types.h \ intel_crt.h \ intel_ddi.h \ diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c index 64beb141c1ec..08e471898c86 100644 --- a/drivers/gpu/drm/i915/icl_dsi.c +++ b/drivers/gpu/drm/i915/icl_dsi.c @@ -28,6 +28,7 @@ #include #include +#include "intel_connector.h" #include "intel_ddi.h" #include "intel_dsi.h" diff --git a/drivers/gpu/drm/i915/intel_connector.h b/drivers/gpu/drm/i915/intel_connector.h new file mode 100644 index ..93a7375c8196 --- /dev/null +++ b/drivers/gpu/drm/i915/intel_connector.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_CONNECTOR_H__ +#define __INTEL_CONNECTOR_H__ + +#include "intel_display.h" + +struct drm_connector; +struct edid; +struct i2c_adapter; +struct intel_connector; +struct intel_encoder; + +int intel_connector_init(struct intel_connector *connector); +struct intel_connector *intel_connector_alloc(void); +void intel_connector_free(struct intel_connector *connector); +void intel_connector_destroy(struct drm_connector *connector); +int intel_connector_register(struct drm_connector *connector); +void intel_connector_unregister(struct drm_connector *connector); +void intel_connector_attach_encoder(struct intel_connector *connector, + struct intel_encoder *encoder); +bool intel_connector_get_hw_state(struct intel_connector *connector); +enum pipe intel_connector_get_pipe(struct intel_connector *connector); +int intel_connector_update_modes(struct drm_connector *connector, +struct edid *edid); +int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter); +void intel_attach_force_audio_property(struct drm_connector *connector); +void intel_attach_broadcast_rgb_property(struct drm_connector *connector); +void intel_attach_aspect_ratio_property(struct drm_connector *connector); +void intel_attach_colorspace_property(struct drm_connector *connector); + +#endif /* __INTEL_CONNECTOR_H__ */ diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index d649dae3cc70..b665c370111b 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -35,6 +35,7 @@ #include #include "i915_drv.h" +#include "intel_connector.h" #include "intel_crt.h" #include "intel_ddi.h" #include "intel_drv.h" diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 46a6adea815a..011a6fb621ad 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -29,6 +29,7 @@ #include "i915_drv.h" #include "intel_audio.h" +#include "intel_connector.h" #include "intel_drv.h" #include "intel_dsi.h" diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index ca3ed4ae253c..466e5a6b9513 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -43,6 +43,7 @@ #include "i915_drv.h" #include "intel_audio.h" +#include "intel_connector.h" #include "intel_ddi.h" #include "intel_drv.h" diff --git a/drivers/gpu/drm
[Intel-gfx] [PATCH 06/25] drm/i915: extract intel_csr.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/intel_csr.h | 17 + drivers/gpu/drm/i915/intel_drv.h | 7 --- drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + 5 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_csr.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index c0095a4ed26f..e03285ccad24 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -12,6 +12,7 @@ header_test := \ intel_connector.h \ intel_context_types.h \ intel_crt.h \ + intel_csr.h \ intel_ddi.h \ intel_engine_types.h \ intel_frontbuffer.h \ diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 80166e3ee68e..6d9711a767b4 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -54,6 +54,7 @@ #include "i915_trace.h" #include "i915_vgpu.h" #include "intel_audio.h" +#include "intel_csr.h" #include "intel_drv.h" #include "intel_uc.h" #include "intel_workarounds.h" diff --git a/drivers/gpu/drm/i915/intel_csr.h b/drivers/gpu/drm/i915/intel_csr.h new file mode 100644 index ..ade260fc484c --- /dev/null +++ b/drivers/gpu/drm/i915/intel_csr.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_CSR_H__ +#define __INTEL_CSR_H__ + +struct drm_i915_private; + +void intel_csr_ucode_init(struct drm_i915_private *); +void intel_csr_load_program(struct drm_i915_private *); +void intel_csr_ucode_fini(struct drm_i915_private *); +void intel_csr_ucode_suspend(struct drm_i915_private *); +void intel_csr_ucode_resume(struct drm_i915_private *); + +#endif /* __INTEL_CSR_H__ */ diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 2b2aa634fd4b..9404dfcbfd3a 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1846,13 +1846,6 @@ unsigned int i9xx_plane_max_stride(struct intel_plane *plane, u32 pixel_format, u64 modifier, unsigned int rotation); -/* intel_csr.c */ -void intel_csr_ucode_init(struct drm_i915_private *); -void intel_csr_load_program(struct drm_i915_private *); -void intel_csr_ucode_fini(struct drm_i915_private *); -void intel_csr_ucode_suspend(struct drm_i915_private *); -void intel_csr_ucode_resume(struct drm_i915_private *); - /* intel_dp.c */ struct link_config_limits { int min_clock, max_clock; diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c index a9931081462b..b72af95b893b 100644 --- a/drivers/gpu/drm/i915/intel_runtime_pm.c +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c @@ -33,6 +33,7 @@ #include "i915_drv.h" #include "intel_crt.h" +#include "intel_csr.h" #include "intel_drv.h" /** -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 04/25] drm/i915: extract intel_ddi.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/icl_dsi.c| 4 +- drivers/gpu/drm/i915/intel_crt.c | 1 + drivers/gpu/drm/i915/intel_ddi.h | 53 +++ drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_dp_mst.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 38 +--- drivers/gpu/drm/i915/intel_hdmi.c | 1 + 9 files changed, 64 insertions(+), 37 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_ddi.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index fd0f33ea896d..d9a6089f0de5 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -11,6 +11,7 @@ header_test := \ intel_audio.h \ intel_context_types.h \ intel_crt.h \ + intel_ddi.h \ intel_engine_types.h \ intel_frontbuffer.h \ intel_workarounds_types.h diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c index b67ffaa283dc..64beb141c1ec 100644 --- a/drivers/gpu/drm/i915/icl_dsi.c +++ b/drivers/gpu/drm/i915/icl_dsi.c @@ -25,8 +25,10 @@ * Jani Nikula */ -#include #include +#include + +#include "intel_ddi.h" #include "intel_dsi.h" static inline int header_credits_available(struct drm_i915_private *dev_priv, diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index a14afbe51b08..d649dae3cc70 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -36,6 +36,7 @@ #include "i915_drv.h" #include "intel_crt.h" +#include "intel_ddi.h" #include "intel_drv.h" /* Here's the desired hotplug mode */ diff --git a/drivers/gpu/drm/i915/intel_ddi.h b/drivers/gpu/drm/i915/intel_ddi.h new file mode 100644 index ..9cf69175942e --- /dev/null +++ b/drivers/gpu/drm/i915/intel_ddi.h @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_DDI_H__ +#define __INTEL_DDI_H__ + +#include + +#include "intel_display.h" + +struct drm_connector_state; +struct drm_i915_private; +struct intel_connector; +struct intel_crtc; +struct intel_crtc_state; +struct intel_dp; +struct intel_dpll_hw_state; +struct intel_encoder; + +void intel_ddi_fdi_post_disable(struct intel_encoder *intel_encoder, + const struct intel_crtc_state *old_crtc_state, + const struct drm_connector_state *old_conn_state); +void hsw_fdi_link_train(struct intel_crtc *crtc, + const struct intel_crtc_state *crtc_state); +void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port); +bool intel_ddi_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe); +void intel_ddi_enable_transcoder_func(const struct intel_crtc_state *crtc_state); +void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state); +void intel_ddi_enable_pipe_clock(const struct intel_crtc_state *crtc_state); +void intel_ddi_disable_pipe_clock(const struct intel_crtc_state *crtc_state); +void intel_ddi_set_pipe_settings(const struct intel_crtc_state *crtc_state); +void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp); +bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector); +void intel_ddi_get_config(struct intel_encoder *encoder, + struct intel_crtc_state *pipe_config); +void intel_ddi_set_vc_payload_alloc(const struct intel_crtc_state *crtc_state, + bool state); +void intel_ddi_compute_min_voltage_level(struct drm_i915_private *dev_priv, +struct intel_crtc_state *crtc_state); +u32 bxt_signal_levels(struct intel_dp *intel_dp); +u32 ddi_signal_levels(struct intel_dp *intel_dp); +u8 intel_ddi_dp_voltage_max(struct intel_encoder *encoder); +u8 intel_ddi_dp_pre_emphasis_max(struct intel_encoder *encoder, +u8 voltage_swing); +int intel_ddi_toggle_hdcp_signalling(struct intel_encoder *intel_encoder, +bool enable); +void icl_sanitize_encoder_pll_mapping(struct intel_encoder *encoder); +int cnl_calc_wrpll_link(struct drm_i915_private *dev_priv, + struct intel_dpll_hw_state *state); + +#endif /* __IN
[Intel-gfx] [PATCH 18/25] drm/i915: extract intel_atomic_plane.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_atomic_plane.c | 34 +-- drivers/gpu/drm/i915/intel_atomic_plane.h | 40 +++ drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 24 -- drivers/gpu/drm/i915/intel_sprite.c | 1 + 6 files changed, 60 insertions(+), 41 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_atomic_plane.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index e78eeaa8ec33..43c939da9665 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -8,6 +8,7 @@ header_test := \ i915_priolist_types.h \ i915_scheduler_types.h \ i915_timeline_types.h \ + intel_atomic_plane.h \ intel_audio.h \ intel_color.h \ intel_connector.h \ diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c index 42821f8e6031..381234ce1bc4 100644 --- a/drivers/gpu/drm/i915/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c @@ -59,6 +59,23 @@ struct intel_plane *intel_plane_alloc(void) return plane; } +/** + * intel_plane_destroy_state - destroy plane state + * @plane: drm plane + * @state: state object to destroy + * + * Destroys the plane state (both common and Intel-specific) for the + * specified plane. + */ +void +intel_plane_destroy_state(struct drm_plane *plane, + struct drm_plane_state *state) +{ + WARN_ON(to_intel_plane_state(state)->vma); + + drm_atomic_helper_plane_destroy_state(plane, state); +} + void intel_plane_free(struct intel_plane *plane) { intel_plane_destroy_state(&plane->base, plane->base.state); @@ -95,23 +112,6 @@ intel_plane_duplicate_state(struct drm_plane *plane) return state; } -/** - * intel_plane_destroy_state - destroy plane state - * @plane: drm plane - * @state: state object to destroy - * - * Destroys the plane state (both common and Intel-specific) for the - * specified plane. - */ -void -intel_plane_destroy_state(struct drm_plane *plane, - struct drm_plane_state *state) -{ - WARN_ON(to_intel_plane_state(state)->vma); - - drm_atomic_helper_plane_destroy_state(plane, state); -} - int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state, struct intel_crtc_state *new_crtc_state, const struct intel_plane_state *old_plane_state, diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.h b/drivers/gpu/drm/i915/intel_atomic_plane.h new file mode 100644 index ..14678620440f --- /dev/null +++ b/drivers/gpu/drm/i915/intel_atomic_plane.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_ATOMIC_PLANE_H__ +#define __INTEL_ATOMIC_PLANE_H__ + +struct drm_plane; +struct intel_atomic_state; +struct intel_crtc; +struct intel_crtc_state; +struct intel_plane; +struct intel_plane_state; + +extern const struct drm_plane_helper_funcs intel_plane_helper_funcs; + +void intel_update_plane(struct intel_plane *plane, + const struct intel_crtc_state *crtc_state, + const struct intel_plane_state *plane_state); +void intel_update_slave(struct intel_plane *plane, + const struct intel_crtc_state *crtc_state, + const struct intel_plane_state *plane_state); +void intel_disable_plane(struct intel_plane *plane, +const struct intel_crtc_state *crtc_state); +struct intel_plane *intel_plane_alloc(void); +void intel_plane_free(struct intel_plane *plane); +struct drm_plane_state *intel_plane_duplicate_state(struct drm_plane *plane); +void intel_plane_destroy_state(struct drm_plane *plane, + struct drm_plane_state *state); +void skl_update_planes_on_crtc(struct intel_atomic_state *state, + struct intel_crtc *crtc); +void i9xx_update_planes_on_crtc(struct intel_atomic_state *state, + struct intel_crtc *crtc); +int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state, + struct intel_crtc_state *crtc_state, +
[Intel-gfx] [PATCH 21/25] drm/i915: extract intel_lvds.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 7 --- drivers/gpu/drm/i915/intel_lvds.h | 22 ++ 5 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_lvds.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 595d9b34d866..486ad9679d7f 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -24,6 +24,7 @@ header_test := \ intel_hdcp.h \ intel_hdmi.h \ intel_lspcon.h \ + intel_lvds.h \ intel_panel.h \ intel_pipe_crc.h \ intel_pm.h \ diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 5f4771d0f489..806fe9db2de8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -60,6 +60,7 @@ #include "intel_frontbuffer.h" #include "intel_hdcp.h" #include "intel_hdmi.h" +#include "intel_lvds.h" #include "intel_pipe_crc.h" #include "intel_pm.h" #include "intel_psr.h" diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index a5eeb1b89376..c4e36759a756 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -50,6 +50,7 @@ #include "intel_hdcp.h" #include "intel_hdmi.h" #include "intel_lspcon.h" +#include "intel_lvds.h" #include "intel_panel.h" #include "intel_psr.h" diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index fab363d9af2e..75035d663491 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1880,13 +1880,6 @@ void intel_hpd_poll_init(struct drm_i915_private *dev_priv); bool intel_encoder_hotplug(struct intel_encoder *encoder, struct intel_connector *connector); -/* intel_lvds.c */ -bool intel_lvds_port_enabled(struct drm_i915_private *dev_priv, -i915_reg_t lvds_reg, enum pipe *pipe); -void intel_lvds_init(struct drm_i915_private *dev_priv); -struct intel_encoder *intel_get_lvds_encoder(struct drm_i915_private *dev_priv); -bool intel_is_dual_link_lvds(struct drm_i915_private *dev_priv); - /* intel_overlay.c */ void intel_overlay_setup(struct drm_i915_private *dev_priv); void intel_overlay_cleanup(struct drm_i915_private *dev_priv); diff --git a/drivers/gpu/drm/i915/intel_lvds.h b/drivers/gpu/drm/i915/intel_lvds.h new file mode 100644 index ..bc9c8b84ba2f --- /dev/null +++ b/drivers/gpu/drm/i915/intel_lvds.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_LVDS_H__ +#define __INTEL_LVDS_H__ + +#include + +#include "i915_reg.h" + +enum pipe; +struct drm_i915_private; + +bool intel_lvds_port_enabled(struct drm_i915_private *dev_priv, +i915_reg_t lvds_reg, enum pipe *pipe); +void intel_lvds_init(struct drm_i915_private *dev_priv); +struct intel_encoder *intel_get_lvds_encoder(struct drm_i915_private *dev_priv); +bool intel_is_dual_link_lvds(struct drm_i915_private *dev_priv); + +#endif /* __INTEL_LVDS_H__ */ -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 13/25] drm/i915: extract intel_panel.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/icl_dsi.c| 1 + drivers/gpu/drm/i915/intel_connector.c| 1 + drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 45 drivers/gpu/drm/i915/intel_dvo.c | 1 + drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_lvds.c | 1 + drivers/gpu/drm/i915/intel_opregion.c | 3 +- drivers/gpu/drm/i915/intel_panel.h| 65 +++ drivers/gpu/drm/i915/intel_sdvo.c | 1 + drivers/gpu/drm/i915/vlv_dsi.c| 1 + 13 files changed, 77 insertions(+), 46 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_panel.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index a4846d7eaf46..d3a8fc37d6b5 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -20,6 +20,7 @@ header_test := \ intel_frontbuffer.h \ intel_hdcp.h \ intel_lspcon.h \ + intel_panel.h \ intel_psr.h \ intel_sdvo.h \ intel_workarounds_types.h diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c index 08e471898c86..527aafc16e62 100644 --- a/drivers/gpu/drm/i915/icl_dsi.c +++ b/drivers/gpu/drm/i915/icl_dsi.c @@ -31,6 +31,7 @@ #include "intel_connector.h" #include "intel_ddi.h" #include "intel_dsi.h" +#include "intel_panel.h" static inline int header_credits_available(struct drm_i915_private *dev_priv, enum transcoder dsi_trans) diff --git a/drivers/gpu/drm/i915/intel_connector.c b/drivers/gpu/drm/i915/intel_connector.c index 27031040f090..40b3d6379ac9 100644 --- a/drivers/gpu/drm/i915/intel_connector.c +++ b/drivers/gpu/drm/i915/intel_connector.c @@ -32,6 +32,7 @@ #include "i915_drv.h" #include "intel_drv.h" #include "intel_hdcp.h" +#include "intel_panel.h" int intel_connector_init(struct intel_connector *connector) { diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index c7c8f7b1a0b8..887903d89cd8 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -34,6 +34,7 @@ #include "intel_dsi.h" #include "intel_hdcp.h" #include "intel_lspcon.h" +#include "intel_panel.h" #include "intel_psr.h" struct ddi_buf_trans { diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index efc411964bcc..02d662ff5df9 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -48,6 +48,7 @@ #include "intel_drv.h" #include "intel_hdcp.h" #include "intel_lspcon.h" +#include "intel_panel.h" #include "intel_psr.h" #define DP_DPRX_ESI_LEN 14 diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index e04a622a71ed..8e23827a03d9 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2054,51 +2054,6 @@ int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); void intel_overlay_reset(struct drm_i915_private *dev_priv); - -/* intel_panel.c */ -int intel_panel_init(struct intel_panel *panel, -struct drm_display_mode *fixed_mode, -struct drm_display_mode *downclock_mode); -void intel_panel_fini(struct intel_panel *panel); -void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode, - struct drm_display_mode *adjusted_mode); -void intel_pch_panel_fitting(struct intel_crtc *crtc, -struct intel_crtc_state *pipe_config, -int fitting_mode); -void intel_gmch_panel_fitting(struct intel_crtc *crtc, - struct intel_crtc_state *pipe_config, - int fitting_mode); -void intel_panel_set_backlight_acpi(const struct drm_connector_state *conn_state, - u32 level, u32 max); -int intel_panel_setup_backlight(struct drm_connector *connector, - enum pipe pipe); -void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state, - const struct drm_connector_state *conn_state); -void intel_panel_update_backlight(struct intel_encoder *encod
[Intel-gfx] [PATCH 17/25] drm/i915: extract intel_hdmi.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 38 - drivers/gpu/drm/i915/intel_hdmi.h | 51 +++ drivers/gpu/drm/i915/intel_sdvo.c | 1 + 8 files changed, 64 insertions(+), 31 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_hdmi.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index fbc172a26cb1..e78eeaa8ec33 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -21,6 +21,7 @@ header_test := \ intel_fbdev.h \ intel_frontbuffer.h \ intel_hdcp.h \ + intel_hdmi.h \ intel_lspcon.h \ intel_panel.h \ intel_pm.h \ diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 859f77a8a09e..527b995a4d7a 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -38,6 +38,7 @@ #include "intel_fbc.h" #include "intel_guc_submission.h" #include "intel_hdcp.h" +#include "intel_hdmi.h" #include "intel_pm.h" #include "intel_psr.h" diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 406eb9088935..46ab56755365 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -34,6 +34,7 @@ #include "intel_drv.h" #include "intel_dsi.h" #include "intel_hdcp.h" +#include "intel_hdmi.h" #include "intel_lspcon.h" #include "intel_panel.h" #include "intel_psr.h" diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index e1b38634ba42..472388592951 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -58,6 +58,7 @@ #include "intel_fbdev.h" #include "intel_frontbuffer.h" #include "intel_hdcp.h" +#include "intel_hdmi.h" #include "intel_pm.h" #include "intel_psr.h" #include "intel_sdvo.h" diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 46d27ed6954b..a5eeb1b89376 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -48,6 +48,7 @@ #include "intel_dp.h" #include "intel_drv.h" #include "intel_hdcp.h" +#include "intel_hdmi.h" #include "intel_lspcon.h" #include "intel_panel.h" #include "intel_psr.h" diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 4847db9f87e2..ae5714ef6c11 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -27,23 +27,24 @@ #include #include -#include #include #include -#include -#include "i915_drv.h" + +#include #include -#include -#include #include #include +#include +#include #include #include #include -#include +#include #include #include +#include "i915_drv.h" + struct drm_printer; /** @@ -1879,31 +1880,6 @@ void intel_hpd_poll_init(struct drm_i915_private *dev_priv); bool intel_encoder_hotplug(struct intel_encoder *encoder, struct intel_connector *connector); -/* intel_hdmi.c */ -void intel_hdmi_init(struct drm_i915_private *dev_priv, i915_reg_t hdmi_reg, -enum port port); -void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, - struct intel_connector *intel_connector); -struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder); -int intel_hdmi_compute_config(struct intel_encoder *encoder, - struct intel_crtc_state *pipe_config, - struct drm_connector_state *conn_state); -bool intel_hdmi_handle_sink_scrambling(struct intel_encoder *encoder, - struct drm_connector *connector, - bool high_tmds_clock_ratio, - bool scrambling); -void intel_dp_dual_mode_set_tmds_output(struct intel_hdmi *hdmi, bool enable); -void intel_infoframe_init(struct intel_digital_port *intel_dig_port); -u32 intel_hdmi_infoframes_enabled(struct intel_encoder *encoder, - const struct intel_crtc_state *crtc_state); -u32 intel_hdmi_infoframe_enable(unsigned int type)
[Intel-gfx] [PATCH 09/25] drm/i915: extract intel_color.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_color.h| 17 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 6 -- 4 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_color.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 6da5c6722bee..cf6e6fce7b2c 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -9,6 +9,7 @@ header_test := \ i915_scheduler_types.h \ i915_timeline_types.h \ intel_audio.h \ + intel_color.h \ intel_connector.h \ intel_context_types.h \ intel_crt.h \ diff --git a/drivers/gpu/drm/i915/intel_color.h b/drivers/gpu/drm/i915/intel_color.h new file mode 100644 index ..b8a3ce609587 --- /dev/null +++ b/drivers/gpu/drm/i915/intel_color.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_COLOR_H__ +#define __INTEL_COLOR_H__ + +struct intel_crtc_state; +struct intel_crtc; + +void intel_color_init(struct intel_crtc *crtc); +int intel_color_check(struct intel_crtc_state *crtc_state); +void intel_color_commit(const struct intel_crtc_state *crtc_state); +void intel_color_load_luts(const struct intel_crtc_state *crtc_state); + +#endif /* __INTEL_COLOR_H__ */ diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 8812b2776b28..ed41f313e63f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -48,6 +48,7 @@ #include "i915_gem_clflush.h" #include "i915_reset.h" #include "i915_trace.h" +#include "intel_color.h" #include "intel_crt.h" #include "intel_ddi.h" #include "intel_drv.h" diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 3829d96d0233..9fd356c614ae 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2419,12 +2419,6 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_ const struct intel_plane_state *old_plane_state, struct intel_plane_state *intel_state); -/* intel_color.c */ -void intel_color_init(struct intel_crtc *crtc); -int intel_color_check(struct intel_crtc_state *crtc_state); -void intel_color_commit(const struct intel_crtc_state *crtc_state); -void intel_color_load_luts(const struct intel_crtc_state *crtc_state); - /* intel_lspcon.c */ bool lspcon_init(struct intel_digital_port *intel_dig_port); void lspcon_resume(struct intel_lspcon *lspcon); -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 22/25] drm/i915: extract intel_dvo.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 2 -- drivers/gpu/drm/i915/intel_dvo.h | 13 + 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_dvo.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 486ad9679d7f..24cfbb5c0f51 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -17,6 +17,7 @@ header_test := \ intel_csr.h \ intel_ddi.h \ intel_dp.h \ + intel_dvo.h \ intel_engine_types.h \ intel_fbc.h \ intel_fbdev.h \ diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 806fe9db2de8..4c465a3eb7a1 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -55,6 +55,7 @@ #include "intel_dp.h" #include "intel_drv.h" #include "intel_dsi.h" +#include "intel_dvo.h" #include "intel_fbc.h" #include "intel_fbdev.h" #include "intel_frontbuffer.h" diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 75035d663491..dba3ab28428d 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1873,8 +1873,6 @@ void icl_dsi_init(struct drm_i915_private *dev_priv); /* intel_dsi_dcs_backlight.c */ int intel_dsi_dcs_init_backlight_funcs(struct intel_connector *intel_connector); -/* intel_dvo.c */ -void intel_dvo_init(struct drm_i915_private *dev_priv); /* intel_hotplug.c */ void intel_hpd_poll_init(struct drm_i915_private *dev_priv); bool intel_encoder_hotplug(struct intel_encoder *encoder, diff --git a/drivers/gpu/drm/i915/intel_dvo.h b/drivers/gpu/drm/i915/intel_dvo.h new file mode 100644 index ..3ed0fdf8efff --- /dev/null +++ b/drivers/gpu/drm/i915/intel_dvo.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_DVO_H__ +#define __INTEL_DVO_H__ + +struct drm_i915_private; + +void intel_dvo_init(struct drm_i915_private *dev_priv); + +#endif /* __INTEL_DVO_H__ */ -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 10/25] drm/i915: extract intel_lspcon.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 21 - drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_lspcon.h | 38 +++ 6 files changed, 42 insertions(+), 21 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_lspcon.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index cf6e6fce7b2c..589e5b513838 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -18,6 +18,7 @@ header_test := \ intel_engine_types.h \ intel_fbc.h \ intel_frontbuffer.h \ + intel_lspcon.h \ intel_psr.h \ intel_workarounds_types.h diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 625a12b02502..9da006f4ce35 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -32,6 +32,7 @@ #include "intel_connector.h" #include "intel_drv.h" #include "intel_dsi.h" +#include "intel_lspcon.h" #include "intel_psr.h" struct ddi_buf_trans { diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 00efbb59c422..2f50a4d81fcd 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -46,6 +46,7 @@ #include "intel_connector.h" #include "intel_ddi.h" #include "intel_drv.h" +#include "intel_lspcon.h" #include "intel_psr.h" #define DP_DPRX_ESI_LEN 14 diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 9fd356c614ae..5c1326c81cdb 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2419,27 +2419,6 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_ const struct intel_plane_state *old_plane_state, struct intel_plane_state *intel_state); -/* intel_lspcon.c */ -bool lspcon_init(struct intel_digital_port *intel_dig_port); -void lspcon_resume(struct intel_lspcon *lspcon); -void lspcon_wait_pcon_mode(struct intel_lspcon *lspcon); -void lspcon_write_infoframe(struct intel_encoder *encoder, - const struct intel_crtc_state *crtc_state, - unsigned int type, - const void *buf, ssize_t len); -void lspcon_read_infoframe(struct intel_encoder *encoder, - const struct intel_crtc_state *crtc_state, - unsigned int type, - void *frame, ssize_t len); -void lspcon_set_infoframes(struct intel_encoder *encoder, - bool enable, - const struct intel_crtc_state *crtc_state, - const struct drm_connector_state *conn_state); -u32 lspcon_infoframes_enabled(struct intel_encoder *encoder, - const struct intel_crtc_state *pipe_config); -void lspcon_ycbcr420_config(struct drm_connector *connector, - struct intel_crtc_state *crtc_state); - /* intel_pipe_crc.c */ #ifdef CONFIG_DEBUG_FS int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name); diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index 92f4d9b65150..012ae7b1bda5 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -44,6 +44,7 @@ #include "intel_connector.h" #include "intel_ddi.h" #include "intel_drv.h" +#include "intel_lspcon.h" static struct drm_device *intel_hdmi_to_dev(struct intel_hdmi *intel_hdmi) { diff --git a/drivers/gpu/drm/i915/intel_lspcon.h b/drivers/gpu/drm/i915/intel_lspcon.h new file mode 100644 index ..37cfddf8a9c5 --- /dev/null +++ b/drivers/gpu/drm/i915/intel_lspcon.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_LSPCON_H__ +#define __INTEL_LSPCON_H__ + +#include + +struct drm_connector; +struct drm_connector_state; +struct intel_crtc_state; +struct intel_digital_port; +struct intel_encoder; +struct intel_lspcon; + +bool lspcon_init(struct intel_digital_port *intel_dig_port); +void lspcon_resume(struct intel_lspcon *lspcon); +void lspcon_wait_pcon_mode(struc
[Intel-gfx] [PATCH 07/25] drm/i915: extract intel_fbc.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_debugfs.c| 8 +++-- drivers/gpu/drm/i915/i915_reset.h | 1 + drivers/gpu/drm/i915/i915_suspend.c| 5 ++- drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 24 - drivers/gpu/drm/i915/intel_fbc.h | 42 ++ drivers/gpu/drm/i915/intel_fifo_underrun.c | 1 + drivers/gpu/drm/i915/intel_frontbuffer.c | 3 +- drivers/gpu/drm/i915/intel_pm.c| 1 + 10 files changed, 58 insertions(+), 29 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_fbc.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index e03285ccad24..1099de6c8bda 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -15,6 +15,7 @@ header_test := \ intel_csr.h \ intel_ddi.h \ intel_engine_types.h \ + intel_fbc.h \ intel_frontbuffer.h \ intel_workarounds_types.h diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index a14a7bccffc1..bdb5daa59de5 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -26,14 +26,16 @@ * */ -#include #include +#include + #include #include -#include "intel_drv.h" -#include "intel_guc_submission.h" #include "i915_reset.h" +#include "intel_drv.h" +#include "intel_fbc.h" +#include "intel_guc_submission.h" static inline struct drm_i915_private *node_to_i915(struct drm_info_node *node) { diff --git a/drivers/gpu/drm/i915/i915_reset.h b/drivers/gpu/drm/i915/i915_reset.h index 86b1ac8116ce..3c0450289b8f 100644 --- a/drivers/gpu/drm/i915/i915_reset.h +++ b/drivers/gpu/drm/i915/i915_reset.h @@ -14,6 +14,7 @@ #include "intel_engine_types.h" struct drm_i915_private; +struct i915_request; struct intel_engine_cs; struct intel_guc; diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index d2f2a9c2fabd..eec48d856adb 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -24,9 +24,12 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + #include -#include "intel_drv.h" + #include "i915_reg.h" +#include "intel_drv.h" +#include "intel_fbc.h" static void i915_save_display(struct drm_i915_private *dev_priv) { diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index cae807341553..08c9205a4e8a 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -52,6 +52,7 @@ #include "intel_ddi.h" #include "intel_drv.h" #include "intel_dsi.h" +#include "intel_fbc.h" #include "intel_frontbuffer.h" /* Primary plane formats for gen <= 3 */ diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 9404dfcbfd3a..cc0d179b6c43 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2012,30 +2012,6 @@ static inline void intel_fbdev_restore_mode(struct drm_device *dev) } #endif -/* intel_fbc.c */ -void intel_fbc_choose_crtc(struct drm_i915_private *dev_priv, - struct intel_atomic_state *state); -bool intel_fbc_is_active(struct drm_i915_private *dev_priv); -void intel_fbc_pre_update(struct intel_crtc *crtc, - struct intel_crtc_state *crtc_state, - struct intel_plane_state *plane_state); -void intel_fbc_post_update(struct intel_crtc *crtc); -void intel_fbc_init(struct drm_i915_private *dev_priv); -void intel_fbc_init_pipe_state(struct drm_i915_private *dev_priv); -void intel_fbc_enable(struct intel_crtc *crtc, - struct intel_crtc_state *crtc_state, - struct intel_plane_state *plane_state); -void intel_fbc_disable(struct intel_crtc *crtc); -void intel_fbc_global_disable(struct drm_i915_private *dev_priv); -void intel_fbc_invalidate(struct drm_i915_private *dev_priv, - unsigned int frontbuffer_bits, - enum fb_op_origin origin); -void intel_fbc_flush(struct drm_i915_private *dev_priv, -unsigned int frontbuffer_bits, enum fb_op_origin origin); -void intel_fbc_cleanup_cfb(struct drm_i915_private *dev_priv); -void intel_fbc_handle_fifo_underrun_irq(struct drm_i915_private
[Intel-gfx] [PATCH 15/25] drm/i915: extract intel_fbdev.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_pci.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 40 - drivers/gpu/drm/i915/intel_fbdev.c| 17 drivers/gpu/drm/i915/intel_fbdev.h| 53 +++ 7 files changed, 66 insertions(+), 48 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_fbdev.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index ab7ac0ac17a1..9fd6f3460334 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -17,6 +17,7 @@ header_test := \ intel_ddi.h \ intel_engine_types.h \ intel_fbc.h \ + intel_fbdev.h \ intel_frontbuffer.h \ intel_hdcp.h \ intel_lspcon.h \ diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 85dac2f23197..fc11c215e0a2 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -56,6 +56,7 @@ #include "intel_audio.h" #include "intel_csr.h" #include "intel_drv.h" +#include "intel_fbdev.h" #include "intel_pm.h" #include "intel_uc.h" #include "intel_workarounds.h" diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 6ffb85ddac53..f893c2cbce15 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -31,6 +31,7 @@ #include "i915_drv.h" #include "i915_globals.h" #include "i915_selftest.h" +#include "intel_fbdev.h" #define PLATFORM(x) .platform = (x) #define GEN(x) .gen = (x), .gen_mask = BIT((x) - 1) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f81a5c50120e..a1a29a7f2db0 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -54,6 +54,7 @@ #include "intel_drv.h" #include "intel_dsi.h" #include "intel_fbc.h" +#include "intel_fbdev.h" #include "intel_frontbuffer.h" #include "intel_hdcp.h" #include "intel_pm.h" diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 173f88935169..d23abd7cff49 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1972,46 +1972,6 @@ void intel_hpd_poll_init(struct drm_i915_private *dev_priv); bool intel_encoder_hotplug(struct intel_encoder *encoder, struct intel_connector *connector); -/* legacy fbdev emulation in intel_fbdev.c */ -#ifdef CONFIG_DRM_FBDEV_EMULATION -extern int intel_fbdev_init(struct drm_device *dev); -extern void intel_fbdev_initial_config_async(struct drm_device *dev); -extern void intel_fbdev_unregister(struct drm_i915_private *dev_priv); -extern void intel_fbdev_fini(struct drm_i915_private *dev_priv); -extern void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous); -extern void intel_fbdev_output_poll_changed(struct drm_device *dev); -extern void intel_fbdev_restore_mode(struct drm_device *dev); -#else -static inline int intel_fbdev_init(struct drm_device *dev) -{ - return 0; -} - -static inline void intel_fbdev_initial_config_async(struct drm_device *dev) -{ -} - -static inline void intel_fbdev_unregister(struct drm_i915_private *dev_priv) -{ -} - -static inline void intel_fbdev_fini(struct drm_i915_private *dev_priv) -{ -} - -static inline void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous) -{ -} - -static inline void intel_fbdev_output_poll_changed(struct drm_device *dev) -{ -} - -static inline void intel_fbdev_restore_mode(struct drm_device *dev) -{ -} -#endif - /* intel_hdmi.c */ void intel_hdmi_init(struct drm_i915_private *dev_priv, i915_reg_t hdmi_reg, enum port port); diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index ef93c27e60b4..bc532e99b5dc 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -25,26 +25,27 @@ */ #include -#include -#include #include +#include #include -#include +#include +#include #include -#include +#include +#include #include -#include -#include +#include #include #include #include #include +#include +#include "i915_drv.h" #include "intel_drv.h" +#include "intel_fbdev.h" #include "intel_frontbu
[Intel-gfx] [PATCH 08/25] drm/i915: extract intel_psr.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_irq.c | 11 --- drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 26 --- drivers/gpu/drm/i915/intel_fbc.c | 3 +- drivers/gpu/drm/i915/intel_frontbuffer.c | 1 + drivers/gpu/drm/i915/intel_psr.c | 11 --- drivers/gpu/drm/i915/intel_psr.h | 40 +++ drivers/gpu/drm/i915/intel_sprite.c | 13 +--- 12 files changed, 69 insertions(+), 41 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_psr.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 1099de6c8bda..6da5c6722bee 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -17,6 +17,7 @@ header_test := \ intel_engine_types.h \ intel_fbc.h \ intel_frontbuffer.h \ + intel_psr.h \ intel_workarounds_types.h quiet_cmd_header_test = HDRTEST $@ diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index bdb5daa59de5..1c3e19b9583e 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -36,6 +36,7 @@ #include "intel_drv.h" #include "intel_fbc.h" #include "intel_guc_submission.h" +#include "intel_psr.h" static inline struct drm_i915_private *node_to_i915(struct drm_info_node *node) { diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index aa107a78cb36..6454ddc37f8b 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -28,16 +28,19 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -#include -#include -#include #include -#include +#include +#include +#include + #include +#include #include + #include "i915_drv.h" #include "i915_trace.h" #include "intel_drv.h" +#include "intel_psr.h" /** * DOC: interrupt handling diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 011a6fb621ad..625a12b02502 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -32,6 +32,7 @@ #include "intel_connector.h" #include "intel_drv.h" #include "intel_dsi.h" +#include "intel_psr.h" struct ddi_buf_trans { u32 trans1; /* balance leg enable, de-emph level */ diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 08c9205a4e8a..8812b2776b28 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -54,6 +54,7 @@ #include "intel_dsi.h" #include "intel_fbc.h" #include "intel_frontbuffer.h" +#include "intel_psr.h" /* Primary plane formats for gen <= 3 */ static const u32 i8xx_primary_formats[] = { diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 466e5a6b9513..00efbb59c422 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -46,6 +46,7 @@ #include "intel_connector.h" #include "intel_ddi.h" #include "intel_drv.h" +#include "intel_psr.h" #define DP_DPRX_ESI_LEN 14 diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index cc0d179b6c43..3829d96d0233 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2114,32 +2114,6 @@ void intel_hdcp_component_fini(struct drm_i915_private *dev_priv); void intel_hdcp_cleanup(struct intel_connector *connector); void intel_hdcp_handle_cp_irq(struct intel_connector *connector); -/* intel_psr.c */ -#define CAN_PSR(dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support) -void intel_psr_init_dpcd(struct intel_dp *intel_dp); -void intel_psr_enable(struct intel_dp *intel_dp, - const struct intel_crtc_state *crtc_state); -void intel_psr_disable(struct intel_dp *intel_dp, - const struct intel_crtc_state *old_crtc_state); -void intel_psr_update(struct intel_dp *intel_dp, - const struct intel_crtc_state *crtc_state); -int intel_psr_debug_set(struct drm_i915_private *dev_priv, u64 value); -void intel_psr_invalidate(struct drm_i915_private *dev_priv, - unsigned frontbuffer_bits, - e
[Intel-gfx] [PATCH 14/25] drm/i915: extract intel_pm.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_gem.c | 1 + drivers/gpu/drm/i915/i915_request.c | 3 +- drivers/gpu/drm/i915/intel_atomic_plane.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 51 drivers/gpu/drm/i915/intel_pm.c | 3 +- drivers/gpu/drm/i915/intel_pm.h | 72 +++ drivers/gpu/drm/i915/intel_sprite.c | 1 + drivers/gpu/drm/i915/intel_uncore.c | 9 +-- 12 files changed, 88 insertions(+), 57 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_pm.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index d3a8fc37d6b5..ab7ac0ac17a1 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -21,6 +21,7 @@ header_test := \ intel_hdcp.h \ intel_lspcon.h \ intel_panel.h \ + intel_pm.h \ intel_psr.h \ intel_sdvo.h \ intel_workarounds_types.h diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index ebe85144ae9c..7c54c994de50 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -37,6 +37,7 @@ #include "intel_fbc.h" #include "intel_guc_submission.h" #include "intel_hdcp.h" +#include "intel_pm.h" #include "intel_psr.h" static inline struct drm_i915_private *node_to_i915(struct drm_info_node *node) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 6d9711a767b4..85dac2f23197 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -56,6 +56,7 @@ #include "intel_audio.h" #include "intel_csr.h" #include "intel_drv.h" +#include "intel_pm.h" #include "intel_uc.h" #include "intel_workarounds.h" diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index f25a1ba24927..bf3d12f94365 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -50,6 +50,7 @@ #include "intel_drv.h" #include "intel_frontbuffer.h" #include "intel_mocs.h" +#include "intel_pm.h" #include "intel_workarounds.h" static void i915_gem_flush_free_objects(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 82094b9f5ba7..91eec5075bc9 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c @@ -29,10 +29,11 @@ #include #include -#include "i915_drv.h" #include "i915_active.h" +#include "i915_drv.h" #include "i915_globals.h" #include "i915_reset.h" +#include "intel_pm.h" struct execute_cb { struct list_head link; diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c index 9d32a6fcf840..42821f8e6031 100644 --- a/drivers/gpu/drm/i915/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c @@ -36,6 +36,7 @@ #include #include "intel_drv.h" +#include "intel_pm.h" struct intel_plane *intel_plane_alloc(void) { diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index e725597ce730..f81a5c50120e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -56,6 +56,7 @@ #include "intel_fbc.h" #include "intel_frontbuffer.h" #include "intel_hdcp.h" +#include "intel_pm.h" #include "intel_psr.h" #include "intel_sdvo.h" diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 8e23827a03d9..173f88935169 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2203,57 +2203,6 @@ void chv_phy_powergate_lanes(struct intel_encoder *encoder, bool chv_phy_powergate_ch(struct drm_i915_private *dev_priv, enum dpio_phy phy, enum dpio_channel ch, bool override); - -/* intel_pm.c */ -void intel_init_clock_gating(struct drm_i915_private *dev_priv); -void intel_suspend_hw(struct drm_i915_private *dev_priv); -int ilk_wm_max_level(const struct drm_i915_private *dev_priv); -void intel_update_watermarks(struct intel_crtc *crtc); -void intel_init_pm(struct drm_i915_private *dev_priv); -void intel_init_clock_gating_hooks(struct drm_i915_private *dev_priv); -void intel_pm_s
[Intel-gfx] [PATCH 24/25] drm/i915: extract intel_cdclk.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/intel_cdclk.c| 1 + drivers/gpu/drm/i915/intel_cdclk.h| 52 +++ drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 35 --- drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + 7 files changed, 57 insertions(+), 35 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_cdclk.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 83db8f79e3bc..c1c391816fa7 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -10,6 +10,7 @@ header_test := \ i915_timeline_types.h \ intel_atomic_plane.h \ intel_audio.h \ + intel_cdclk.h \ intel_color.h \ intel_connector.h \ intel_context_types.h \ diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 23f16fd47b4d..402acdb953c4 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -54,6 +54,7 @@ #include "i915_trace.h" #include "i915_vgpu.h" #include "intel_audio.h" +#include "intel_cdclk.h" #include "intel_csr.h" #include "intel_dp.h" #include "intel_drv.h" diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c index b911fe86be56..c6e163d26158 100644 --- a/drivers/gpu/drm/i915/intel_cdclk.c +++ b/drivers/gpu/drm/i915/intel_cdclk.c @@ -21,6 +21,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include "intel_cdclk.h" #include "intel_drv.h" /** diff --git a/drivers/gpu/drm/i915/intel_cdclk.h b/drivers/gpu/drm/i915/intel_cdclk.h new file mode 100644 index ..ae4a60b76756 --- /dev/null +++ b/drivers/gpu/drm/i915/intel_cdclk.h @@ -0,0 +1,52 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_CDCLK_H__ +#define __INTEL_CDCLK_H__ + +#include + +#include "intel_display.h" + +struct drm_i915_private; +struct intel_atomic_state; +struct intel_cdclk_state; +struct intel_crtc_state; + +int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state); +void skl_init_cdclk(struct drm_i915_private *dev_priv); +void skl_uninit_cdclk(struct drm_i915_private *dev_priv); +void cnl_init_cdclk(struct drm_i915_private *dev_priv); +void cnl_uninit_cdclk(struct drm_i915_private *dev_priv); +void bxt_init_cdclk(struct drm_i915_private *dev_priv); +void bxt_uninit_cdclk(struct drm_i915_private *dev_priv); +void icl_init_cdclk(struct drm_i915_private *dev_priv); +void icl_uninit_cdclk(struct drm_i915_private *dev_priv); +void intel_init_cdclk_hooks(struct drm_i915_private *dev_priv); +void intel_update_max_cdclk(struct drm_i915_private *dev_priv); +void intel_update_cdclk(struct drm_i915_private *dev_priv); +void intel_update_rawclk(struct drm_i915_private *dev_priv); +bool intel_cdclk_needs_cd2x_update(struct drm_i915_private *dev_priv, + const struct intel_cdclk_state *a, + const struct intel_cdclk_state *b); +bool intel_cdclk_needs_modeset(const struct intel_cdclk_state *a, + const struct intel_cdclk_state *b); +bool intel_cdclk_changed(const struct intel_cdclk_state *a, +const struct intel_cdclk_state *b); +void intel_cdclk_swap_state(struct intel_atomic_state *state); +void +intel_set_cdclk_pre_plane_update(struct drm_i915_private *dev_priv, +const struct intel_cdclk_state *old_state, +const struct intel_cdclk_state *new_state, +enum pipe pipe); +void +intel_set_cdclk_post_plane_update(struct drm_i915_private *dev_priv, + const struct intel_cdclk_state *old_state, + const struct intel_cdclk_state *new_state, + enum pipe pipe); +void intel_dump_cdclk_state(const struct intel_cdclk_state *cdclk_state, + const char *context); + +#endif /* __INTEL_CDCLK_H__ */ diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7d1eb8e2e6a8..f8938b5a4936 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -50,6 +50,7 @@ #include "i915_trace.h"
[Intel-gfx] [PATCH 23/25] drm/i915: extract intel_sprite.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/intel_atomic.c | 1 + drivers/gpu/drm/i915/intel_atomic_plane.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 35 --- drivers/gpu/drm/i915/intel_pm.c | 1 + drivers/gpu/drm/i915/intel_psr.c | 1 + drivers/gpu/drm/i915/intel_sprite.c | 1 + drivers/gpu/drm/i915/intel_sprite.h | 55 +++ 10 files changed, 63 insertions(+), 35 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_sprite.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 24cfbb5c0f51..83db8f79e3bc 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -31,6 +31,7 @@ header_test := \ intel_pm.h \ intel_psr.h \ intel_sdvo.h \ + intel_sprite.h \ intel_tv.h \ intel_workarounds_types.h diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 08a64e5cc869..23f16fd47b4d 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -59,6 +59,7 @@ #include "intel_drv.h" #include "intel_fbdev.h" #include "intel_pm.h" +#include "intel_sprite.h" #include "intel_uc.h" #include "intel_workarounds.h" diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index 2cbcf6ac24d8..8c8fae32ec50 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -36,6 +36,7 @@ #include "intel_drv.h" #include "intel_hdcp.h" +#include "intel_sprite.h" /** * intel_digital_connector_atomic_get_property - hook for connector->atomic_get_property. diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c index 381234ce1bc4..0c662dec9eee 100644 --- a/drivers/gpu/drm/i915/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c @@ -37,6 +37,7 @@ #include "intel_drv.h" #include "intel_pm.h" +#include "intel_sprite.h" struct intel_plane *intel_plane_alloc(void) { diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 4c465a3eb7a1..7d1eb8e2e6a8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -66,6 +66,7 @@ #include "intel_pm.h" #include "intel_psr.h" #include "intel_sdvo.h" +#include "intel_sprite.h" #include "intel_tv.h" /* Primary plane formats for gen <= 3 */ diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index dba3ab28428d..a5f81dcb4380 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2037,41 +2037,6 @@ void chv_phy_powergate_lanes(struct intel_encoder *encoder, bool chv_phy_powergate_ch(struct drm_i915_private *dev_priv, enum dpio_phy phy, enum dpio_channel ch, bool override); -/* intel_sprite.c */ -bool is_planar_yuv_format(u32 pixelformat); -int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode, -int usecs); -struct intel_plane *intel_sprite_plane_create(struct drm_i915_private *dev_priv, - enum pipe pipe, int plane); -int intel_sprite_set_colorkey_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv); -void intel_pipe_update_start(const struct intel_crtc_state *new_crtc_state); -void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state); -int intel_plane_check_stride(const struct intel_plane_state *plane_state); -int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state); -int chv_plane_check_rotation(const struct intel_plane_state *plane_state); -struct intel_plane * -skl_universal_plane_create(struct drm_i915_private *dev_priv, - enum pipe pipe, enum plane_id plane_id); - -static inline bool icl_is_nv12_y_plane(enum plane_id id) -{ - /* Don't need to do a gen check, these planes are only available on gen11 */ - if (id == PLANE_SPRITE4 || id == PLANE_SPRITE5) - return true; - - return false; -} - -static inline bool icl_is_hdr_plane(struct drm_i915_private *dev_priv, - enum plane_id plane_id) -{ - if (I
[Intel-gfx] [PATCH 25/25] drm/i915/cdclk: have only one init/uninit function
While transitioning to having better clarity between the modules, it's desirable to have the function name prefixes reflect the module. Functions in intel_foo.c should be prefixed intel_foo_. Expose only one CDCLK init/uninit function from intel_cdclk.c instead of one per platform. Obviously this adds one "unnecessary" if ladder within the entry points. However it should be considered more of a CDCLK implementation detail how this is done per platform, instead of exposing the fact. In other words, abstract the CDCLK module better. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/intel_cdclk.c | 120 ++-- drivers/gpu/drm/i915/intel_cdclk.h | 10 +- drivers/gpu/drm/i915/intel_runtime_pm.c | 16 ++-- 3 files changed, 58 insertions(+), 88 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c index c6e163d26158..7f060eaf1b17 100644 --- a/drivers/gpu/drm/i915/intel_cdclk.c +++ b/drivers/gpu/drm/i915/intel_cdclk.c @@ -1129,16 +1129,7 @@ static void skl_sanitize_cdclk(struct drm_i915_private *dev_priv) dev_priv->cdclk.hw.vco = -1; } -/** - * skl_init_cdclk - Initialize CDCLK on SKL - * @dev_priv: i915 device - * - * Initialize CDCLK for SKL and derivatives. This is generally - * done only during the display core initialization sequence, - * after which the DMC will take care of turning CDCLK off/on - * as needed. - */ -void skl_init_cdclk(struct drm_i915_private *dev_priv) +static void skl_init_cdclk(struct drm_i915_private *dev_priv) { struct intel_cdclk_state cdclk_state; @@ -1167,14 +1158,7 @@ void skl_init_cdclk(struct drm_i915_private *dev_priv) skl_set_cdclk(dev_priv, &cdclk_state, INVALID_PIPE); } -/** - * skl_uninit_cdclk - Uninitialize CDCLK on SKL - * @dev_priv: i915 device - * - * Uninitialize CDCLK for SKL and derivatives. This is done only - * during the display core uninitialization sequence. - */ -void skl_uninit_cdclk(struct drm_i915_private *dev_priv) +static void skl_uninit_cdclk(struct drm_i915_private *dev_priv) { struct intel_cdclk_state cdclk_state = dev_priv->cdclk.hw; @@ -1499,16 +1483,7 @@ static void bxt_sanitize_cdclk(struct drm_i915_private *dev_priv) dev_priv->cdclk.hw.vco = -1; } -/** - * bxt_init_cdclk - Initialize CDCLK on BXT - * @dev_priv: i915 device - * - * Initialize CDCLK for BXT and derivatives. This is generally - * done only during the display core initialization sequence, - * after which the DMC will take care of turning CDCLK off/on - * as needed. - */ -void bxt_init_cdclk(struct drm_i915_private *dev_priv) +static void bxt_init_cdclk(struct drm_i915_private *dev_priv) { struct intel_cdclk_state cdclk_state; @@ -1537,14 +1512,7 @@ void bxt_init_cdclk(struct drm_i915_private *dev_priv) bxt_set_cdclk(dev_priv, &cdclk_state, INVALID_PIPE); } -/** - * bxt_uninit_cdclk - Uninitialize CDCLK on BXT - * @dev_priv: i915 device - * - * Uninitialize CDCLK for BXT and derivatives. This is done only - * during the display core uninitialization sequence. - */ -void bxt_uninit_cdclk(struct drm_i915_private *dev_priv) +static void bxt_uninit_cdclk(struct drm_i915_private *dev_priv) { struct intel_cdclk_state cdclk_state = dev_priv->cdclk.hw; @@ -1977,16 +1945,7 @@ static void icl_get_cdclk(struct drm_i915_private *dev_priv, icl_calc_voltage_level(cdclk_state->cdclk); } -/** - * icl_init_cdclk - Initialize CDCLK on ICL - * @dev_priv: i915 device - * - * Initialize CDCLK for ICL. This consists mainly of initializing - * dev_priv->cdclk.hw and sanitizing the state of the hardware if needed. This - * is generally done only during the display core initialization sequence, after - * which the DMC will take care of turning CDCLK off/on as needed. - */ -void icl_init_cdclk(struct drm_i915_private *dev_priv) +static void icl_init_cdclk(struct drm_i915_private *dev_priv) { struct intel_cdclk_state sanitized_state; u32 val; @@ -2023,14 +1982,7 @@ void icl_init_cdclk(struct drm_i915_private *dev_priv) icl_set_cdclk(dev_priv, &sanitized_state, INVALID_PIPE); } -/** - * icl_uninit_cdclk - Uninitialize CDCLK on ICL - * @dev_priv: i915 device - * - * Uninitialize CDCLK for ICL. This is done only during the display core - * uninitialization sequence. - */ -void icl_uninit_cdclk(struct drm_i915_private *dev_priv) +static void icl_uninit_cdclk(struct drm_i915_private *dev_priv) { struct intel_cdclk_state cdclk_state = dev_priv->cdclk.hw; @@ -2041,16 +1993,7 @@ void icl_uninit_cdclk(struct drm_i915_private *dev_priv) icl_set_cdclk(dev_priv, &cdclk_state, INVALID_PIPE); } -/** - * cnl_init_cdclk - Initialize CDCLK on CNL - * @dev_priv: i915 device - * - * Initialize CDCLK for CNL. This is generally - * done only during the display core initialization sequence, - * after which the DMC will take care of turning CDCLK off/on - * as needed. - */ -
[Intel-gfx] [PATCH 19/25] drm/i915: extract intel_pipe_crc.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 21 -- drivers/gpu/drm/i915/intel_pipe_crc.h | 35 +++ 4 files changed, 37 insertions(+), 21 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_pipe_crc.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 43c939da9665..2724ccff61ea 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -25,6 +25,7 @@ header_test := \ intel_hdmi.h \ intel_lspcon.h \ intel_panel.h \ + intel_pipe_crc.h \ intel_pm.h \ intel_psr.h \ intel_sdvo.h \ diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 54ba021ad4ea..77348a9e68e7 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -60,6 +60,7 @@ #include "intel_frontbuffer.h" #include "intel_hdcp.h" #include "intel_hdmi.h" +#include "intel_pipe_crc.h" #include "intel_pm.h" #include "intel_psr.h" #include "intel_sdvo.h" diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 9b8435f9ccaf..5bf36ea9fc08 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2120,25 +2120,4 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv, struct intel_crtc *intel_crtc, struct intel_crtc_state *crtc_state); -/* intel_pipe_crc.c */ -#ifdef CONFIG_DEBUG_FS -int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name); -int intel_crtc_verify_crc_source(struct drm_crtc *crtc, -const char *source_name, size_t *values_cnt); -const char *const *intel_crtc_get_crc_sources(struct drm_crtc *crtc, - size_t *count); -void intel_crtc_disable_pipe_crc(struct intel_crtc *crtc); -void intel_crtc_enable_pipe_crc(struct intel_crtc *crtc); -#else -#define intel_crtc_set_crc_source NULL -#define intel_crtc_verify_crc_source NULL -#define intel_crtc_get_crc_sources NULL -static inline void intel_crtc_disable_pipe_crc(struct intel_crtc *crtc) -{ -} - -static inline void intel_crtc_enable_pipe_crc(struct intel_crtc *crtc) -{ -} -#endif #endif /* __INTEL_DRV_H__ */ diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.h b/drivers/gpu/drm/i915/intel_pipe_crc.h new file mode 100644 index ..81eaf1854788 --- /dev/null +++ b/drivers/gpu/drm/i915/intel_pipe_crc.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_PIPE_CRC_H__ +#define __INTEL_PIPE_CRC_H__ + +#include + +struct drm_crtc; +struct intel_crtc; + +#ifdef CONFIG_DEBUG_FS +int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name); +int intel_crtc_verify_crc_source(struct drm_crtc *crtc, +const char *source_name, size_t *values_cnt); +const char *const *intel_crtc_get_crc_sources(struct drm_crtc *crtc, + size_t *count); +void intel_crtc_disable_pipe_crc(struct intel_crtc *crtc); +void intel_crtc_enable_pipe_crc(struct intel_crtc *crtc); +#else +#define intel_crtc_set_crc_source NULL +#define intel_crtc_verify_crc_source NULL +#define intel_crtc_get_crc_sources NULL +static inline void intel_crtc_disable_pipe_crc(struct intel_crtc *crtc) +{ +} + +static inline void intel_crtc_enable_pipe_crc(struct intel_crtc *crtc) +{ +} +#endif + +#endif /* __INTEL_PIPE_CRC_H__ */ -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 16/25] drm/i915: extract intel_dp.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_dp.h | 121 ++ drivers/gpu/drm/i915/intel_dp_link_training.c | 1 + drivers/gpu/drm/i915/intel_dp_mst.c | 1 + drivers/gpu/drm/i915/intel_dpio_phy.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 97 +- drivers/gpu/drm/i915/intel_frontbuffer.c | 1 + drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_lspcon.c | 5 +- drivers/gpu/drm/i915/intel_psr.c | 1 + drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + 16 files changed, 140 insertions(+), 96 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_dp.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 9fd6f3460334..fbc172a26cb1 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -15,6 +15,7 @@ header_test := \ intel_crt.h \ intel_csr.h \ intel_ddi.h \ + intel_dp.h \ intel_engine_types.h \ intel_fbc.h \ intel_fbdev.h \ diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 7c54c994de50..859f77a8a09e 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -33,6 +33,7 @@ #include #include "i915_reset.h" +#include "intel_dp.h" #include "intel_drv.h" #include "intel_fbc.h" #include "intel_guc_submission.h" diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index fc11c215e0a2..08a64e5cc869 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -55,6 +55,7 @@ #include "i915_vgpu.h" #include "intel_audio.h" #include "intel_csr.h" +#include "intel_dp.h" #include "intel_drv.h" #include "intel_fbdev.h" #include "intel_pm.h" diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 887903d89cd8..406eb9088935 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -30,6 +30,7 @@ #include "i915_drv.h" #include "intel_audio.h" #include "intel_connector.h" +#include "intel_dp.h" #include "intel_drv.h" #include "intel_dsi.h" #include "intel_hdcp.h" diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a1a29a7f2db0..e1b38634ba42 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -51,6 +51,7 @@ #include "intel_color.h" #include "intel_crt.h" #include "intel_ddi.h" +#include "intel_dp.h" #include "intel_drv.h" #include "intel_dsi.h" #include "intel_fbc.h" diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 02d662ff5df9..46d27ed6954b 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -45,6 +45,7 @@ #include "intel_audio.h" #include "intel_connector.h" #include "intel_ddi.h" +#include "intel_dp.h" #include "intel_drv.h" #include "intel_hdcp.h" #include "intel_lspcon.h" diff --git a/drivers/gpu/drm/i915/intel_dp.h b/drivers/gpu/drm/i915/intel_dp.h new file mode 100644 index ..5c152ca6f9ed --- /dev/null +++ b/drivers/gpu/drm/i915/intel_dp.h @@ -0,0 +1,121 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_DP_H__ +#define __INTEL_DP_H__ + +#include + +#include + +#include "i915_reg.h" + +enum pipe; +struct drm_connector_state; +struct drm_encoder; +struct drm_i915_private; +struct drm_modeset_acquire_ctx; +struct intel_connector; +struct intel_crtc_state; +struct intel_digital_port; +struct intel_dp; +struct intel_encoder; + +struct link_config_limits { + int min_clock, max_clock; + int min_lane_count, max_lane_count; + int min_bpp, max_bpp; +}; + +void intel_dp_adjust_compliance_config(struct intel_dp *intel_dp, + struct intel_crtc_state *pipe_config, + struct link_config_limits *limits); +bool intel_dp_limited_color_range(const struct intel_crtc_state *crtc_state, +
[Intel-gfx] [PATCH 11/25] drm/i915: extract intel_sdvo.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 7 --- drivers/gpu/drm/i915/intel_hdmi.c | 1 + drivers/gpu/drm/i915/intel_sdvo.h | 23 +++ 5 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_sdvo.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 589e5b513838..f1f62794b457 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -20,6 +20,7 @@ header_test := \ intel_frontbuffer.h \ intel_lspcon.h \ intel_psr.h \ + intel_sdvo.h \ intel_workarounds_types.h quiet_cmd_header_test = HDRTEST $@ diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ed41f313e63f..6d2a385d149e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -56,6 +56,7 @@ #include "intel_fbc.h" #include "intel_frontbuffer.h" #include "intel_psr.h" +#include "intel_sdvo.h" /* Primary plane formats for gen <= 3 */ static const u32 i8xx_primary_formats[] = { diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 5c1326c81cdb..681f232fd305 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2314,13 +2314,6 @@ int skl_check_pipe_max_pixel_rate(struct intel_crtc *intel_crtc, void intel_init_ipc(struct drm_i915_private *dev_priv); void intel_enable_ipc(struct drm_i915_private *dev_priv); -/* intel_sdvo.c */ -bool intel_sdvo_port_enabled(struct drm_i915_private *dev_priv, -i915_reg_t sdvo_reg, enum pipe *pipe); -bool intel_sdvo_init(struct drm_i915_private *dev_priv, -i915_reg_t reg, enum port port); - - /* intel_sprite.c */ bool is_planar_yuv_format(u32 pixelformat); int intel_usecs_to_scanlines(const struct drm_display_mode *adjusted_mode, diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index 012ae7b1bda5..03dcf5f7d69f 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -45,6 +45,7 @@ #include "intel_ddi.h" #include "intel_drv.h" #include "intel_lspcon.h" +#include "intel_sdvo.h" static struct drm_device *intel_hdmi_to_dev(struct intel_hdmi *intel_hdmi) { diff --git a/drivers/gpu/drm/i915/intel_sdvo.h b/drivers/gpu/drm/i915/intel_sdvo.h new file mode 100644 index ..c9e05bcdd141 --- /dev/null +++ b/drivers/gpu/drm/i915/intel_sdvo.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_SDVO_H__ +#define __INTEL_SDVO_H__ + +#include + +#include + +#include "i915_reg.h" + +struct drm_i915_private; +enum pipe; + +bool intel_sdvo_port_enabled(struct drm_i915_private *dev_priv, +i915_reg_t sdvo_reg, enum pipe *pipe); +bool intel_sdvo_init(struct drm_i915_private *dev_priv, +i915_reg_t reg, enum port port); + +#endif /* __INTEL_SDVO_H__ */ -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 12/25] drm/i915: extract intel_hdcp.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/i915_debugfs.c | 1 + drivers/gpu/drm/i915/intel_atomic.c | 1 + drivers/gpu/drm/i915/intel_connector.c| 7 +++-- drivers/gpu/drm/i915/intel_ddi.c | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_dp.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 15 --- drivers/gpu/drm/i915/intel_hdcp.h | 33 +++ drivers/gpu/drm/i915/intel_hdmi.c | 1 + 10 files changed, 45 insertions(+), 17 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_hdcp.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index f1f62794b457..a4846d7eaf46 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -18,6 +18,7 @@ header_test := \ intel_engine_types.h \ intel_fbc.h \ intel_frontbuffer.h \ + intel_hdcp.h \ intel_lspcon.h \ intel_psr.h \ intel_sdvo.h \ diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 1c3e19b9583e..ebe85144ae9c 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -36,6 +36,7 @@ #include "intel_drv.h" #include "intel_fbc.h" #include "intel_guc_submission.h" +#include "intel_hdcp.h" #include "intel_psr.h" static inline struct drm_i915_private *node_to_i915(struct drm_info_node *node) diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c index b844e8840c6f..2cbcf6ac24d8 100644 --- a/drivers/gpu/drm/i915/intel_atomic.c +++ b/drivers/gpu/drm/i915/intel_atomic.c @@ -35,6 +35,7 @@ #include #include "intel_drv.h" +#include "intel_hdcp.h" /** * intel_digital_connector_atomic_get_property - hook for connector->atomic_get_property. diff --git a/drivers/gpu/drm/i915/intel_connector.c b/drivers/gpu/drm/i915/intel_connector.c index 848dd9e728d8..27031040f090 100644 --- a/drivers/gpu/drm/i915/intel_connector.c +++ b/drivers/gpu/drm/i915/intel_connector.c @@ -23,12 +23,15 @@ * DEALINGS IN THE SOFTWARE. */ -#include #include +#include + #include #include -#include "intel_drv.h" + #include "i915_drv.h" +#include "intel_drv.h" +#include "intel_hdcp.h" int intel_connector_init(struct intel_connector *connector) { diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 9da006f4ce35..c7c8f7b1a0b8 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -32,6 +32,7 @@ #include "intel_connector.h" #include "intel_drv.h" #include "intel_dsi.h" +#include "intel_hdcp.h" #include "intel_lspcon.h" #include "intel_psr.h" diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 6d2a385d149e..e725597ce730 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -55,6 +55,7 @@ #include "intel_dsi.h" #include "intel_fbc.h" #include "intel_frontbuffer.h" +#include "intel_hdcp.h" #include "intel_psr.h" #include "intel_sdvo.h" diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 2f50a4d81fcd..efc411964bcc 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -46,6 +46,7 @@ #include "intel_connector.h" #include "intel_ddi.h" #include "intel_drv.h" +#include "intel_hdcp.h" #include "intel_lspcon.h" #include "intel_psr.h" diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 681f232fd305..e04a622a71ed 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2099,21 +2099,6 @@ static inline void intel_backlight_device_unregister(struct intel_connector *con } #endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */ -/* intel_hdcp.c */ -void intel_hdcp_atomic_check(struct drm_connector *connector, -struct drm_connector_state *old_state, -struct drm_connector_state *new_state); -int intel_hdcp_init(struct intel_connector *connector, - const struct intel_hdcp_shim *hdcp_shim); -int intel_hdcp_enable(struct intel_connector *connector); -int intel_hdcp_disable(struct intel_connector *connector); -bool is_hdcp_supported(struct drm_i915_private *dev_priv, enum port port); -bool intel_hdcp_capable(st
[Intel-gfx] [PATCH 20/25] drm/i915: extract intel_tv.h from intel_drv.h
It used to be handy that we only had a couple of headers, but over time intel_drv.h has become unwieldy. Extract declarations to a separate header file corresponding to the implementation module, clarifying the modularity of the driver. Ensure the new header is self-contained, and do so with minimal further includes, using forward declarations as needed. Include the new header only where needed, and sort the modified include directives while at it and as needed. No functional changes. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/Makefile.header-test | 1 + drivers/gpu/drm/i915/intel_display.c | 1 + drivers/gpu/drm/i915/intel_drv.h | 3 --- drivers/gpu/drm/i915/intel_tv.h | 13 + 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu/drm/i915/intel_tv.h diff --git a/drivers/gpu/drm/i915/Makefile.header-test b/drivers/gpu/drm/i915/Makefile.header-test index 2724ccff61ea..595d9b34d866 100644 --- a/drivers/gpu/drm/i915/Makefile.header-test +++ b/drivers/gpu/drm/i915/Makefile.header-test @@ -29,6 +29,7 @@ header_test := \ intel_pm.h \ intel_psr.h \ intel_sdvo.h \ + intel_tv.h \ intel_workarounds_types.h quiet_cmd_header_test = HDRTEST $@ diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 77348a9e68e7..5f4771d0f489 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -64,6 +64,7 @@ #include "intel_pm.h" #include "intel_psr.h" #include "intel_sdvo.h" +#include "intel_tv.h" /* Primary plane formats for gen <= 3 */ static const u32 i8xx_primary_formats[] = { diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 5bf36ea9fc08..fab363d9af2e 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2081,9 +2081,6 @@ static inline bool icl_is_hdr_plane(struct drm_i915_private *dev_priv, return plane_id < PLANE_SPRITE2; } -/* intel_tv.c */ -void intel_tv_init(struct drm_i915_private *dev_priv); - /* intel_atomic.c */ int intel_digital_connector_atomic_get_property(struct drm_connector *connector, const struct drm_connector_state *state, diff --git a/drivers/gpu/drm/i915/intel_tv.h b/drivers/gpu/drm/i915/intel_tv.h new file mode 100644 index ..44518575ec5c --- /dev/null +++ b/drivers/gpu/drm/i915/intel_tv.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: MIT */ +/* + * Copyright © 2019 Intel Corporation + */ + +#ifndef __INTEL_TV_H__ +#define __INTEL_TV_H__ + +struct drm_i915_private; + +void intel_tv_init(struct drm_i915_private *dev_priv); + +#endif /* __INTEL_TV_H__ */ -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 6/7] drm/i915/psr: Remove partial PSR support on multiple transcoders
On Thu, Apr 04, 2019 at 12:40:34PM -0700, Souza, Jose wrote: > On Wed, 2019-04-03 at 17:31 -0700, Rodrigo Vivi wrote: > > On Wed, Apr 03, 2019 at 04:35:38PM -0700, José Roberto de Souza > > wrote: > > > PSR is only supported in eDP transcoder and there is only one > > > instance of it, so lets drop all of this code. > > > > Is this sentence true? I mean, in the way it is written it > > seems like HW doesn't actually support it... > > Or should we re-phrase for we are not really enabling support > > for other transcoders than eDP and we do not have plans to do > > it so soon so let's clean the code... > > or something like that? > > Okay, what about replace it for: > > Since BDW all transcoders have PSR registers but only EDP transcoder > can drive a EDP panel and as PSR is only part of the EDP specification, > for real usage PSR is only supported in EDP panel, so lets drop all of > this useless code. well, this still looks like HW limitation. If PSR is supported by HW on different transcoders is because there's some possibility of adding eDP on other transcoders. They wouldn't waste so many register space if that wasn't the case. Even though we have a dedicated transcoder for eDP I don't believe we can assume that eDP is not supported on the other ones. > > > > > > > > Cc: Dhinakaran Pandiyan > > > Cc: Rodrigo Vivi > > > Signed-off-by: José Roberto de Souza > > > --- > > > drivers/gpu/drm/i915/i915_reg.h | 17 +--- > > > drivers/gpu/drm/i915/intel_psr.c | 147 --- > > > > > > 2 files changed, 42 insertions(+), 122 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i915/i915_reg.h > > > b/drivers/gpu/drm/i915/i915_reg.h > > > index c59cfa83dbaf..18e2991b376d 100644 > > > --- a/drivers/gpu/drm/i915/i915_reg.h > > > +++ b/drivers/gpu/drm/i915/i915_reg.h > > > @@ -4241,13 +4241,9 @@ enum { > > > /* Bspec claims those aren't shifted but stay at 0x64800 */ > > > #define EDP_PSR_IMR _MMIO(0x64834) > > > #define EDP_PSR_IIR _MMIO(0x64838) > > > -#define EDP_PSR_ERROR(shift) (1 << ((shift) > > > + 2)) > > > -#define EDP_PSR_POST_EXIT(shift) (1 << ((shift) + 1)) > > > -#define EDP_PSR_PRE_ENTRY(shift) (1 << (shift)) > > > -#define EDP_PSR_TRANSCODER_C_SHIFT 24 > > > -#define EDP_PSR_TRANSCODER_B_SHIFT 16 > > > -#define EDP_PSR_TRANSCODER_A_SHIFT 8 > > > -#define EDP_PSR_TRANSCODER_EDP_SHIFT 0 > > > +#define EDP_PSR_ERROR (1 << 2) > > > +#define EDP_PSR_POST_EXIT (1 << 1) > > > +#define EDP_PSR_PRE_ENTRY (1 << 0) > > > > > > #define EDP_PSR_AUX_CTL _MMIO(dev_priv- > > > >psr_mmio_base + 0x10) > > > #define EDP_PSR_AUX_CTL_TIME_OUT_MASK (3 << 26) > > > @@ -4312,12 +4308,7 @@ enum { > > > #define EDP_PSR2_IDLE_FRAME_MASK 0xf > > > #define EDP_PSR2_IDLE_FRAME_SHIFT 0 > > > > > > -#define _PSR_EVENT_TRANS_A 0x60848 > > > -#define _PSR_EVENT_TRANS_B 0x61848 > > > -#define _PSR_EVENT_TRANS_C 0x62848 > > > -#define _PSR_EVENT_TRANS_D 0x63848 > > > -#define _PSR_EVENT_TRANS_EDP 0x6F848 > > > -#define PSR_EVENT(trans) _MMIO_TRANS2(trans, > > > _PSR_EVENT_TRANS_A) > > > +#define PSR_EVENT_MMIO(0x6F848) > > > #define PSR_EVENT_PSR2_WD_TIMER_EXPIRE (1 << 17) > > > #define PSR_EVENT_PSR2_DISABLED (1 << 16) > > > #define PSR_EVENT_SU_DIRTY_FIFO_UNDERRUN(1 << 15) > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > > b/drivers/gpu/drm/i915/intel_psr.c > > > index bb97c1657493..b984e005b72e 100644 > > > --- a/drivers/gpu/drm/i915/intel_psr.c > > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > > @@ -84,46 +84,12 @@ static bool intel_psr2_enabled(struct > > > drm_i915_private *dev_priv, > > > } > > > } > > > > > > -static int edp_psr_shift(enum transcoder cpu_transcoder) > > > -{ > > > - switch (cpu_transcoder) { > > > - case TRANSCODER_A: > > > - return EDP_PSR_TRANSCODER_A_SHIFT; > > > - case TRANSCODER_B: > > > - return EDP_PSR_TRANSCODER_B_SHIFT; > > > - case TRANSCODER_C: > > > - return EDP_PSR_TRANSCODER_C_SHIFT; > > > - default: > > > - MISSING_CASE(cpu_transcoder); > > > - /* fallthrough */ > > > - case TRANSCODER_EDP: > > > - return EDP_PSR_TRANSCODER_EDP_SHIFT; > > > - } > > > -} > > > - > > > void intel_psr_irq_control(struct drm_i915_private *dev_priv, u32 > > > debug) > > > { > > > - u32 debug_mask, mask; > > > - enum transcoder cpu_transcoder; > > > - u32 transcoders = BIT(TRANSCODER_EDP); > > > - > > > - if (INTEL_GEN(dev_priv) >= 8) > > > - transcoders |= BIT(TRANSCODER_A) | > > > -BIT(TRANSCODER_B) | > > > -
Re: [Intel-gfx] [PATCH 03/25] drm/i915: extract intel_crt.h from intel_drv.h
On Fri, 05 Apr 2019, Jani Nikula wrote: > It used to be handy that we only had a couple of headers, but over time > intel_drv.h has become unwieldy. Extract declarations to a separate > header file corresponding to the implementation module, clarifying the > modularity of the driver. The tabs are a copy-paste fail that happen to align so that I didn't spot them in either git log or looking at the patches before sending. Ugh. BR, Jani. > > Ensure the new header is self-contained, and do so with minimal further > includes, using forward declarations as needed. Include the new header > only where needed, and sort the modified include directives while at it > and as needed. > > No functional changes. > > Signed-off-by: Jani Nikula > --- > drivers/gpu/drm/i915/Makefile.header-test | 1 + > drivers/gpu/drm/i915/intel_crt.c | 5 - > drivers/gpu/drm/i915/intel_crt.h | 21 + > drivers/gpu/drm/i915/intel_display.c | 11 ++- > drivers/gpu/drm/i915/intel_drv.h | 6 -- > drivers/gpu/drm/i915/intel_runtime_pm.c | 1 + > 6 files changed, 29 insertions(+), 16 deletions(-) > create mode 100644 drivers/gpu/drm/i915/intel_crt.h > > diff --git a/drivers/gpu/drm/i915/Makefile.header-test > b/drivers/gpu/drm/i915/Makefile.header-test > index 09bba7c9376c..fd0f33ea896d 100644 > --- a/drivers/gpu/drm/i915/Makefile.header-test > +++ b/drivers/gpu/drm/i915/Makefile.header-test > @@ -10,6 +10,7 @@ header_test := \ > i915_timeline_types.h \ > intel_audio.h \ > intel_context_types.h \ > + intel_crt.h \ > intel_engine_types.h \ > intel_frontbuffer.h \ > intel_workarounds_types.h > diff --git a/drivers/gpu/drm/i915/intel_crt.c > b/drivers/gpu/drm/i915/intel_crt.c > index 50530e49982c..a14afbe51b08 100644 > --- a/drivers/gpu/drm/i915/intel_crt.c > +++ b/drivers/gpu/drm/i915/intel_crt.c > @@ -27,13 +27,16 @@ > #include > #include > #include > + > #include > #include > #include > #include > -#include "intel_drv.h" > #include > + > #include "i915_drv.h" > +#include "intel_crt.h" > +#include "intel_drv.h" > > /* Here's the desired hotplug mode */ > #define ADPA_HOTPLUG_BITS (ADPA_CRT_HOTPLUG_PERIOD_128 | \ > diff --git a/drivers/gpu/drm/i915/intel_crt.h > b/drivers/gpu/drm/i915/intel_crt.h > new file mode 100644 > index ..1b3fba359efc > --- /dev/null > +++ b/drivers/gpu/drm/i915/intel_crt.h > @@ -0,0 +1,21 @@ > +/* SPDX-License-Identifier: MIT */ > +/* > + * Copyright © 2019 Intel Corporation > + */ > + > +#ifndef __INTEL_CRT_H__ > +#define __INTEL_CRT_H__ > + > +#include "i915_reg.h" > + > +enum pipe; > +struct drm_encoder; > +struct drm_i915_private; > +struct drm_i915_private; > + > +bool intel_crt_port_enabled(struct drm_i915_private *dev_priv, > + i915_reg_t adpa_reg, enum pipe *pipe); > +void intel_crt_init(struct drm_i915_private *dev_priv); > +void intel_crt_reset(struct drm_encoder *encoder); > + > +#endif /* __INTEL_CRT_H__ */ > diff --git a/drivers/gpu/drm/i915/intel_display.c > b/drivers/gpu/drm/i915/intel_display.c > index 7ecfb7d98839..5cf82dbead65 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -46,20 +46,13 @@ > > #include "i915_drv.h" > #include "i915_gem_clflush.h" > +#include "i915_reset.h" > #include "i915_trace.h" > +#include "intel_crt.h" > #include "intel_drv.h" > #include "intel_dsi.h" > #include "intel_frontbuffer.h" > > -#include "intel_drv.h" > -#include "intel_dsi.h" > -#include "intel_frontbuffer.h" > - > -#include "i915_drv.h" > -#include "i915_gem_clflush.h" > -#include "i915_reset.h" > -#include "i915_trace.h" > - > /* Primary plane formats for gen <= 3 */ > static const u32 i8xx_primary_formats[] = { > DRM_FORMAT_C8, > diff --git a/drivers/gpu/drm/i915/intel_drv.h > b/drivers/gpu/drm/i915/intel_drv.h > index 5dc434d74ada..847da5b24548 100644 > --- a/drivers/gpu/drm/i915/intel_drv.h > +++ b/drivers/gpu/drm/i915/intel_drv.h > @@ -1627,12 +1627,6 @@ void gen9_reset_guc_interrupts(struct drm_i915_private > *dev_priv); > void gen9_enable_guc_interrupts(struct drm_i915_private *dev_priv); > void gen9_disable_guc_interrupts(struct drm_i915_private *dev_priv); > > -/* intel_crt.c */ > -bool intel_crt_port_enabled(struct drm_i915_private *dev_priv, > - i915_reg_t adpa_reg, enum pipe *pipe); > -void intel_crt_init(struct drm_i915_private *dev_priv); > -void intel_crt_reset(struct drm_encoder *encoder); > - > /* intel_ddi.c */ > void intel_ddi_fdi_post_disable(struct intel_encoder *intel_encoder, > const struct intel_crtc_state *old_crtc_state, > diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c > b/drivers/gpu/drm/i915/intel_runtime_pm.c > index 40ddfbb97acb..a9931081462b 100644 > --- a/drivers/gpu/drm/i915/intel_runtime_pm.c > +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c >
Re: [Intel-gfx] [PATCH 07/25] drm/i915: extract intel_fbc.h from intel_drv.h
Quoting Jani Nikula (2019-04-04 22:14:31) > diff --git a/drivers/gpu/drm/i915/i915_suspend.c > b/drivers/gpu/drm/i915/i915_suspend.c > index d2f2a9c2fabd..eec48d856adb 100644 > --- a/drivers/gpu/drm/i915/i915_suspend.c > +++ b/drivers/gpu/drm/i915/i915_suspend.c > @@ -24,9 +24,12 @@ > * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. > */ > > + Stray > #include > -#include "intel_drv.h" > + > #include "i915_reg.h" > +#include "intel_drv.h" > +#include "intel_fbc.h" > > static void i915_save_display(struct drm_i915_private *dev_priv) > { ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 00/25] drm/i915: the great header refactoring, part one
Quoting Jani Nikula (2019-04-04 22:14:24) > intel_drv.h has grown out of proportions, and turned into a dumping > ground. Way back when it was useful to have only a handful of headers, > but we're long past that. > > Start splitting off per-module headers. The basic principles: > > * Make the new headers self-contained (i.e. can be compiled without > including other headers first), and test this using the new infra for > that. > > * Use minimal includes for making the headers self-contained. Use > forward declarations for structs where applicable, and e.g. include >instead of . > > * Only split off the headers, and mostly refrain from doing other > refactoring while at it. (There are a few minor things.) > > * Mostly only split off function declarations. Splitting off types is > left for follow-up work. > > * Include the new headers only where needed. This leads to a lot of > includes here and there, but on the other hand increases the clarity > of the relationships between the modules. (And already raises a bunch > of questions about the split and cross-calls between some > modules. It'll be easier to analyze this.) > > * Wherever adding new includes, group the includes by first, > then , then "...", and sort the groups alphabetically. > > * Choice of what to extract first here is purely arbitrary. > > * Follow-up work should consider renaming functions according to the > module, i.e. functions in intel_foo.c should be prefixed > intel_foo_. Better naming will be helpful in further organizing the > driver, as well as grasping the structure to begin with. I wholeheartedly agree. Recent experience shows that with a small number of very large headers, getting the types defined at the right point is much harder than with small scoped headers. (And don't get me started on trying to avoid circular definitions for inlines.) The counterpoint is that it can be harder to find the right header. But it's no harder than trying to find the right c-file, and if we keep to the rule that object-name.c is accompanied by object-name.h, once you know object name, it is easy to find. > Jani Nikula (25): > drm/i915: make intel_frontbuffer.h self-contained > drm/i915: extract intel_audio.h from intel_drv.h > drm/i915: extract intel_crt.h from intel_drv.h > drm/i915: extract intel_ddi.h from intel_drv.h > drm/i915: extract intel_connector.h from intel_drv.h > drm/i915: extract intel_csr.h from intel_drv.h > drm/i915: extract intel_fbc.h from intel_drv.h > drm/i915: extract intel_psr.h from intel_drv.h > drm/i915: extract intel_color.h from intel_drv.h > drm/i915: extract intel_lspcon.h from intel_drv.h > drm/i915: extract intel_sdvo.h from intel_drv.h > drm/i915: extract intel_hdcp.h from intel_drv.h > drm/i915: extract intel_panel.h from intel_drv.h > drm/i915: extract intel_pm.h from intel_drv.h > drm/i915: extract intel_fbdev.h from intel_drv.h > drm/i915: extract intel_dp.h from intel_drv.h > drm/i915: extract intel_hdmi.h from intel_drv.h > drm/i915: extract intel_atomic_plane.h from intel_drv.h > drm/i915: extract intel_pipe_crc.h from intel_drv.h > drm/i915: extract intel_tv.h from intel_drv.h > drm/i915: extract intel_lvds.h from intel_drv.h > drm/i915: extract intel_dvo.h from intel_drv.h > drm/i915: extract intel_sprite.h from intel_drv.h > drm/i915: extract intel_cdclk.h from intel_drv.h > drm/i915/cdclk: have only one init/uninit function Read through the patches, and they are just code motion. Reviewed-by: Chris Wilson The real work is done by the compiler. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 6/7] drm/i915/psr: Remove partial PSR support on multiple transcoders
On Thu, 2019-04-04 at 14:20 -0700, Rodrigo Vivi wrote: > On Thu, Apr 04, 2019 at 12:40:34PM -0700, Souza, Jose wrote: > > On Wed, 2019-04-03 at 17:31 -0700, Rodrigo Vivi wrote: > > > On Wed, Apr 03, 2019 at 04:35:38PM -0700, José Roberto de Souza > > > wrote: > > > > PSR is only supported in eDP transcoder and there is only one > > > > instance of it, so lets drop all of this code. > > > > > > Is this sentence true? I mean, in the way it is written it > > > seems like HW doesn't actually support it... > > > Or should we re-phrase for we are not really enabling support > > > for other transcoders than eDP and we do not have plans to do > > > it so soon so let's clean the code... > > > or something like that? > > > > Okay, what about replace it for: > > > > Since BDW all transcoders have PSR registers but only EDP transcoder > > can drive a EDP panel and as PSR is only part of the EDP specification, > > for real usage PSR is only supported in EDP panel, so lets drop all of > > this useless code. > > well, this still looks like HW limitation. If PSR is supported by HW on > different transcoders is because there's some possibility of adding > eDP on other transcoders. They wouldn't waste so many register space > if that wasn't the case. > > Even though we have a dedicated transcoder for eDP I don't > believe we can assume that eDP is not supported on the other ones. > Why not write something like (or exactly) this "i915 does not support enabling PSR on any transcoder other than eDP. Clean up the misleading non-eDP code that currently exists to allow for the rework of PSR register definitions in the next patch" -DK > > > > > > > > > > > > > Cc: Dhinakaran Pandiyan > > > > Cc: Rodrigo Vivi > > > > Signed-off-by: José Roberto de Souza > > > > --- > > > > drivers/gpu/drm/i915/i915_reg.h | 17 +--- > > > > drivers/gpu/drm/i915/intel_psr.c | 147 --- > > > > > > > > 2 files changed, 42 insertions(+), 122 deletions(-) > > > > > > > > diff --git a/drivers/gpu/drm/i915/i915_reg.h > > > > b/drivers/gpu/drm/i915/i915_reg.h > > > > index c59cfa83dbaf..18e2991b376d 100644 > > > > --- a/drivers/gpu/drm/i915/i915_reg.h > > > > +++ b/drivers/gpu/drm/i915/i915_reg.h > > > > @@ -4241,13 +4241,9 @@ enum { > > > > /* Bspec claims those aren't shifted but stay at 0x64800 */ > > > > #define EDP_PSR_IMR_MMIO(0x64834) > > > > #define EDP_PSR_IIR_MMIO(0x64838) > > > > -#define EDP_PSR_ERROR(shift) (1 << ((shift) > > > > + 2)) > > > > -#define EDP_PSR_POST_EXIT(shift) (1 << ((shift) + 1)) > > > > -#define EDP_PSR_PRE_ENTRY(shift) (1 << (shift)) > > > > -#define EDP_PSR_TRANSCODER_C_SHIFT 24 > > > > -#define EDP_PSR_TRANSCODER_B_SHIFT 16 > > > > -#define EDP_PSR_TRANSCODER_A_SHIFT 8 > > > > -#define EDP_PSR_TRANSCODER_EDP_SHIFT 0 > > > > +#define EDP_PSR_ERROR(1 << 2) > > > > +#define EDP_PSR_POST_EXIT(1 << 1) > > > > +#define EDP_PSR_PRE_ENTRY(1 << 0) > > > > > > > > #define EDP_PSR_AUX_CTL_MMIO(dev_priv- > > > > > psr_mmio_base + 0x10) > > > > > > > > #define EDP_PSR_AUX_CTL_TIME_OUT_MASK(3 << 26) > > > > @@ -4312,12 +4308,7 @@ enum { > > > > #define EDP_PSR2_IDLE_FRAME_MASK 0xf > > > > #define EDP_PSR2_IDLE_FRAME_SHIFT0 > > > > > > > > -#define _PSR_EVENT_TRANS_A 0x60848 > > > > -#define _PSR_EVENT_TRANS_B 0x61848 > > > > -#define _PSR_EVENT_TRANS_C 0x62848 > > > > -#define _PSR_EVENT_TRANS_D 0x63848 > > > > -#define _PSR_EVENT_TRANS_EDP 0x6F848 > > > > -#define PSR_EVENT(trans) _MMIO_TRANS2(trans, > > > > _PSR_EVENT_TRANS_A) > > > > +#define PSR_EVENT _MMIO(0x6F848) > > > > #define PSR_EVENT_PSR2_WD_TIMER_EXPIRE(1 << 17) > > > > #define PSR_EVENT_PSR2_DISABLED (1 << 16) > > > > #define PSR_EVENT_SU_DIRTY_FIFO_UNDERRUN (1 << 15) > > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > > > b/drivers/gpu/drm/i915/intel_psr.c > > > > index bb97c1657493..b984e005b72e 100644 > > > > --- a/drivers/gpu/drm/i915/intel_psr.c > > > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > > > @@ -84,46 +84,12 @@ static bool intel_psr2_enabled(struct > > > > drm_i915_private *dev_priv, > > > > } > > > > } > > > > > > > > -static int edp_psr_shift(enum transcoder cpu_transcoder) > > > > -{ > > > > - switch (cpu_transcoder) { > > > > - case TRANSCODER_A: > > > > - return EDP_PSR_TRANSCODER_A_SHIFT; > > > > - case TRANSCODER_B: > > > > - return EDP_PSR_TRANSCODER_B_SHIFT; > > > > - case TRANSCODER_C: > > > > - return EDP_PSR_TRANSCODER_C_SHIFT; > > > >
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: the great header refactoring, part one
== Series Details == Series: drm/i915: the great header refactoring, part one URL : https://patchwork.freedesktop.org/series/59022/ State : warning == Summary == $ dim checkpatch origin/drm-tip e3273176ce64 drm/i915: make intel_frontbuffer.h self-contained 9173569bc454 drm/i915: extract intel_audio.h from intel_drv.h -:94: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #94: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 178 lines checked 17593127dc04 drm/i915: extract intel_crt.h from intel_drv.h -:55: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #55: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 86 lines checked f7505cd98351 drm/i915: extract intel_ddi.h from intel_drv.h -:61: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #61: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 156 lines checked 29b3cb9772fe drm/i915: extract intel_connector.h from intel_drv.h -:45: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #45: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 214 lines checked d3dbcf35782d drm/i915: extract intel_csr.h from intel_drv.h -:45: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #45: new file mode 100644 -:60: WARNING:FUNCTION_ARGUMENTS: function definition argument 'struct drm_i915_private *' should also have an identifier name #60: FILE: drivers/gpu/drm/i915/intel_csr.h:11: +void intel_csr_ucode_init(struct drm_i915_private *); -:61: WARNING:FUNCTION_ARGUMENTS: function definition argument 'struct drm_i915_private *' should also have an identifier name #61: FILE: drivers/gpu/drm/i915/intel_csr.h:12: +void intel_csr_load_program(struct drm_i915_private *); -:62: WARNING:FUNCTION_ARGUMENTS: function definition argument 'struct drm_i915_private *' should also have an identifier name #62: FILE: drivers/gpu/drm/i915/intel_csr.h:13: +void intel_csr_ucode_fini(struct drm_i915_private *); -:63: WARNING:FUNCTION_ARGUMENTS: function definition argument 'struct drm_i915_private *' should also have an identifier name #63: FILE: drivers/gpu/drm/i915/intel_csr.h:14: +void intel_csr_ucode_suspend(struct drm_i915_private *); -:64: WARNING:FUNCTION_ARGUMENTS: function definition argument 'struct drm_i915_private *' should also have an identifier name #64: FILE: drivers/gpu/drm/i915/intel_csr.h:15: +void intel_csr_ucode_resume(struct drm_i915_private *); total: 0 errors, 6 warnings, 0 checks, 51 lines checked 3b0c7907b1c7 drm/i915: extract intel_fbc.h from intel_drv.h -:76: CHECK:LINE_SPACING: Please don't use multiple blank lines #76: FILE: drivers/gpu/drm/i915/i915_suspend.c:27: + -:134: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #134: new file mode 100644 total: 0 errors, 1 warnings, 1 checks, 150 lines checked 1d43269827e3 drm/i915: extract intel_psr.h from intel_drv.h -:202: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #202: new file mode 100644 -:221: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #221: FILE: drivers/gpu/drm/i915/intel_psr.h:15: +#define CAN_PSR(dev_priv) (HAS_PSR(dev_priv) && dev_priv->psr.sink_support) -:226: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #226: FILE: drivers/gpu/drm/i915/intel_psr.h:20: +void intel_psr_disable(struct intel_dp *intel_dp, + const struct intel_crtc_state *old_crtc_state); -:231: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #231: FILE: drivers/gpu/drm/i915/intel_psr.h:25: + unsigned frontbuffer_bits, -:234: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #234: FILE: drivers/gpu/drm/i915/intel_psr.h:28: +unsigned frontbuffer_bits, total: 0 errors, 3 warnings, 2 checks, 195 lines checked 1e02d4859ef6 drm/i915: extract intel_color.h from intel_drv.h -:33: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #33: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 43 lines checked 4aef051c5084 drm/i915: extract intel_lspcon.h from intel_drv.h -:101: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #101: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 93 lines checked a9b1119a8b8a drm/i915: extract intel_sdvo.h from intel_drv.h -:75: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #75: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 57 lines checked 444cceac5b34 drm/i915: extract intel_hdcp.h from intel_drv.h -:141: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #141: new
Re: [Intel-gfx] [PATCH 6/7] drm/i915/psr: Remove partial PSR support on multiple transcoders
On Thu, Apr 04, 2019 at 02:41:26PM -0700, Pandiyan, Dhinakaran wrote: > On Thu, 2019-04-04 at 14:20 -0700, Rodrigo Vivi wrote: > > On Thu, Apr 04, 2019 at 12:40:34PM -0700, Souza, Jose wrote: > > > On Wed, 2019-04-03 at 17:31 -0700, Rodrigo Vivi wrote: > > > > On Wed, Apr 03, 2019 at 04:35:38PM -0700, José Roberto de Souza > > > > wrote: > > > > > PSR is only supported in eDP transcoder and there is only one > > > > > instance of it, so lets drop all of this code. > > > > > > > > Is this sentence true? I mean, in the way it is written it > > > > seems like HW doesn't actually support it... > > > > Or should we re-phrase for we are not really enabling support > > > > for other transcoders than eDP and we do not have plans to do > > > > it so soon so let's clean the code... > > > > or something like that? > > > > > > Okay, what about replace it for: > > > > > > Since BDW all transcoders have PSR registers but only EDP transcoder > > > can drive a EDP panel and as PSR is only part of the EDP specification, > > > for real usage PSR is only supported in EDP panel, so lets drop all of > > > this useless code. > > > > well, this still looks like HW limitation. If PSR is supported by HW on > > different transcoders is because there's some possibility of adding > > eDP on other transcoders. They wouldn't waste so many register space > > if that wasn't the case. > > > > Even though we have a dedicated transcoder for eDP I don't > > believe we can assume that eDP is not supported on the other ones. > > > > Why not write something like (or exactly) this > > "i915 does not support enabling PSR on any transcoder other than eDP. Clean up > the misleading non-eDP code that currently exists to allow for the rework of > PSR > register definitions in the next patch" +1 > > > -DK > > > > > > > > > > > > > > > > > > Cc: Dhinakaran Pandiyan > > > > > Cc: Rodrigo Vivi > > > > > Signed-off-by: José Roberto de Souza > > > > > --- > > > > > drivers/gpu/drm/i915/i915_reg.h | 17 +--- > > > > > drivers/gpu/drm/i915/intel_psr.c | 147 --- > > > > > > > > > > 2 files changed, 42 insertions(+), 122 deletions(-) > > > > > > > > > > diff --git a/drivers/gpu/drm/i915/i915_reg.h > > > > > b/drivers/gpu/drm/i915/i915_reg.h > > > > > index c59cfa83dbaf..18e2991b376d 100644 > > > > > --- a/drivers/gpu/drm/i915/i915_reg.h > > > > > +++ b/drivers/gpu/drm/i915/i915_reg.h > > > > > @@ -4241,13 +4241,9 @@ enum { > > > > > /* Bspec claims those aren't shifted but stay at 0x64800 */ > > > > > #define EDP_PSR_IMR _MMIO(0x64834) > > > > > #define EDP_PSR_IIR _MMIO(0x64838) > > > > > -#define EDP_PSR_ERROR(shift) (1 << ((shift) > > > > > + 2)) > > > > > -#define EDP_PSR_POST_EXIT(shift) (1 << ((shift) + 1)) > > > > > -#define EDP_PSR_PRE_ENTRY(shift) (1 << (shift)) > > > > > -#define EDP_PSR_TRANSCODER_C_SHIFT 24 > > > > > -#define EDP_PSR_TRANSCODER_B_SHIFT 16 > > > > > -#define EDP_PSR_TRANSCODER_A_SHIFT 8 > > > > > -#define EDP_PSR_TRANSCODER_EDP_SHIFT 0 > > > > > +#define EDP_PSR_ERROR (1 << 2) > > > > > +#define EDP_PSR_POST_EXIT (1 << 1) > > > > > +#define EDP_PSR_PRE_ENTRY (1 << 0) > > > > > > > > > > #define EDP_PSR_AUX_CTL _MMIO(dev_priv- > > > > > > psr_mmio_base + 0x10) > > > > > > > > > > #define EDP_PSR_AUX_CTL_TIME_OUT_MASK (3 << 26) > > > > > @@ -4312,12 +4308,7 @@ enum { > > > > > #define EDP_PSR2_IDLE_FRAME_MASK 0xf > > > > > #define EDP_PSR2_IDLE_FRAME_SHIFT 0 > > > > > > > > > > -#define _PSR_EVENT_TRANS_A 0x60848 > > > > > -#define _PSR_EVENT_TRANS_B 0x61848 > > > > > -#define _PSR_EVENT_TRANS_C 0x62848 > > > > > -#define _PSR_EVENT_TRANS_D 0x63848 > > > > > -#define _PSR_EVENT_TRANS_EDP 0x6F848 > > > > > -#define PSR_EVENT(trans) _MMIO_TRANS2(trans, > > > > > _PSR_EVENT_TRANS_A) > > > > > +#define PSR_EVENT_MMIO(0x6F848) > > > > > #define PSR_EVENT_PSR2_WD_TIMER_EXPIRE (1 << 17) > > > > > #define PSR_EVENT_PSR2_DISABLED (1 << 16) > > > > > #define PSR_EVENT_SU_DIRTY_FIFO_UNDERRUN(1 << 15) > > > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > > > > b/drivers/gpu/drm/i915/intel_psr.c > > > > > index bb97c1657493..b984e005b72e 100644 > > > > > --- a/drivers/gpu/drm/i915/intel_psr.c > > > > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > > > > @@ -84,46 +84,12 @@ static bool intel_psr2_enabled(struct > > > > > drm_i915_private *dev_priv, > > > > > } > > > > > } > > > > > > > > > > -static int edp_psr_shift(enum transcoder cpu_transcoder) > > > > > -{ > > > > > - switch (cpu_transcoder) { > > > > > - case TRANSCODER_A: > > > >
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: the great header refactoring, part one
== Series Details == Series: drm/i915: the great header refactoring, part one URL : https://patchwork.freedesktop.org/series/59022/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915: make intel_frontbuffer.h self-contained -drivers/gpu/drm/i915/selftests/../i915_drv.h:3623:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3616:16: warning: expression using sizeof(void) +./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000 becomes 0) Commit: drm/i915: extract intel_audio.h from intel_drv.h Okay! Commit: drm/i915: extract intel_crt.h from intel_drv.h Okay! Commit: drm/i915: extract intel_ddi.h from intel_drv.h +drivers/gpu/drm/i915/intel_ddi.c:1046:6: warning: symbol 'hsw_fdi_link_train' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:1300:5: warning: symbol 'cnl_calc_wrpll_link' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:1663:6: warning: symbol 'intel_ddi_set_pipe_settings' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:1708:6: warning: symbol 'intel_ddi_set_vc_payload_alloc' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:1724:6: warning: symbol 'intel_ddi_enable_transcoder_func' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:1810:6: warning: symbol 'intel_ddi_disable_transcoder_func' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:1830:5: warning: symbol 'intel_ddi_toggle_hdcp_signalling' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:1861:6: warning: symbol 'intel_ddi_connector_get_hw_state' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:2013:6: warning: symbol 'intel_ddi_get_hw_state' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:2083:6: warning: symbol 'intel_ddi_enable_pipe_clock' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:2096:6: warning: symbol 'intel_ddi_disable_pipe_clock' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:2191:4: warning: symbol 'intel_ddi_dp_voltage_max' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:2235:4: warning: symbol 'intel_ddi_dp_pre_emphasis_max' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:2664:5: warning: symbol 'bxt_signal_levels' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:2682:5: warning: symbol 'ddi_signal_levels' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:2751:6: warning: symbol 'icl_sanitize_encoder_pll_mapping' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:3326:6: warning: symbol 'intel_ddi_fdi_post_disable' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:3624:6: warning: symbol 'intel_ddi_prepare_link_retrain' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:3683:6: warning: symbol 'intel_ddi_compute_min_voltage_level' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:3692:6: warning: symbol 'intel_ddi_get_config' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_ddi.c:4136:6: warning: symbol 'intel_ddi_init' was not declared. Should it be static? Commit: drm/i915: extract intel_connector.h from intel_drv.h +drivers/gpu/drm/i915/intel_connector.c:106:5: warning: symbol 'intel_connector_register' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_connector.c:128:6: warning: symbol 'intel_connector_unregister' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_connector.c:135:6: warning: symbol 'intel_connector_attach_encoder' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_connector.c:147:6: warning: symbol 'intel_connector_get_hw_state' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_connector.c:155:11: warning: symbol 'intel_connector_get_pipe' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_connector.c:172:5: warning: symbol 'intel_connector_update_modes' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_connector.c:190:5: warning: symbol 'intel_ddc_get_modes' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_connector.c:214:1: warning: symbol 'intel_attach_force_audio_property' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_connector.c:241:1: warning: symbol 'intel_attach_broadcast_rgb_property' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_connector.c:263:1: warning: symbol 'intel_attach_aspect_ratio_property' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_connector.c:272:1: warning: symbol 'intel_attach_colorspace_property' was not declared. Should it be static? +drivers/gpu/drm/i915/
Re: [Intel-gfx] [PATCH 4/7] drm/i915/psr: Do not enable PSR in interlaced mode for all GENs
On Wed, 2019-04-03 at 17:29 -0700, Rodrigo Vivi wrote: > On Wed, Apr 03, 2019 at 04:35:36PM -0700, José Roberto de Souza wrote: > > This interlaced restriction applies to all gens, not only to Haswell. > > I believe this came from VLV times and I doubt we would be > impacted by it ever, but better to protect just in case: > > > Reviewed-by: Rodrigo Vivi > > > > > > Cc: Dhinakaran Pandiyan > > Cc: Rodrigo Vivi > > Signed-off-by: José Roberto de Souza > > --- > > drivers/gpu/drm/i915/intel_psr.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > b/drivers/gpu/drm/i915/intel_psr.c > > index a84da931c3be..bb97c1657493 100644 > > --- a/drivers/gpu/drm/i915/intel_psr.c > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > @@ -627,8 +627,7 @@ void intel_psr_compute_config(struct intel_dp *intel_dp, > > return; > > } > > > > - if (IS_HASWELL(dev_priv) && > > - adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) { > > + if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) { > > DRM_DEBUG_KMS("PSR condition failed: Interlaced is Enabled\n"); It'd be nice to change this to "interlaced mode" Noticed that the spec says PSR does not work with Stereo 3d mode as well. But, that should be okay since we don't set stereo_allowed for DP. Reviewed-by: Dhinakaran Pandiyan > > return; > > } > > -- > > 2.21.0 > > ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 6/7] drm/i915/psr: Remove partial PSR support on multiple transcoders
On Thu, 2019-04-04 at 14:41 -0700, Dhinakaran Pandiyan wrote: > On Thu, 2019-04-04 at 14:20 -0700, Rodrigo Vivi wrote: > > On Thu, Apr 04, 2019 at 12:40:34PM -0700, Souza, Jose wrote: > > > On Wed, 2019-04-03 at 17:31 -0700, Rodrigo Vivi wrote: > > > > On Wed, Apr 03, 2019 at 04:35:38PM -0700, José Roberto de Souza > > > > wrote: > > > > > PSR is only supported in eDP transcoder and there is only one > > > > > instance of it, so lets drop all of this code. > > > > > > > > Is this sentence true? I mean, in the way it is written it > > > > seems like HW doesn't actually support it... > > > > Or should we re-phrase for we are not really enabling support > > > > for other transcoders than eDP and we do not have plans to do > > > > it so soon so let's clean the code... > > > > or something like that? > > > > > > Okay, what about replace it for: > > > > > > Since BDW all transcoders have PSR registers but only EDP transcoder > > > can drive a EDP panel and as PSR is only part of the EDP specification, > > > for real usage PSR is only supported in EDP panel, so lets drop all of > > > this useless code. > > > > well, this still looks like HW limitation. If PSR is supported by HW on > > different transcoders is because there's some possibility of adding > > eDP on other transcoders. They wouldn't waste so many register space > > if that wasn't the case. > > > > Even though we have a dedicated transcoder for eDP I don't > > believe we can assume that eDP is not supported on the other ones. > > > > Why not write something like (or exactly) this > > "i915 does not support enabling PSR on any transcoder other than eDP. Clean up > the misleading non-eDP code that currently exists to allow for the rework of > PSR > register definitions in the next patch" > > > -DK > > > > > > > > > > > > > > > > > > Cc: Dhinakaran Pandiyan > > > > > Cc: Rodrigo Vivi > > > > > Signed-off-by: José Roberto de Souza > > > > > --- > > > > > drivers/gpu/drm/i915/i915_reg.h | 17 +--- > > > > > drivers/gpu/drm/i915/intel_psr.c | 147 --- > > > > > > > > > > 2 files changed, 42 insertions(+), 122 deletions(-) > > > > > > > > > > diff --git a/drivers/gpu/drm/i915/i915_reg.h > > > > > b/drivers/gpu/drm/i915/i915_reg.h > > > > > index c59cfa83dbaf..18e2991b376d 100644 > > > > > --- a/drivers/gpu/drm/i915/i915_reg.h > > > > > +++ b/drivers/gpu/drm/i915/i915_reg.h > > > > > @@ -4241,13 +4241,9 @@ enum { > > > > > /* Bspec claims those aren't shifted but stay at 0x64800 */ > > > > > #define EDP_PSR_IMR _MMIO(0x64834) > > > > > #define EDP_PSR_IIR _MMIO(0x64838) > > > > > -#define EDP_PSR_ERROR(shift) (1 << ((shift) > > > > > + 2)) > > > > > -#define EDP_PSR_POST_EXIT(shift) (1 << ((shift) + 1)) > > > > > -#define EDP_PSR_PRE_ENTRY(shift) (1 << (shift)) > > > > > -#define EDP_PSR_TRANSCODER_C_SHIFT 24 > > > > > -#define EDP_PSR_TRANSCODER_B_SHIFT 16 > > > > > -#define EDP_PSR_TRANSCODER_A_SHIFT 8 > > > > > -#define EDP_PSR_TRANSCODER_EDP_SHIFT 0 > > > > > +#define EDP_PSR_ERROR (1 << 2) > > > > > +#define EDP_PSR_POST_EXIT (1 << 1) > > > > > +#define EDP_PSR_PRE_ENTRY (1 << 0) > > > > > > > > > > #define EDP_PSR_AUX_CTL _MMIO(dev_priv- > > > > > > psr_mmio_base + 0x10) > > > > > > > > > > #define EDP_PSR_AUX_CTL_TIME_OUT_MASK (3 << 26) > > > > > @@ -4312,12 +4308,7 @@ enum { > > > > > #define EDP_PSR2_IDLE_FRAME_MASK 0xf > > > > > #define EDP_PSR2_IDLE_FRAME_SHIFT 0 > > > > > > > > > > -#define _PSR_EVENT_TRANS_A 0x60848 > > > > > -#define _PSR_EVENT_TRANS_B 0x61848 > > > > > -#define _PSR_EVENT_TRANS_C 0x62848 > > > > > -#define _PSR_EVENT_TRANS_D 0x63848 > > > > > -#define _PSR_EVENT_TRANS_EDP 0x6F848 > > > > > -#define PSR_EVENT(trans) _MMIO_TRANS2(trans, > > > > > _PSR_EVENT_TRANS_A) > > > > > +#define PSR_EVENT_MMIO(0x6F848) > > > > > #define PSR_EVENT_PSR2_WD_TIMER_EXPIRE (1 << 17) > > > > > #define PSR_EVENT_PSR2_DISABLED (1 << 16) > > > > > #define PSR_EVENT_SU_DIRTY_FIFO_UNDERRUN(1 << 15) > > > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > > > > b/drivers/gpu/drm/i915/intel_psr.c > > > > > index bb97c1657493..b984e005b72e 100644 > > > > > --- a/drivers/gpu/drm/i915/intel_psr.c > > > > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > > > > @@ -84,46 +84,12 @@ static bool intel_psr2_enabled(struct > > > > > drm_i915_private *dev_priv, > > > > > } > > > > > } > > > > > > > > > > -static int edp_psr_shift(enum transcoder cpu_transcoder) > > > > > -{ > > > > > - switch (cpu_transcoder) { > > > > > - case TRANSCODER_A: > > > > > -
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: the great header refactoring, part one
== Series Details == Series: drm/i915: the great header refactoring, part one URL : https://patchwork.freedesktop.org/series/59022/ State : success == Summary == CI Bug Log - changes from CI_DRM_5875 -> Patchwork_12687 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/59022/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12687 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_basic@basic-bsd2: - fi-kbl-7500u: NOTRUN -> SKIP [fdo#109271] +9 * igt@gem_exec_basic@gtt-bsd2: - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +12 * igt@gem_exec_suspend@basic-s3: - fi-byt-clapper: NOTRUN -> INCOMPLETE [fdo#102657] * igt@i915_selftest@live_contexts: - fi-bdw-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@kms_busy@basic-flip-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@dp-crc-fast: - fi-kbl-7500u: NOTRUN -> DMESG-WARN [fdo#103841] * igt@kms_pipe_crc_basic@hang-read-crc-pipe-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +48 * igt@runner@aborted: - fi-kbl-7500u: NOTRUN -> FAIL [fdo#103841] - fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720] Possible fixes * igt@gem_exec_suspend@basic-s3: - fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS * igt@i915_selftest@live_hangcheck: - fi-skl-iommu: INCOMPLETE [fdo#108602] / [fdo#108744] -> PASS * igt@kms_flip@basic-flip-vs-wf_vblank: - fi-bsw-n3050: FAIL [fdo#100368] -> PASS * igt@kms_frontbuffer_tracking@basic: - {fi-icl-u3}:FAIL [fdo#103167] -> PASS - fi-icl-u2: FAIL [fdo#103167] -> PASS {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368 [fdo#102657]: https://bugs.freedesktop.org/show_bug.cgi?id=102657 [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602 [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622 [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (48 -> 45) -- Additional (2): fi-byt-clapper fi-kbl-7500u Missing(5): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan Build changes - * Linux: CI_DRM_5875 -> Patchwork_12687 CI_DRM_5875: 5cc7c47c44aaef5bfe07e7307d06caa98e401fad @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4928: 014a6fa238322b497116b359cb92df1ce7fa8847 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12687: 65c3d8e5d782f22612abb99cf76f5782a9641d0f @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 65c3d8e5d782 drm/i915/cdclk: have only one init/uninit function eef88940ccfa drm/i915: extract intel_cdclk.h from intel_drv.h 502027133de0 drm/i915: extract intel_sprite.h from intel_drv.h afe139e73b37 drm/i915: extract intel_dvo.h from intel_drv.h 1baaf662b096 drm/i915: extract intel_lvds.h from intel_drv.h 8552e096cde2 drm/i915: extract intel_tv.h from intel_drv.h c2bed9041cd5 drm/i915: extract intel_pipe_crc.h from intel_drv.h 4fcb1b6c3c6d drm/i915: extract intel_atomic_plane.h from intel_drv.h de1853ccd427 drm/i915: extract intel_hdmi.h from intel_drv.h c9dd8b09cf61 drm/i915: extract intel_dp.h from intel_drv.h 9b50c8a6f31f drm/i915: extract intel_fbdev.h from intel_drv.h 9169ad03c189 drm/i915: extract intel_pm.h from intel_drv.h 7764ec95da8a drm/i915: extract intel_panel.h from intel_drv.h 444cceac5b34 drm/i915: extract intel_hdcp.h from intel_drv.h a9b1119a8b8a drm/i915: extract intel_sdvo.h from intel_drv.h 4aef051c5084 drm/i915: extract intel_lspcon.h from intel_drv.h 1e02d4859ef6 drm/i915: extract intel_color.h from intel_drv.h 1d43269827e3 drm/i915: extract intel_psr.h from intel_drv.h 3b0c7907b1c7 drm/i915: extract intel_fbc.h from intel_drv.h d3dbcf35782d drm/i915: extract intel_csr.h from intel_drv.h 29b3cb9772fe drm/i915: extract intel_connector.h from intel_drv.h f7505cd98351 drm/i915: extract intel_ddi.h from intel
Re: [Intel-gfx] [PATCH 6/7] drm/i915/psr: Remove partial PSR support on multiple transcoders
On Thu, 2019-04-04 at 14:51 -0700, Rodrigo Vivi wrote: > On Thu, Apr 04, 2019 at 02:41:26PM -0700, Pandiyan, Dhinakaran wrote: > > On Thu, 2019-04-04 at 14:20 -0700, Rodrigo Vivi wrote: > > > On Thu, Apr 04, 2019 at 12:40:34PM -0700, Souza, Jose wrote: > > > > On Wed, 2019-04-03 at 17:31 -0700, Rodrigo Vivi wrote: > > > > > On Wed, Apr 03, 2019 at 04:35:38PM -0700, José Roberto de > > > > > Souza > > > > > wrote: > > > > > > PSR is only supported in eDP transcoder and there is only > > > > > > one > > > > > > instance of it, so lets drop all of this code. > > > > > > > > > > Is this sentence true? I mean, in the way it is written it > > > > > seems like HW doesn't actually support it... > > > > > Or should we re-phrase for we are not really enabling support > > > > > for other transcoders than eDP and we do not have plans to do > > > > > it so soon so let's clean the code... > > > > > or something like that? > > > > > > > > Okay, what about replace it for: > > > > > > > > Since BDW all transcoders have PSR registers but only EDP > > > > transcoder > > > > can drive a EDP panel and as PSR is only part of the EDP > > > > specification, > > > > for real usage PSR is only supported in EDP panel, so lets drop > > > > all of > > > > this useless code. > > > > > > well, this still looks like HW limitation. If PSR is supported by > > > HW on > > > different transcoders is because there's some possibility of > > > adding > > > eDP on other transcoders. They wouldn't waste so many register > > > space > > > if that wasn't the case. > > > > > > Even though we have a dedicated transcoder for eDP I don't > > > believe we can assume that eDP is not supported on the other > > > ones. > > > > > > > Why not write something like (or exactly) this > > > > "i915 does not support enabling PSR on any transcoder other than > > eDP. Clean up > > the misleading non-eDP code that currently exists to allow for the > > rework of PSR > > register definitions in the next patch" > > +1 Sure, going to change to that in the next version. > > > > > -DK > > > > > > > > > > > > > > Cc: Dhinakaran Pandiyan > > > > > > Cc: Rodrigo Vivi > > > > > > Signed-off-by: José Roberto de Souza > > > > > > --- > > > > > > drivers/gpu/drm/i915/i915_reg.h | 17 +--- > > > > > > drivers/gpu/drm/i915/intel_psr.c | 147 --- > > > > > > > > > > > > > > > > > > 2 files changed, 42 insertions(+), 122 deletions(-) > > > > > > > > > > > > diff --git a/drivers/gpu/drm/i915/i915_reg.h > > > > > > b/drivers/gpu/drm/i915/i915_reg.h > > > > > > index c59cfa83dbaf..18e2991b376d 100644 > > > > > > --- a/drivers/gpu/drm/i915/i915_reg.h > > > > > > +++ b/drivers/gpu/drm/i915/i915_reg.h > > > > > > @@ -4241,13 +4241,9 @@ enum { > > > > > > /* Bspec claims those aren't shifted but stay at 0x64800 > > > > > > */ > > > > > > #define EDP_PSR_IMR_MMIO(0 > > > > > > x64834) > > > > > > #define EDP_PSR_IIR_MMIO(0 > > > > > > x64838) > > > > > > -#define EDP_PSR_ERROR(shift) (1 << > > > > > > ((shift) > > > > > > + 2)) > > > > > > -#define EDP_PSR_POST_EXIT(shift) (1 << ((shift) > > > > > > + 1)) > > > > > > -#define EDP_PSR_PRE_ENTRY(shift) (1 << (shift)) > > > > > > -#define EDP_PSR_TRANSCODER_C_SHIFT 24 > > > > > > -#define EDP_PSR_TRANSCODER_B_SHIFT 16 > > > > > > -#define EDP_PSR_TRANSCODER_A_SHIFT 8 > > > > > > -#define EDP_PSR_TRANSCODER_EDP_SHIFT 0 > > > > > > +#define EDP_PSR_ERROR(1 << > > > > > > 2) > > > > > > +#define EDP_PSR_POST_EXIT(1 << > > > > > > 1) > > > > > > +#define EDP_PSR_PRE_ENTRY(1 << > > > > > > 0) > > > > > > > > > > > > #define EDP_PSR_AUX_CTL_MMIO(d > > > > > > ev_priv- > > > > > > > psr_mmio_base + 0x10) > > > > > > > > > > > > #define EDP_PSR_AUX_CTL_TIME_OUT_MASK(3 << > > > > > > 26) > > > > > > @@ -4312,12 +4308,7 @@ enum { > > > > > > #define EDP_PSR2_IDLE_FRAME_MASK 0xf > > > > > > #define EDP_PSR2_IDLE_FRAME_SHIFT0 > > > > > > > > > > > > -#define _PSR_EVENT_TRANS_A 0x60848 > > > > > > -#define _PSR_EVENT_TRANS_B 0x61848 > > > > > > -#define _PSR_EVENT_TRANS_C 0x62848 > > > > > > -#define _PSR_EVENT_TRANS_D 0x63848 > > > > > > -#define _PSR_EVENT_TRANS_EDP 0x6F848 > > > > > > -#define PSR_EVENT(trans) _MMIO_TRANS2(tr > > > > > > ans, > > > > > > _PSR_EVENT_TRANS_A) > > > > > > +#define PSR_EVENT _MMIO(0x6F848) > > > > > > #define PSR_EVENT_PSR2_WD_TIMER_EXPIRE(1 << > > > > > > 17) > > > > > > #define PSR_EVENT_PSR2_DISABLED (1 << 16) > > > > > > #define PSR_EVENT_SU_DIRTY_FIFO_UNDERRUN (1 << 15) > > > > > > diff --git a/drivers
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt()
== Series Details == Series: drm/i915/gvt: Prevent use-after-free in ppgtt_free_all_spt() URL : https://patchwork.freedesktop.org/series/58985/ State : success == Summary == CI Bug Log - changes from CI_DRM_5869_full -> Patchwork_12680_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_12680_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_create@create-clear: - shard-snb: NOTRUN -> INCOMPLETE [fdo#105411] * igt@gem_exec_schedule@preempt-other-chain-blt: - shard-snb: NOTRUN -> SKIP [fdo#109271] +112 * igt@gem_mmap_gtt@hang: - shard-iclb: PASS -> FAIL [fdo#109677] * igt@gem_tiled_blits@normal: - shard-iclb: PASS -> TIMEOUT [fdo#109673] * igt@gem_tiled_swapping@non-threaded: - shard-iclb: PASS -> INCOMPLETE [fdo#108686] * igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing: - shard-apl: PASS -> FAIL [fdo#109660] * igt@kms_atomic_transition@5x-modeset-transitions: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +5 * igt@kms_busy@extended-modeset-hang-newfb-render-a: - shard-kbl: PASS -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-modeset-hang-newfb-render-f: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +12 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a: - shard-snb: NOTRUN -> DMESG-WARN [fdo#110222] - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_content_protection@legacy: - shard-kbl: NOTRUN -> FAIL [fdo#108739] / [fdo#110321] * igt@kms_flip@2x-flip-vs-wf_vblank-interruptible: - shard-skl: NOTRUN -> SKIP [fdo#109271] +49 * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-cpu: - shard-iclb: PASS -> FAIL [fdo#105682] / [fdo#109247] * igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite: - shard-iclb: PASS -> FAIL [fdo#109247] +8 * igt@kms_frontbuffer_tracking@psr-2p-pri-indfb-multidraw: - shard-apl: NOTRUN -> SKIP [fdo#109271] +10 * igt@kms_frontbuffer_tracking@psr-2p-primscrn-shrfb-pgflip-blt: - shard-kbl: NOTRUN -> SKIP [fdo#109271] +8 * igt@kms_lease@lease_again: - shard-snb: PASS -> SKIP [fdo#109271] * igt@kms_pipe_crc_basic@read-crc-pipe-d: - shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb: - shard-skl: NOTRUN -> FAIL [fdo#108145] * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc: - shard-skl: PASS -> FAIL [fdo#107815] * igt@kms_plane_scaling@pipe-c-scaler-with-rotation: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_psr@cursor_mmap_cpu: - shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] * igt@kms_psr@psr2_cursor_render: - shard-iclb: PASS -> SKIP [fdo#109441] +4 * igt@kms_rotation_crc@multiplane-rotation: - shard-kbl: PASS -> DMESG-FAIL [fdo#105763] * igt@kms_setmode@basic: - shard-skl: NOTRUN -> FAIL [fdo#99912] * igt@kms_vblank@pipe-c-ts-continuation-dpms-suspend: - shard-apl: PASS -> FAIL [fdo#104894] * igt@perf@blocking: - shard-iclb: PASS -> FAIL [fdo#108587] Possible fixes * igt@gem_eio@in-flight-suspend: - shard-kbl: INCOMPLETE [fdo#103665] -> PASS * igt@i915_selftest@live_workarounds: - shard-iclb: DMESG-FAIL [fdo#108954] -> PASS * igt@kms_busy@extended-modeset-hang-newfb-render-c: - shard-iclb: DMESG-WARN [fdo#110222] -> PASS * igt@kms_cursor_crc@cursor-256x256-onscreen: - shard-iclb: FAIL [fdo#103232] -> PASS * igt@kms_cursor_crc@cursor-64x64-suspend: - shard-skl: INCOMPLETE [fdo#104108] -> PASS * igt@kms_cursor_legacy@cursor-vs-flip-toggle: - shard-iclb: FAIL [fdo#103355] -> PASS * igt@kms_flip@dpms-vs-vblank-race: - shard-glk: FAIL [fdo#103060] -> PASS * igt@kms_flip@plain-flip-ts-check-interruptible: - shard-skl: FAIL [fdo#100368] -> PASS * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw: - shard-iclb: FAIL [fdo#103167] -> PASS * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt: - shard-iclb: FAIL [fdo#109247] -> PASS +11 * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-blt: - shard-iclb: FAIL [fdo#105682] / [fdo#109247] -> PASS +1 * igt@kms_plane@pixel-format-pipe-c-planes: - shard-glk: SKIP [fdo#109271] -> PASS +1 * igt@kms_plane_scaling@pipe-b-scaler-with-rotation: - shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS * igt@kms_psr2_su@page_flip: - shard-iclb: SKIP [
[Intel-gfx] [PATCH 2/3] drm/i915: reorder if chain to have last gen first
Reorder if/else so we check for gen >= 11 first, similar to most of other checks in the driver. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/intel_pm.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 0e05ee1f3ea0..25eff3728fcd 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4367,15 +4367,16 @@ skl_allocate_pipe_ddb(struct intel_crtc_state *cstate, return 0; } - if (INTEL_GEN(dev_priv) < 11) + if (INTEL_GEN(dev_priv) >= 11) + total_data_rate = + icl_get_total_relative_data_rate(cstate, +plane_data_rate); + else total_data_rate = skl_get_total_relative_data_rate(cstate, plane_data_rate, uv_plane_data_rate); - else - total_data_rate = - icl_get_total_relative_data_rate(cstate, -plane_data_rate); + skl_ddb_get_pipe_allocation_limits(dev_priv, cstate, total_data_rate, ddb, alloc, &num_active); -- 2.21.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/3] drm/i915: do not mix workaround with normal flow
Separate the two comments: one is a workaround and the other is a sanity check. We could just compare != 1, but let's treat them differently due to having different meaning. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/intel_pm.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 25eff3728fcd..b4d1078727dc 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -3760,14 +3760,16 @@ bool intel_can_enable_sagv(struct drm_atomic_state *state) sagv_block_time_us = 10; /* -* SKL+ workaround: bspec recommends we disable SAGV when we have -* more then one pipe enabled -* * If there are no active CRTCs, no additional checks need be performed */ if (hweight32(intel_state->active_crtcs) == 0) return true; - else if (hweight32(intel_state->active_crtcs) > 1) + + /* +* SKL+ workaround: bspec recommends we disable SAGV when we have +* more then one pipe enabled +*/ + if (hweight32(intel_state->active_crtcs) > 1) return false; /* Since we're now guaranteed to only have one active CRTC... */ -- 2.21.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/3] drm/i915/icl: fix step numbers in icl_display_core_init()
At some point the spec was changed and we never updated the numbers to match it. Let's try once more to keep them in sync. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/intel_runtime_pm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c index 40ddfbb97acb..25053dfc3a12 100644 --- a/drivers/gpu/drm/i915/intel_runtime_pm.c +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c @@ -3832,11 +3832,11 @@ void icl_display_core_init(struct drm_i915_private *dev_priv, /* 1. Enable PCH reset handshake. */ intel_pch_reset_handshake(dev_priv, !HAS_PCH_NOP(dev_priv)); - /* 2-3. */ + /* 2. Initialize all combo phys */ icl_combo_phys_init(dev_priv); /* -* 4. Enable Power Well 1 (PG1). +* 3. Enable Power Well 1 (PG1). *The AUX IO power wells will be enabled on demand. */ mutex_lock(&power_domains->lock); @@ -3844,13 +3844,13 @@ void icl_display_core_init(struct drm_i915_private *dev_priv, intel_power_well_enable(dev_priv, well); mutex_unlock(&power_domains->lock); - /* 5. Enable CDCLK. */ + /* 4. Enable CDCLK. */ icl_init_cdclk(dev_priv); - /* 6. Enable DBUF. */ + /* 5. Enable DBUF. */ icl_dbuf_enable(dev_priv); - /* 7. Setup MBUS. */ + /* 6. Setup MBUS. */ icl_mbus_init(dev_priv); if (resume && dev_priv->csr.dmc_payload) -- 2.21.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 0/3] Trivial comments and small changes
I was fixing a pm thing that ended up not being needed. So, just get the small/trivial changes out. No change in behavior. Lucas De Marchi (3): drm/i915/icl: fix step numbers in icl_display_core_init() drm/i915: reorder if chain to have last gen first drm/i915: do not mix workaround with normal flow drivers/gpu/drm/i915/intel_pm.c | 21 - drivers/gpu/drm/i915/intel_runtime_pm.c | 10 +- 2 files changed, 17 insertions(+), 14 deletions(-) -- 2.21.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/7] drm/i915/psr: Initialize PSR mutex even when sink is not reliable
On Thu, Apr 04, 2019 at 12:25:56PM -0700, Souza, Jose wrote: > On Wed, 2019-04-03 at 17:27 -0700, Rodrigo Vivi wrote: > > On Wed, Apr 03, 2019 at 04:35:35PM -0700, José Roberto de Souza > > wrote: > > > Even when driver is reloaded and hits this scenario the PSR mutex > > > should be initialized, otherwise reading PSR debugfs status will > > > execute mutex_lock() over a mutex that was not initialized. > > > > > > Cc: Dhinakaran Pandiyan > > > Cc: Rodrigo Vivi > > > Signed-off-by: José Roberto de Souza > > > --- > > > drivers/gpu/drm/i915/intel_psr.c | 1 - > > > 1 file changed, 1 deletion(-) > > > > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > > > b/drivers/gpu/drm/i915/intel_psr.c > > > index c80bb3003a7d..a84da931c3be 100644 > > > --- a/drivers/gpu/drm/i915/intel_psr.c > > > +++ b/drivers/gpu/drm/i915/intel_psr.c > > > @@ -1227,7 +1227,6 @@ void intel_psr_init(struct drm_i915_private > > > *dev_priv) > > > if (val) { > > > DRM_DEBUG_KMS("PSR interruption error set\n"); > > > dev_priv->psr.sink_not_reliable = true; > > > - return; > > > > There are other returns above and if debugfs hits this case maybe it > > is worth to move the mutex initialization up instead? > > > We have those two returns in PSR debugfs, !HAS_PSR(dev_priv) and !psr- > >sink_support and in this cases we don't have any PSR functionality so > not worthy to initialize anything PSR related. oh, indeed. Reviewed-by: Rodrigo Vivi > > > > > > } > > > > > > /* Set link_standby x link_off defaults */ > > > -- > > > 2.21.0 > > > ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Fixup kerneldoc for intel_cdclk_needs_cd2x_update
== Series Details == Series: drm/i915: Fixup kerneldoc for intel_cdclk_needs_cd2x_update URL : https://patchwork.freedesktop.org/series/58988/ State : success == Summary == CI Bug Log - changes from CI_DRM_5869_full -> Patchwork_12681_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_12681_full that come from known issues: ### IGT changes ### Issues hit * igt@debugfs_test@read_all_entries_display_off: - shard-skl: PASS -> INCOMPLETE [fdo#104108] +1 * igt@gem_create@create-clear: - shard-snb: NOTRUN -> INCOMPLETE [fdo#105411] * igt@gem_exec_schedule@preempt-other-chain-blt: - shard-snb: NOTRUN -> SKIP [fdo#109271] +112 * igt@gem_mmap_gtt@big-copy-odd: - shard-iclb: PASS -> TIMEOUT [fdo#109673] * igt@gem_tiled_swapping@non-threaded: - shard-iclb: PASS -> FAIL [fdo#108686] * igt@i915_pm_rpm@gem-mmap-cpu: - shard-skl: PASS -> INCOMPLETE [fdo#107807] +1 * igt@i915_suspend@fence-restore-untiled: - shard-skl: PASS -> INCOMPLETE [fdo#104108] / [fdo#107773] * igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing: - shard-apl: PASS -> FAIL [fdo#109660] * igt@kms_atomic_transition@5x-modeset-transitions: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +5 * igt@kms_busy@extended-modeset-hang-newfb-render-a: - shard-kbl: PASS -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-modeset-hang-newfb-render-f: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +12 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a: - shard-snb: NOTRUN -> DMESG-WARN [fdo#110222] - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c: - shard-skl: PASS -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-hang-newfb-render-f: - shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy: - shard-glk: PASS -> FAIL [fdo#104873] * igt@kms_flip@2x-flip-vs-wf_vblank-interruptible: - shard-skl: NOTRUN -> SKIP [fdo#109271] +49 * igt@kms_flip@flip-vs-suspend-interruptible: - shard-snb: PASS -> DMESG-WARN [fdo#102365] * igt@kms_flip@modeset-vs-vblank-race-interruptible: - shard-skl: PASS -> FAIL [fdo#103060] * igt@kms_flip_tiling@flip-to-y-tiled: - shard-iclb: PASS -> FAIL [fdo#107931] / [fdo#108134] * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite: - shard-iclb: PASS -> FAIL [fdo#109247] +14 * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render: - shard-iclb: PASS -> FAIL [fdo#103167] +5 * igt@kms_frontbuffer_tracking@psr-2p-pri-indfb-multidraw: - shard-apl: NOTRUN -> SKIP [fdo#109271] +7 * igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb: - shard-skl: NOTRUN -> FAIL [fdo#108145] +1 * igt@kms_plane_alpha_blend@pipe-b-coverage-7efc: - shard-skl: PASS -> FAIL [fdo#107815] * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc: - shard-skl: NOTRUN -> FAIL [fdo#107815] * igt@kms_plane_multiple@atomic-pipe-c-tiling-yf: - shard-iclb: PASS -> FAIL [fdo#110037] * igt@kms_plane_scaling@pipe-c-scaler-with-rotation: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_psr@cursor_render: - shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +1 * igt@kms_psr@no_drrs: - shard-iclb: PASS -> FAIL [fdo#108341] * igt@kms_psr@psr2_cursor_render: - shard-iclb: PASS -> SKIP [fdo#109441] +5 * igt@kms_rotation_crc@multiplane-rotation-cropping-top: - shard-kbl: PASS -> FAIL [fdo#109016] * igt@kms_setmode@basic: - shard-skl: NOTRUN -> FAIL [fdo#99912] * igt@kms_vblank@pipe-a-ts-continuation-modeset-hang: - shard-apl: PASS -> FAIL [fdo#104894] * igt@kms_vblank@pipe-b-ts-continuation-suspend: - shard-iclb: PASS -> FAIL [fdo#104894] Possible fixes * igt@i915_selftest@live_workarounds: - shard-iclb: DMESG-FAIL [fdo#108954] -> PASS * igt@kms_cursor_crc@cursor-256x256-onscreen: - shard-iclb: FAIL [fdo#103232] -> PASS * igt@kms_cursor_crc@cursor-64x64-suspend: - shard-skl: INCOMPLETE [fdo#104108] -> PASS * igt@kms_cursor_legacy@cursor-vs-flip-toggle: - shard-iclb: FAIL [fdo#103355] -> PASS * igt@kms_flip@dpms-vs-vblank-race: - shard-glk: FAIL [fdo#103060] -> PASS * igt@kms_flip@flip-vs-expired-vblank-interruptible: - shard-skl: FAIL [fdo#105363] -> PASS * igt@kms_frontbuffer_tracking@fbc-1p-pri-in
[Intel-gfx] [PATCH] drm/i915/ehl: Add support for DPLL4 (v2)
This patch adds support for DPLL4 on EHL that include the following restrictions: - DPLL4 cannot be used with DDIA (combo port A internal eDP usage). DPLL4 can be used with other DDIs, including DDID (combo port A external usage). - DPLL4 cannot be enabled when DC5 or DC6 are enabled. - The DPLL4 enable, lock, power enabled, and power state are connected to the MGPLL1_ENABLE register. v2: (suggestions from Bob Paauwe) - Rework ehl_get_dpll() function to call intel_find_shared_dpll() and iterate twice: once for Combo plls and once for MG plls. - Use MG pll funcs for DPLL4 instead of creating new ones and modify mg_pll_enable to include the restrictions for EHL. Cc: Lucas De Marchi Signed-off-by: Vivek Kasireddy Reviewed-by: Bob Paauwe --- drivers/gpu/drm/i915/intel_dpll_mgr.c | 60 ++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dpll_mgr.c b/drivers/gpu/drm/i915/intel_dpll_mgr.c index e01c057ce50b..cb756acedc94 100644 --- a/drivers/gpu/drm/i915/intel_dpll_mgr.c +++ b/drivers/gpu/drm/i915/intel_dpll_mgr.c @@ -2870,6 +2870,56 @@ icl_get_dpll(struct intel_crtc_state *crtc_state, return pll; } +static struct intel_shared_dpll * +ehl_get_dpll(struct intel_crtc_state *crtc_state, +struct intel_encoder *encoder) +{ + struct drm_i915_private *dev_priv = to_i915(crtc_state->base.crtc->dev); + struct intel_shared_dpll *pll; + enum port port = encoder->port; + enum intel_dpll_id min, max; + bool ret; + + if (!intel_port_is_combophy(dev_priv, port)) { + MISSING_CASE(port); + return NULL; + } + + min = DPLL_ID_ICL_DPLL0; + max = DPLL_ID_ICL_DPLL1; + ret = icl_calc_dpll_state(crtc_state, encoder); + if (ret) { + pll = intel_find_shared_dpll(crtc_state, min, max); + if (pll) { + intel_reference_shared_dpll(pll, crtc_state); + return pll; + } + } else { + DRM_DEBUG_KMS("Could not calculate PLL state.\n"); + } + + if (encoder->type == INTEL_OUTPUT_EDP) { + DRM_DEBUG_KMS("Cannot use DPLL4 with EDP.\n"); + return NULL; + } + + min = max = DPLL_ID_ICL_MGPLL1; + ret = icl_calc_mg_pll_state(crtc_state, false); + if (!ret) { + DRM_DEBUG_KMS("Could not calculate PLL state.\n"); + return NULL; + } + + pll = intel_find_shared_dpll(crtc_state, min, max); + if (!pll) { + DRM_DEBUG_KMS("No PLL selected\n"); + return NULL; + } + + intel_reference_shared_dpll(pll, crtc_state); + return pll; +} + static bool mg_pll_get_hw_state(struct drm_i915_private *dev_priv, struct intel_shared_dpll *pll, struct intel_dpll_hw_state *hw_state) @@ -3115,6 +3165,13 @@ static void mg_pll_enable(struct drm_i915_private *dev_priv, i915_reg_t enable_reg = MG_PLL_ENABLE(icl_pll_id_to_tc_port(pll->info->id)); + if (IS_ELKHARTLAKE(dev_priv) && + (I915_READ(DC_STATE_EN) & DC_STATE_EN_UPTO_DC5 || + I915_READ(DC_STATE_EN) & DC_STATE_EN_UPTO_DC6)) { + DRM_ERROR("Cant enable DPLL4 when DC5 or DC6 are enabled\n"); + return; + } + icl_pll_power_enable(dev_priv, pll, enable_reg); icl_mg_pll_write(dev_priv, pll); @@ -3249,12 +3306,13 @@ static const struct intel_dpll_mgr icl_pll_mgr = { static const struct dpll_info ehl_plls[] = { { "DPLL 0", &combo_pll_funcs, DPLL_ID_ICL_DPLL0, 0 }, { "DPLL 1", &combo_pll_funcs, DPLL_ID_ICL_DPLL1, 0 }, + { "DPLL 4", &mg_pll_funcs, DPLL_ID_ICL_MGPLL1,0 }, { }, }; static const struct intel_dpll_mgr ehl_pll_mgr = { .dpll_info = ehl_plls, - .get_dpll = icl_get_dpll, + .get_dpll = ehl_get_dpll, .dump_hw_state = icl_dump_hw_state, }; -- 2.14.5 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 5/6] drm/i915: Add "10.6" LUT mode for i965+
On Thu, 2019-03-28 at 23:05 +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > i965+ have an interpolate 10bit LUT mode. Let's expose that so > that we can actually enjoy real 10bpc. > > Signed-off-by: Ville Syrjälä LGTM Reviewed-by: Radhakrishna Sripada > --- > drivers/gpu/drm/i915/i915_pci.c| 6 +++ > drivers/gpu/drm/i915/i915_reg.h| 4 ++ > drivers/gpu/drm/i915/intel_color.c | 62 > +- > 3 files changed, 71 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_pci.c > b/drivers/gpu/drm/i915/i915_pci.c > index 0971eee4a4d1..0c5258aa13bb 100644 > --- a/drivers/gpu/drm/i915/i915_pci.c > +++ b/drivers/gpu/drm/i915/i915_pci.c > @@ -116,6 +116,10 @@ > [PIPE_C] = IVB_CURSOR_C_OFFSET, \ > } > > +#define I965_COLORS \ > + .color = { .gamma_lut_size = 129, \ > +.gamma_lut_tests = DRM_COLOR_LUT_NON_DECREASING, \ > + } > #define ILK_COLORS \ > .color = { .gamma_lut_size = 1024 } > #define IVB_COLORS \ > @@ -278,6 +282,7 @@ static const struct intel_device_info > intel_pineview_info = { > .has_coherent_ggtt = true, \ > I9XX_PIPE_OFFSETS, \ > I9XX_CURSOR_OFFSETS, \ > + I965_COLORS, \ > GEN_DEFAULT_PAGE_SIZES > > static const struct intel_device_info intel_i965g_info = { > @@ -462,6 +467,7 @@ static const struct intel_device_info > intel_valleyview_info = { > .display_mmio_offset = VLV_DISPLAY_BASE, > I9XX_PIPE_OFFSETS, > I9XX_CURSOR_OFFSETS, > + I965_COLORS, > GEN_DEFAULT_PAGE_SIZES, > }; > > diff --git a/drivers/gpu/drm/i915/i915_reg.h > b/drivers/gpu/drm/i915/i915_reg.h > index f6a5d8f11368..0437a3ab6cdc 100644 > --- a/drivers/gpu/drm/i915/i915_reg.h > +++ b/drivers/gpu/drm/i915/i915_reg.h > @@ -5795,6 +5795,10 @@ enum { > #define PIPEFRAMEPIXEL(pipe) _MMIO_PIPE2(pipe, _PIPEAFRAMEPIXEL) > #define PIPESTAT(pipe) _MMIO_PIPE2(pipe, _PIPEASTAT) > > +#define _PIPEAGCMAX 0x70010 > +#define _PIPEBGCMAX 0x71010 > +#define PIPEGCMAX(pipe, i) _MMIO_PIPE2(pipe, _PIPEAGCMAX + (i) * > 4) > + > #define _PIPE_MISC_A 0x70030 > #define _PIPE_MISC_B 0x71030 > #define PIPEMISC_YUV420_ENABLE (1 << 27) > diff --git a/drivers/gpu/drm/i915/intel_color.c > b/drivers/gpu/drm/i915/intel_color.c > index 8e03f066adf7..07d62c7cb386 100644 > --- a/drivers/gpu/drm/i915/intel_color.c > +++ b/drivers/gpu/drm/i915/intel_color.c > @@ -359,6 +359,22 @@ static void cherryview_load_csc_matrix(const > struct intel_crtc_state *crtc_state > I915_WRITE(CGM_PIPE_MODE(pipe), crtc_state->cgm_mode); > } > > +/* i965+ "10.6" bit interpolated format "even DW" (low 8 bits) */ > +static u32 i965_lut_10p6_ldw(const struct drm_color_lut *color) > +{ > + return (color->red & 0xff) << 16 | > + (color->green & 0xff) << 8 | > + (color->blue & 0xff); > +} > + > +/* i965+ "10.6" interpolated format "odd DW" (high 8 bits) */ > +static u32 i965_lut_10p6_udw(const struct drm_color_lut *color) > +{ > + return (color->red >> 8) << 16 | > + (color->green >> 8) << 8 | > + (color->blue >> 8); > +} > + > static u32 ilk_lut_10(const struct drm_color_lut *color) > { > return drm_color_lut_extract(color->red, 10) << 20 | > @@ -468,6 +484,37 @@ static void skl_color_commit(const struct > intel_crtc_state *crtc_state) > ilk_load_csc_matrix(crtc_state); > } > > +static void i965_load_lut_10p6(struct intel_crtc *crtc, > +const struct drm_property_blob *blob) > +{ > + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); > + const struct drm_color_lut *lut = blob->data; > + int i, lut_size = drm_color_lut_size(blob); > + enum pipe pipe = crtc->pipe; > + > + for (i = 0; i < lut_size - 1; i++) { > + I915_WRITE_FW(PALETTE(pipe, 2 * i + 0), > + i965_lut_10p6_ldw(&lut[i])); > + I915_WRITE_FW(PALETTE(pipe, 2 * i + 1), > + i965_lut_10p6_udw(&lut[i])); > + } > + > + I915_WRITE_FW(PIPEGCMAX(pipe, 0), lut[i].red); > + I915_WRITE_FW(PIPEGCMAX(pipe, 1), lut[i].green); > + I915_WRITE_FW(PIPEGCMAX(pipe, 2), lut[i].blue); > +} > + > +static void i965_load_luts(const struct intel_crtc_state > *crtc_state) > +{ > + struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc); > + const struct drm_property_blob *gamma_lut = crtc_state- > >base.gamma_lut; > + > + if (crtc_state->gamma_mode == GAMMA_MODE_MODE_8BIT) > + i9xx_load_luts(crtc_state); > + else > + i965_load_lut_10p6(crtc, gamma_lut); > +} > + > static void ilk_load_lut_10(struct intel_crtc *crtc, > const struct drm_property_blob *blob) > { > @@ -911,6 +958,15 @@ static int check_luts(const struct > intel_crtc_state *crtc_state) > return 0; > } > > +static u32 i9xx_gamma_mode
[Intel-gfx] ✓ Fi.CI.BAT: success for Trivial comments and small changes
== Series Details == Series: Trivial comments and small changes URL : https://patchwork.freedesktop.org/series/59027/ State : success == Summary == CI Bug Log - changes from CI_DRM_5875 -> Patchwork_12688 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/59027/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12688 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_basic@basic-bsd2: - fi-kbl-7500u: NOTRUN -> SKIP [fdo#109271] +9 * igt@gem_exec_basic@gtt-bsd2: - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +57 * igt@i915_module_load@reload: - fi-blb-e6850: NOTRUN -> INCOMPLETE [fdo#107718] * igt@i915_pm_rpm@basic-rte: - fi-hsw-4770:PASS -> INCOMPLETE [fdo#107807] * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@kms_busy@basic-flip-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@dp-crc-fast: - fi-kbl-7500u: NOTRUN -> DMESG-WARN [fdo#103841] * igt@kms_flip@basic-flip-vs-wf_vblank: - fi-blb-e6850: NOTRUN -> FAIL [fdo#100368] * igt@kms_pipe_crc_basic@hang-read-crc-pipe-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +29 * igt@runner@aborted: - fi-kbl-7500u: NOTRUN -> FAIL [fdo#103841] Possible fixes * igt@gem_exec_suspend@basic-s3: - fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS * igt@i915_selftest@live_hangcheck: - fi-skl-iommu: INCOMPLETE [fdo#108602] / [fdo#108744] -> PASS * igt@kms_flip@basic-flip-vs-wf_vblank: - fi-bsw-n3050: FAIL [fdo#100368] -> PASS [fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368 [fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807 [fdo#108602]: https://bugs.freedesktop.org/show_bug.cgi?id=108602 [fdo#108744]: https://bugs.freedesktop.org/show_bug.cgi?id=108744 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 Participating hosts (48 -> 42) -- Additional (2): fi-byt-clapper fi-kbl-7500u Missing(8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-gdg-551 fi-icl-y Build changes - * Linux: CI_DRM_5875 -> Patchwork_12688 CI_DRM_5875: 5cc7c47c44aaef5bfe07e7307d06caa98e401fad @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4928: 014a6fa238322b497116b359cb92df1ce7fa8847 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12688: 011da257e505f089da15171375e301fd90e1c592 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 011da257e505 drm/i915: do not mix workaround with normal flow cc1c2dc7e7c8 drm/i915: reorder if chain to have last gen first ad25ad7d0a25 drm/i915/icl: fix step numbers in icl_display_core_init() == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12688/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/ehl: Add support for DPLL4 (v2)
== Series Details == Series: drm/i915/ehl: Add support for DPLL4 (v2) URL : https://patchwork.freedesktop.org/series/59029/ State : failure == Summary == CALLscripts/checksyscalls.sh CALLscripts/atomic/check-atomics.sh DESCEND objtool CHK include/generated/compile.h CC [M] drivers/gpu/drm/i915/header_test_i915_active_types.o CC [M] drivers/gpu/drm/i915/header_test_i915_gem_context_types.o CC [M] drivers/gpu/drm/i915/header_test_i915_priolist_types.o CC [M] drivers/gpu/drm/i915/header_test_i915_scheduler_types.o CC [M] drivers/gpu/drm/i915/header_test_i915_timeline_types.o CC [M] drivers/gpu/drm/i915/header_test_intel_context_types.o CC [M] drivers/gpu/drm/i915/header_test_intel_engine_types.o CC [M] drivers/gpu/drm/i915/header_test_intel_workarounds_types.o CC [M] drivers/gpu/drm/i915/intel_dpll_mgr.o drivers/gpu/drm/i915/intel_dpll_mgr.c: In function ‘ehl_get_dpll’: drivers/gpu/drm/i915/intel_dpll_mgr.c:2907:8: error: too many arguments to function ‘icl_calc_mg_pll_state’ ret = icl_calc_mg_pll_state(crtc_state, false); ^ drivers/gpu/drm/i915/intel_dpll_mgr.c:2649:13: note: declared here static bool icl_calc_mg_pll_state(struct intel_crtc_state *crtc_state) ^ scripts/Makefile.build:275: recipe for target 'drivers/gpu/drm/i915/intel_dpll_mgr.o' failed make[4]: *** [drivers/gpu/drm/i915/intel_dpll_mgr.o] Error 1 scripts/Makefile.build:486: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2 scripts/Makefile.build:486: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2 scripts/Makefile.build:486: recipe for target 'drivers/gpu' failed make[1]: *** [drivers/gpu] Error 2 Makefile:1051: recipe for target 'drivers' failed make: *** [drivers] Error 2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx