From: Nirmoy Das <nirmoy.das@linux.intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
Nirmoy Das <nirmoy.das@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/display: Do not use stolen on MTL
Date: Mon, 10 Jul 2023 11:00:53 +0200 [thread overview]
Message-ID: <4032e558-00f7-4c9b-6d4a-7b8958361237@linux.intel.com> (raw)
In-Reply-To: <73912e3b-69af-b95c-7b0b-8518d003a3d2@linux.intel.com>
Hi Tvrkto,
On 7/6/2023 3:43 PM, Tvrtko Ursulin wrote:
>
> On 06/07/2023 14:35, Nirmoy Das wrote:
>>
>> On 7/6/2023 3:32 PM, Tvrtko Ursulin wrote:
>>>
>>> On 30/06/2023 18:01, Nirmoy Das wrote:
>>>> Use smem on MTL due to a HW bug in MTL that prevents
>>>> reading from stolen memory using LMEM BAR.
>>>
>>> Does anything remain in stolen or could the memory region just not
>>> be created?
>>
>>
>> GSC requires DSM which can't use smem for another bug.
>
> Okay, thanks.
>
> As a related comment, these if-if-if object creation ladders were
> always a bit ugly and some years ago I was suggesting we create a
> helper with some "intent/usage" flags. Which could then dtrt ie.
> create the right object for that intent/usage and platform. I *think*
> I possibly even had a RFC... need to try and find it.
Did you find it :) Would be nice to have a better way to detect and
apply memory region as per platfrom/usecase.
Regards,
Nirmoy
>
> Regards,
>
> Tvrtko
>
>>
>> Regards,
>>
>> Nirmoy
>>
>>
>>>
>>> Regards,
>>>
>>> Tvrtko
>>>
>>>> Cc: Oak Zeng <oak.zeng@intel.com>
>>>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>>>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>>>> Cc: Andi Shyti <andi.shyti@linux.intel.com>
>>>> Cc: Andrzej Hajda <andrzej.hajda@intel.com>
>>>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>>>> ---
>>>> drivers/gpu/drm/i915/display/intel_fbdev.c | 2 ++
>>>> drivers/gpu/drm/i915/display/intel_overlay.c | 7 ++++---
>>>> 2 files changed, 6 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c
>>>> b/drivers/gpu/drm/i915/display/intel_fbdev.c
>>>> index 1cc0ddc6a310..10e38d60f9ef 100644
>>>> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
>>>> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
>>>> @@ -182,6 +182,8 @@ static int intelfb_alloc(struct drm_fb_helper
>>>> *helper,
>>>> obj = i915_gem_object_create_lmem(dev_priv, size,
>>>> I915_BO_ALLOC_CONTIGUOUS |
>>>> I915_BO_ALLOC_USER);
>>>> + } else if (IS_METEORLAKE(dev_priv)) { /* Wa_22018444074 */
>>>> + obj = i915_gem_object_create_shmem(dev_priv, size);
>>>> } else {
>>>> /*
>>>> * If the FB is too big, just don't use it since fbdev is
>>>> not very
>>>> diff --git a/drivers/gpu/drm/i915/display/intel_overlay.c
>>>> b/drivers/gpu/drm/i915/display/intel_overlay.c
>>>> index d6fe2bbabe55..05ae446c8a56 100644
>>>> --- a/drivers/gpu/drm/i915/display/intel_overlay.c
>>>> +++ b/drivers/gpu/drm/i915/display/intel_overlay.c
>>>> @@ -1348,12 +1348,13 @@ int intel_overlay_attrs_ioctl(struct
>>>> drm_device *dev, void *data,
>>>> static int get_registers(struct intel_overlay *overlay, bool
>>>> use_phys)
>>>> {
>>>> struct drm_i915_private *i915 = overlay->i915;
>>>> - struct drm_i915_gem_object *obj;
>>>> + struct drm_i915_gem_object *obj = NULL;
>>>> struct i915_vma *vma;
>>>> int err;
>>>> - obj = i915_gem_object_create_stolen(i915, PAGE_SIZE);
>>>> - if (IS_ERR(obj))
>>>> + if (!IS_METEORLAKE(i915)) /* Wa_22018444074 */
>>>> + obj = i915_gem_object_create_stolen(i915, PAGE_SIZE);
>>>> + if (IS_ERR_OR_NULL(obj))
>>>> obj = i915_gem_object_create_internal(i915, PAGE_SIZE);
>>>> if (IS_ERR(obj))
>>>> return PTR_ERR(obj);
next prev parent reply other threads:[~2023-07-10 9:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 17:01 [Intel-gfx] [PATCH 1/2] drm/i915/gt: Do not use stolen on MTL Nirmoy Das
2023-06-30 17:01 ` [Intel-gfx] [PATCH 2/2] drm/i915/display: " Nirmoy Das
2023-07-05 10:02 ` Andrzej Hajda
2023-07-11 13:44 ` Nirmoy Das
2023-07-06 13:32 ` Tvrtko Ursulin
2023-07-06 13:35 ` Nirmoy Das
2023-07-06 13:43 ` Tvrtko Ursulin
2023-07-10 9:00 ` Nirmoy Das [this message]
2023-07-11 15:59 ` Tvrtko Ursulin
2023-07-12 12:43 ` Nirmoy Das
2023-07-11 14:50 ` Andi Shyti
2023-06-30 17:31 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915/gt: " Patchwork
2023-06-30 17:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-07-01 6:45 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-07-04 15:01 ` [Intel-gfx] [PATCH 1/2] " Zeng, Oak
2023-07-04 15:31 ` Nirmoy Das
2023-07-04 15:41 ` Zeng, Oak
2023-07-11 14:50 ` Andi Shyti
2023-07-05 9:51 ` Andrzej Hajda
2023-07-11 14:48 ` Andi Shyti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4032e558-00f7-4c9b-6d4a-7b8958361237@linux.intel.com \
--to=nirmoy.das@linux.intel.com \
--cc=andrzej.hajda@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=nirmoy.das@intel.com \
--cc=tvrtko.ursulin@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.