drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
Subsystems (2)
PATCH 1/1 drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
From: Ville Syrjälä <[email protected]>
Use I915_GTT_PAGE_SIZE when talking about GTT pages rather than physical pages.
There are some PAGE_SHIFTs left though. Not sure if we want to introduce I915_GTT_PAGE_SHIFT or what?
--- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem_gtt.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -2284,7 +2284,7 @@ static inline struct scatterlist *__sg_next(struct scatterlist *sg)#define for_each_sgt_dma (__dmap, __iter, __sgt) \ for ((__iter) = __sgt_iter((__sgt)->sgl, true); \ ((__dmap) = (__iter).dma + (__iter).curr); \ - (((__iter).curr += PAGE_SIZE) >= (__iter).max) ? \ + (((__iter).curr += I915_GTT_PAGE_SIZE) >= (__iter).max) ? \ (__iter) = __sgt_iter(__sg_next((__iter).sgp), true), 0 : 0)/**
drivers/gpu/drm/i915/i915_gem_gtt.c +9 -9
@@ -1050,7 +1050,7 @@ gen8_ppgtt_insert_pte_entries(struct i915_hw_ppgtt *ppgtt, do { vaddr[idx->pte] = pte_encode | iter->dma; - iter->dma += PAGE_SIZE; + iter->dma += I915_GTT_PAGE_SIZE; if (iter->dma >= iter->max) { iter->sg = __sg_next(iter->sg); if (!iter->sg) {
@@ -1759,7 +1759,7 @@ static void gen6_dump_ppgtt(struct i915_hw_ppgtt *base, struct seq_file *m)seq_printf (m,"\t\t(%03d, %04d) %08lx: " , pde, pte, - (pde *GEN6_PTES + pte) *PAGE_SIZE ); + (pde *GEN6_PTES + pte) *I915_GTT_PAGE_SIZE );for (i =0 ; i <4 ; i++) {if (vaddr[pte + i] != scratch_pte)seq_printf (m," %08x" , vaddr[pte + i]);
@@ -1899,7 +1899,7 @@ static void gen6_ppgtt_insert_entries(struct i915_address_space *vm, do { vaddr[act_pte] = pte_encode | GEN6_PTE_ADDR_ENCODE(iter.dma); - iter.dma += PAGE_SIZE; + iter.dma += I915_GTT_PAGE_SIZE; if (iter.dma == iter.max) { iter.sg = __sg_next(iter.sg); if (!iter.sg)
@@ -2037,7 +2037,7 @@ static int pd_vma_bind(struct i915_vma *vma, {struct i915_ggtt *ggtt =i915_vm_to_ggtt (vma->vm);struct gen6_hw_ppgtt *ppgtt = vma->private; -u32 ggtt_offset =i915_ggtt_offset (vma) /PAGE_SIZE ; +u32 ggtt_offset =i915_ggtt_offset (vma) /I915_GTT_PAGE_SIZE ;struct i915_page_table *pt;unsigned int pde;
@@ -2163,7 +2163,7 @@ static struct i915_hw_ppgtt *gen6_ppgtt_create(struct drm_i915_private *i915) ppgtt->base.vm.i915 = i915; ppgtt->base.vm.dma = &i915->drm.pdev->dev; - ppgtt->base.vm.total =I915_PDES *GEN6_PTES *PAGE_SIZE ; + ppgtt->base.vm.total =I915_PDES *GEN6_PTES *I915_GTT_PAGE_SIZE ;i915_address_space_init (&ppgtt->base.vm, i915);
@@ -3023,7 +3023,7 @@ static unsigned int gen8_get_total_gtt_size(u16 bdw_gmch_ctl) bdw_gmch_ctl =1 << bdw_gmch_ctl;#ifdef CONFIG_X86_32 -/* Limit 32b platforms to a 2GB GGTT: 4 << 20 / pte size * PAGE_SIZE */ +/* Limit 32b platforms to a 2GB GGTT: 4 << 20 / pte size * I915_GTT_PAGE_SIZE */ if (bdw_gmch_ctl >4 ) bdw_gmch_ctl =4 ;#endif
@@ -3727,9 +3727,9 @@ rotate_pages(const dma_addr_t *in, unsigned int offset,* the entries so the sg list can be happily traversed. * The only thing we need are DMA addresses. */ -sg_set_page (sg,NULL ,PAGE_SIZE ,0 ); +sg_set_page (sg,NULL ,I915_GTT_PAGE_SIZE ,0 );sg_dma_address (sg) = in[offset + src_idx]; -sg_dma_len (sg) =PAGE_SIZE ; +sg_dma_len (sg) =I915_GTT_PAGE_SIZE ; sg =sg_next (sg); src_idx -= stride; }
@@ -3742,7 +3742,7 @@ static noinline struct sg_table * intel_rotate_pages(struct intel_rotation_info *rot_info, struct drm_i915_gem_object *obj) { -const unsigned long n_pages = obj->base.size /PAGE_SIZE ; +const unsigned long n_pages = obj->base.size /I915_GTT_PAGE_SIZE ;unsigned int size =intel_rotation_info_size (rot_info);struct sgt_iter sgt_iter;dma_addr_t dma_addr;
Signature · 6 lines
2.16.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Ville Syrjala (2018-09-13 16:04:05)
Quoted 4 lines
From: Ville Syrjälä <[email protected]>
Use
I915_GTT_PAGE_SIZEwhen talking about GTT pages rather than physical pages.
Yup, these are all concerned with GTT units so we prefer I915_GTT_PAGE_SIZE.
Quoted 2 lines
There are some
PAGE_SHIFTsleft though. Not sure if we want to introduceI915_GTT_PAGE_SHIFTor what?
Nah, I think gcc is good for doing the right thing for a constant divide by a power of two. If you spot some, just change them over to (x / GTT_PAGE_SIZE) and double check gcc emits the same code. If it doesn't just flag it in the commit message and then one day we may feel the urge for another cleanup.
Quoted 3 lines
Cc Chris Wilson <[email protected]>Signed-off-by Ville Syrjälä <[email protected]>
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
URL : https://patchwork.freedesktop.org/series/49645/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip f7ce7c3fcf8c drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE -:16: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #16: Suggested-by: Chris Wilson <[email protected]> # at least some of it :)
total: 0 errors, 1 warnings, 0 checks, 75 lines checked
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
URL : https://patchwork.freedesktop.org/series/49645/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_4816 -> Patchwork_10170 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_10170 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10170, 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/49645/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10170:
=== IGT changes ===
==== Possible regressions ====
igt@drv_selftest@live_hangcheck:
fi-icl-u: NOTRUN -> INCOMPLETE== Known issues ==
Here are the changes found in Patchwork_10170 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@kms_pipe_crc_basic@read-crc-pipe-b:
fi-byt-clapper: PASS -> FAIL (fdo#107362)
igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
fi-byt-clapper: PASS -> FAIL (fdo#103191, fdo#107362) +1
igt@kms_psr@primary_mmap_gtt:
{fi-cnl-u}: NOTRUN -> FAIL (fdo#107383) +3
igt@prime_vgem@basic-fence-flip:
fi-ilk-650: PASS -> FAIL (fdo#104008)
==== Possible fixes ====
igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#107362) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
fi-byt-clapper: FAIL (fdo#103191, fdo#107362) -> PASS {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107383 https://bugs.freedesktop.org/show_bug.cgi?id=107383
== Participating hosts (49 -> 45) ==
Additional (2): fi-cnl-u fi-icl-u
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus
== Build changes ==
* Linux: CI_DRM_4816 -> Patchwork_10170
CI_DRM_4816: 5bebc54ac552e3716bfe0f1f7eb0babfbda49f09 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4640: 9a8da36e708f9ed15b20689dfe305e41f9a19008 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10170: f7ce7c3fcf8c08487b2382429792704e802d4e85 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
f7ce7c3fcf8c drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10170/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
URL : https://patchwork.freedesktop.org/series/49645/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4817 -> Patchwork_10173 =
== Summary - WARNING ==
Minor unknown changes coming with Patchwork_10173 need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_10173, 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/49645/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_10173:
=== IGT changes ===
==== Warnings ====
igt@pm_rpm@module-reload:
fi-hsw-4770r: SKIP -> PASS== Known issues ==
Here are the changes found in Patchwork_10173 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_exec_suspend@basic-s3:
fi-kbl-soraka: NOTRUN -> INCOMPLETE (fdo#107774, fdo#107556)
fi-icl-u: PASS -> INCOMPLETE (fdo#107901)
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-cfl-8109u: PASS -> INCOMPLETE (fdo#106070)
fi-blb-e6850: NOTRUN -> INCOMPLETE (fdo#107718)
igt@kms_psr@primary_page_flip:
fi-kbl-r: PASS -> FAIL (fdo#107336)
==== Possible fixes ====
igt@drv_module_reload@basic-reload-inject:
fi-hsw-4770r: DMESG-WARN -> PASS
igt@drv_selftest@live_coherency:
fi-gdg-551: DMESG-FAIL (fdo#107164) -> PASS
igt@gem_exec_suspend@basic-s3:
fi-blb-e6850: INCOMPLETE (fdo#107718) -> PASS
igt@gem_exec_suspend@basic-s4-devices:
fi-kbl-7500u: DMESG-WARN (fdo#105128, fdo#107139) -> PASS
igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
fi-byt-clapper: FAIL (fdo#107362, fdo#103191) -> PASS fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#105128 https://bugs.freedesktop.org/show_bug.cgi?id=105128
fdo#106070 https://bugs.freedesktop.org/show_bug.cgi?id=106070
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
fdo#107164 https://bugs.freedesktop.org/show_bug.cgi?id=107164
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107556 https://bugs.freedesktop.org/show_bug.cgi?id=107556
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#107774 https://bugs.freedesktop.org/show_bug.cgi?id=107774
fdo#107901 https://bugs.freedesktop.org/show_bug.cgi?id=107901
== Participating hosts (48 -> 44) ==
Additional (1): fi-kbl-soraka
Missing (5): fi-bsw-cyan fi-ilk-m540 fi-byt-squawks fi-bdw-5557u fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4817 -> Patchwork_10173
CI_DRM_4817: 0725fa5c5756ff86de0f33f10b9d92ac452d5118 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4640: 9a8da36e708f9ed15b20689dfe305e41f9a19008 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10173: cb4d2347b96d80ca07d8dfbf20d9ed43425d5c17 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
cb4d2347b96d drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10173/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.IGT: success for drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: drm/i915: Replace some PAGE_SIZE with I915_GTT_PAGE_SIZE
URL : https://patchwork.freedesktop.org/series/49645/
State : success
== Summary ==
= CI Bug Log - changes from CI_DRM_4817_full -> Patchwork_10173_full =
== Summary - SUCCESS ==
No regressions found.
== Known issues ==
Here are the changes found in Patchwork_10173_full that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@gem_ctx_isolation@rcs0-s3:
shard-apl: PASS -> INCOMPLETE (fdo#103927)
igt@gem_exec_schedule@preempt-hang-blt:
shard-snb: NOTRUN -> INCOMPLETE (fdo#105411)
igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
shard-hsw: PASS -> FAIL (fdo#105767)
igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
shard-glk: PASS -> FAIL (fdo#105363)
igt@kms_setmode@basic:
shard-hsw: PASS -> FAIL (fdo#99912)
==== Possible fixes ====
igt@gem_eio@in-flight-suspend:
shard-glk: DMESG-WARN (fdo#107925) -> PASS
igt@gem_exec_await@wide-contexts:
shard-glk: FAIL (fdo#106680) -> PASS
igt@gem_exec_schedule@preempt-other-chain-vebox:
shard-snb: INCOMPLETE (fdo#105411) -> SKIP
igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
shard-hsw: FAIL (fdo#105767) -> PASS
igt@kms_setmode@basic:
shard-apl: FAIL (fdo#99912) -> PASS fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105767 https://bugs.freedesktop.org/show_bug.cgi?id=105767
fdo#106680 https://bugs.freedesktop.org/show_bug.cgi?id=106680
fdo#107925 https://bugs.freedesktop.org/show_bug.cgi?id=107925
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
== Participating hosts (5 -> 5) ==
No changes in participating hosts
== Build changes ==
* Linux: CI_DRM_4817 -> Patchwork_10173
CI_DRM_4817: 0725fa5c5756ff86de0f33f10b9d92ac452d5118 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4640: 9a8da36e708f9ed15b20689dfe305e41f9a19008 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10173: cb4d2347b96d80ca07d8dfbf20d9ed43425d5c17 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10173/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx