Skip to contentSkip to conversation

drm/i915/fbdev: FB allocation from LMEM, if supported

PATCH In review Ramalingam C 4 participants 4 messages Nov 15, 2019

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

PATCH 1/1 drm/i915/fbdev: FB allocation from LMEM, if supported

FB for fbdev is allocated from LMEM if the platform supports LMEM.

---
 drivers/gpu/drm/i915/display/intel_fbdev.c | 24 ++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)
drivers/gpu/drm/i915/display/intel_fbdev.c +16 -8
index 48c960ca12fb..82efc0ca83d9 100644
@@ -42,6 +42,7 @@
 #include <drm/drm_fourcc.h>
 #include <drm/i915_drm.h>
 
+#include "gem/i915_gem_lmem.h"
 #include "i915_drv.h"
 #include "intel_display_types.h"
 #include "intel_fbdev.h"
@@ -137,15 +138,22 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
 
 	size = mode_cmd.pitches[0] * mode_cmd.height;
 	size = PAGE_ALIGN(size);
-
-	/* If the FB is too big, just don't use it since fbdev is not very
-	 * important and we should probably use that space with FBC or other
-	 * features. */
 	obj = ERR_PTR(-ENODEV);
-	if (size * 2 < dev_priv->stolen_usable_size)
-		obj = i915_gem_object_create_stolen(dev_priv, size);
-	if (IS_ERR(obj))
-		obj = i915_gem_object_create_shmem(dev_priv, size);
+
+	if (HAS_LMEM(dev_priv)) {
+		obj = i915_gem_object_create_lmem(dev_priv, size,
+						  I915_BO_ALLOC_CONTIGUOUS);
+	} else {
+		/*
+		 * If the FB is too big, just don't use it since fbdev is not
+		 * very important and we should probably use that space with
+		 * FBC or other features.
+		 */
+		if (size * 2 < dev_priv->stolen_usable_size)
+			obj = i915_gem_object_create_stolen(dev_priv, size);
+		if (IS_ERR(obj))
+			obj = i915_gem_object_create_shmem(dev_priv, size);
+	}
 	if (IS_ERR(obj)) {
 		DRM_ERROR("failed to allocate framebuffer\n");
 		return PTR_ERR(obj);
Signature · 6 lines
2.20.1

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

✗ Fi.CI.BAT: failure for drm/i915/fbdev: FB allocation from LMEM, if supported

== Series Details ==

== Series Details ==

Series: drm/i915/fbdev: FB allocation from LMEM, if supported
URL : https://patchwork.freedesktop.org/series/69517/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7350 -> Patchwork_15275
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_15275 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_15275, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15275/index.html

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live_gem_contexts:
- fi-skl-lmem: [PASS][1] -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7350/fi-skl-lmem/igt@i915_selftest@live_gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15275/fi-skl-lmem/igt@i915_selftest@live_gem_contexts.html

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@kms_busy@basic-flip-pipe-b:
- fi-skl-6770hq: [PASS][3] -> [DMESG-WARN][4] ([fdo#105541])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7350/fi-skl-6770hq/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15275/fi-skl-6770hq/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][5] -> [FAIL][6] ([fdo#111045] / [fdo#111096])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7350/fi-kbl-7500u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15275/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@i915_module_load@reload-with-fault-injection:
- {fi-kbl-7560u}: [INCOMPLETE][7] ([fdo#109964] / [fdo#110343]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7350/fi-kbl-7560u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15275/fi-kbl-7560u/igt@[email protected]

* igt@i915_pm_rpm@module-reload:
- fi-skl-6770hq: [DMESG-WARN][9] ([fdo#112261]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7350/fi-skl-6770hq/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15275/fi-skl-6770hq/igt@[email protected]

* igt@kms_flip@basic-flip-vs-modeset:
- fi-icl-dsi: [INCOMPLETE][11] ([fdo#107713]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7350/fi-icl-dsi/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15275/fi-icl-dsi/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u2: [FAIL][13] ([fdo#103167]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7350/fi-icl-u2/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15275/fi-icl-u2/igt@[email protected]

* igt@kms_setmode@basic-clone-single-crtc:
- fi-skl-6770hq: [WARN][15] ([fdo#112252]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7350/fi-skl-6770hq/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15275/fi-skl-6770hq/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#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#105541]: https://bugs.freedesktop.org/show_bug.cgi?id=105541
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#109964]: https://bugs.freedesktop.org/show_bug.cgi?id=109964
[fdo#110343]: https://bugs.freedesktop.org/show_bug.cgi?id=110343
[fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#112252]: https://bugs.freedesktop.org/show_bug.cgi?id=112252
[fdo#112261]: https://bugs.freedesktop.org/show_bug.cgi?id=112261

Participating hosts (49 -> 44)
------------------------------

Missing (5): fi-kbl-soraka fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7350 -> Patchwork_15275

CI-20190529: 20190529
CI_DRM_7350: 152f497716543b573ad729cbee8dd0e51d6b4aaf @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5287: 9e57f8a51d59b3ffe4002d761fe0315d733bd66e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15275: 7d588de1c1736c5c78da846ba80128b61aee8173 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

7d588de1c173 drm/i915/fbdev: FB allocation from LMEM, if supported

== Logs ==

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

#2 lore raw
In reply to Ramalingam C
Quoted 5 lines · Ramalingam C

FB for fbdev is allocated from LMEM if the platform supports LMEM.

Sounds reasonable I think. Do we also need to adjust intelfb_create as part of this? pin_iomap, gmadr etc?
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Quoting Matthew Auld (2019-11-15 12:25:41)

Quoted 9 lines · Ramalingam C
Quoted 5 lines

FB for fbdev is allocated from LMEM if the platform supports LMEM.

Sounds reasonable I think. Do we also need to adjust intelfb_create as part of this? pin_iomap, gmadr etc?

I had a vague idea of doing an intel_fb_vma to abstract the different map handling. What can't be solved with one more layer of indirection? -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx