drm/i915/pages: some more unsigned long conversions
Subsystems (2)
PATCH 1/1 drm/i915/pages: some more unsigned long conversions
unsigned long is always preferred when indexing a page, especially when the caller expects it.
--- drivers/gpu/drm/i915/gem/i915_gem_object.h | 6 +++--- drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 2 +- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 11 ++++++----- 3 files changed, 10 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_object.h +3 -3
@@ -252,15 +252,15 @@ int i915_gem_object_set_tiling(struct drm_i915_gem_object *obj,struct scatterlist *i915_gem_object_get_sg (struct drm_i915_gem_object *obj, -unsigned int n,unsigned int *offset); +unsigned long n,unsigned int *offset);struct page *i915_gem_object_get_page (struct drm_i915_gem_object *obj, -unsigned int n); +unsigned long n);struct page *i915_gem_object_get_dirty_page (struct drm_i915_gem_object *obj, -unsigned int n); +unsigned long n); dma_addr_t i915_gem_object_get_dma_address_len(struct drm_i915_gem_object *obj,
drivers/gpu/drm/i915/gem/i915_gem_object_types.h +1 -1
@@ -236,7 +236,7 @@ struct drm_i915_gem_object {struct i915_gem_object_page_iter {struct scatterlist *sg_pos; -unsigned int sg_idx;/* in pages, but 32bit eek! */ +unsigned long sg_idx;/* in pages */ struct radix_tree_root radix;struct mutex lock;/* protects this cache */
drivers/gpu/drm/i915/gem/i915_gem_pages.c +6 -5
@@ -409,12 +409,13 @@ void __i915_gem_object_flush_map(struct drm_i915_gem_object *obj,struct scatterlist *i915_gem_object_get_sg (struct drm_i915_gem_object *obj, -unsigned int n, +unsigned long n,unsigned int *offset) {struct i915_gem_object_page_iter *iter = &obj->mm.get_page;struct scatterlist *sg; -unsigned int idx, count; +unsigned long idx; +unsigned int count;might_sleep ();GEM_BUG_ON (n >= obj->base.size >>PAGE_SHIFT );
@@ -445,7 +446,7 @@ i915_gem_object_get_sg(struct drm_i915_gem_object *obj,while (idx + count <= n) {void *entry; -unsigned long i; +unsigned int i;int ret;/* If we cannot allocate and insert this entry, or the
@@ -521,7 +522,7 @@ i915_gem_object_get_sg(struct drm_i915_gem_object *obj, }struct page * -i915_gem_object_get_page (struct drm_i915_gem_object *obj,unsigned int n) +i915_gem_object_get_page (struct drm_i915_gem_object *obj,unsigned long n) {struct scatterlist *sg;unsigned int offset;
@@ -535,7 +536,7 @@ i915_gem_object_get_page(struct drm_i915_gem_object *obj, unsigned int n)/* Like i915_gem_object_get_page(), but mark the returned page dirty */ struct page *i915_gem_object_get_dirty_page (struct drm_i915_gem_object *obj, -unsigned int n) +unsigned long n) {struct page *page;
Signature · 6 lines
2.20.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Matthew Auld (2020-04-17 10:30:46)
drivers/gpu/drm/i915/gem/i915_gem_object_types.h struct drm_i915_gem_object { · line 239
Quoted 10 lines
drivers/gpu/drm/i915/gem/i915_gem_object_types.h +1
-1@@ -236,7 +236,7 @@ struct drm_i915_gem_object {struct i915_gem_object_page_iter {struct scatterlist *sg_pos; -unsigned int sg_idx;/* in pages, but 32bit eek! */ +unsigned long sg_idx;/* in pages */
iirc sg_idx is still unsigned int.
Could you keep this and idx as int but add some GEM_BUG_ON(overflows_type) Hmm, or probably better would be overflows_type(sg->len) which is I think the trouble iirc.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✗ Fi.CI.DOCS: warning for drm/i915/pages: some more unsigned long conversions
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915/pages: some more unsigned long conversions
URL : https://patchwork.freedesktop.org/series/76078/
State : warning
== Summary ==
$ make htmldocs 2>&1 > /dev/null | grep i915 /home/cidrm/kernel/Documentation/gpu/i915.rst:610: WARNING: duplicate label gpu/i915:layout, other instance in /home/cidrm/kernel/Documentation/gpu/i915.rst
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/pages: some more unsigned long conversions
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915/pages: some more unsigned long conversions
URL : https://patchwork.freedesktop.org/series/76078/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8315 -> Patchwork_17342
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/index.html
Known issues
------------
Here are the changes found in Patchwork_17342 that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [FAIL][1] ([i915#178]) -> [PASS][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/fi-skl-6770hq/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/fi-skl-6770hq/igt@[email protected]
* igt@i915_selftest@live@requests:
- fi-icl-guc: [INCOMPLETE][3] ([i915#1581]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/fi-icl-guc/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/fi-icl-guc/igt@i915_selftest@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1581]: https://gitlab.freedesktop.org/drm/intel/issues/1581
[i915#1725]: https://gitlab.freedesktop.org/drm/intel/issues/1725
[i915#178]: https://gitlab.freedesktop.org/drm/intel/issues/178
Participating hosts (51 -> 45)
------------------------------
Missing (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8315 -> Patchwork_17342
CI-20190529: 20190529
CI_DRM_8315: cf2c3255ec72dfcb37385181a362cbf8e6cfdd15 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5599: cdb07101dda33e2fcb0f4c2aa199c47159d88f35 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17342: 70de3e9b10dca309685bfaeaf9aab087f85abfe4 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
70de3e9b10dc drm/i915/pages: some more unsigned long conversions
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/pages: some more unsigned long conversions
In reply to Matthew Auld== Series Details ==
== Series Details ==
Series: drm/i915/pages: some more unsigned long conversions
URL : https://patchwork.freedesktop.org/series/76078/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8315_full -> Patchwork_17342_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_17342_full:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* {igt@kms_flip@flip-vs-suspend@a-edp1}:
- shard-skl: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-skl10/igt@kms_flip@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-skl2/igt@kms_flip@[email protected]
Known issues
------------
Here are the changes found in Patchwork_17342_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_persistence@legacy-engines-mixed-process@bsd2:
- shard-kbl: [PASS][3] -> [FAIL][4] ([i915#1528])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-kbl1/igt@gem_ctx_persistence@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-kbl7/igt@gem_ctx_persistence@[email protected]
* igt@gem_exec_suspend@basic-s3:
- shard-skl: [PASS][5] -> [INCOMPLETE][6] ([i915#69])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-skl4/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-skl6/igt@[email protected]
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][7] -> [FAIL][8] ([i915#454])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-iclb2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-iclb8/igt@[email protected]
* igt@kms_cursor_crc@pipe-a-cursor-128x42-random:
- shard-kbl: [PASS][9] -> [FAIL][10] ([i915#54] / [i915#93] / [i915#95])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-kbl3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-kbl1/igt@[email protected]
* igt@kms_cursor_legacy@pipe-b-torture-bo:
- shard-tglb: [PASS][11] -> [DMESG-WARN][12] ([i915#128])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-tglb2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-tglb5/igt@[email protected]
* igt@kms_hdr@bpc-switch:
- shard-skl: [PASS][13] -> [FAIL][14] ([i915#1188])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-skl4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-skl6/igt@[email protected]
* igt@kms_mmap_write_crc@main:
- shard-kbl: [PASS][15] -> [FAIL][16] ([i915#93] / [i915#95])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-kbl2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-kbl4/igt@[email protected]
* igt@kms_psr@no_drrs:
- shard-iclb: [PASS][17] -> [FAIL][18] ([i915#173])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-iclb3/igt@kms_psr@no_drrs.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-iclb1/igt@kms_psr@no_drrs.html
* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [PASS][19] -> [SKIP][20] ([fdo#109441]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-iclb3/igt@kms_psr@psr2_primary_mmap_cpu.html
* igt@kms_vblank@pipe-b-ts-continuation-suspend:
- shard-kbl: [PASS][21] -> [DMESG-WARN][22] ([i915#180])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-kbl7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-kbl7/igt@[email protected]
#### Possible fixes ####
* igt@gem_workarounds@suspend-resume-context:
- shard-skl: [INCOMPLETE][23] ([i915#69]) -> [PASS][24] +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-skl5/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-skl7/igt@[email protected]
* igt@kms_draw_crc@draw-method-rgb565-render-untiled:
- shard-glk: [FAIL][25] ([i915#52] / [i915#54]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-glk2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-glk9/igt@[email protected]
* {igt@kms_flip@flip-vs-suspend-interruptible@a-dp1}:
- shard-apl: [DMESG-WARN][27] ([i915#180]) -> [PASS][28] +2 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-apl6/igt@kms_flip@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-apl1/igt@kms_flip@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-kbl: [DMESG-WARN][29] ([i915#180]) -> [PASS][30] +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-kbl7/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-kbl7/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
- shard-skl: [FAIL][31] ([fdo#108145] / [i915#265]) -> [PASS][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-skl8/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-skl9/igt@[email protected]
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [SKIP][33] ([fdo#109441]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-iclb4/igt@kms_psr@psr2_sprite_plane_move.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
* {igt@perf@blocking-parameterized}:
- shard-iclb: [FAIL][35] ([i915#1542]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-iclb3/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-iclb7/igt@[email protected]
#### Warnings ####
* igt@gen9_exec_parse@allowed-all:
- shard-glk: [INCOMPLETE][37] ([i915#58] / [k.org#198133]) -> [DMESG-WARN][38] ([i915#716])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-glk5/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-glk5/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbc-suspend:
- shard-kbl: [DMESG-WARN][39] ([i915#180] / [i915#93] / [i915#95]) -> [INCOMPLETE][40] ([i915#155])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8315/shard-kbl7/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17342/shard-kbl4/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#128]: https://gitlab.freedesktop.org/drm/intel/issues/128
[i915#1528]: https://gitlab.freedesktop.org/drm/intel/issues/1528
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
[i915#173]: https://gitlab.freedesktop.org/drm/intel/issues/173
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#58]: https://gitlab.freedesktop.org/drm/intel/issues/58
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8315 -> Patchwork_17342
CI-20190529: 20190529
CI_DRM_8315: cf2c3255ec72dfcb37385181a362cbf8e6cfdd15 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5599: cdb07101dda33e2fcb0f4c2aa199c47159d88f35 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17342: 70de3e9b10dca309685bfaeaf9aab087f85abfe4 @ 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_17342/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx