All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] ppgtt/i915: memory address masks
@ 2018-10-25  8:49 Sergii Romantsov
  2018-10-25  9:29 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2018-10-25  9:57 ` ✓ Fi.CI.BAT: success " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Sergii Romantsov @ 2018-10-25  8:49 UTC (permalink / raw)
  To: intel-gfx; +Cc: Kenneth Graunke

Gen8+ ppgtt uses 48-bit addresses.
Kernel driver uses masks to manipulate with addresses.
Masks are UL-types. On 64-bit system UL is 64 bits,
on 32-bit system - 32.
So on 32-bit systems 48-bit adresses goes to be cut to 32 bits.

CC: Kenneth Graunke <kenneth@whitecape.org>
CC: Chris Wilson <chris@chris-wilson.co.uk>
CC: Lionel G Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108282
Fixes: a363bb2cd0e2 (i965: Allocate VMA in userspace for full-PPGTT systems.)
Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +-
 drivers/gpu/drm/i915/i915_gem_gtt.h | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index f00c7fbe..fa3c6e4 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2358,7 +2358,7 @@ static void gen6_check_and_clear_faults(struct drm_i915_private *dev_priv)
 		fault = I915_READ(RING_FAULT_REG(engine));
 		if (fault & RING_FAULT_VALID) {
 			DRM_DEBUG_DRIVER("Unexpected fault\n"
-					 "\tAddr: 0x%08lx\n"
+					 "\tAddr: 0x%08llx\n"
 					 "\tAddress space: %s\n"
 					 "\tSource ID: %d\n"
 					 "\tType: %d\n",
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
index 2a116a9..02087ca 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.h
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
@@ -676,6 +676,11 @@ int i915_gem_gtt_insert(struct i915_address_space *vm,
 #define PIN_HIGH		BIT(9)
 #define PIN_OFFSET_BIAS		BIT(10)
 #define PIN_OFFSET_FIXED	BIT(11)
-#define PIN_OFFSET_MASK		(-I915_GTT_PAGE_SIZE)
+#define PIN_OFFSET_MASK		(-(__u64)I915_GTT_PAGE_SIZE)
+#undef PAGE_MASK		/* NOTE(sergii.romantsov): seems not the best
+				 * idea, but original PAGE_MASK can\t be used
+				 * for ppgtt at least with 32-bit kernel.
+				 */
+#define PAGE_MASK		(~((__u64)PAGE_SIZE-1))
 
 #endif
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ Fi.CI.CHECKPATCH: warning for ppgtt/i915: memory address masks
  2018-10-25  8:49 [PATCH v1] ppgtt/i915: memory address masks Sergii Romantsov
@ 2018-10-25  9:29 ` Patchwork
  2018-10-25  9:57 ` ✓ Fi.CI.BAT: success " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2018-10-25  9:29 UTC (permalink / raw)
  To: Sergii Romantsov; +Cc: intel-gfx

== Series Details ==

Series: ppgtt/i915: memory address masks
URL   : https://patchwork.freedesktop.org/series/51499/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
19ba58175c82 ppgtt/i915: memory address masks
-:10: WARNING:TYPO_SPELLING: 'adresses' may be misspelled - perhaps 'addresses'?
#10: 
So on 32-bit systems 48-bit adresses goes to be cut to 32 bits.

-:46: CHECK:SPACING: spaces preferred around that '-' (ctx:VxV)
#46: FILE: drivers/gpu/drm/i915/i915_gem_gtt.h:681:
+#define PAGE_MASK		(~((__u64)PAGE_SIZE-1))
                  		                   ^

-:48: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Sergii Romantsov <sergii.romantsov@gmail.com>'

total: 0 errors, 2 warnings, 1 checks, 20 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* ✓ Fi.CI.BAT: success for ppgtt/i915: memory address masks
  2018-10-25  8:49 [PATCH v1] ppgtt/i915: memory address masks Sergii Romantsov
  2018-10-25  9:29 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-10-25  9:57 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2018-10-25  9:57 UTC (permalink / raw)
  To: Sergii Romantsov; +Cc: intel-gfx

== Series Details ==

Series: ppgtt/i915: memory address masks
URL   : https://patchwork.freedesktop.org/series/51499/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_5033 -> Patchwork_10573 =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_10573 need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_10573, 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/51499/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_10573:

  === IGT changes ===

    ==== Warnings ====

    igt@pm_rpm@module-reload:
      fi-hsw-4770r:       SKIP -> PASS

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_module_reload@basic-reload:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106248, fdo#106725)

    igt@gem_exec_suspend@basic-s3:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106097) +1

    igt@kms_flip@basic-flip-vs-modeset:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000)

    igt@kms_flip@basic-flip-vs-wf_vblank:
      fi-glk-j4005:       PASS -> FAIL (fdo#100368)

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     PASS -> FAIL (fdo#103167)

    igt@pm_rpm@module-reload:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#107726)

    
    ==== Possible fixes ====

    igt@drv_module_reload@basic-reload-inject:
      fi-hsw-4770r:       DMESG-WARN (fdo#107425, fdo#107924) -> PASS

    igt@drv_selftest@live_hangcheck:
      fi-kbl-7560u:       INCOMPLETE (fdo#108044) -> PASS

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
  fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097
  fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
  fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725
  fdo#107425 https://bugs.freedesktop.org/show_bug.cgi?id=107425
  fdo#107726 https://bugs.freedesktop.org/show_bug.cgi?id=107726
  fdo#107924 https://bugs.freedesktop.org/show_bug.cgi?id=107924
  fdo#108044 https://bugs.freedesktop.org/show_bug.cgi?id=108044


== Participating hosts (47 -> 40) ==

  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-u fi-skl-6700hq 


== Build changes ==

    * Linux: CI_DRM_5033 -> Patchwork_10573

  CI_DRM_5033: f935e4c7634781e6ffef10bb8a1c93225ac42d90 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4691: d445be01f5edc7e7a324444c73e221c9ed75602e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_10573: 19ba58175c82a2a18eb12d8dbcaf86e2cbaa61e8 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

19ba58175c82 ppgtt/i915: memory address masks

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10573/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-25  9:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25  8:49 [PATCH v1] ppgtt/i915: memory address masks Sergii Romantsov
2018-10-25  9:29 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-10-25  9:57 ` ✓ Fi.CI.BAT: success " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.