Skip to contentSkip to conversation

drm/i915: GTT offset is cut by 32b-flag.

PATCH In review Sergii Romantsov 6 participants 8 messages Nov 2, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: GTT offset is cut by 32b-flag.

Operating with gtt-addresses has to be done with 64b variables.

CC Kenneth Graunke <[email protected]>
CC Chris Wilson <[email protected]>
Fixes a363bb2cd0e2 (i965: Allocate VMA in userspace for full-PPGTT systems.)
Fixes c7c6e46f913b (drm/i915: Convert execbuf to use struct-of-array packing for critical fields)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108619

---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_execbuffer.c +1 -1
index 3f0c612..1973b79 100644
@@ -611,7 +611,7 @@ static int eb_reserve_vma(const struct i915_execbuffer *eb,
 
 	if (exec_flags & EXEC_OBJECT_PINNED) {
 		pin_flags |= entry->offset | PIN_OFFSET_FIXED;
-		pin_flags &= ~PIN_NONBLOCK; /* force overlapping checks */
+		pin_flags &= ~(u64)PIN_NONBLOCK; /* force overlapping checks */
 	} else if (exec_flags & __EXEC_OBJECT_NEEDS_BIAS) {
 		pin_flags |= BATCH_OFFSET_BIAS | PIN_OFFSET_BIAS;
 	}
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

Seems extending of any PIN_XXX flags to 64b has no sense for all other cases.
But also in the code there is mismatching of 64 and 32b flags/data usage (32b flags may be put to 64b arguments).
Seems that shouldn't cause any issues anymore, but if you think that it should be fixed - please, let me know - would like to complete that case.

Quoted 38 lines · Sergii Romantsov

Operating with gtt-addresses has to be done with 64b variables.

CC Kenneth Graunke <[email protected]>
CC Chris Wilson <[email protected]>
Fixes a363bb2cd0e2 (i965: Allocate VMA in userspace for full-PPGTT

systems.)

Fixes c7c6e46f913b (drm/i915: Convert execbuf to use struct-of-array

packing for critical fields)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108619

---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_execbuffer.c +1 -1
index 3f0c612..1973b79 100644
@@ -611,7 +611,7 @@ static int eb_reserve_vma(const struct i915_execbuffer
 *eb,
 
        if (exec_flags & EXEC_OBJECT_PINNED) {
                pin_flags |= entry->offset | PIN_OFFSET_FIXED;
-               pin_flags &= ~PIN_NONBLOCK; /* force overlapping checks */
+               pin_flags &= ~(u64)PIN_NONBLOCK; /* force overlapping

checks */

        } else if (exec_flags & __EXEC_OBJECT_NEEDS_BIAS) {
                pin_flags |= BATCH_OFFSET_BIAS | PIN_OFFSET_BIAS;
        }

--
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 3 lines
Sergii Romantsov
GlobalLogic Inc.
www.globallogic.com

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#2 lore raw
In reply to Sergii Romantsov
Quoted 8 lines · Sergii Romantsov

Operating with gtt-addresses has to be done with 64b variables.

CC Kenneth Graunke <[email protected]>
CC Chris Wilson <[email protected]>
Fixes a363bb2cd0e2 (i965: Allocate VMA in userspace for full-PPGTT systems.)
Fixes c7c6e46f913b (drm/i915: Convert execbuf to use struct-of-array packing for critical fields)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108619

Thanks a lot for finding this. Looks good to me. I'll let Chris decide whether to turn all the bit masks into 64bits.

Quoted 9 lines
---
  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_execbuffer.c +0 -0
index 3f0c612..1973b79 100644

drivers/gpu/drm/i915/i915_gem_execbuffer.c static int eb_reserve_vma(const struct i915_execbuffer *eb, · line 617

Quoted 8 lines
drivers/gpu/drm/i915/i915_gem_execbuffer.c +1 -1
@@ -611,7 +611,7 @@ static int eb_reserve_vma(const struct i915_execbuffer *eb,
 
  	if (exec_flags & EXEC_OBJECT_PINNED) {
  		pin_flags |= entry->offset | PIN_OFFSET_FIXED;
-		pin_flags &= ~PIN_NONBLOCK; /* force overlapping checks */
+		pin_flags &= ~(u64)PIN_NONBLOCK; /* force overlapping checks */
  	} else if (exec_flags & __EXEC_OBJECT_NEEDS_BIAS) {
  		pin_flags |= BATCH_OFFSET_BIAS | PIN_OFFSET_BIAS;
  	}

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Quoting Lionel Landwerlin (2018-11-02 16:32:06)

Quoted 11 lines · Sergii Romantsov
Quoted 8 lines

Operating with gtt-addresses has to be done with 64b variables.

CC Kenneth Graunke <[email protected]>
CC Chris Wilson <[email protected]>
Fixes a363bb2cd0e2 (i965: Allocate VMA in userspace for full-PPGTT systems.)
Fixes c7c6e46f913b (drm/i915: Convert execbuf to use struct-of-array packing for critical fields)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108619

Quoted 2 lines

Thanks a lot for finding this. Looks good to me. I'll let Chris decide whether to turn all the bit masks into 64bits.

Already did.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
In reply to Lionel Landwerlin
Quoted 11 lines · Lionel Landwerlin
Quoted 8 lines · Sergii Romantsov

Operating with gtt-addresses has to be done with 64b variables.

CC Kenneth Graunke <[email protected]>
CC Chris Wilson <[email protected]>
Fixes a363bb2cd0e2 (i965: Allocate VMA in userspace for full-PPGTT systems.)
Fixes c7c6e46f913b (drm/i915: Convert execbuf to use struct-of-array packing for critical fields)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108619

Quoted 1 line

Thanks a lot for finding this. Looks good to me. I'll let Chris decide whether to turn all the bit masks into 64bits.

+1 for using BIT_ULL for all PIN_XXX definitions (plus some fixups in code)

Michal

Quoted 20 lines
Quoted 15 lines
---
  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_execbuffer.c +1 -1
index 3f0c612..1973b79 100644
@@ -611,7 +611,7 @@ static int eb_reserve_vma(const struct  
 i915_execbuffer *eb,
    	if (exec_flags & EXEC_OBJECT_PINNED) {
  		pin_flags |= entry->offset | PIN_OFFSET_FIXED;
-		pin_flags &= ~PIN_NONBLOCK; /* force overlapping checks */
+		pin_flags &= ~(u64)PIN_NONBLOCK; /* force overlapping checks */
  	} else if (exec_flags & __EXEC_OBJECT_NEEDS_BIAS) {
Quoted 8 lines

drivers/gpu/drm/i915/i915_gem_execbuffer.c static int eb_reserve_vma(const struct i915_execbuffer *eb, · line 617

Quoted 2 lines
drivers/gpu/drm/i915/i915_gem_execbuffer.c +0 -0
  		pin_flags |= BATCH_OFFSET_BIAS | PIN_OFFSET_BIAS;
  	}

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✗ Fi.CI.CHECKPATCH: warning for drm/i915: GTT offset is cut by 32b-flag.

In reply to Sergii Romantsov
== Series Details ==

== Series Details ==

Series: drm/i915: GTT offset is cut by 32b-flag.
URL : https://patchwork.freedesktop.org/series/51955/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
33a09ca99519 drm/i915: GTT offset is cut by 32b-flag.
-:28: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Sergii Romantsov <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 8 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

✓ Fi.CI.BAT: success for drm/i915: GTT offset is cut by 32b-flag.

In reply to Sergii Romantsov
== Series Details ==

== Series Details ==

Series: drm/i915: GTT offset is cut by 32b-flag.
URL : https://patchwork.freedesktop.org/series/51955/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5080 -> Patchwork_10712 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/51955/revisions/1/mbox/

== Known issues ==

Here are the changes found in Patchwork_10712 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_execlists:
      fi-apl-guc:         PASS -> DMESG-WARN (fdo#108622)

    igt@gem_exec_suspend@basic-s4-devices:
      fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)

    igt@kms_pipe_crc_basic@read-crc-pipe-a:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-icl-u:           NOTRUN -> INCOMPLETE (fdo#107713)

    
    ==== Possible fixes ====

    igt@gem_ctx_switch@basic-default:
      fi-icl-u:           INCOMPLETE (fdo#108315, fdo#108535) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
      fi-byt-clapper:     FAIL (fdo#107362) -> PASS

fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107713 https://bugs.freedesktop.org/show_bug.cgi?id=107713
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
fdo#108315 https://bugs.freedesktop.org/show_bug.cgi?id=108315
fdo#108535 https://bugs.freedesktop.org/show_bug.cgi?id=108535
fdo#108622 https://bugs.freedesktop.org/show_bug.cgi?id=108622

== Participating hosts (51 -> 45) ==

Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600

== Build changes ==

* Linux: CI_DRM_5080 -> Patchwork_10712

CI_DRM_5080: b8df8e90cb6f888bfa6df630cda858473e3bd2f8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4705: 7983e19ed62ec8db1884f55e07e458a62cc51e37 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10712: 33a09ca99519a223cd8571827380905944f9352a @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

33a09ca99519 drm/i915: GTT offset is cut by 32b-flag.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10712/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

✓ Fi.CI.IGT: success for drm/i915: GTT offset is cut by 32b-flag.

In reply to Sergii Romantsov
== Series Details ==

== Series Details ==

Series: drm/i915: GTT offset is cut by 32b-flag.
URL : https://patchwork.freedesktop.org/series/51955/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5080_full -> Patchwork_10712_full =

== Summary - SUCCESS ==

No regressions found.

== Known issues ==

Here are the changes found in Patchwork_10712_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-glk:          PASS -> INCOMPLETE (fdo#106886, fdo#103359, k.org#198133)

    igt@gem_cpu_reloc@full:
      shard-skl:          NOTRUN -> INCOMPLETE (fdo#108073)

    igt@gem_ppgtt@blt-vs-render-ctxn:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665, fdo#106023, fdo#106887)

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
      shard-skl:          NOTRUN -> DMESG-WARN (fdo#107956) +1

    igt@kms_chv_cursor_fail@pipe-c-128x128-top-edge:
      shard-skl:          NOTRUN -> FAIL (fdo#104671)

    igt@kms_color@pipe-b-ctm-0-75:
      shard-apl:          PASS -> DMESG-WARN (fdo#103558, fdo#105602) +5

    igt@kms_color@pipe-c-ctm-negative:
      shard-skl:          NOTRUN -> FAIL (fdo#107361)

    igt@kms_cursor_crc@cursor-256x256-sliding:
      shard-glk:          PASS -> FAIL (fdo#103232) +2

    igt@kms_cursor_crc@cursor-256x85-random:
      shard-apl:          PASS -> FAIL (fdo#103232) +1

    igt@kms_cursor_crc@cursor-64x64-suspend:
      shard-skl:          PASS -> INCOMPLETE (fdo#104108)

    igt@kms_flip@basic-flip-vs-dpms:
      shard-kbl:          PASS -> DMESG-WARN (fdo#103313, fdo#105345)

    igt@kms_flip@flip-vs-expired-vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#105363)

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
      shard-apl:          PASS -> FAIL (fdo#103167)

    igt@kms_panel_fitting@legacy:
      shard-skl:          NOTRUN -> FAIL (fdo#105456)

    igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
      shard-apl:          PASS -> FAIL (fdo#108145)
      shard-skl:          NOTRUN -> FAIL (fdo#107815, fdo#108145) +2

    igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
      shard-skl:          NOTRUN -> FAIL (fdo#108145)

    igt@kms_plane_multiple@atomic-pipe-b-tiling-yf:
      shard-glk:          PASS -> FAIL (fdo#103166)

    igt@pm_backlight@fade_with_suspend:
      shard-skl:          NOTRUN -> FAIL (fdo#107847)

    igt@pm_rpm@universal-planes:
      shard-skl:          NOTRUN -> INCOMPLETE (fdo#107807)

    
    ==== Possible fixes ====

    igt@gem_exec_schedule@preempt-contexts-render:
      shard-glk:          DMESG-WARN (fdo#105763, fdo#106538) -> PASS +2

    igt@kms_color@pipe-c-legacy-gamma:
      shard-apl:          FAIL (fdo#104782) -> PASS

    igt@kms_cursor_crc@cursor-128x128-suspend:
      shard-snb:          DMESG-WARN (fdo#102365) -> PASS
      shard-kbl:          FAIL (fdo#103191, fdo#103232) -> PASS

    igt@kms_cursor_crc@cursor-256x256-sliding:
      shard-apl:          FAIL (fdo#103232) -> PASS

    igt@kms_cursor_crc@cursor-256x85-sliding:
      shard-skl:          FAIL (fdo#103232) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-onoff:
      shard-glk:          FAIL (fdo#103167) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-mmap-wc:
      shard-glk:          DMESG-FAIL (fdo#106538) -> PASS

    igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
      shard-skl:          FAIL (fdo#107815) -> PASS

    igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
      shard-glk:          FAIL (fdo#103166) -> PASS +1
      shard-apl:          FAIL (fdo#103166) -> PASS +1

    igt@kms_universal_plane@disable-primary-vs-flip-pipe-c:
      shard-kbl:          DMESG-WARN (fdo#103558, fdo#105602) -> PASS +30

    igt@perf@blocking:
      shard-hsw:          FAIL (fdo#102252) -> PASS

    
    ==== Warnings ====

    igt@kms_plane_alpha_blend@pipe-c-alpha-7efc:
      shard-kbl:          DMESG-FAIL (fdo#103558, fdo#105602, fdo#108145) -> FAIL (fdo#108590, fdo#108145)

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
fdo#103313 https://bugs.freedesktop.org/show_bug.cgi?id=103313
fdo#103359 https://bugs.freedesktop.org/show_bug.cgi?id=103359
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#104108 https://bugs.freedesktop.org/show_bug.cgi?id=104108
fdo#104671 https://bugs.freedesktop.org/show_bug.cgi?id=104671
fdo#104782 https://bugs.freedesktop.org/show_bug.cgi?id=104782
fdo#105345 https://bugs.freedesktop.org/show_bug.cgi?id=105345
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105456 https://bugs.freedesktop.org/show_bug.cgi?id=105456
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#106887 https://bugs.freedesktop.org/show_bug.cgi?id=106887
fdo#107361 https://bugs.freedesktop.org/show_bug.cgi?id=107361
fdo#107807 https://bugs.freedesktop.org/show_bug.cgi?id=107807
fdo#107815 https://bugs.freedesktop.org/show_bug.cgi?id=107815
fdo#107847 https://bugs.freedesktop.org/show_bug.cgi?id=107847
fdo#107956 https://bugs.freedesktop.org/show_bug.cgi?id=107956
fdo#108073 https://bugs.freedesktop.org/show_bug.cgi?id=108073
fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
fdo#108590 https://bugs.freedesktop.org/show_bug.cgi?id=108590
k.org#198133 https://bugzilla.kernel.org/show_bug.cgi?id=198133

== Participating hosts (6 -> 6) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_5080 -> Patchwork_10712

CI_DRM_5080: b8df8e90cb6f888bfa6df630cda858473e3bd2f8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4705: 7983e19ed62ec8db1884f55e07e458a62cc51e37 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10712: 33a09ca99519a223cd8571827380905944f9352a @ 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_10712/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx