From: Matthew Auld <matthew.auld@intel.com>
To: Ramalingam C <ramalingam.c@intel.com>,
Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v3] drm/i915: Create dumb buffer from LMEM
Date: Wed, 6 Nov 2019 12:12:31 +0000 [thread overview]
Message-ID: <2e19dad8-792c-6ac9-87f9-fbc8c6cdaf18@intel.com> (raw)
In-Reply-To: <20191106114228.GA2215@intel.com>
On 06/11/2019 11:42, Ramalingam C wrote:
> On 2019-11-05 at 11:47:16 +0000, Chris Wilson wrote:
>> Quoting Ramalingam C (2019-11-05 11:30:29)
>>> When LMEM is supported, dumb buffer preferred to be created from LMEM.
>>>
>>> v2:
>>> Parameters are reshuffled. [Chris]
>>> v3:
>>> s/region_id/mem_type
>>>
>>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>>> cc: Matthew Auld <matthew.auld@intel.com>
>>> ---
>>> drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++++---
>>> 1 file changed, 14 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
>>> index 143a8952b736..db72af98905f 100644
>>> --- a/drivers/gpu/drm/i915/i915_gem.c
>>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>>> @@ -44,6 +44,7 @@
>>> #include "gem/i915_gem_clflush.h"
>>> #include "gem/i915_gem_context.h"
>>> #include "gem/i915_gem_ioctls.h"
>>> +#include "gem/i915_gem_lmem.h"
>>> #include "gem/i915_gem_pm.h"
>>> #include "gt/intel_engine_user.h"
>>> #include "gt/intel_gt.h"
>>> @@ -175,6 +176,7 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj,
>>> static int
>>> i915_gem_create(struct drm_file *file,
>>> struct drm_i915_private *dev_priv,
>>> + enum intel_memory_type mem_type,
>>> u64 *size_p,
>>> u32 *handle_p)
>>> {
>>> @@ -188,7 +190,11 @@ i915_gem_create(struct drm_file *file,
>>> return -EINVAL;
>>>
>>> /* Allocate the new object */
>>> - obj = i915_gem_object_create_shmem(dev_priv, size);
>>> + if (mem_type == INTEL_MEMORY_LOCAL)
>>> + obj = i915_gem_object_create_lmem(dev_priv, size, 0);
>>> + else
>>> + obj = i915_gem_object_create_shmem(dev_priv, size);
>>
>> Have you not talked Matthew into creating a
>> i915_gem_object_create_region(?dev_priv?,
>> intel_memory_region_lookup(dev_priv, mem_type),
>> size, flags)
> Sounds a good idea to skip a wrapper function.
>
> Matt, Is that ok with you?
Sure.
>
> -Ram
>> yet?
>> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Matthew Auld <matthew.auld@intel.com>
To: Ramalingam C <ramalingam.c@intel.com>,
Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v3] drm/i915: Create dumb buffer from LMEM
Date: Wed, 6 Nov 2019 12:12:31 +0000 [thread overview]
Message-ID: <2e19dad8-792c-6ac9-87f9-fbc8c6cdaf18@intel.com> (raw)
Message-ID: <20191106121231.R3HSabiIvFxIGti7JamvVZASXOWBhSFm9l7ksQvNxR8@z> (raw)
In-Reply-To: <20191106114228.GA2215@intel.com>
On 06/11/2019 11:42, Ramalingam C wrote:
> On 2019-11-05 at 11:47:16 +0000, Chris Wilson wrote:
>> Quoting Ramalingam C (2019-11-05 11:30:29)
>>> When LMEM is supported, dumb buffer preferred to be created from LMEM.
>>>
>>> v2:
>>> Parameters are reshuffled. [Chris]
>>> v3:
>>> s/region_id/mem_type
>>>
>>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>>> cc: Matthew Auld <matthew.auld@intel.com>
>>> ---
>>> drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++++---
>>> 1 file changed, 14 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
>>> index 143a8952b736..db72af98905f 100644
>>> --- a/drivers/gpu/drm/i915/i915_gem.c
>>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>>> @@ -44,6 +44,7 @@
>>> #include "gem/i915_gem_clflush.h"
>>> #include "gem/i915_gem_context.h"
>>> #include "gem/i915_gem_ioctls.h"
>>> +#include "gem/i915_gem_lmem.h"
>>> #include "gem/i915_gem_pm.h"
>>> #include "gt/intel_engine_user.h"
>>> #include "gt/intel_gt.h"
>>> @@ -175,6 +176,7 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj,
>>> static int
>>> i915_gem_create(struct drm_file *file,
>>> struct drm_i915_private *dev_priv,
>>> + enum intel_memory_type mem_type,
>>> u64 *size_p,
>>> u32 *handle_p)
>>> {
>>> @@ -188,7 +190,11 @@ i915_gem_create(struct drm_file *file,
>>> return -EINVAL;
>>>
>>> /* Allocate the new object */
>>> - obj = i915_gem_object_create_shmem(dev_priv, size);
>>> + if (mem_type == INTEL_MEMORY_LOCAL)
>>> + obj = i915_gem_object_create_lmem(dev_priv, size, 0);
>>> + else
>>> + obj = i915_gem_object_create_shmem(dev_priv, size);
>>
>> Have you not talked Matthew into creating a
>> i915_gem_object_create_region(?dev_priv?,
>> intel_memory_region_lookup(dev_priv, mem_type),
>> size, flags)
> Sounds a good idea to skip a wrapper function.
>
> Matt, Is that ok with you?
Sure.
>
> -Ram
>> yet?
>> -Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-11-06 12:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 11:30 [PATCH v3] drm/i915: Create dumb buffer from LMEM Ramalingam C
2019-11-05 11:30 ` [Intel-gfx] " Ramalingam C
2019-11-05 11:47 ` Chris Wilson
2019-11-05 11:47 ` [Intel-gfx] " Chris Wilson
2019-11-06 11:42 ` Ramalingam C
2019-11-06 11:42 ` [Intel-gfx] " Ramalingam C
2019-11-06 12:12 ` Matthew Auld [this message]
2019-11-06 12:12 ` Matthew Auld
2019-11-05 14:59 ` ✓ Fi.CI.BAT: success for drm/i915: Create dumb buffer from LMEM (rev3) Patchwork
2019-11-05 14:59 ` [Intel-gfx] " Patchwork
2019-11-06 5:13 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-11-06 5:13 ` [Intel-gfx] " Patchwork
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=2e19dad8-792c-6ac9-87f9-fbc8c6cdaf18@intel.com \
--to=matthew.auld@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ramalingam.c@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox